File tree Expand file tree Collapse file tree 2 files changed +24
-0
lines changed
Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -187,6 +187,18 @@ rule extract_vcf_fields:
187187 'SnpSift extractFields -s {params.sep:q} {input.vcf:q} {params.extract_columns} >{output.tsv:q} 2>{log:q}'
188188
189189
190+ rule format_vcf_fields_longer :
191+ conda : "../envs/renv.yaml"
192+ params :
193+ sep = ","
194+ input :
195+ tsv = OUTDIR / f"{ OUTPUT_NAME } .vcf_fields.tsv"
196+ output :
197+ tsv = OUTDIR / f"{ OUTPUT_NAME } .vcf_fields.longer.tsv"
198+ script :
199+ "../scripts/format_vcf_fields_longer.R"
200+
201+
190202rule vcf_to_tsv :
191203 threads : 1
192204 conda : "../envs/renv.yaml"
Original file line number Diff line number Diff line change 1+ # !/usr/bin/env Rscript
2+
3+ # Write stdout and stderr to log file
4+ log <- file(snakemake @ log [[1 ]], open = " wt" )
5+ sink(log , type = " message" )
6+ sink(log , type = " output" )
7+
8+ library(tidyverse )
9+
10+ read_tsv(snakemake @ input $ tsv ) %> %
11+ separate_rows(contains(" [*]" ), sep = snakemake @ params $ sep ) %> %
12+ write_tsv(snakemake @ output $ tsv )
You can’t perform that action at this time.
0 commit comments