[Bioperl-l] seq object usage
Roy Chaudhuri
roy.chaudhuri at gmail.com
Tue Jun 12 13:54:55 UTC 2012
Bio::Seq's seq method just delegates to Bio::PrimarySeq:
http://doc.bioperl.org/releases/bioperl-current/bioperl-live/Bio/Seq.html#CODE2
So this should work:
$bio_seq_obj->seq($bio_seq_obj->seq.$some_addition_seq)
You're right about the memory thing though. Math, couldn't you just
print out a Fasta file directly rather than using BioPerl?
Cheers,
Roy.
On 12/06/2012 14:28, Frank Schwach wrote:
> 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
>
>
More information about the Bioperl-l
mailing list