Skip to content

Commit f2dd317

Browse files
committed
Expand cellsnp-lite to export cell-level genotypes
1 parent bb1221b commit f2dd317

File tree

1 file changed

+22
-2
lines changed

1 file changed

+22
-2
lines changed

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

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public VireoHandler()
4242
}}, null),
4343
ToolParameterDescriptor.create("maxDepth", "Max Depth", "At a position, read maximally INT reads per input file, to avoid excessive memory usage", "ldk-integerfield", new JSONObject(){{
4444
put("minValue", 0);
45-
}}, 50000),
45+
}}, null),
4646
ToolParameterDescriptor.create("contigs", "Allowable Contigs", "A comma-separated list of contig names to use", "textfield", new JSONObject(){{
4747

4848
}}, "1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20"),
@@ -52,7 +52,8 @@ public VireoHandler()
5252
put("category", "VCF File");
5353
put("performGenomeFilter", false);
5454
put("doNotIncludeInTemplates", true);
55-
}}, null)
55+
}}, null),
56+
ToolParameterDescriptor.create("storeCellSnpVcf", "Store CellSnp-Lite VCF", "If checked, the cellsnp donor calls VCF will be stored as an output file", "checkbox", null, false)
5657
));
5758
}
5859

@@ -162,6 +163,7 @@ public void processFilesRemote(List<SequenceOutputFile> inputFiles, JobContext c
162163
cellsnp.add(bam.getPath());
163164
cellsnp.add("-b");
164165
cellsnp.add(barcodes.getPath());
166+
cellsnp.add("--genotype");
165167

166168
File cellsnpDir = new File(ctx.getWorkingDirectory(), "cellsnp");
167169
if (cellsnpDir.exists())
@@ -279,6 +281,24 @@ else if (outFiles.length > 1)
279281
}
280282
so.setCategory("Vireo Demultiplexing");
281283
ctx.addSequenceOutput(so);
284+
285+
if (ctx.getParams().optBoolean("storeCellSnpVcf", false))
286+
{
287+
so = new SequenceOutputFile();
288+
so.setReadset(inputFiles.get(0).getReadset());
289+
so.setLibrary_id(inputFiles.get(0).getLibrary_id());
290+
so.setFile(outFiles[0]);
291+
if (so.getReadset() != null)
292+
{
293+
so.setName(ctx.getSequenceSupport().getCachedReadset(so.getReadset()).getName() + ": Cellsnp-lite VCF");
294+
}
295+
else
296+
{
297+
so.setName(inputFiles.get(0).getName() + ": Cellsnp-lite VCF");
298+
}
299+
so.setCategory("VCF File");
300+
ctx.addSequenceOutput(so);
301+
}
282302
}
283303
}
284304
}

0 commit comments

Comments
 (0)