Skip to content

Commit e3bee00

Browse files
committed
Fix input VCF
1 parent 834a73f commit e3bee00

1 file changed

Lines changed: 20 additions & 20 deletions

File tree

workflow/rules/vaf.smk

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -137,26 +137,6 @@ rule tsv_to_vcf:
137137
"../scripts/tsv_to_vcf.py"
138138

139139

140-
rule extract_vcf_fields:
141-
threads: 1
142-
conda: "../envs/snpeff.yaml"
143-
params:
144-
extract_columns = [
145-
"CHROM", "REF", "POS", "ALT", "DP",
146-
'"GEN[*].ALT_DP"', '"GEN[*].ALT_RV"', '"GEN[*].ALT_FREQ"',
147-
'"GEN[*].ALT_QUAL"', '"ANN[*].GENE"', '"ANN[*].HGVS_P"'
148-
],
149-
sep = ","
150-
input:
151-
vcf = OUTDIR/f"{OUTPUT_NAME}.vcf"
152-
output:
153-
tsv = OUTDIR/f"{OUTPUT_NAME}.vcf_fields.tsv"
154-
log:
155-
LOGDIR / "tsv_to_vcf" / "log.txt"
156-
shell:
157-
'SnpSift extractFields -s {params.sep:q} {input.vcf:q} {params.extract_columns} >{output.tsv:q} 2>{log:q}'
158-
159-
160140
rule variants_effect:
161141
threads: 1
162142
shadow: "minimal"
@@ -187,6 +167,26 @@ rule variants_effect:
187167
"""
188168

189169

170+
rule extract_vcf_fields:
171+
threads: 1
172+
conda: "../envs/snpeff.yaml"
173+
params:
174+
extract_columns = [
175+
"CHROM", "POS", "REF", "ALT",
176+
'"ANN[*].IMPACT"', '"ANN[*].BIOTYPE"',
177+
'"ANN[*].GENE"', '"ANN[*].GENEID"', '"ANN[*].FEATURE"', '"ANN[*].HGVS_P"', '"ANN[*].HGVS_C"'
178+
],
179+
sep = ","
180+
input:
181+
vcf = OUTDIR/f"{OUTPUT_NAME}.annotated.vcf"
182+
output:
183+
tsv = OUTDIR/f"{OUTPUT_NAME}.vcf_fields.tsv"
184+
log:
185+
LOGDIR / "tsv_to_vcf" / "log.txt"
186+
shell:
187+
'SnpSift extractFields -s {params.sep:q} {input.vcf:q} {params.extract_columns} >{output.tsv:q} 2>{log:q}'
188+
189+
190190
rule vcf_to_tsv:
191191
threads: 1
192192
conda: "../envs/renv.yaml"

0 commit comments

Comments
 (0)