|
Answer» To get all the FEATURES:
my @features = $seq->all_SeqFeatures(); To get all the features filtering on only those which have the primary tag (IE. feature type) exon. my @genes = grep { $_->primary_tag eq 'exon'} $seq->all_SeqFeatures(); To get all the features filtering on this which have the /NOTE tag and WITHIN the note field contain the requested string $noteval. my @f_with_note = grep { my @a = $_->has_tag('note') ? $_->each_tag_value('note') : (); grep { /$noteval/ } @a; } $seq->all_SeqFeatures(); To get all the features: my @features = $seq->all_SeqFeatures(); To get all the features filtering on only those which have the primary tag (ie. feature type) exon. my @genes = grep { $_->primary_tag eq 'exon'} $seq->all_SeqFeatures(); To get all the features filtering on this which have the /note tag and within the note field contain the requested string $noteval. my @f_with_note = grep { my @a = $_->has_tag('note') ? $_->each_tag_value('note') : (); grep { /$noteval/ } @a; } $seq->all_SeqFeatures();
|