Skip to content

Commit d573556

Browse files
committed
Add step to generate phenotype plots
1 parent 4c2cb65 commit d573556

File tree

3 files changed

+62
-0
lines changed

3 files changed

+62
-0
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
for (datasetId in names(seuratObjects)) {
2+
seuratObj <- seuratObjects[[datasetId]]
3+
seuratObjects[[datasetId]] <- NULL
4+
5+
CellMembrane::PlotImmuneMarkers(seuratObj)
6+
7+
# Cleanup
8+
rm(seuratObj)
9+
gc()
10+
}

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ public static void registerPipelineSteps()
157157
SequencePipelineService.get().registerPipelineStep(new DimPlots.Provider());
158158
SequencePipelineService.get().registerPipelineStep(new CiteSeqDimReduxPca.Provider());
159159
SequencePipelineService.get().registerPipelineStep(new CiteSeqPlots.Provider());
160+
SequencePipelineService.get().registerPipelineStep(new PhenotypePlots.Provider());
160161
}
161162

162163
@Override
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
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+
import org.labkey.api.util.PageFlowUtil;
9+
10+
import java.util.Arrays;
11+
import java.util.Collection;
12+
13+
public class PhenotypePlots extends AbstractCellMembraneStep
14+
{
15+
public PhenotypePlots(PipelineContext ctx, PhenotypePlots.Provider provider)
16+
{
17+
super(provider, ctx);
18+
}
19+
20+
public static class Provider extends AbstractPipelineStepProvider<SingleCellStep>
21+
{
22+
public Provider()
23+
{
24+
super("PhenotypePlots", "Create Phenotype Plots", "Seurat", "This will generate FeaturePlots for a pre-defined set of immune markers. Any feature not present is skipped.", null, Arrays.asList("/sequenceanalysis/field/TrimmingTextArea.js"), null);
25+
}
26+
27+
@Override
28+
public PhenotypePlots create(PipelineContext ctx)
29+
{
30+
return new PhenotypePlots(ctx, this);
31+
}
32+
}
33+
34+
@Override
35+
public Collection<String> getRLibraries()
36+
{
37+
return PageFlowUtil.set("Seurat", "patchwork");
38+
}
39+
40+
@Override
41+
public boolean createsSeuratObjects()
42+
{
43+
return false;
44+
}
45+
46+
@Override
47+
public String getFileSuffix()
48+
{
49+
return "phenotype";
50+
}
51+
}

0 commit comments

Comments
 (0)