SEQanswers

SEQanswers (http://seqanswers.com/forums/index.php)
-   Bioinformatics (http://seqanswers.com/forums/forumdisplay.php?f=18)
-   -   fastq to fasta conversion (http://seqanswers.com/forums/showthread.php?t=5465)

kwtennis311 06-10-2010 11:39 AM

fastq to fasta conversion
 
How can I convert my fastq files to two fasta files with one containing the reads and another containing the quality scores?

Thanks :confused:

Bio.X2Y 06-10-2010 12:06 PM

You could use awk to create a simple fasta file from your fastq, e.g.

awk 'NR % 4 == 1 {print ">" $0 } NR % 4 == 2 {print $0}' my.fastq > my.fasta

However, I don't think it makes any sense to create a fasta file "containing the quality scores". Fasta files are used to represent sequences.

sklages 06-10-2010 12:55 PM

Quote:

Originally Posted by Bio.X2Y (Post 19995)
However, I don't think it makes any sense to create a fasta file "containing the quality scores". Fasta files are used to represent sequences.

... and their corresponding qualities ..

mySeq.fasta :
>mySeq
ACGTACGT

mySeq.fasta.qual:
>mySeq
22 22 33 33 22 22 33 44

There are still some programs which need to be fed with fasta/qual :-)

Anyway, qualities need to be converted to phred-stye ..

Bio.X2Y 06-10-2010 01:30 PM

Thanks sklages! I wasn't aware of qual files.

kwtennis311, there seem to be some existing posts on this, you might find answers in this, e.g. http://seqanswers.com/forums/showthread.php?t=3730.

kwtennis311 06-11-2010 11:06 AM

thanks
 
thanks guys, Biopython did the trick


All times are GMT -8. The time now is 11:19 PM.

Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2020, vBulletin Solutions, Inc.