Snakemake error with blast
0
0
Entering edit mode
3.4 years ago
kamanovae ▴ 100

Hi!

I am trying to run the Blast with snakemake in different ways. Now the code looks like this:

rule blastn:
        input: nt=config["nt"], data1=config["out_LD"] + "contigs_coverage_more_10.fasta", data2=config["nt_folder"]
        output: output1=config["out_LD"] + "{sample}_noLD_spades_cov20.blast"
        shell: " blastn -query {input.data1} -db {input.data2}  -out {output.output1}"

I used to use a script that worked well, but now I need to rewrite it in snakemake

cd /storage1/db/ncbi/nt

    while read x
    do

    blastn -query /storage1/LD_proj/${x}/${x}_noLD_spades/contigs_coverage_more_20.fasta -db nt -out /storage1/LD_proj/${x}/${x}_noLD_spades_cov20.blast

    done<$1

The following error occurs:

BLAST Database error: No alias or index file found for nucleotide database [/storage1/db/ncbi/nt] in search path [/storage1/kaman/Ldec_all::]
[Thu Jul  8 13:05:38 2021]
Error in rule blastn:
    jobid: 34
    output: out_LD/SRR13510812_noLD_spades_cov20.blast
    shell:
         blastn -query out_LD/contigs_coverage_more_10.fasta -db /storage1/db/ncbi/nt  -out out_LD/SRR13510812_noLD_spades_cov20.blast
        (one of the commands exited with non-zero exit code; note that snakemake uses bash strict mode!)

I can't correctly use the cd command in the program Snakemake

Blast cd Snakemake • 819 views
ADD COMMENT
0
Entering edit mode

You need to verify that the /storage1/db/ncbi/nt truly contains the database. In your script, the db is located at directory /storage1/starchevskaya/db/ncbi/nt.

You need to pass the path to the database in the format [PATH TO THE DB DIR]/[DB NAME] for your script, this would almost certainly look like /storage1/starchevskaya/db/ncbi/nt/nt

ADD REPLY

Login before adding your answer.

Traffic: 2581 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