Skip to content

Commit 42b41fa

Browse files
author
Sebastian Benjamin
committed
Add starcat tool
1 parent fce0dac commit 42b41fa

3 files changed

Lines changed: 67 additions & 0 deletions

File tree

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
for (datasetId in names(seuratObjects)) {
2+
printName(datasetId)
3+
seuratObj <- readSeuratRDS(seuratObjects[[datasetId]])
4+
5+
seuratObj <- CellMembrane::RunStarCAT(seuratObj, reference = reference, assayName = assayName, outputDirectory = tempfile(pattern = 'starcat_'))
6+
7+
saveData(seuratObj, datasetId)
8+
9+
# Cleanup
10+
rm(seuratObj)
11+
gc()
12+
}

singlecell/src/org/labkey/singlecell/SingleCellModule.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@
9797
import org.labkey.singlecell.pipeline.singlecell.RunScGate;
9898
import org.labkey.singlecell.pipeline.singlecell.RunScGateBuiltin;
9999
import org.labkey.singlecell.pipeline.singlecell.RunSingleR;
100+
import org.labkey.singlecell.pipeline.singlecell.RunStarCAT;
100101
import org.labkey.singlecell.pipeline.singlecell.RunVision;
101102
import org.labkey.singlecell.pipeline.singlecell.ScoreCellCycle;
102103
import org.labkey.singlecell.pipeline.singlecell.SeuratPrototype;
@@ -248,6 +249,7 @@ public static void registerPipelineSteps()
248249
SequencePipelineService.get().registerPipelineStep(new RunPCA.Provider());
249250
SequencePipelineService.get().registerPipelineStep(new RunPHATE.Provider());
250251
SequencePipelineService.get().registerPipelineStep(new RunSingleR.Provider());
252+
SequencePipelineService.get().registerPipelineStep(new RunStarCAT.Provider());
251253
SequencePipelineService.get().registerPipelineStep(new ClassifyTNKByExpression.Provider());
252254
SequencePipelineService.get().registerPipelineStep(new RunConga.Provider());
253255
SequencePipelineService.get().registerPipelineStep(new FindClustersAndDimRedux.Provider());
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
package org.labkey.singlecell.pipeline.singlecell;
2+
3+
import org.json.JSONObject;
4+
import org.labkey.api.sequenceanalysis.pipeline.AbstractPipelineStepProvider;
5+
import org.labkey.api.sequenceanalysis.pipeline.PipelineContext;
6+
import org.labkey.api.singlecell.pipeline.SeuratToolParameter;
7+
import org.labkey.api.singlecell.pipeline.SingleCellStep;
8+
9+
import java.util.Arrays;
10+
11+
public class RunStarCAT extends AbstractCellMembraneStep
12+
{
13+
public RunStarCAT(PipelineContext ctx, RunStarCAT.Provider provider)
14+
{
15+
super(provider, ctx);
16+
}
17+
18+
public static class Provider extends AbstractPipelineStepProvider<SingleCellStep>
19+
{
20+
public Provider()
21+
{
22+
super("RunStarCAT", "Run StarCAT", "CellMembrane/StarCAT", "This will run StarCAT to project cells onto a reference (e.g. TCAT.V1) and append per-cell scores and program usage to metadata.", Arrays.asList(
23+
SeuratToolParameter.create("reference", "Reference", "Either a built-in StarCAT reference name (e.g. TCAT.V1, MYELOID.GLIOMA.V1, BONEMARROW.CD34POS.HSPC.V1) or a path to a custom reference .tsv/.txt file.", "ldk-simplecombo", new JSONObject()
24+
{{
25+
put("multiSelect", false);
26+
put("allowBlank", false);
27+
put("editable", true);
28+
put("forceSelection", false);
29+
put("storeValues", "TCAT.V1;MYELOID.GLIOMA.V1;BONEMARROW.CD34POS.HSPC.V1");
30+
put("initialValues", "TCAT.V1");
31+
put("delimiter", ";");
32+
put("joinReturnValue", true);
33+
}}, "TCAT.V1"),
34+
SeuratToolParameter.create("assayName", "Assay Name", "The name of the assay containing the counts matrix passed to StarCAT.", "textfield", new JSONObject()
35+
{{
36+
put("allowBlank", false);
37+
}}, "RNA")
38+
), null, null);
39+
}
40+
41+
@Override
42+
public RunStarCAT create(PipelineContext ctx)
43+
{
44+
return new RunStarCAT(ctx, this);
45+
}
46+
}
47+
48+
@Override
49+
public String getFileSuffix()
50+
{
51+
return "starcat";
52+
}
53+
}

0 commit comments

Comments
 (0)