Snakemake «Отсутствие файлов через X секунд» ошибка - PullRequest
0 голосов
/ 11 декабря 2019

Я получаю следующую ошибку каждый раз, когда пытаюсь запустить свой скрипт snakemake:

Building DAG of jobs...
Using shell: /usr/bin/bash
Provided cluster nodes: 99
Job counts:
        count   jobs
        1       all
        1       antiSMASH
        1       pear
        1       prodigal
        4

[Wed Dec 11 14:59:43 2019]
rule pear:
    input: Unmap_41_1.fastq, Unmap_41_2.fastq
    output: merged_reads/Unmap_41.fastq
    jobid: 3
    wildcards: sample=Unmap_41, extension=fastq

Submitted job 3 with external jobid 'Submitted batch job 4572437'.
Waiting at most 120 seconds for missing files.
MissingOutputException in line 14 of /faststorage/project/ABR/scripts/antismash.smk:
Missing files after 120 seconds:
merged_reads/Unmap_41.fastq
This might be due to filesystem latency. If that is the case, consider to increase the wait time with --latency-wait.
Job failed, going on with independent jobs.
Exiting because a job execution failed. Look above for error message

Может показаться, что первое правило не выполняется, но я не уверен, почему, из-за чего яможно увидеть весь синтаксис правильный. У кого-нибудь есть какой-нибудь совет?

Файл snakefile выглядит следующим образом:

#!/miniconda/bin/python

workdir: config["path_to_files"]
wildcard_constraints:
    separator = config["separator"],
    extension = config["file_extension"],
    sample = '|' .join(config["samples"])

rule all:
    input:
        expand("antismash-output/{sample}/{sample}.txt", sample = config["samples"])

# merging the paired end reads (either fasta or fastq) as prodigal only takes single end reads
rule pear:
    input:
        forward = f"{{sample}}{config['separator']}1.{{extension}}",
        reverse = f"{{sample}}{config['separator']}2.{{extension}}"

    output:
        "merged_reads/{sample}.{extension}"

    #conda:
        #"/home/lamma/env-export/antismash.yaml"

    run:
        shell("set +u")
        shell("source ~/miniconda3/etc/profile.d/conda.sh")
        shell("conda activate antismash")
        shell("pear -f {input.forward} -r {input.reverse} -o {output} -t 21")


# If single end then move them to merged_reads directory
rule move:
    input:
        "{sample}.{extension}"

    output:
        "merged_reads/{sample}.{extension}"

    shell:
        "cp {path}/{sample}.{extension} {path}/merged_reads/"

# Setting the rule order on the 3 above rules which should be treated equally and only one run.
ruleorder: pear > move
# annotating the metagenome with prodigal#. Can be done inside antiSMASH but prefer to do it out
rule prodigal:
    input:
        f"merged_reads/{{sample}}.{config['file_extension']}"

    output:
        gbk_files = "annotated_reads/{sample}.gbk",
        protein_files = "protein_reads/{sample}.faa"

    #conda:
        #"/home/lamma/env-export/antismash.yaml"

    run:
        shell("set +u")
        shell("source ~/miniconda3/etc/profile.d/conda.sh")
        shell("conda activate antismash")
        shell("prodigal -i {input} -o {output.gbk_files} -a {output.protein_files} -p meta")


# running antiSMASH on the annotated metagenome
rule antiSMASH:
    input:
        "annotated_reads/{sample}.gbk"

    output:
        touch("antismash-output/{sample}/{sample}.txt")

    #conda:
        #"/home/lamma/env-export/antismash.yaml"

    run:
        shell("set +u")
        shell("source ~/miniconda3/etc/profile.d/conda.sh")
        shell("conda activate antismash")
        shell("antismash --knownclusterblast --subclusterblast --full-hmmer --smcog --outputfolder antismash-output/{wildcards.sample}/ {input}")

В данный момент я запускаю конвейер только для одного файла, но файл yaml выглядит так, если его интересует:

file_extension: fastq
path_to_files: /home/lamma/ABR/Each_reads
samples:
- Unmap_41
separator: _

Я знаю, что ошибка может произойти, когда вы используете определенные флаги в snakemake, но я не верю, что использую эти флаги. Команда, запускаемая для запуска файла змеи:

snakemake --latency-wait 120 --rerun-incomplete --keep-going --jobs 99 --cluster-status 'python /home/lamma/ABR/scripts/slurm-status.py' --cluster 'sbatch  -t {cluster.time} --mem={cluster.mem} --cpus-per-task={cluster.c} --error={cluster.error}  --job-name={cluster.name} --output={cluster.output}' --cluster-config antismash-config.json --configfile yaml-config-files/antismash-on-rawMetagenome.yaml --snakefile antismash.smk

Я пытался установить -F-флаг для принудительного повторного запуска, но, похоже, это ничего не дает, как и увеличение числа --latency-wait. Любая помощь будет оценена:)

Я думаю, что это может быть связано с тем, как я вызываю среду conda в командах запуска, но использование опции conda: с файлами yaml возвращает версию не найденошибки.

...