Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/user-interface/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
带有configfile的星形snakemake包装器_Snakemake - Fatal编程技术网

带有configfile的星形snakemake包装器

带有configfile的星形snakemake包装器,snakemake,Snakemake,我试图使用snakemake的星形包装器(如上所述),但希望使用--sjdbGTFfile标志为注释文件提供一个选项。我的目标是通过引用configfile来指定gtf注释文件,但我似乎无法使其正常工作 我的配置文件的相关片段: annotations: ref_files/cal09_human/GRCh38.103_Cal09.gtf 相关规则如下所示: rule map_reads: message: """ Mapp

我试图使用snakemake的星形包装器(如上所述),但希望使用
--sjdbGTFfile
标志为注释文件提供一个选项。我的目标是通过引用configfile来指定gtf注释文件,但我似乎无法使其正常工作

我的配置文件的相关片段:

annotations: ref_files/cal09_human/GRCh38.103_Cal09.gtf
相关规则如下所示:

rule map_reads:
    message:
        """
        Mapping trimmed reads from {wildcards.sample} to host genome
        """
    input:
        fq1 = "tmp/{sample}_R1_trimmed.fastq.gz",
        fq2 = "tmp/{sample}_R2_trimmed.fastq.gz"
    params:
        index= config["genome_index"],
        extra="--sjdbGTFfile {config[annotations]} \
            --sjdbOverhang 149 \
            --outFilterType BySJout \
            --outFilterMultimapNmax 10 \
            --alignSJoverhangMin 5 \
            --alignSJDBoverhangMin 1 \
            --outFilterMismatchNmax 999 \
            --outFilterMismatchNoverReadLmax 0.04 \
            --alignIntronMin 20 \
            --alignIntronMax 1000000 \
            --alignMatesGapMax 1000000 \
            --outFilterIntronMotifs RemoveNoncanonicalUnannotated \
            --outSAMtype BAM SortedByCoordinate \
            --runMode alignReads"
    output:
        "star_mapping/{sample}_Aligned.sortedByCoord.out.bam"
    log:
        "logs/star/{sample}.log"
    threads: 20
    wrapper:
        "0.74.0/bio/star/align"
我将配置文件指定为shell命令(如所述),但它不起作用:

Jun 03 16:49:52 ..... started STAR run
Jun 03 16:49:52 ..... loading genome
Jun 03 16:50:32 ..... processing annotations GTF

FATAL error, could not open file pGe.sjdbGTFfile={config[annotations]}

Jun 03 16:50:32 ...... FATAL ERROR, exiting
我直接在终端上运行了以下程序,它运行得很好:

STAR --runThreadN 24 \
 --genomeDir ref_files/cal09_human_star_index \
 --sjdbGTFfile ref_files/cal09_human/GRCh38.103_Cal09.gtf \
 --sjdbOverhang 149 \
 --outFilterType BySJout \
 --outFilterMultimapNmax 10 \
 --alignSJoverhangMin 5 \
 --alignSJDBoverhangMin 1 \
 --outFilterMismatchNmax 999 \
 --outFilterMismatchNoverReadLmax 0.04 \
 --alignIntronMin 20 \
 --alignIntronMax 1000000 \
 --alignMatesGapMax 1000000 \
 --outFilterIntronMotifs RemoveNoncanonicalUnannotated \
 --outSAMtype BAM SortedByCoordinate \
 --runMode alignReads
我仔细检查了配置文件,没有犯任何明显的错误,比如在配置文件中错误指定文件路径。有人知道我要做的事的方法吗

extra="--sjdbGTFfile {config[annotations]} \
            --sjdbOverhang 149 ..."
似乎
{config[annotations]}
没有替换为字典值,而是按原样传递

如果您使用的是python 3.6+,请尝试使用(注意
f

或者,老式的:

extra= "--sjdbGTFfile %s \
            --sjdbOverhang 149 ..." % config[annotations]
似乎
{config[annotations]}
没有替换为字典值,而是按原样传递

如果您使用的是python 3.6+,请尝试使用(注意
f

或者,老式的:

extra= "--sjdbGTFfile %s \
            --sjdbOverhang 149 ..." % config[annotations]

或者您可以使用
格式
,如
extra=“--sjdbGTFfile{}…”格式(配置[注释])
或者您可以使用
格式
,如
extra=“--sjdbGTFfile{}…”格式(配置[注释])