Skip to content

Commit 741ace9

Browse files
committed
Add support for non-overlapping samples in SelectSamplesStep
1 parent 35eff13 commit 741ace9

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import htsjdk.samtools.util.Interval;
44
import org.labkey.api.pipeline.PipelineJobException;
55
import org.labkey.api.sequenceanalysis.pipeline.AbstractVariantProcessingStepProvider;
6+
import org.labkey.api.sequenceanalysis.pipeline.CommandLineParam;
67
import org.labkey.api.sequenceanalysis.pipeline.PipelineContext;
78
import org.labkey.api.sequenceanalysis.pipeline.PipelineStepProvider;
89
import org.labkey.api.sequenceanalysis.pipeline.ReferenceGenome;
@@ -41,7 +42,8 @@ public Provider()
4142
{
4243
super("SelectSamples", "Select Specific Samples", "GATK SelectVariants", "A VCF will be generated containing only the samples specified below.", Arrays.asList(
4344
ToolParameterDescriptor.create(SAMPLE_INCLUDE, "Select Sample(s) Include", "Only variants of the selected type(s) will be included", "sequenceanalysis-trimmingtextarea", null, null),
44-
ToolParameterDescriptor.create(SAMPLE_EXCLUDE, "Select Samples(s) To Exclude", "Variants of the selected type(s) will be excluded", "sequenceanalysis-trimmingtextarea", null, null)
45+
ToolParameterDescriptor.create(SAMPLE_EXCLUDE, "Select Samples(s) To Exclude", "Variants of the selected type(s) will be excluded", "sequenceanalysis-trimmingtextarea", null, null),
46+
ToolParameterDescriptor.createCommandLineParam(CommandLineParam.createSwitch("--allow-nonoverlapping-command-line-samples"), "allowNnonoverlappingSamples", "Allow non-overlapping Samples", "Normally the job will fail is samples are selected that do not exist in the VCF. If checked, this will be allowed.", "checkbox", null, null)
4547
), PageFlowUtil.set("/sequenceanalysis/field/TrimmingTextArea.js"), "https://software.broadinstitute.org/gatk/");
4648
}
4749

@@ -72,6 +74,8 @@ public Output processVariants(File inputVCF, File outputDirectory, ReferenceGeno
7274
});
7375
}
7476

77+
options.addAll(getClientCommandArgs());
78+
7579
File outputVcf = new File(outputDirectory, SequenceTaskHelper.getUnzippedBaseName(inputVCF) + ".selectSamples.vcf.gz");
7680
getWrapper().execute(genome.getWorkingFastaFile(), inputVCF, outputVcf, options);
7781
if (!outputVcf.exists())

0 commit comments

Comments
 (0)