Seqtk Seq Unable To Convert A Fastq File To Fasta
0
0
Entering edit mode
10.5 years ago
biolab ★ 1.4k

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!!

• 4.6k views
ADD COMMENT
1
Entering edit mode

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?

ADD REPLY
0
Entering edit mode

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.

ADD REPLY
1
Entering edit mode

perhaps include the first two records of your fastq file

ADD REPLY
0
Entering edit mode

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
ADD REPLY
0
Entering edit mode

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.

ADD REPLY
0
Entering edit mode

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

ADD REPLY
0
Entering edit mode

Do you receive an error message?

ADD REPLY
0
Entering edit mode

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!

ADD REPLY
0
Entering edit mode

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.

ADD REPLY
0
Entering edit mode

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

ADD REPLY

Login before adding your answer.

Traffic: 2898 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6