[Bioperl-l] sequence upgrading

Hilmar Lapp hlapp at gmx.net
Fri Jun 27 14:43:00 EDT 2003


On Thursday, June 26, 2003, at 07:43  PM, Marc Logghe wrote:

> 2) 'upgrading'
> use Bio::SeqIO;
> use Bio::Seq::RichSeq;
> my $fasta_io = Bio::SeqIO->new;
>
> while (my $seq1 = $fasta_io->next_seq)
> {
>    my $seq2 = Bio::Seq::RichSeq->copy($seq1) # $seq2 is enriched fasta 
> seq
> object
>
>    # do some stuff with $seq2
> }
>
> Correct ?
>

Yes more or less. I'd just use different namings:

Deep copy:

	Bio::Seq::clone (this would mostly call Storable::dclone())

Copy constructor with possible 'upgrade':

	$seq2 = Bio::Seq->new(-seqobject => $seq1);

-hilmar

-- 
-------------------------------------------------------------
Hilmar Lapp                            email: lapp at gnf.org
GNF, San Diego, Ca. 92121              phone: +1-858-812-1757
-------------------------------------------------------------



More information about the Bioperl-l mailing list