RobertsLab / resources

https://robertslab.github.io/resources/
19 stars 11 forks source link

running BLAST on Raven -- invalid syntax error #1772

Closed grace-ac closed 10 months ago

grace-ac commented 10 months ago

will keep working to figure out- posting issue in case anyone has quick answer

link to Rmd that I am running on raven: https://github.com/grace-ac/project-pycno-sizeclass-2022/blob/main/code/10-BLAST-summ22-phelgenome_raven.Rmd

error:

Error: Too many positional arguments (1), the offending value: \
Error:  (CArgException::eSynopsis) Too many positional arguments (1), the offending value: \
  File "<string>", line 1
    -query augustus.hints.codingseq \
                  ^
SyntaxError: invalid syntax
  File "<string>", line 1
    -db ../analyses/10-BLAST/blast/uniprot_sprot_r2021_03 \
         ^
SyntaxError: invalid syntax
  File "<string>", line 1
    -out ../analyses/10-BLAST/summer2022-uniprot_blastx.tab \
          ^
SyntaxError: invalid syntax
  File "<string>", line 1
    -evalue 1E-20 \
                ^
SyntaxError: invalid syntax
  File "<string>", line 1
    -num_threads 8 \
                 ^
SyntaxError: invalid syntax
  File "<string>", line 1
    -max_target_seqs 1 \
                     ^
SyntaxError: invalid syntax
  File "<string>", line 1
    -outfmt 6
            ^
SyntaxError: invalid syntax

Code chunk that's the problem:

!/home/shared/ncbi-blast-2.15.0+/bin/blastx \
-query augustus.hints.codingseq \
-db ../analyses/10-BLAST/blast/uniprot_sprot_r2021_03 \
-out ../analyses/10-BLAST/summer2022-uniprot_blastx.tab \
-evalue 1E-20 \
-num_threads 8 \
-max_target_seqs 1 \
-outfmt 6
sr320 commented 10 months ago

Remove "!" That is leftover from Jupyter notebooks.

grace-ac commented 10 months ago

oh i should be running a bash chunk rather than jupyter?

kubu4 commented 10 months ago

Yes.

Jupyter Notebooks are the "equivalent" of RStudio, except Jupyter Notebooks run cells (i.e. chunks) in Python by default.

Rstudio runs chunks in R by default.

Jupyter allows you to run Bash by using the ! shortcut. It's the same as starting the Jupyter cell with %bash - it's just a shortcut.

sr320 commented 10 months ago

See also updated example using R.. https://robertslab.github.io/tusk/modules/04-blast.html

grace-ac commented 10 months ago

thanks! yes i fixed it on Saturday and it ran! code (i'm cleaning up rmd now): https://github.com/grace-ac/project-pycno-sizeclass-2022/blob/main/code/10-BLAST-summ22-phelgenome_raven.Rmd

thank you both!