This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Seqtk Seq Unable To Convert A Fastq File To Fasta

Hi everyone, I downloaded Seqtk, gunzip it, then make, and finally cp seqtk /usr/local/bin. However, when running seqtk seq -A in.fq > out.fa, it gives empty out.fa. What's my problem you think? Thank you for your suggestions!!

Do you receive an error message?

If you did not receive any errors compiling, it may be an issue with your input file. Can you verify that the file is not empty and is correctly formatted?

The fastq file is correct. I have used sed -n '1~4s/^@/>/p;2~4p' in.fq > out.fa to do the job. I didn't reveive any error message from seqtk. Anyway, thx for reply.

perhaps include the first two records of your fastq file

HI Istvan, following are two records at the beginning of the fastq file, pls see if there are errors. THANKS!

@SRR063659.1 I331_2_FC30JJTAAXX:1:1:4:388 length=88
ATTGAAATAAATCAATATGTGAAANAAACTTTCACATAAAATTTCTTGAGCCAAAAGTTTTCAAATNTAACTTGAAAGTCCAAATTTC
+SRR063659.1 I331_2_FC30JJTAAXX:1:1:4:388 length=88
777777777777777777777777!7777744444111+111117575777277777777777777!777777744344111111111
@SRR063659.2 I331_2_FC30JJTAAXX:1:1:4:1068 length=88
TTTGTATTAAATTGGTCAAGGTTCNTTAAATATGCCAAAGTCAAGTCGCTAAGCTCGGGTACTCAGNTCAGTCGTGTAACCGCCACAA
+SRR063659.2 I331_2_FC30JJTAAXX:1:1:4:1068 length=88
777767777777776667677666!6676644444111111+11777772277757)55)4,77,,!41,,11,,&114,1&11,))1

Interestingly, when coping the first two records of the fastq file to a new file, and then run seqtk on this new fastq file, i got a correct fasta file. I don't know why the original fastq file doesn't work.

this sounds like a line ending problem of some sorts. UNIX style line endings vs Windows

i used two commands sed -n '1~4s/^@/>/p;2~4p' in.fq > out.fa and seqret -sequence in.fq -out out.fa to convert fastq file to fasta file. However the two commands generate different although similar sized files. Is it right? THANKS for any comments!

These two commands do produce different files. But when tail file -n 6 I found sed produced each sequence at one line, whereas seqret produced each sequence at two lines.

The two files are different, but contain the same number of seqeunces. Both are right.

0 answers

No answers yet.

Log in to answer this question.