Skip to content

Commit 9c3a247

Browse files
committed
Add more params for celltypist
1 parent 6a427e5 commit 9c3a247

File tree

2 files changed

+38
-2
lines changed

2 files changed

+38
-2
lines changed

singlecell/resources/chunks/RunCelltypistCustomModel.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ for (datasetId in names(seuratObjects)) {
22
printName(datasetId)
33
seuratObj <- readRDS(seuratObjects[[datasetId]])
44

5-
seuratObj <- RIRA::RunCellTypist(seuratObj, modelName = modelFile, columnPrefix = columnPrefix)
5+
seuratObj <- RIRA::RunCellTypist(seuratObj, modelName = modelFile, columnPrefix = columnPrefix, convertAmbiguousToNA = convertAmbiguousToNA, pThreshold = pThreshold, minProp = minProp, maxAllowableClasses = maxAllowableClasses, minFractionToInclude = minFractionToInclude, useMajorityVoting = useMajorityVoting, mode = mode)
66

77
saveData(seuratObj, datasetId)
88
}

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

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,43 @@ public Provider()
3333
put("category", TrainCelltypist.CATEGORY);
3434
put("performGenomeFilter", false);
3535
}}, null),
36-
SeuratToolParameter.create("columnPrefix", "Column Prefix", "This string will be pre-pended to the normal output columns (i.e. majority_voting and predicted_labels)", "textfield", null, null)
36+
SeuratToolParameter.create("columnPrefix", "Column Prefix", "This string will be pre-pended to the normal output columns (i.e. majority_voting and predicted_labels)", "textfield", null, null),
37+
SeuratToolParameter.create("convertAmbiguousToNA", "Convert Ambiguous To NA", "If true, any values for majority_voting with commas (indicating they are ambiguous) will be converted to NA", "checkbox", new JSONObject()
38+
{{
39+
put("checked", false);
40+
}}, false),
41+
SeuratToolParameter.create("maxAllowableClasses", "Max Allowable Classes", "Celltypist can assign a cell to many classes, creating extremely long labels. Any cell with more than this number of labels will be set to NA", "ldk-integerfield", new JSONObject()
42+
{{
43+
put("minValue", 0);
44+
}}, 5),
45+
SeuratToolParameter.create("minFractionToInclude", "Min Fraction To Include", "Any labels representing fewer than this fraction of the cells will be set to NA", "ldk-numberfield", new JSONObject()
46+
{{
47+
put("minValue", 0);
48+
put("maxValue", 1);
49+
put("decimalPrecision", 3);
50+
}}, 0.01),
51+
SeuratToolParameter.create( "mode", "Mode", "The build-in model(s) to use.", "ldk-simplecombo", new JSONObject(){{
52+
put("storeValues", "best_match;prob_match");
53+
put("allowBlank", false);
54+
put("delimiter", ";");
55+
put("joinReturnValue", true);
56+
}}, "prob_match", null, true, true).delimiter(";"),
57+
SeuratToolParameter.create("useMajorityVoting", "Majority Voting", "If true, celltypist will be run using --majority-voting", "checkbox", new JSONObject()
58+
{{
59+
put("checked", true);
60+
}}, true),
61+
SeuratToolParameter.create("pThreshold", "pThreshold", "This is passed to the --p-thres argument.", "ldk-numberfield", new JSONObject()
62+
{{
63+
put("minValue", 0);
64+
put("maxValue", 1);
65+
put("decimalPrecision", 3);
66+
}}, 0.5),
67+
SeuratToolParameter.create("minProp", "minProp", "This is passed to the --min-prop argument.", "ldk-numberfield", new JSONObject()
68+
{{
69+
put("minValue", 0);
70+
put("maxValue", 1);
71+
put("decimalPrecision", 3);
72+
}}, 0)
3773
), PageFlowUtil.set("sequenceanalysis/field/SequenceOutputFileSelectorField.js"), null);
3874
}
3975

0 commit comments

Comments
 (0)