英文:
Target rules may not contain wildcards. Please specify concrete files or a rule without wildcards error
问题
我有一个类似的Snakemake脚本,当我运行它时,Snakemake报告以下错误:
目标规则不能包含通配符。请指定具体文件或没有通配符的规则。
我不确定出了什么问题,你可以帮助我吗?
英文:
I have a snakemake srcipt like
# minimal example
configfile: "../snakemake/config.yaml"
import os
rule generateInclude: 
    input: 
        archaic_inc=config['input']['archaic_include'], 
        modern_inc=config['input']['modern_include']
    output: 
        all_include='include_{reference_genome}.bed'
    params:     
        reference_genome='{reference_genome}'
    shell: 
        """
        if [ {params.reference_genome}=='hg19' ]; then
            bedtools intersect -a <(zcat {input.archaic_inc} | sed 's/^chr//') \
                -b <(zcat {input.modern_inc} | sed 's/^chr//') > {output.all_include}
        else
            bedtools intersect -a <(zcat {input.archaic_inc}) \
                -b <(zcat {input.modern_inc}) > {output.all_include}
        fi
        """
rule all: 
    input: 
        'include_hg19.bed'
When I run it, snakemake report
Target rules may not contain wildcards. Please specify concrete files or a rule without wildcards.
I am not sure whats wrong with it, could your please gave me some help
答案1
得分: 1
默认情况下,snakemake 使用第一个规则作为目标规则。将规则 all 移动到顶部后,您应该能够运行此文件:
rule all: 
    input: 
        'include_hg19.bed';
rule generateInclude:
    ...
英文:
By default snakemake uses the first rule as the target rule. By moving rule all to the top, you should be able to run this file:
rule all: 
    input: 
        'include_hg19.bed'
rule generateInclude:
    ...
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。


评论