|
| 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 | +import java.util.List; |
| 11 | + |
| 12 | +public class CustomGSEA extends AbstractCellMembraneStep |
| 13 | +{ |
| 14 | + final static String DELIM = "<>"; |
| 15 | + |
| 16 | + public CustomGSEA(PipelineContext ctx, CustomGSEA.Provider provider) |
| 17 | + { |
| 18 | + super(provider, ctx); |
| 19 | + } |
| 20 | + |
| 21 | + public static class Provider extends AbstractPipelineStepProvider<SingleCellStep> |
| 22 | + { |
| 23 | + public Provider() |
| 24 | + { |
| 25 | + super("CustomUCell", "ssGSEA (Custom)", "escape/ssGSEA", "The seurat object will be subset based on the expression below, which is passed directly to Seurat's subset(subset = X).", Arrays.asList( |
| 26 | + SeuratToolParameter.create("geneSets", "Gene Sets(s)", "This should contain one gene module per line, where the module is in the format (no spaces): SetName:Gene1,Gene2,Gene3. The first token is the name given to the score and the second is a comma-delimited list of gene names.", "sequenceanalysis-trimmingtextarea", new JSONObject(){{ |
| 27 | + put("allowBlank", false); |
| 28 | + put("replaceAllWhitespace", true); |
| 29 | + put("height", 150); |
| 30 | + put("width", 600); |
| 31 | + put("delimiter", DELIM); |
| 32 | + put("stripCharsRe", "/['\"]/g"); |
| 33 | + }}, null).delimiter(DELIM), |
| 34 | + SeuratToolParameter.create("assayName", "Input Assay Name", "The assay holding the source data.", "textfield", new JSONObject(){{ |
| 35 | + put("allowBlank", false); |
| 36 | + }}, "RNA"), |
| 37 | + SeuratToolParameter.create("outputAssayName", "Output Assay Name", "The assay to hold the resulting scores.", "textfield", new JSONObject(){{ |
| 38 | + put("allowBlank", false); |
| 39 | + }}, "escape.ssGSEA") |
| 40 | + ), List.of("/sequenceanalysis/field/TrimmingTextArea.js"), null); |
| 41 | + } |
| 42 | + |
| 43 | + |
| 44 | + @Override |
| 45 | + public CustomGSEA create(PipelineContext ctx) |
| 46 | + { |
| 47 | + return new CustomGSEA(ctx, this); |
| 48 | + } |
| 49 | + } |
| 50 | +} |
0 commit comments