[Bioperl-l] write_sequence

Josh Lauricha laurichj at bioinfo.ucr.edu
Mon May 9 12:55:18 EDT 2005


On Mon 05/09/05 18:47, Ferdinand Marl?taz wrote:
> Sorry if my question is stupid !!!
> 
> I start programming using bioperl and I've a little problem with the
> function write_sequence. In fact I'd like to add sequence to
> pre-existing files  in a loop and I was convinced that re-do a
> write_seq on a already written file would only add the interest
> lines... But it's not the case and  it overwrites my previous files.
> What could be the solution to this problem ???

Use:
    my $in = new Bio::SeqIO( -filename => ">>foo" ... )
rather than.
    my $in = new Bio::SeqIO( -filename => "foo" ... )

the ">>" will tell Perl to append to the file.

-- 

------------------------------------------------------
| Josh Lauricha            | Ford, you're turning    |
| laurichj at bioinfo.ucr.edu | into a penguin. Stop    |
| Bioinformatics, UCR      | it                      |
|----------------------------------------------------|
| OpenPG:                                            |
|  4E7D 0FC0 DB6C E91D 4D7B C7F3 9BE9 8740 E4DC 6184 |
|----------------------------------------------------|
| Geek Code: Version 3.12                            |
| GAT/CS$/IT$ d+ s-: a-->--- C++++$ UL++++$ P++ L++++|
| $E--- W+ N o? K? w--(---) O? M+(++) V? PS++ PE-(--)|
| Y+ PGP+++ t--- 5+++ X+ R tv DI++ D--- G++          |
| e++ h- r++ z?                                      |
|----------------------------------------------------|


More information about the Bioperl-l mailing list