[Bioperl-l] Extracting a particular feature from a sequence
michael watson (IAH-C)
michael.watson at bbsrc.ac.uk
Thu May 19 11:40:58 EDT 2005
Hi Marc
:-) Yes I am using extractfeat, and maybe you can help - the information
I really need for this CDS is what STRAND it is on. As you will know,
extractfeat extracts the sequence in the direction that the feature
runs, so if it is on the -1 strand, the feature sequence runs in the
opposite direction to a feature on the +1 strand. I just need to know
*when* extractfeat has done that, but no matter how hard I look, I can't
find anywhere that extractfeat can put that information....?
Mick
-----Original Message-----
From: Marc Logghe [mailto:Marc.Logghe at devgen.com]
Sent: 19 May 2005 16:37
To: michael watson (IAH-C); bioperl-l at portal.open-bio.org
Subject: RE: [Bioperl-l] Extracting a particular feature from a sequence
Hi Michael,
I don't know what kind of information you need from the features but if
you are after the sequence I often use EMBOSS' extractfeat to do that.
The command looks like: extractfeat test.gb -type CDS -tag gene -value
STY2701 So you can specify the feature type, the tag name and value.
Besides the sequence, you can add more feature info (e.g. other tag
values) to the description line using the -describe option. Full docs at
http://emboss.sourceforge.net/apps/extractfeat.html
HTH,
ML
> -----Original Message-----
> From: bioperl-l-bounces at portal.open-bio.org
> [mailto:bioperl-l-bounces at portal.open-bio.org] On Behalf Of
> michael watson (IAH-C)
> Sent: Thursday, May 19, 2005 4:12 PM
> To: bioperl-l at portal.open-bio.org
> Subject: [Bioperl-l] Extracting a particular feature from a sequence
>
> Hi
>
> Sorry if this documentation exists, but if it does I haven't
> been able to find it.
>
> I want to find a feature with a particular tag=value pairing
> in a sequence file. The Feature and Annotation HOWTO
> suggests a combination of grep and get_SeqFeatures:
>
> my @cds_features = grep { $_->primary_tag eq 'CDS' }
> Bio::SeqIO->new(-file => $gb_file)->next_seq->get_SeqFeatures;
>
> However, if I want to examine a feature for a particular gene
> within a sequence containing an entire bacterial genome, the
> above code is somewhat cumbersome, having to iterate through
> all the features just to find one.
>
> Just wondering if there was a method I could use to extract
> just a single feature, something really nice like:
>
> $seq->get_SeqFeature(-primary_tag => 'CDS', -locus_tag => 'STY2701');
>
> Thanks
> Mick
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at portal.open-bio.org
> http://portal.open-bio.org/mailman/listinfo/bioperl-l
>
More information about the Bioperl-l
mailing list