Skip to content
Snippets Groups Projects
Unverified Commit 67eb968f authored by s-mm's avatar s-mm Committed by GitHub
Browse files

Merge pull request #105 from Ensembl/bugfix/filechameleon_gtf_error

Bugfix/filechameleon gtf error
parents 534ca4a3 597f881a
No related branches found
No related tags found
No related merge requests found
...@@ -77,31 +77,6 @@ sub strand_conversion { ...@@ -77,31 +77,6 @@ sub strand_conversion {
########################################## ##########################################
=head2 create_record
Description: Serialize the record to it's native format, pieces may
need to be overridden by inherited types.
=cut
sub create_record {
my $self = shift;
my @values;
foreach my $field (@{$self->fields}) {
my $value;
if(defined($self->$field) && ref $self->$field eq 'HASH') {
$value = $self->combine_fields($self->$field, '; ', 1, ' ', '"');
} else {
$value = $self->$field || '.';
}
push @values, $value;
}
return $self->concatenate_fields(\@values) . "\n";
}
=head2 =head2
Description: Map to a GTF type strand (+/-) when accessing the strand value Description: Map to a GTF type strand (+/-) when accessing the strand value
......
...@@ -170,7 +170,9 @@ sub combine_fields { ...@@ -170,7 +170,9 @@ sub combine_fields {
push @values, ($inc_field ? "$field$separator" : '') . qq($valuequotes$v$valuequotes); push @values, ($inc_field ? "$field$separator" : '') . qq($valuequotes$v$valuequotes);
} }
} }
} else { } elsif (ref($values->{$field}) eq 'HASH'){
push @values, $self->combine_fields($values->{$field}, $order, $delimiter, $inc_field, $separator, $valuequotes, $multi_delimiter);
} else {
push @values, ($inc_field ? "$field$separator" : '') . $valuequotes . $values->{$field} . $valuequotes; push @values, ($inc_field ? "$field$separator" : '') . $valuequotes . $values->{$field} . $valuequotes;
} }
} }
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment