gradlab / lsarp_gwas

MIT License
1 stars 2 forks source link

Snakemake file #1

Closed sorenwacker closed 3 months ago

sorenwacker commented 3 years ago

Hi, there is this code in the Snakemake file:


rule all:
    input:
        "data/CLX/unitig_significance_annotated.txt",
        "data/CLX/unitigs_TCH1516_chromosome_position.txt",
        "data/CLX/manhattan_plot_TCH1516_chromosome.pdf"

It seems that should be more something like:

rule all:
    input:
        "data/{phenotype}/unitig_significance_annotated.txt",
        "data/{phenotype}/unitigs_TCH1516_chromosome_position.txt",
        "data/{phenotype}/manhattan_plot_TCH1516_chromosome.pdf"

but that did not run either.

It gave me :

Building DAG of jobs... WildcardError in line 28 of /home/swacker/workspace/lsarp_gwas/Snakefile: Wildcards in input files cannot be determined from output files: 'phenotype'

tatumdmortimer commented 3 years ago

You'll need to replace "CLX" with whatever the phenotype is that you are using.

So for example, if you've named the phenotype info "SCV":

rule all:
    input:
        "data/SCV/unitig_significance_annotated.txt",
        "data/SCV/unitigs_TCH1516_chromosome_position.txt",
        "data/SCV/manhattan_plot_TCH1516_chromosome.pdf"

Snakemake uses the file names in rule all and propagates the wildcard throughout the rest of the rules.

Does that make sense?

sorenwacker commented 3 years ago

Ok, that makes sense. I thought the script is automatically looking for all the different folders and creates the jobs for each phenotype .