Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

grep gene db syntax error #92

Open
IshwaryaMullaiSelvapandian opened this issue Aug 28, 2017 · 1 comment
Open

grep gene db syntax error #92

IshwaryaMullaiSelvapandian opened this issue Aug 28, 2017 · 1 comment

Comments

@IshwaryaMullaiSelvapandian
Copy link

IshwaryaMullaiSelvapandian commented Aug 28, 2017

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

@oliverdrechsel
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants