[Biopython] SeqIO.convert

Peter biopython at maubp.freeserve.co.uk
Sun Nov 15 14:55:48 UTC 2009


On Sun, Nov 15, 2009 at 2:38 PM, Brad Chapman <chapmanb at 50mail.com> wrote:
> Hello;
>
>> I have to convert fastq to fasta and to trim the sequence. I have found
>> SeqIO.convert:
>>
>> from Bio import SeqIO
>> count = SeqIO.convert("a.fastq", "fastq", "a.fasta", "fasta")
>>
>> But I do not know how can I trim the sequence.
>
> SeqIO.convert is a format converter only, but you can use it along
> with other Biopython modules to trim adaptors. ...

It all depends on what you mean by "trim" the sequence. In addition
to Brad's examples, there are some simpler ones in the Tutorial:
http://biopython.org/DIST/docs/tutorial/Tutorial.html#sec:FASTQ-slicing-off-primer
http://biopython.org/DIST/docs/tutorial/Tutorial.html#sec:FASTQ-slicing-off-adaptor

Peter



More information about the Biopython mailing list