Skip to content

Commit

Permalink
The gff3 source for gene and transcript will be identical
Browse files Browse the repository at this point in the history
  • Loading branch information
cybersiddhu committed Apr 11, 2016
1 parent 13e9784 commit fa40c9f
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions lib/Modware/EventHandler/FeatureWriter/GFF3/Canonical/Dicty.pm
Expand Up @@ -59,16 +59,18 @@ sub write_transcript {
$output->print( gff3_format_feature($trans_hash) );
}
else {

#transcript is before gene because transcript source defines the source of
#gene feature
my $trans_hash = $self->_dbrow2gff3hash( $dbrow, $event, $seq_id, $gene_id );
if ( !$self->has_gene_in_cache($gene_id) ) {
my $gene_hash = $self->_dbrow2gff3hash( $parent_dbrow, $event, $seq_id );
$gene_hash->{attributes}->{Alias} = $synonyms if $synonyms;
if ($gene_hash->{source} ne $trans_hash->{source}) {
$gene_hash->{source} = $trans_hash->{source};
}
$output->print( gff3_format_feature($gene_hash) );
$self->add_gene_in_cache( $gene_id, 1 );
}

#transcript
my $trans_hash = $self->_dbrow2gff3hash( $dbrow, $event, $seq_id, $gene_id );
$output->print( gff3_format_feature($trans_hash) );
}
}
Expand Down

1 comment on commit fa40c9f

@cybersiddhu
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.