Skip to content

Commit 35bc78d

Browse files
committed
Store correct libraryId in seurat prototypes
1 parent 9bd57a7 commit 35bc78d

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

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

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
package org.labkey.singlecell.pipeline.singlecell;
22

3-
import org.apache.commons.io.IOUtils;
4-
import org.apache.commons.lang3.StringUtils;
53
import org.json.JSONObject;
64
import org.labkey.api.pipeline.PipelineJobException;
7-
import org.labkey.api.reader.Readers;
85
import org.labkey.api.sequenceanalysis.SequenceOutputFile;
96
import org.labkey.api.sequenceanalysis.model.Readset;
107
import org.labkey.api.sequenceanalysis.pipeline.AbstractPipelineStepProvider;
@@ -15,10 +12,6 @@
1512
import org.labkey.api.singlecell.pipeline.SingleCellStep;
1613
import org.labkey.singlecell.CellHashingServiceImpl;
1714

18-
import java.io.File;
19-
import java.io.IOException;
20-
import java.nio.file.Files;
21-
import java.nio.file.Path;
2215
import java.util.Arrays;
2316
import java.util.Collections;
2417
import java.util.List;
@@ -83,6 +76,11 @@ public void init(SequenceOutputHandler.JobContext ctx, List<SequenceOutputFile>
8376
{
8477
throw new PipelineJobException("Seurat prototype step expects all inputs to have a readset ID.");
8578
}
79+
80+
if (ctx.getSequenceSupport().getCachedGenomes().size() > 1)
81+
{
82+
throw new PipelineJobException("Expected seurat prototype step to use a single genome");
83+
}
8684
}
8785

8886
@Override
@@ -122,6 +120,11 @@ public Output execute(SequenceOutputHandler.JobContext ctx, List<SeuratObjectWra
122120
{
123121
Output output = super.execute(ctx, inputObjects, outputPrefix);
124122

123+
if (ctx.getSequenceSupport().getCachedGenomes().size() > 1)
124+
{
125+
throw new PipelineJobException("Expected seurat prototype step to use a single genome");
126+
}
127+
125128
for (SeuratObjectWrapper wrapper : output.getSeuratObjects())
126129
{
127130
if (wrapper.getReadsetId() == null)
@@ -132,6 +135,7 @@ public Output execute(SequenceOutputHandler.JobContext ctx, List<SeuratObjectWra
132135
SequenceOutputFile so = new SequenceOutputFile();
133136
so.setFile(wrapper.getFile());
134137
so.setCategory("Seurat Object Prototype");
138+
so.setLibrary_id(ctx.getSequenceSupport().getCachedGenomes().iterator().next().getGenomeId());
135139

136140
String readsetName = ctx.getSequenceSupport().getCachedReadset(wrapper.getReadsetId()).getName();
137141
so.setReadset(wrapper.getReadsetId());

0 commit comments

Comments
 (0)