File tree Expand file tree Collapse file tree 4 files changed +41
-102
lines changed Expand file tree Collapse file tree 4 files changed +41
-102
lines changed Original file line number Diff line number Diff line change @@ -8,10 +8,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
8
8
9
9
## [ 0.5.x] -2023-xx-xx (unreleased)
10
10
11
+
11
12
### Features
12
13
13
14
- NMD information (e.g., escape rule,...) is now also calculated for all variants
14
15
16
+ ## [ 0.3.4] - 2025-04-04
17
+
18
+ ### Fix
19
+
20
+ - Moved script for preparing hla input to workflow/scripts/genotyping
21
+ - Added missing pipe to log file in rule hlatyping_mhcII
22
+ - Added wrong input file to filtering of mhcII reads on SE
23
+
15
24
## [ 0.3.3] - 2025-04-02
16
25
17
26
### Fix
Original file line number Diff line number Diff line change @@ -255,6 +255,17 @@ def get_all_mhcI_alleles(wildcards):
255
255
256
256
257
257
##### MHC CLASS II #####
258
+ def get_input_filter_reads_mhcII_SE (wildcards ):
259
+ if config ["preproc" ]["activate" ]:
260
+ return expand ("results/{sample}/{seqtype}/reads/{group}_preproc.fq.gz" ,
261
+ sample = wildcards .sample ,
262
+ seqtype = "dnaseq" if wildcards .nartype == "DNA" else "rnaseq" ,
263
+ group = wildcards .group )
264
+ else :
265
+ seqtype = "dnaseq" if wildcards .nartype == "DNA" else "rnaseq"
266
+ return config ["data" ][f"{ seqtype } " ][wildcards .group ]
267
+
268
+
258
269
def get_input_filter_reads_mhcII_PE (wildcards ):
259
270
seqtype = "dnaseq" if wildcards .nartype == "DNA" else "rnaseq"
260
271
""" if the reads are in BAM format, we consider them as processed and forward
@@ -269,6 +280,7 @@ def get_input_filter_reads_mhcII_PE(wildcards):
269
280
if config ["preproc" ]["activate" ]:
270
281
return expand ("results/{sample}/{seqtype}/reads/{group}_{readpair}_preproc.fq.gz" ,
271
282
sample = wildcards .sample ,
283
+ seqtype = "dnaseq" if wildcards .nartype == "DNA" else "rnaseq" ,
272
284
group = wildcards .group ,
273
285
readpair = ["R1" , "R2" ]
274
286
)
Original file line number Diff line number Diff line change 1
1
######### MHC-II HLA GENOTYPING ###########
2
2
rule filter_reads_mhcII_SE :
3
3
input :
4
- sample = [ "results/{sample}/hla/reads/{group}_{nartype}_SE.fq" ],
4
+ sample = get_input_filter_reads_mhcII_SE ,
5
5
idx = multiext (
6
6
"resources/hla/bowtie2_index" ,
7
7
".1.bt2" ,
@@ -72,12 +72,29 @@ rule finalize_reads_mhcII:
72
72
threads : 1
73
73
shell :
74
74
"""
75
- python workflow/scripts/finalize_mhcII_input.py \
75
+ python workflow/scripts/genotyping/ finalize_mhcII_input.py \
76
76
{input} \
77
77
{output.fwd} \
78
78
{output.rev}
79
79
"""
80
80
81
+ rule readcounts_mhcII :
82
+ input :
83
+ fwd = "results/{sample}/hla/mhc-II/reads/{group}_{nartype}_final_R1.fq" ,
84
+ rev = "results/{sample}/hla/mhc-II/reads/{group}_{nartype}_final_R2.fq"
85
+ output :
86
+ "results/{sample}/hla/mhc-II/reads/{group}_{nartype}_final_counts.txt"
87
+ log :
88
+ "logs/{sample}/genotyping/final_readcounts_mhcII_{group}_{nartype}.log"
89
+ conda :
90
+ "../envs/basic.yml"
91
+ threads : 1
92
+ shell :
93
+ """
94
+ python workflow/scripts/countreads.py \
95
+ {input.fwd} {output} > {log} 2>&1 | exit 0
96
+ """
97
+
81
98
82
99
rule hlatyping_mhcII :
83
100
input :
@@ -104,7 +121,7 @@ rule hlatyping_mhcII:
104
121
{input.fwd} {input.rev} \
105
122
{params.split} {params.dic} \
106
123
{wildcards.group}_{wildcards.nartype} \
107
- results/{wildcards.sample}/hla/mhc-II/genotyping/
124
+ results/{wildcards.sample}/hla/mhc-II/genotyping/ > {log} 2>&1
108
125
"""
109
126
110
127
rule merge_predicted_mhcII_allels :
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments