Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

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

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

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

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:
    ...
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading