[Biopython] replace header
    Dilara Ally 
    dilara.ally at gmail.com
       
    Wed May 30 03:54:13 UTC 2012
    
    
  
Thanks!  That worked. 
On May 29, 2012, at 8:44 PM, Lenna Peterson wrote:
> Hi Dilara,
> 
> Opening a file for append with 'a' allows successive writes to go to
> the end of the file.
> 
> Before the loop:
> 
>    out_handle = open("newsolid_1.fastq", 'a')
> 
> In the loop:
> 
>    SeqIO.write(newfastqrecord, out_handle, "fastq")
> 
> After the loop:
> 
>    out_handle.close()
> 
> 
> You may have to manually write newlines to the file but hopefully the
> fastq writer handles that properly.
> 
> Hope that helps,
> 
> Lenna
    
    
More information about the Biopython
mailing list