Skip to content

Commit

Permalink
Support maxDEPTH for cellsnp-lite
Browse files Browse the repository at this point in the history
  • Loading branch information
bbimber committed Mar 21, 2024
1 parent 1653f87 commit 5a55965
Showing 1 changed file with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ public VireoHandler()
ToolParameterDescriptor.create("nDonors", "# Donors", "The number of donors to demultiplex", "ldk-integerfield", new JSONObject(){{
put("allowBlank", false);
}}, null),
ToolParameterDescriptor.create("maxDepth", "Max Depth", "At a position, read maximally INT reads per input file, to avoid excessive memory usage", "ldk-integerfield", new JSONObject(){{
put("minValue", 0);
}}, null),
ToolParameterDescriptor.create("contigs", "Allowable Contigs", "A comma-separated list of contig names to use", "textfield", new JSONObject(){{

}}, "1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20")
Expand Down Expand Up @@ -72,7 +75,7 @@ public SequenceOutputProcessor getProcessor()
return new Processor();
}

public class Processor implements SequenceOutputProcessor
public static class Processor implements SequenceOutputProcessor
{
@Override
public void init(JobContext ctx, List<SequenceOutputFile> inputFiles, List<RecordedAction> actions, List<SequenceOutputFile> outputsToCreate) throws UnsupportedOperationException, PipelineJobException
Expand Down Expand Up @@ -178,6 +181,13 @@ public void processFilesRemote(List<SequenceOutputFile> inputFiles, JobContext c
cellsnp.add("--minCOUNT");
cellsnp.add("100");

String maxDepth = StringUtils.trimToNull(ctx.getParams().optString("maxDepth"));
if (maxDepth != null)
{
cellsnp.add("--maxDEPTH");
cellsnp.add(maxDepth);
}

cellsnp.add("--gzip");

ReferenceGenome genome = ctx.getSequenceSupport().getCachedGenome(inputFiles.get(0).getLibrary_id());
Expand Down

0 comments on commit 5a55965

Please sign in to comment.