|
| 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 ClrNormalizeByGroup extends AbstractCellMembraneStep |
| 12 | +{ |
| 13 | + public ClrNormalizeByGroup(PipelineContext ctx, ClrNormalizeByGroup.Provider provider) |
| 14 | + { |
| 15 | + super(provider, ctx); |
| 16 | + } |
| 17 | + |
| 18 | + public static class Provider extends AbstractPipelineStepProvider<SingleCellStep> |
| 19 | + { |
| 20 | + public Provider() |
| 21 | + { |
| 22 | + super("ClrNormalizeByGroup", "CLR Normalize By Group", "CellMembrane/Seurat", "This will run standard Seurat CLR normalization on the desired assay, subsetting by group.", Arrays.asList( |
| 23 | + SeuratToolParameter.create("groupingVar", "Group Variable", "The variable on which to group.", "textfield", new JSONObject(){{ |
| 24 | + put("allowBlank", false); |
| 25 | + }}, "cDNA_ID"), |
| 26 | + SeuratToolParameter.create("assayName", "Source Assay", "The source assay", "textfield", new JSONObject(){{ |
| 27 | + put("allowBlank", false); |
| 28 | + }}, "ADT"), |
| 29 | + SeuratToolParameter.create("targetAssayName", "Target Assay", "The target assay. Will overwrite the source if blank.", "textfield", new JSONObject(){{ |
| 30 | + |
| 31 | + }}, null), |
| 32 | + SeuratToolParameter.create("margin", "Margin", "Passing to NormalizeData. Either 1 or 2.", "ldk-integerfield", new JSONObject(){{ |
| 33 | + put("allowBlank", false); |
| 34 | + }}, 1), |
| 35 | + SeuratToolParameter.create("minCellsPerGroup", "Min Cells Per Group", "Any group with fewer than this many cells will be dropped.", "ldk-integerfield", new JSONObject(){{ |
| 36 | + |
| 37 | + }}, 20), |
| 38 | + SeuratToolParameter.create("calculatePerCellUCell", "Calculate Per Feature UCell ", "If checked, ScaleData will only be performed on VariableFeatures, which should dramatically reduce time and memory", "checkbox", new JSONObject(){{ |
| 39 | + put("checked", true); |
| 40 | + }}, true) |
| 41 | + ), Arrays.asList("/sequenceanalysis/field/TrimmingTextArea.js"), null); |
| 42 | + } |
| 43 | + |
| 44 | + |
| 45 | + @Override |
| 46 | + public ClrNormalizeByGroup create(PipelineContext ctx) |
| 47 | + { |
| 48 | + return new ClrNormalizeByGroup(ctx, this); |
| 49 | + } |
| 50 | + } |
| 51 | + |
| 52 | + @Override |
| 53 | + public String getFileSuffix() |
| 54 | + { |
| 55 | + return "clrByGroup"; |
| 56 | + } |
| 57 | +} |
| 58 | + |
| 59 | + |
0 commit comments