Skip to content

Commit 51d69ad

Browse files
committed
Allow user to specify chain when running cellranger vdj
1 parent e43c85f commit 51d69ad

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

singlecell/src/org/labkey/singlecell/run/CellRangerVDJWrapper.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ public CellRangerVDJWrapper(@Nullable Logger logger)
6969

7070
public static final String INNER_ENRICHMENT_PRIMERS = "innerEnrichmentPrimers";
7171
public static final String INCLUDE_GD = "includeGD";
72+
public static final String CHAIN = "chain";
7273

7374
public static class VDJProvider extends AbstractAlignmentStepProvider<AlignmentStep>
7475
{
@@ -90,6 +91,9 @@ public VDJProvider()
9091
put("height", 100);
9192
put("width", 400);
9293
}}, null),
94+
ToolParameterDescriptor.create(CHAIN, "Chain", "Force the analysis to be carried out for a particular chain type", "ldk-simplecombo", new JSONObject(){{
95+
put("storeValues", "TR;IG;auto");
96+
}}, "TR"),
9397
ToolParameterDescriptor.create(INCLUDE_GD, "Include G/D", "As a hack to get CellRanger 6 to include g/d (which it does not normally allow), they can be included in the reference, but marked as TRA/TRB. Alignment is performed with these values, and the result is converted in the final text file.", "checkbox", new JSONObject(){{
9498
put("checked", true);
9599
}}, true)
@@ -297,6 +301,12 @@ public AlignmentStep.IndexOutput createIndex(ReferenceGenome referenceGenome, Fi
297301
args.add("--seqs=" + getGenomeFasta().getPath());
298302
args.add("--genome=" + indexDir.getName());
299303

304+
String chain = getProvider().getParameterByName(CHAIN).extractValue(getPipelineCtx().getJob(), getProvider(), getStepIdx(), String.class);
305+
if (StringUtils.trimToNull(chain) != null)
306+
{
307+
args.add("--chain=" + chain);
308+
}
309+
300310
getWrapper().setWorkingDir(indexDir.getParentFile());
301311
getWrapper().execute(args);
302312

0 commit comments

Comments
 (0)