Skip to content

Commit 3be4d6d

Browse files
committed
Bugfix to 10x metrics handling
1 parent e7b6133 commit 3be4d6d

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

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

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -776,20 +776,26 @@ public void complete(SequenceAnalysisJobSupport support, AnalysisModel model, Co
776776
throw new PipelineJobException("Expected sequence outputs to be created");
777777
}
778778

779+
File folderWithMetricFile;
779780
SequenceOutputFile outputForData = outputFilesCreated.stream().filter(x -> VLOUPE_CATEGORY.equals(x.getCategory())).findFirst().orElse(null);
780781
if (outputForData == null)
781782
{
782783
outputForData = outputFilesCreated.stream().filter(x -> "10x Run Summary".equals(x.getCategory())).findFirst().orElseThrow();
784+
folderWithMetricFile = outputForData.getFile().getParentFile();
785+
}
786+
else
787+
{
788+
// The metric file is one level above the vloupe, but in the same folder as HTML
789+
folderWithMetricFile = outputForData.getFile().getParentFile().getParentFile();
783790
}
784791

785-
File outsDir = outputForData.getFile().getParentFile();
786792
Integer dataId = outputForData.getDataId();
787793
if (dataId == null)
788794
{
789795
throw new PipelineJobException("Unable to find dataId for output file");
790796
}
791797

792-
addMetrics(outsDir, model, dataId);
798+
addMetrics(folderWithMetricFile, model, dataId);
793799
}
794800

795801
private static final Pattern FILE_PATTERN = Pattern.compile("^(.+?)(_S[0-9]+){0,1}_L(.+?)_(R){0,1}([0-9])(_[0-9]+){0,1}(.*?)(\\.f(ast){0,1}q)(\\.gz)?$");

0 commit comments

Comments
 (0)