小编jps*_*y19的帖子

如何防止snakemake从失败的作业中删除输出文件夹?

我有一个规则,它遍历文件会拉出 Fastq 文件路径并在 Fastq 文件上运行 trimGalore。但是,某些文件已损坏/被截断,因此 trimGalore 无法处理它们。它继续在剩余文件上运行,但整体规则失败并删除包含成功处理文件的输出文件夹。如何保留输出文件夹?

我尝试更改 shell 命令以忽略退出状态,但 snakemake 似乎set -euo pipefail在运行的 shell 元素中强制执行。

rule trimGalore:
    """
    This module takes in the temporary file created by parse sampleFile rule and determines if libraries are single end or paired end.
    The appropriate step for trimGalore is then ran and a summary of the runs is produced in summary_tg.txt
    """
    input:
        rules.parse_sampleFile.output[1]+"singleFile.txt", rules.parse_sampleFile.output[1]+"pairFile.txt"
    output:
        directory(projectDir+"/trimmed_reads/")
    log:
        projectDir+"/logs/"+stamp+"_trimGalore.log"
    params:
        p = trimGaloreParams
    shell:
        """
        (awk -F "," '{{print …
Run Code Online (Sandbox Code Playgroud)

snakemake

5
推荐指数
1
解决办法
788
查看次数

标签 统计

snakemake ×1