|
84 | 84 | elif aligner == "bwa-mem2": |
85 | 85 | include: os.path.join(maindir, "shared", "rules", "bwa-mem2.snakefile") |
86 | 86 |
|
| 87 | +if "allelic-whatshap" in mode: |
| 88 | + include: os.path.join(maindir, "shared", "rules", "whatshap.snakefile") |
| 89 | + include: os.path.join(maindir, "shared", "rules", "deepTools_qc_allelic.snakefile") |
| 90 | + |
87 | 91 | ### conditional/optional rules ################################################# |
88 | 92 | ################################################################################ |
89 | 93 |
|
@@ -126,12 +130,6 @@ def run_deepTools_qc(): |
126 | 130 | file_list.append(expand("deepTools_qc/estimateReadFiltering/{sample}_filtering_estimation.txt",sample = samples)) |
127 | 131 | return (file_list) |
128 | 132 |
|
129 | | -def run_Qualimap(): |
130 | | - file_list = [] |
131 | | - if qualimap: |
132 | | - file_list += expand("Qualimap_qc/{sample}.filtered.bamqc_report.html", sample = samples) |
133 | | - file_list += expand("Qualimap_qc/{sample}.filtered.bamqc_results.txt", sample = samples) |
134 | | - return (file_list) |
135 | 133 | # allele specific |
136 | 134 | def make_nmasked_genome(): |
137 | 135 | if allele_mode == 'create_and_map': |
@@ -160,6 +158,21 @@ def run_allelesp_mapping(): |
160 | 158 | else: |
161 | 159 | return([]) |
162 | 160 |
|
| 161 | +def run_whatshap(): |
| 162 | + if "allelic-whatshap" in mode: |
| 163 | + allele_suffix = ['allele_flagged', 'genome1', 'genome2', 'unassigned'] |
| 164 | + file_list = [ |
| 165 | + expand("allelic_bams/{sample}.{suffix}.sorted.bam", sample = samples, |
| 166 | + suffix = allele_suffix), |
| 167 | + expand("allelic_bams/{sample}.{suffix}.sorted.bam.bai", sample = samples, |
| 168 | + suffix = allele_suffix), |
| 169 | + expand("bamCoverage/allele_specific/{sample}.{suffix}.seq_depth_norm.bw", sample = samples, |
| 170 | + suffix = ['genome1', 'genome2']) |
| 171 | + ] |
| 172 | + return(file_list) |
| 173 | + else: |
| 174 | + return([]) |
| 175 | + |
163 | 176 | ### execute before workflow starts ############################################# |
164 | 177 | ################################################################################ |
165 | 178 | onstart: |
@@ -196,9 +209,9 @@ rule all: |
196 | 209 | expand("bamCoverage/{sample}.filtered.seq_depth_norm.bw", sample = samples), |
197 | 210 | run_computeGCBias(GCBias), |
198 | 211 | run_deepTools_qc(), |
199 | | - run_Qualimap(), |
200 | 212 | make_nmasked_genome(), |
201 | 213 | run_allelesp_mapping(), |
| 214 | + run_whatshap(), |
202 | 215 | "multiQC/multiqc_report.html" |
203 | 216 |
|
204 | 217 | ### execute after workflow finished ############################################ |
|
0 commit comments