[Bioperl-guts-l] Create is own mRNA Feature
Ewan Birney
birney at ebi.ac.uk
Mon Feb 10 08:59:55 EST 2003
On Mon, 10 Feb 2003 Frederic.Fleche at aventis.com wrote:
> Hi Bioperl World,
>
>
> First of all, many thanks for developing very useful biological oriented
> tools.
> I am a newbie in Bioperl and I would like to know what is the way to add his
> own mRNA feature to an embl file which looks like this :
>
> FT mRNA join(1001..1062,1768..1945,7968..8051,8376..8051,
> FT 11711..11804,11895..12037,13172..13421,
> FT 14062..14157,14933..15111,15908..15990,
> FT 20244..20393,24155..25871)
> FT /label="CYP26"
>
>
>
> In fact I know that if I want to add exons features to an embl file which
> look like these :
>
> FT exon 1001..1062
> FT /label="exon 1"
> FT exon 1768..1945
> FT /label="exon 2"
>
> I have to use code like the following :
>
> $feat = new Bio::SeqFeature::Generic ( -start => $exon_start,
> -end => $exon_end,
> -strand => 1,
> -primary => 'exon',
> -tag => { label => "exon $n" }
>
Build a location object and then use that rather than start/end to
intialise the location:
$loc = new Bio::Location::Split ();
$loc->add_sub_Location( new Bio::Location::Simple( -start => 1001, -end =>
1062, -strand => 1);
$loc->add_sub_Location( new Bio::Location::Simple( -start => 1768, -end =>
1945, -strand => 1);
...etc...
$feat = new Bio::SeqFeature::Generic( -primary -> 'mRNA', -location =>
$loc);
We should make the Bio::SeqFeature::Gene* classes work nicer so that this
is easier, but it doesn't work at the moment, and you have to build things
up by hand...
More information about the Bioperl-guts-l
mailing list