[Bioperl-l] Bio::DB::Fasta::get_Seq_by_id()

Chris Fields cjfields at uiuc.edu
Tue Oct 31 18:53:16 UTC 2006




> -----Original Message-----
> From: bioperl-l-bounces at lists.open-bio.org 
> [mailto:bioperl-l-bounces at lists.open-bio.org] On Behalf Of Hilmar Lapp
> Sent: Tuesday, October 31, 2006 11:02 AM
> To: n.haigh at sheffield.ac.uk
> Cc: Bioperl-l at lists.open-bio.org
> Subject: Re: [Bioperl-l] Bio::DB::Fasta::get_Seq_by_id()
> 
> The only thing I would add to Jason's reply is that it is easy to do
> 
> 	if (! $seq->isa("Bio::SeqI")) {
> 		my $bioseq = Bio::Seq->new();
> 		$bioseq->primary_seq($seq);
> 		$seq = $bioseq;
> 	}
> 
> and from that point on all your objects are Bio::SeqI 
> compliant regardless of whether they were obtained that way or not.
> 
> Aside from that I wonder why there isn't a -primary_seq 
> option in Bio::Seq::new - this would shorten the above into a 
> (more perl'ish) single line:
> 
> 	$seq = Bio::Seq->new(-primary_seq=>$seq) unless 
> $seq->isa("Bio::SeqI");
> 
> Anyone takers to add that capability?
> 
> -hilmar

Sounds good to me!

Christopher Fields
Postdoctoral Researcher - Switzer Lab
Dept. of Biochemistry
University of Illinois Urbana-Champaign 

 




More information about the Bioperl-l mailing list