Skip to content

Commit e4fcd49

Browse files
committed
Support additional parameter for split seurat
1 parent ff5ef77 commit e4fcd49

File tree

4 files changed

+29
-7
lines changed

4 files changed

+29
-7
lines changed

singlecell/resources/chunks/RunRiraClassification.R

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

5-
seuratObj <- RIRA::RunCellTypist(seuratObj, modelName = 'RIRA_Immune_v1', maxBatchSize = maxBatchSize, columnPrefix = 'RIRA_Immune_v1.', retainProbabilityMatrix = retainProbabilityMatrix)
6-
seuratObj <- RIRA::Classify_TNK(seuratObj, maxBatchSize = maxBatchSize, retainProbabilityMatrix = retainProbabilityMatrix, columnPrefix = 'RIRA_TNK_v2.')
5+
seuratObj <- RIRA::Classify_ImmuneCells(seuratObj, maxBatchSize = maxBatchSize, retainProbabilityMatrix = retainProbabilityMatrix)
6+
seuratObj <- RIRA::Classify_TNK(seuratObj, maxBatchSize = maxBatchSize, retainProbabilityMatrix = retainProbabilityMatrix)
77

88
seuratObj$RIRA_TNK_v2.predicted_labels[seuratObj$RIRA_Immune_v1.majority_voting != 'T_NK'] <- 'Other'
99

singlecell/resources/chunks/SplitSeurat.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-
newList <- CellMembrane::SplitSeurat(seuratObj, splitField = splitField, minCellsToKeep = minCellsToKeep)
5+
newList <- CellMembrane::SplitSeurat(seuratObj, splitField = splitField, minCellsToKeep = minCellsToKeep, excludedClasses = excludedClasses)
66
for (name in names(newList)) {
77
saveData(newList[[name]], paste0(datasetId, '-', name))
88
}

singlecell/resources/views/singleCellDataManagement.html

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,27 @@
6161
})
6262
},{
6363
name: 'Readsets Not Archived to SRA',
64-
url: LABKEY.ActionURL.buildURL('query', 'executeQuery.view', null, {schemaName: 'sequenceanalysis', queryName: 'sequence_readsets', 'query.totalForwardReads~isnonblank': null, 'query.isArchived~eq': 0})
65-
},{
64+
url: LABKEY.ActionURL.buildURL('query', 'executeQuery.view', null, {
65+
schemaName: 'sequenceanalysis',
66+
queryName: 'sequence_readsets',
67+
'query.totalForwardReads~isnonblank': null,
68+
'query.isArchived~eq': 0}
69+
)
70+
}, {
6671
name: 'Analyses Using Old Readsets',
67-
url: LABKEY.ActionURL.buildURL('query', 'executeQuery.view', null, {schemaName: 'sequenceanalysis', queryName: 'sequence_analyses', 'query.readset/status~isnonblank': null})
72+
url: LABKEY.ActionURL.buildURL('query', 'executeQuery.view', null, {
73+
schemaName: 'sequenceanalysis',
74+
queryName: 'sequence_analyses',
75+
'query.readset/status~isnonblank': null
76+
})
77+
},{
78+
name: 'Orphan 10x Run Summaries',
79+
url: LABKEY.ActionURL.buildURL('query', 'executeQuery.view', null, {
80+
schemaName: 'sequenceanalysis',
81+
queryName: 'outputfiles',
82+
'query.category~eq': '10x Run Summary',
83+
'query.readset/totalOutputs~eq': 1
84+
})
6885
}]
6986
}]
7087
}]

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,12 @@ public Provider()
2626
SeuratToolParameter.create("minCellsToKeep", "Min Cells To Keep", "If provided, any subset with fewer than this many cells will be discarded. Use zero to keep all. Note: if the value is less than 1 it will be interpreted as a fraction of the total input cells", "ldk-numberfield", new JSONObject(){{
2727
put("allowBlank", false);
2828
put("decimalPrecision", 3);
29-
}}, 0.05)
29+
}}, 0.05),
30+
SeuratToolParameter.create("excludedClasses", "Excluded Classes", "A list, one per line, of any classes to be excluded from the split. Cells with these values we will placed into the Other subset", "sequenceanalysis-trimmingtextarea", new JSONObject(){{
31+
put("height", 150);
32+
put("delimiter", ",");
33+
put("stripCharsRe", "/(^['\"]+)|(['\"]+$)/g");
34+
}}, null, null, true).delimiter(",")
3035
), null, null);
3136
}
3237

0 commit comments

Comments
 (0)