Skip to content

Commit 896da55

Browse files
committed
Allow GenotypeGVCFHandler to leave a memory buffer for C layer
1 parent 40a6d51 commit 896da55

File tree

3 files changed

+14
-16
lines changed

3 files changed

+14
-16
lines changed

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

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -394,6 +394,20 @@ private File runGenotypeGVCFs(PipelineJob job, JobContext ctx, ProcessVariantsHa
394394
toolParams.add("--genomicsdb-shared-posixfs-optimizations");
395395
}
396396

397+
Integer maxRam = SequencePipelineService.get().getMaxRam();
398+
int nativeMemoryBuffer = ctx.getParams().optInt("variantCalling.GenotypeGVCFs.nativeMemoryBuffer", 0);
399+
if (maxRam != null && nativeMemoryBuffer > 0)
400+
{
401+
ctx.getLogger().info("Adjusting RAM based on memory buffer (" + nativeMemoryBuffer + ")");
402+
maxRam = maxRam - nativeMemoryBuffer;
403+
404+
if (maxRam < 1)
405+
{
406+
throw new PipelineJobException("After adjusting for nativeMemoryBuffer, maxRam is less than 1: " + maxRam);
407+
}
408+
wrapper.setMaxRamOverride(maxRam);
409+
}
410+
397411
wrapper.execute(genome.getWorkingFastaFile(), outputVcf, toolParams, inputVcf);
398412
try
399413
{

singlecell/src/org/labkey/singlecell/pipeline/singlecell/AppendSaturation.java

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -198,31 +198,16 @@ public String getFileSuffix()
198198

199199
private void findAdditionalData(SequenceOutputFile loupeFile, CSVWriter writer, PipelineJob job) throws IOException, PipelineJobException
200200
{
201-
Set<Integer> hashingReadsets = new HashSet<>();
202201
Set<Integer> citeReadsets = new HashSet<>();
203202
Container targetContainer = job.getContainer().isWorkbook() ? job.getContainer().getParent() : job.getContainer();
204203
TableSelector ts = new TableSelector(QueryService.get().getUserSchema(job.getUser(), targetContainer, SingleCellSchema.NAME).getTable(SingleCellSchema.TABLE_CDNAS), PageFlowUtil.set("hashingReadsetId", "citeseqReadsetId"), new SimpleFilter(FieldKey.fromString("readsetId"), loupeFile.getReadset()), null);
205204
ts.forEachResults(rs -> {
206-
if (rs.getObject(FieldKey.fromString("hashingReadsetId")) != null)
207-
{
208-
hashingReadsets.add(rs.getInt(FieldKey.fromString("hashingReadsetId")));
209-
}
210-
211205
if (rs.getObject(FieldKey.fromString("citeseqReadsetId")) != null)
212206
{
213207
citeReadsets.add(rs.getInt(FieldKey.fromString("citeseqReadsetId")));
214208
}
215209
});
216210

217-
if (hashingReadsets.size() > 1)
218-
{
219-
throw new PipelineJobException("More than one hashing readset associated with GEX readset: " + loupeFile.getReadset());
220-
}
221-
else if (hashingReadsets.size() == 1)
222-
{
223-
writeExtraData(loupeFile.getRowid(), hashingReadsets.iterator().next(), job, "Cell Hashing Counts", writer, "HTO");
224-
}
225-
226211
if (citeReadsets.size() > 1)
227212
{
228213
throw new PipelineJobException("More than one CITE-seq readset associated with GEX readset: " + loupeFile.getReadset());

singlecell/src/org/labkey/singlecell/pipeline/singlecell/MergeSeurat.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ public Provider()
3232
), null, null);
3333
}
3434

35-
3635
@Override
3736
public MergeSeurat create(PipelineContext ctx)
3837
{

0 commit comments

Comments
 (0)