srst2
srst2 copied to clipboard
grep gene db syntax error
Hi,
I have this issue at the end of running srst2 using resistance gene database. Can anyone please let me know why this error occurs and how to resolve it?
sh: -c: line 0: syntax error near unexpected token (' sh: -c: line 0:
grep 69__mef(A)__mef(A)_3__1542 /testmount/efs/SharedData/Spn_Scripts_Reference-master/Spn_Reference_DB/ResFinder.fasta'
sh: -c: line 0: syntax error near unexpected token (' sh: -c: line 0:
grep 44__msr(D)__msr(D)_2__1944 /testmount/efs/SharedData/Spn_Scripts_Reference-master/Spn_Reference_DB/ResFinder.fasta'
sh: -c: line 0: syntax error near unexpected token (' sh: -c: line 0:
grep 70__mef(A)__mef(A)_10__1225 /testmount/efs/SharedData/Spn_Scripts_Reference-master/Spn_Reference_DB/ResFinder.fasta'
Thanks, ishwarya
Dear ishwarya,
this issue is pretty old, but maybe this is helpful for future users.
Your Fasta file probably contains '|' symbols in the fasta headers, e.g. ">MK268740.1|Bacillus cereus strain|"
As srst2 uses some bash logics the pipe symbol is interpreted as such and causes issues in a grep command.
Replace all non-alphanumeric letters in the fasta headers and srst2 should run better.