[Bioperl-l] subsection of genbank file

Roy Chaudhuri roy.chaudhuri at gmail.com
Fri Sep 18 10:43:29 UTC 2009


Hi Liam,

I just discovered your message, which has not yet been replied to. What 
you require has been discussed in a recent thread:
http://bioperl.org/pipermail/bioperl-l/2009-August/031071.html

Try using trunc_with_features from Bio::SeqUtils:

my $sub_seqobj=Bio::SeqUtils->trunc_with_features($seqobj, 300, 2000);
Cheers.
Roy.

Liam Elbourne wrote:
> Hi All,
> 
> Is there a method or methodology that will produce a fully fledged Seq  
> object with all the associated metadata given a start and end  
> position? To clarify, I create a sequence object from a genbank file:
> 
> 
> ****
> my $io  = Bio::Seqio->new(as per usual);
> 
> my $seqobj = $io->next_seq();
> ****
> I now want:
> 
> my $sub_seqobj = $seqobj between 300 and 2000
> 
> where $sub_seqobj is a Seq object (which I appreciate is an  
> 'aggregate' of objects) too. The "trunc" method only returns a  
> PrimarySeq object which lacks all the annotation etc. I've previously  
> done this task by iterating through feature by feature and parsing out  
> what I needed, but thought there might be a more elegant approach...
> 
> 
> Regards,
> Liam Elbourne.

-- 
Dr. Roy Chaudhuri
Department of Veterinary Medicine
University of Cambridge, U.K.



More information about the Bioperl-l mailing list