logo       
Google Custom Search
    AddThis Social Bookmark Button

RE: Generating multiple fasta files from an embl file: msg#00311

Subject: RE: Generating multiple fasta files from an embl file
Adam,

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@xxxxxxxxxxxxxxxxxxx
[mailto:bioperl-l-bounces@xxxxxxxxxxxxxxxxxxx]On Behalf Of Adam Witney
Sent: Thursday, June 26, 2003 10:01 AM
To: bioperl-l@xxxxxxxxxxxxxxxxxxx
Subject: [Bioperl-l] Generating multiple fasta files from an embl file

Hi,

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
elements)

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
here?

Thanks

Adam


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

_______________________________________________
Bioperl-l mailing list
Bioperl-l@xxxxxxxxxxxxxxxxxxx
http://portal.open-bio.org/mailman/listinfo/bioperl-l



Try Searching:
servers, voip, java, networking, microsoft ...
<Prev in Thread] Current Thread [Next in Thread>