[Bioperl-l] seq object usage

Frank Schwach fs5 at sanger.ac.uk
Tue Jun 12 13:28:30 UTC 2012


the Bio::Seq's "seq" method doesn't take an argument to set a new 
sequence, so I think you would have to do it like this:

$bio_seq_obj->primary_seq(
   Bio:PrimarySeq->new(
     -seq => $bio_seq_obj->seq .$some_addition_seq
   )
);

but it wouldn't save you any memory because you still have the whole 
sequence in memory.




On 12/06/12 11:27, math math wrote:
> Hi,
>
> consider the following case:
>
> A seq object's string field (ie the sequence part) needs to be filled
> gradually in a PERL loop. The seq object(s) can be hundreds of millions
> bases long at the end of this loop. The final goal is to write this seq
> object(s) to an output file (in multi-fasta format).
>
> My question is, how can one append progressively more sequence to a seq
> object (i.e. instead of all at once, to minimize memory), and make sure
> that these get written to a file.
>
> Thanks.
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioperl-l


-- 
 The Wellcome Trust Sanger Institute is operated by Genome Research 
 Limited, a charity registered in England with number 1021457 and a 
 company registered in England with number 2742969, whose registered 
 office is 215 Euston Road, London, NW1 2BE. 



More information about the Bioperl-l mailing list