[Bioperl-l] Generating multiple fasta files from an embl file

Brian Osborne brian_osborne at cognia.com
Thu Jun 26 13:05:07 EDT 2003


I'm not sure I understand the question exactly but it may be that you want
to examine the LocationI object, which you can get by:

$locobj = $feat->location

With that in hand you'll be able to iterate over each location using
each_Location(). You can select the Location object you want and attach it
to the Seq object in question. FAQ question 5.4 shows an example of
something like this.

Brian O.

-----Original Message-----
From: bioperl-l-bounces at portal.open-bio.org
[mailto:bioperl-l-bounces at portal.open-bio.org]On Behalf Of Adam Witney
Sent: Thursday, June 26, 2003 10:01 AM
To: bioperl-l at portal.open-bio.org
Subject: [Bioperl-l] Generating multiple fasta files from an embl file


I am passing an embl file and generating a multiple fasta file of the genes.
In the embl file there are entries like this

FT   CDS             complement(join(104291..105577,107535..108365))

The two joined pieces of DNA actually span two other genes (insertion

I am passing the file like so:

my $embl_obj = Bio::SeqIO->new('-file' => "$embl_file",
                              '-format' => 'embl');

while (my $seq = $embl_obj->next_seq())  # gets the genome sequence object
   my @features = $seq->all_SeqFeatures;

   foreach my $feat (@features)         # gets the genes
      if($feat->primary_tag eq 'CDS')
          my $seq_obj = $feat->seq;

          $seq = $seq_obj->seq;

However the $seq variable now contains the whole piece of DNA from
104291-108365 ie including the two insertion elements.

What I would like is to get the two joined fragments separately... Is there
a way to do this with bioperl? Or a better way of doing the whole process



This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

Bioperl-l mailing list
Bioperl-l at portal.open-bio.org

More information about the Bioperl-l mailing list