Skip to content

Commit 82797da

Browse files
committed
Bugfix to CellRangerVDJWrapper
1 parent b29dfe7 commit 82797da

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

singlecell/api-src/org/labkey/api/singlecell/CellHashingService.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ public static CellHashingService.CellHashingParameters createFromStep(SequenceOu
127127
ret.majorityConsensusThreshold = step.getProvider().getParameterByName("majorityConsensusThreshold").extractValue(ctx.getJob(), step.getProvider(), step.getStepIdx(), Double.class, null);
128128
ret.minAllowableDoubletRateFilter = step.getProvider().getParameterByName("minAllowableDoubletRateFilter").extractValue(ctx.getJob(), step.getProvider(), step.getStepIdx(), Double.class, null);
129129
ret.callerDisagreementThreshold = step.getProvider().getParameterByName("callerDisagreementThreshold").extractValue(ctx.getJob(), step.getProvider(), step.getStepIdx(), Double.class, null);
130-
ret.doTSNE = step.getProvider().getParameterByName("doTSNE").extractValue(ctx.getJob(), step.getProvider(), step.getStepIdx(), Boolean.class, null);
130+
ret.doTSNE = step.getProvider().getParameterByName("doTSNE").extractValue(ctx.getJob(), step.getProvider(), step.getStepIdx(), Boolean.class, false);
131131
ret.retainRawCountFile = step.getProvider().getParameterByName("retainRawCountFile").extractValue(ctx.getJob(), step.getProvider(), step.getStepIdx(), Boolean.class, true);
132132
ret.failIfUnexpectedHtosFound = step.getProvider().getParameterByName("failIfUnexpectedHtosFound").extractValue(ctx.getJob(), step.getProvider(), step.getStepIdx(), Boolean.class, true);
133133
ret.htoReadset = htoReadset;
@@ -170,7 +170,7 @@ public static CellHashingParameters createFromJson(BARCODE_TYPE type, File webse
170170
ret.majorityConsensusThreshold = params.get("majorityConsensusThreshold") == null ? null : params.getDouble("majorityConsensusThreshold");
171171
ret.minAllowableDoubletRateFilter = params.get("minAllowableDoubletRateFilter") == null ? null : params.getDouble("minAllowableDoubletRateFilter");
172172
ret.callerDisagreementThreshold = params.get("callerDisagreementThreshold") == null ? null : params.getDouble("callerDisagreementThreshold");
173-
ret.doTSNE = params.get("doTSNE") == null || params.getBoolean("doTSNE");
173+
ret.doTSNE = params.get("doTSNE") == null || params.optBoolean("doTSNE", false);
174174
ret.retainRawCountFile = params.optBoolean("retainRawCountFile", true);
175175
ret.failIfUnexpectedHtosFound = params.optBoolean("failIfUnexpectedHtosFound", true);
176176
ret.htoReadset = htoReadset;

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

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,13 @@ private File processOutputsForType(String sampleId, Readset rs, ReferenceGenome
473473
{
474474
try
475475
{
476-
FileUtils.moveFile(f, new File(sampleDir, f.getName()));
476+
File dest = new File(sampleDir, f.getName());
477+
if (dest.exists())
478+
{
479+
dest.delete();
480+
}
481+
482+
FileUtils.moveFile(f, dest);
477483
}
478484
catch (IOException e)
479485
{
@@ -911,22 +917,22 @@ else if (idx == 9)
911917
uniqueChains.clear();
912918
uniqueChains.add(cGeneChain);
913919
String key = originalChain + "->" + cGeneChain + " (based on C-GENE)";
914-
chimericCallsRecovered.put(key, chimericCallsRecovered.getOrDefault(key, 0));
920+
chimericCallsRecovered.put(key, chimericCallsRecovered.getOrDefault(key, 0) + 1);
915921
}
916922
else if (uniqueChains.size() == 2)
917923
{
918924
if ("TRD".equals(vGeneChain) && "TRA".equals(jGeneChain))
919925
{
920926
uniqueChains.clear();
921927
String key = originalChain + "->" + vGeneChain + " (based on V-GENE)";
922-
chimericCallsRecovered.put(key, chimericCallsRecovered.getOrDefault(key, 0));
928+
chimericCallsRecovered.put(key, chimericCallsRecovered.getOrDefault(key, 0) + 1);
923929
uniqueChains.add(vGeneChain);
924930
}
925931
if ("TRA".equals(vGeneChain) && "TRD".equals(jGeneChain))
926932
{
927933
uniqueChains.clear();
928934
String key = originalChain + "->" + vGeneChain + " (based on V-GENE)";
929-
chimericCallsRecovered.put(key, chimericCallsRecovered.getOrDefault(key, 0));
935+
chimericCallsRecovered.put(key, chimericCallsRecovered.getOrDefault(key, 0) + 1);
930936
uniqueChains.add(vGeneChain);
931937
}
932938
}

0 commit comments

Comments
 (0)