目标规则不能包含通配符。请指定具体的文件或不带通配符的规则。错误。

huangapple go评论80阅读模式
英文:

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:
    ...

huangapple
  • 本文由 发表于 2023年3月1日 11:03:36
  • 转载请务必保留本文链接:https://go.coder-hub.com/75599218.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定