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

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

Target rules may not contain wildcards. Please specify concrete files or a rule without wildcards error

问题

我有一个类似的Snakemake脚本,当我运行它时,Snakemake报告以下错误:

  1. 目标规则不能包含通配符。请指定具体文件或没有通配符的规则。

我不确定出了什么问题,你可以帮助我吗?

英文:

I have a snakemake srcipt like

  1. # minimal example
  2. configfile: "../snakemake/config.yaml"
  3. import os
  4. rule generateInclude:
  5. input:
  6. archaic_inc=config['input']['archaic_include'],
  7. modern_inc=config['input']['modern_include']
  8. output:
  9. all_include='include_{reference_genome}.bed'
  10. params:
  11. reference_genome='{reference_genome}'
  12. shell:
  13. """
  14. if [ {params.reference_genome}=='hg19' ]; then
  15. bedtools intersect -a <(zcat {input.archaic_inc} | sed 's/^chr//') \
  16. -b <(zcat {input.modern_inc} | sed 's/^chr//') > {output.all_include}
  17. else
  18. bedtools intersect -a <(zcat {input.archaic_inc}) \
  19. -b <(zcat {input.modern_inc}) > {output.all_include}
  20. fi
  21. """
  22. rule all:
  23. input:
  24. 'include_hg19.bed'

When I run it, snakemake report

  1. 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 移动到顶部后,您应该能够运行此文件:

  1. rule all:
  2. input:
  3. 'include_hg19.bed';
  4. rule generateInclude:
  5. ...
英文:

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:

  1. rule all:
  2. input:
  3. 'include_hg19.bed'
  4. rule generateInclude:
  5. ...

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:

确定