This is a test version of Biostars. For the public version, visit https://www.biostars.org.
seqtk illegal option --r, although -r is used in official examples

Hello, I am trying to get the reverse-complement of an entire fastq file (including symbols). I have used Galaxy for this, but it can be very slow. I came across lh3/seqtk, which advertised as being able to get the reverse complement sequence of a fastq file with the following example from the github docs:

seqtk seq -r in.fq > out.fq

However, when I run this (after successful instal/compile) I get the following message:

seq: illegal option -- r usage: seq [-w] [-f format] [-s string] [-t string] [first [incr]] last

This doesn't seem to match up with the documentation that came with seqtk. Anyone have any insights to why this might be, or could you provide another way of getting the reverse complement of a fastq file? Thanks, -Rob

seqtk reverse-complement fastq

1 answer

Edit:

turns out you are actually running the seq command on its own, not seqtk seq.


Works for me:

$ cat HBR_1_R1.fq | head -2
@HWI-ST718_146963544:7:2201:16660:89809/1
CAAAGAGAGAAAGAAAAGTCAATGATTTTATAGCCAGGCAAAATGACTTTCAAGTAAAAAATATAAAGCACCTTACAAACTAGTATCAAAATGCATTTCT

$ seqtk seq -r HBR_1_R1.fq | head -2
@HWI-ST718_146963544:7:2201:16660:89809/1
AGAAATGCATTTTGATACTAGTTTGTAAGGTGCTTTATATTTTTTACTTGAAAGTCATTTTGCCTGGCTATAAAATCATTGACTTTTCTTTCTCTCTTTG

Thank you very much for the response Istvan. Perhaps I don't have it installed correctly? When I am in Users/roblogan/seqtk and run the command I get the following: -bash: seqtk: command not found The contents of the directory are: LICENSE Makefile README.md khash.h kseq.h seqtk.c I have tried to follow the instructions, but is something readily obvious to you that I looked over? I appreciate your help. Thanks.

run it as ./seqkt or full path to the program /home/username/biostuff/seqtk/seqtk

I ran this command again:

cd seqtk; make

And then typed the original command in question using ./seqkt and it worked! Thanks so much for your help.

Log in to answer this question.