Skip to content

Commit 8d262ce

Browse files
committed
Support king-cutoff on Plink/PCA
1 parent 0f2f806 commit 8d262ce

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

SequenceAnalysis/src/org/labkey/sequenceanalysis/run/variant/PlinkPcaStep.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,10 @@ public Provider()
8080
put("valueField", "application");
8181
put("sortField", "application");
8282
}}, null),
83+
ToolParameterDescriptor.create("kingCutoff", "KING Cutoff", "Can be used to prune close relations, identified using KING", "ldk_numberfield", new JSONObject(){{
84+
put("minValue", 0);
85+
put("maxValue", 1);
86+
}}, 0.25),
8387
ToolParameterDescriptor.create("allowMissingSamples", "Allow Missing Samples", "When using split by application, this controls whether or not the job should fail if a matching readset cannot be found for specific samples.", "checkbox", null, false),
8488
ToolParameterDescriptor.create("fileSets", "File Set(s) For Readset Query", "If Split By Application is used, the system needs to query each sample name in the VCF and find the corresponding readset. If this is provided, this query will be limited to redsets where a gVCF exists and is tagged as one of these file sets", "sequenceanalysis-trimmingtextarea", null, null),
8589
ToolParameterDescriptor.create(SelectSamplesStep.SAMPLE_INCLUDE, "Sample(s) Include", "Only the following samples will be included in the analysis.", "sequenceanalysis-trimmingtextarea", null, null),
@@ -178,6 +182,13 @@ private void runBatch(File inputVCF, File outputDirectory, VariantProcessingStep
178182
String samplesToExclude = getProvider().getParameterByName(SelectSamplesStep.SAMPLE_EXCLUDE).extractValue(getPipelineCtx().getJob(), getProvider(), getStepIdx(), String.class);
179183
addSubjectSelectOptions(samplesToExclude, args, "--exclude", new File(outputDirectory, "samplesToExclude.txt"), output);
180184

185+
Double kingCutoff = getProvider().getParameterByName("kingCutoff").extractValue(getPipelineCtx().getJob(), getProvider(), getStepIdx(), Double.class);
186+
if (kingCutoff != null)
187+
{
188+
args.add("--king-cutoff");
189+
args.add(kingCutoff.toString());
190+
}
191+
181192
args.add("--vcf");
182193
args.add(inputVCF.getPath());
183194

0 commit comments

Comments
 (0)