|
| 1 | +package org.labkey.singlecell.pipeline.singlecell; |
| 2 | + |
| 3 | +import org.json.old.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 RunSDA extends AbstractCellMembraneStep |
| 12 | +{ |
| 13 | + public RunSDA(PipelineContext ctx, RunSDA.Provider provider) |
| 14 | + { |
| 15 | + super(provider, ctx); |
| 16 | + } |
| 17 | + |
| 18 | + public static class Provider extends AbstractPipelineStepProvider<SingleCellStep> |
| 19 | + { |
| 20 | + public Provider() |
| 21 | + { |
| 22 | + super("RunSDA", "Run SDA", "CellMembrane/SDA", "This will run SDA on the seurat object.", Arrays.asList( |
| 23 | + SeuratToolParameter.create("numComps", "Num Comps", "Passed to SDAtools::run_SDA(). 30 is a good minimum but depends on input data complexity.", "ldk-integerfield", new JSONObject(){{ |
| 24 | + put("minValue", 0); |
| 25 | + }}, 50), |
| 26 | + SeuratToolParameter.create("featureInclusionList", "Genes to Include", "These genes, entered comma-separated or one/line, will be added to the default Seurat::VariableFeatures gene set when running PCA", "sequenceanalysis-trimmingtextarea", new JSONObject(){{ |
| 27 | + put("height", 150); |
| 28 | + put("delimiter", ","); |
| 29 | + put("stripCharsRe", "/(^['\"]+)|(['\"]+$)/g"); |
| 30 | + }}, null).delimiter(","), |
| 31 | + SeuratToolParameter.create("featureExclusionList", "Genes to Exclude", "These genes, entered comma-separated or one/line, will be excluded from the genes passed to RunPCA (which is otherwise determined by Seurat::VariableFeatures)", "sequenceanalysis-trimmingtextarea", new JSONObject(){{ |
| 32 | + put("height", 150); |
| 33 | + put("delimiter", ","); |
| 34 | + put("stripCharsRe", "/(^['\"]+)|(['\"]+$)/g"); |
| 35 | + }}, null).delimiter(","), |
| 36 | + SeuratToolParameter.create("minAsinhThreshold", "asinh Threshold", "This is used to filter genes. Only features with asinh(TOTAL_COUNTS) above this value are included.", "ldk-numberfield", new JSONObject(){{ |
| 37 | + put("minValue", 0); |
| 38 | + put("decimalPrecision", 2); |
| 39 | + }}, 0.5, "minAsinhThreshold", false), |
| 40 | + SeuratToolParameter.create("minLibrarySize", "Min Library Size", "Passed to dropsim::normaliseDGE() min_library_size", "ldk-integerfield", new JSONObject(){{ |
| 41 | + put("minValue", 0); |
| 42 | + }}, 50), |
| 43 | + SeuratToolParameter.create("max_iter", "Max Iterations", "Passed directly to SDAtools::run_SDA()", "ldk-integerfield", new JSONObject(){{ |
| 44 | + put("minValue", 0); |
| 45 | + }}, 10000), |
| 46 | + SeuratToolParameter.create(SEURAT_THREADS, "Max Threads", "The number of threads to use. Cannot be higher than the threads allocated to the job.", "ldk-integerfield", new JSONObject(){{ |
| 47 | + put("minValue", 0); |
| 48 | + }}, 8) |
| 49 | + ), Arrays.asList("/sequenceanalysis/field/TrimmingTextArea.js"), null); |
| 50 | + } |
| 51 | + |
| 52 | + |
| 53 | + @Override |
| 54 | + public RunSDA create(PipelineContext ctx) |
| 55 | + { |
| 56 | + return new RunSDA(ctx, this); |
| 57 | + } |
| 58 | + } |
| 59 | + |
| 60 | + @Override |
| 61 | + public boolean createsSeuratObjects() |
| 62 | + { |
| 63 | + return false; |
| 64 | + } |
| 65 | + |
| 66 | + @Override |
| 67 | + public String getFileSuffix() |
| 68 | + { |
| 69 | + return "sda"; |
| 70 | + } |
| 71 | +} |
| 72 | + |
| 73 | + |
0 commit comments