Skip to content

Commit 74dfd10

Browse files
committed
Use consistent delimiter for seurat-related fields
1 parent 3638f05 commit 74dfd10

File tree

9 files changed

+18
-11
lines changed

9 files changed

+18
-11
lines changed

singlecell/api-src/org/labkey/api/singlecell/pipeline/AbstractSingleCellPipelineStep.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ else if (NumberUtils.isCreatable(val))
333333
else if ("sequenceanalysis-trimmingtextarea".equals(pd.getFieldXtype()))
334334
{
335335
val = val.replace("'", "\\\'");
336-
String[] vals = val.split(",");
336+
String[] vals = val.split(pd.getDelimiter());
337337
return "c('" + StringUtils.join(vals, "','") + "')";
338338
}
339339
else if (pd.isMultiValue())

singlecell/api-src/org/labkey/api/singlecell/pipeline/SeuratToolParameter.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,13 @@ public SeuratToolParameter(String name, String label, String description, String
2323
_isMultiValue = isMultiValue;
2424
}
2525

26+
public SeuratToolParameter delimiter(String delim)
27+
{
28+
_delimiter = delim;
29+
30+
return this;
31+
}
32+
2633
public static SeuratToolParameter create(String name, String label, String description, String fieldXtype, @Nullable JSONObject additionalExtConfig, @Nullable Object defaultValue)
2734
{
2835
return new SeuratToolParameter(name, label, description, fieldXtype, defaultValue, additionalExtConfig, null, true, false);

singlecell/src/org/labkey/singlecell/pipeline/singlecell/CiteSeqDimReduxPca.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ public Provider()
2626
SeuratToolParameter.create("adtWhitelist", "ADT Whitelist", "If provided, these ADTs will be scaled and used for PCA. If empty, all ADTs will be used.", "sequenceanalysis-trimmingtextarea", new JSONObject(){{
2727
put("height", 150);
2828
put("delimiter", ",");
29-
}}, null),
29+
}}, null).delimiter(","),
3030
SeuratToolParameter.create("adtBlacklist", "ADT Blacklist", "If provided, these ADTs will be excluded from scaling/PCA", "sequenceanalysis-trimmingtextarea", new JSONObject(){{
3131
put("height", 150);
3232
put("delimiter", ",");
33-
}}, null)
33+
}}, null).delimiter(",")
3434
), null, null);
3535
}
3636

singlecell/src/org/labkey/singlecell/pipeline/singlecell/DimPlots.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public Provider()
2626
put("allowBlank", false);
2727
put("height", 150);
2828
put("delimiter", ",");
29-
}}, null)
29+
}}, null).delimiter(",")
3030
), Arrays.asList("/sequenceanalysis/field/TrimmingTextArea.js"), null);
3131
}
3232

singlecell/src/org/labkey/singlecell/pipeline/singlecell/Downsample.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public Provider()
2626
SeuratToolParameter.create("subsetFields", "Additional Grouping Fields", "A comma-separated list of fields that will be used to subset data within each seurat object. For example, if 'BarcodePrefix' is provided and 500 target cells is selected, each incoming seurat object will be subset to no more than 500 cells per unique value of BarcodePrefix. If blank, each object will be treated as one unit of data.", "sequenceanalysis-trimmingtextarea", new JSONObject(){{
2727
put("height", 150);
2828
put("delimiter", ",");
29-
}}, null, "subsetFields", true, true),
29+
}}, null, "subsetFields", true, true).delimiter(","),
3030
SeuratToolParameter.create("seed", "Random Seed", "This random seed, used for downsampling", "ldk-integerfield", new JSONObject(){{
3131

3232
}}, 1234)

singlecell/src/org/labkey/singlecell/pipeline/singlecell/FeaturePlots.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public Provider()
2626
put("allowBlank", false);
2727
put("height", 150);
2828
put("delimiter", ",");
29-
}}, null)
29+
}}, null).delimiter(",")
3030
), Arrays.asList("/sequenceanalysis/field/TrimmingTextArea.js"), null);
3131
}
3232

singlecell/src/org/labkey/singlecell/pipeline/singlecell/FindMarkers.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public Provider()
2828
put("allowBlank", false);
2929
put("height", 200);
3030
put("delimiter", ",");
31-
}}, null),
31+
}}, null).delimiter(","),
3232
SeuratToolParameter.create("testsToUse", "Tests To Use", "The set of tests to perform.", "ldk-simplecombo", new JSONObject()
3333
{{
3434
put("multiSelect", true);

singlecell/src/org/labkey/singlecell/pipeline/singlecell/NormalizeAndScale.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,15 @@ public Provider()
2828
SeuratToolParameter.create("variableGenesWhitelist", "Genes to Add to VariableFeatures", "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(){{
2929
put("height", 150);
3030
put("delimiter", ",");
31-
}}, null),
31+
}}, null).delimiter(","),
3232
SeuratToolParameter.create("variableGenesBlacklist", "Genes to Exclude From VariableFeatures", "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(){{
3333
put("height", 150);
3434
put("delimiter", ",");
35-
}}, null),
35+
}}, null).delimiter(","),
3636
SeuratToolParameter.create("featuresToRegress", "Features to Regress", "These features, entered comma-separated or one/line, will be passed to Seurat::ScaleData vars.to.regress", "sequenceanalysis-trimmingtextarea", new JSONObject(){{
3737
put("height", 150);
3838
put("delimiter", ",");
39-
}}, null),
39+
}}, null).delimiter(","),
4040
SeuratToolParameter.create("scaleVariableFeaturesOnly", "ScaleData On Variable Features Only", "If checked, ScaleData will only be performed on VariableFeatures, which should dramatically reduce time and memory", "checkbox", new JSONObject(){{
4141
put("checked", true);
4242
}}, true),

singlecell/src/org/labkey/singlecell/pipeline/singlecell/PlotAverageCiteSeqCounts.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public Provider()
2626
put("allowBlank", false);
2727
put("height", 150);
2828
put("delimiter", ",");
29-
}}, "ClusterNames_0.2,ClusterNames_0.4,ClusterNames_0.6")
29+
}}, "ClusterNames_0.2,ClusterNames_0.4,ClusterNames_0.6").delimiter(",")
3030
), Arrays.asList("/sequenceanalysis/field/TrimmingTextArea.js"), null);
3131
}
3232

0 commit comments

Comments
 (0)