Extractfeat options

Marc Logghe Marc.Logghe at devgen.com
Wed Apr 2 08:27:23 UTC 2003


Hi Burke,


> I have having a bit of trouble extracting just genes form a 
> Genbank file. I
> have tried the obviously options to no avail. I want to get 
> JUST the gene
> information but I always get gene and CDS as below. How do I do that?

you should set the -type arg to gene like this
extractfeat -filter -type gene test.gb | less

> 
> Additionally, can I get the gene name instead of the stuff below?
Don't know how to do this with EMBOSS, I'd use BioPerl for that:

#!/usr/bin/perl -w
use strict;
use Bio::SeqIO;


my $io = Bio::SeqIO->new(-format => 'genbank', -file => shift);

while (my $seq = $io->next_seq)
{
  foreach my $feat ($seq->get_SeqFeatures('gene'))
  {
     next unless ($feat->primary_tag =~ /gene/i);
     print $feat->each_tag_value('gene'), "\n";
  }
}

HTH,
Marc

***********************************************************
Marc Logghe, Ph.D.
Senior Scientist
Scientific Computing Group
deVGen
Technologiepark 9
9052 Zwijnaarde
Belgium
tel: +32 (0) 9 324 24 88
fax: +32 (0) 9 324 24 25
***********************************************************



More information about the EMBOSS mailing list