Commit 9fa11be3 authored by khalid's avatar khalid
Browse files

LD prunning option enhancements

parent c6bedf93
......@@ -7,9 +7,10 @@ rule <step_name>__vcf2gds:
gds = config["results_dir"] + "/" + config["<step_name>__vcf2gds_output_dir"] + "/" + <step_name>__vcf2gds_vcf_name + ".gds",
params:
output_dir = config["results_dir"] + "/" + config["<step_name>__vcf2gds_output_dir"]+ "/",
vcf2gds_min_maf = config["results_dir"] + "/" + config["<step_name>__vcf2gds_min_maf"],
vcf2gds_ld_threshold = config["results_dir"] + "/" + config["<step_name>__vcf2gds_ld_threshold"],
vcf2gds_ld_trim = config["results_dir"] + "/" + config["<step_name>__vcf2gds_ld_trim"],
vcf2gds_ld_trim = config["<step_name>__vcf2gds_ld_trim"] ,
vcf2gds_min_maf = config["<step_name>__vcf2gds_min_maf"] if (config["<step_name>__vcf2gds_ld_trim"] != "False") else "0",
vcf2gds_ld_threshold = config["<step_name>__vcf2gds_ld_threshold"] if (config["<step_name>__vcf2gds_ld_trim"] != "False") else "1",
command = config["<step_name>__vcf2gds_command"],
log:
......
library(SeqArray);
vcffile = snakemake@input[["vcffile"]]
gdsfile = snakemake@input[["gds"]]
ld.threshold = snakemake@params[["vcf2gds_ld_threshold"]]
maf = snakemake@params[["vcf2gds_min_maf"]]
vcffile = snakemake@input[["vcfFile"]]
gdsfile = snakemake@output[["gds"]]
ldprune = snakemake@params[["vcf2gds_ld_trim"]]
if (ldprune == FALSE)
......@@ -12,6 +11,8 @@ if (ldprune == FALSE)
seqVCF2GDS(vcffile, gdsfile, verbose=FALSE);
} else {
ld.threshold = snakemake@params[["vcf2gds_ld_threshold"]]
maf = snakemake@params[["vcf2gds_min_maf"]]
tmpgds = tempfile(pattern = "tmp", fileext = "gds")
seqVCF2GDS(vcffile, tmpgds, verbose=FALSE);
......
......@@ -18,16 +18,6 @@
inputs: [{ name: vcfFile, type: "vcfFile", description: "A vcf file to convert"} ],
outputs: [{ name: gds, type: "gds",file: "*.gds", description: "gds file" }],
options: [
{
name: "vcf2gds_threads",
prefix: "--threads",
value: 16,
min: 1,
max: 64,
step: 1,
label: "Threads to use",
type: "numeric",
},
{
name: vcf2gds_ld_trim,
prefix: ,
......@@ -39,7 +29,7 @@
name: vcf2gds_min_maf,
prefix: --min-maf,
type: numeric,
value: 0.05,
value: 0.00,
min: 0,
max: 0.5,
step: NA,
......@@ -49,11 +39,21 @@
name: vcf2gds_ld_threshold,
prefix: --ld-threshold,
type: numeric,
value: 0.05,
value: 1,
min: 0,
max: 0.5,
max: 1,
step: NA,
label: "skip SNPs with ld > to this threshold",
},
{
name: "vcf2gds_threads",
prefix: "--threads",
value: 16,
min: 1,
max: 64,
step: 1,
label: "Threads to use",
type: "numeric",
},
],
},
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment