Snakefile 2.04 KB
Newer Older
Philipp Spohr's avatar
Philipp Spohr committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
include: "scripts/shared.py"

from snakemake.utils import validate

#Validate configuration files

configfile: "config.yaml"
validate(config, "schemas/config.schema.yaml")


#Generate Input/Output Files from specified folder
inputIDs, = glob_wildcards('data/input/'+config['input_folder']+'/{id}'+config['input_read_1_ending'])
kmer_lengths = config['kmers']


#kmer_lengths = [24]

Jan Hoeckesfeld's avatar
Jan Hoeckesfeld committed
18
19
20
21
22
23
24
25
26
27
28
29
30
possible_params = {'generative_model': expand('data/output/'+config['input_folder']+'/kmers/{kmer}/predictions.probabilistic_gen.tsv',kmer=kmer_lengths),
'probabilistic_model': expand('data/output/'+config['input_folder']+'/kmers/{kmer}/predictions.probabilistic_cov.tsv',kmer=kmer_lengths),
# if above:
'plot_top3_fit': expand('data/output/'+config['input_folder']+'/kmers/{kmer}/{id}_top3fit.svg',kmer=kmer_lengths,id=inputIDs),
'distance_model': expand('data/output/'+config['input_folder']+'/kmers/{kmer}/predictions.euclidean.tsv',kmer=kmer_lengths),
'assembly_model': expand('data/output/'+config['input_folder']+'/{id}/exactMatches.tsv',id=inputIDs),
'calc_strand_bias': expand('data/output/'+config['input_folder']+'/{id}/strandbias.txt',id=inputIDs),
'mapping_diff_analysis': expand('data/output/'+config['input_folder']+'/methodAnalysis/{id}/mapping.comparison',id=inputIDs),
'map_filtered_reads': expand('data/output/'+config['input_folder']+'/methodAnalysis/{id}/alignmentToGroundTruthType.sorted.bam.bai',id=inputIDs),
'verifyUniqueness': expand('data/output/kmers/{kmer}/uniquenessTest.tsv',kmer=kmer_lengths),
'kmer_stats_analysis': expand('data/auxiliary/'+config['input_folder']+'/kmers/{kmer}/{id}/stats.tsv',kmer=kmer_lengths,id=inputIDs) + 
						expand('data/output/'+config['input_folder']+'/kmers/{kmer}/{id}/spaTypesGroundTruthVennDia.svg',kmer=kmer_lengths,id=inputIDs)
}
Philipp Spohr's avatar
Philipp Spohr committed
31
32
33

rule all:
	input:
Jan Hoeckesfeld's avatar
Jan Hoeckesfeld committed
34
		[possible_params[k] for k in possible_params.keys() if config[k]]
Philipp Spohr's avatar
Philipp Spohr committed
35
36
37


##### load rules #####
Jan Hoeckesfeld's avatar
Jan Hoeckesfeld committed
38
39
40
41
42
43
include: "rules/assembly.smk"
include: "rules/shared.smk"
include: "rules/kmerApproach.smk"
include: "rules/coverageBased.smk"
include: "rules/probabilistic.smk"
include: "rules/euclidean.smk"