Skip to content

Commit 8d06837

Browse files
committed
Add --memory arg to king/plink2
1 parent 1c8e519 commit 8d06837

File tree

3 files changed

+19
-1
lines changed

3 files changed

+19
-1
lines changed

SequenceAnalysis/src/org/labkey/sequenceanalysis/analysis/LiftoverHandler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ public void processFilesRemote(List<SequenceOutputFile> inputFiles, JobContext c
178178
boolean dropGenotypes = params.optBoolean("dropGenotypes", false);
179179
boolean useBcfTools = params.optBoolean("useBcfTools", false);
180180
boolean doNotRetainUnmapped = params.optBoolean("doNotRetainUnmapped", false);
181-
if (doNotRetainUnmapped && !useBcfTools)
181+
if (!doNotRetainUnmapped && !useBcfTools)
182182
{
183183
ctx.getLogger().debug("Picard LiftoverVcf requires an output file for rejected sites, so setting doNotRetainUnmapped to true");
184184
doNotRetainUnmapped = true;

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,15 @@ public Output processVariants(File inputVCF, File outputDirectory, ReferenceGeno
131131
plinkArgs.add(threads.toString());
132132
}
133133

134+
Integer maxRam = SequencePipelineService.get().getMaxRam();
135+
if (maxRam != null)
136+
{
137+
plinkArgs.add("--memory");
138+
139+
maxRam = maxRam * 1000;
140+
plinkArgs.add(String.valueOf(maxRam));
141+
}
142+
134143
List<String> plinkArgs1 = new ArrayList<>(plinkArgs);
135144
plinkArgs1.add("--make-bed");
136145

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,15 @@ private void runBatch(File inputVCF, File outputDirectory, VariantProcessingStep
218218
args.add(SequencePipelineService.get().getMaxThreads(getPipelineCtx().getLogger()).toString());
219219
}
220220

221+
Integer maxRam = SequencePipelineService.get().getMaxRam();
222+
if (maxRam != null)
223+
{
224+
args.add("--memory");
225+
226+
maxRam = maxRam * 1000;
227+
args.add(String.valueOf(maxRam));
228+
}
229+
221230
args.addAll(getClientCommandArgs());
222231

223232
getWrapper().execute(args);

0 commit comments

Comments
 (0)