Skip to content
Snippets Groups Projects
Commit 969ed975 authored by Graham McVicker's avatar Graham McVicker
Browse files

use display_id instead of primary id for xrefs

added mRNA to feature table
CDS is now actually CDS when there is UTR
pseudogenes dump as misc_RNA instead of as CDS
parent 660687e6
No related branches found
No related tags found
No related merge requests found
......@@ -620,22 +620,41 @@ sub _dump_feature_table {
foreach my $gene (@{$gene_slice->get_all_Genes}) {
foreach my $transcript (@{$gene->get_all_Transcripts}) {
my $translation = $transcript->translation;
$value = $self->features2location($transcript->get_all_Exons);
$self->write(@ff,'CDS', $value);
$self->write(@ff,'' , '/gene="'.$gene->stable_id().'"');
$translation &&
$self->write(@ff,'', '/protein_id="'.$translation->stable_id().'"');
$self->write(@ff,''
,'/note="transcript_id='.$transcript->stable_id().'"');
foreach my $dbl (@{$transcript->get_all_DBLinks}) {
$value = '/db_xref="'.$dbl->dbname().':'.$dbl->primary_id().'"';
$self->write(@ff, '', $value);
}
if($translation) {
# normal transcripts get dumped differently than pseudogenes
if($translation) {
#normal transcript
$value = $self->features2location($transcript->get_all_Exons);
$self->write(@ff, 'mRNA', $value);
$self->write(@ff,'' , '/gene="'.$gene->stable_id().'"');
# ...and a CDS section
$value =
$self->features2location($transcript->get_all_translateable_Exons);
$self->write(@ff,'CDS', $value);
$self->write(@ff,'' , '/gene="'.$gene->stable_id().'"');
$self->write(@ff,'', '/protein_id="'.$translation->stable_id().'"');
$self->write(@ff,''
,'/note="transcript_id='.$transcript->stable_id().'"');
foreach my $dbl (@{$transcript->get_all_DBLinks}) {
$value = '/db_xref="'.$dbl->dbname().':'.$dbl->display_id().'"';
$self->write(@ff, '', $value);
}
$value = '/translation="'.$transcript->translate()->seq().'"';
$self->write(@ff, '', $value);
}
} else {
#pseudogene
$value = $self->features2location($transcript->get_all_Exons);
$self->write(@ff, 'misc_RNA', $value);
$self->write(@ff,'' , '/gene="'.$gene->stable_id().'"');
foreach my $dbl (@{$transcript->get_all_DBLinks}) {
$value = '/db_xref="'.$dbl->dbname().':'.$dbl->primary_id().'"';
$self->write(@ff, '', $value);
}
$self->write(@ff,'' , '/note="pseudogene"');
}
}
}
......@@ -660,7 +679,7 @@ sub _dump_feature_table {
$self->write(@ff, 'mRNA', $self->features2location($exons));
$self->write(@ff, '', '/product="'.$transcript->translate()->seq().'"');
$self->write(@ff, '', '/note="Derived by automated computational' .
'analysis using gene prediction method:' .
' analysis using gene prediction method:' .
$transcript->analysis->logic_name . '"');
}
}
......
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