Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions singlecell/resources/chunks/RunStarCAT.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
for (datasetId in names(seuratObjects)) {
printName(datasetId)
seuratObj <- readSeuratRDS(seuratObjects[[datasetId]])

seuratObj <- CellMembrane::RunStarCAT(seuratObj, reference = reference, assayName = assayName, outputDirectory = tempfile(pattern = 'starcat_'))

saveData(seuratObj, datasetId)

# Cleanup
rm(seuratObj)
gc()
}
2 changes: 2 additions & 0 deletions singlecell/src/org/labkey/singlecell/SingleCellModule.java
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@
import org.labkey.singlecell.pipeline.singlecell.RunScGate;
import org.labkey.singlecell.pipeline.singlecell.RunScGateBuiltin;
import org.labkey.singlecell.pipeline.singlecell.RunSingleR;
import org.labkey.singlecell.pipeline.singlecell.RunStarCAT;
import org.labkey.singlecell.pipeline.singlecell.RunVision;
import org.labkey.singlecell.pipeline.singlecell.ScoreCellCycle;
import org.labkey.singlecell.pipeline.singlecell.SeuratPrototype;
Expand Down Expand Up @@ -248,6 +249,7 @@ public static void registerPipelineSteps()
SequencePipelineService.get().registerPipelineStep(new RunPCA.Provider());
SequencePipelineService.get().registerPipelineStep(new RunPHATE.Provider());
SequencePipelineService.get().registerPipelineStep(new RunSingleR.Provider());
SequencePipelineService.get().registerPipelineStep(new RunStarCAT.Provider());
SequencePipelineService.get().registerPipelineStep(new ClassifyTNKByExpression.Provider());
SequencePipelineService.get().registerPipelineStep(new RunConga.Provider());
SequencePipelineService.get().registerPipelineStep(new FindClustersAndDimRedux.Provider());
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
package org.labkey.singlecell.pipeline.singlecell;

import org.json.JSONObject;
import org.labkey.api.sequenceanalysis.pipeline.AbstractPipelineStepProvider;
import org.labkey.api.sequenceanalysis.pipeline.PipelineContext;
import org.labkey.api.singlecell.pipeline.SeuratToolParameter;
import org.labkey.api.singlecell.pipeline.SingleCellStep;

import java.util.Arrays;

public class RunStarCAT extends AbstractCellMembraneStep
{
public RunStarCAT(PipelineContext ctx, RunStarCAT.Provider provider)
{
super(provider, ctx);
}

public static class Provider extends AbstractPipelineStepProvider<SingleCellStep>
{
public Provider()
{
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(
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()
{{
put("multiSelect", false);
put("allowBlank", false);
put("editable", true);
put("forceSelection", false);
put("storeValues", "TCAT.V1;MYELOID.GLIOMA.V1;BONEMARROW.CD34POS.HSPC.V1");
put("initialValues", "TCAT.V1");
put("delimiter", ";");
put("joinReturnValue", true);
}}, "TCAT.V1"),
SeuratToolParameter.create("assayName", "Assay Name", "The name of the assay containing the counts matrix passed to StarCAT.", "textfield", new JSONObject()
{{
put("allowBlank", false);
}}, "RNA")
), null, null);
}

@Override
public RunStarCAT create(PipelineContext ctx)
{
return new RunStarCAT(ctx, this);
}
}

@Override
public String getFileSuffix()
{
return "starcat";
}
}
Loading