Skip to content

Commit 2743441

Browse files
committed
Bugfix to CalculateGeneComponentScores when selecting multiple components
1 parent e9121a6 commit 2743441

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

jbrowse/src/org/labkey/jbrowse/JBrowseLuceneSearch.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ private String tryUrlDecode(String input) {
105105
//special case for urls containing +; this isn't necessary for strings sent from the client-side, but URLs
106106
//sent via unit tests autodecode, and strings containing + rather than the URL-encoded symbol are unsafe
107107
//to pass through URLDecoded.decode
108-
if(input.contains("+")) {
108+
if (input.contains("+")) {
109109
return input;
110110
}
111111

@@ -202,7 +202,7 @@ public JSONObject doSearch(User u, String searchString, final int pageSize, fina
202202
{
203203
query = queryParser.parse(queryString);
204204
}
205-
else if(numericQueryParserFields.contains(fieldName))
205+
else if (numericQueryParserFields.contains(fieldName))
206206
{
207207
try
208208
{
@@ -212,7 +212,8 @@ else if(numericQueryParserFields.contains(fieldName))
212212
{
213213
e.printStackTrace();
214214
}
215-
} else
215+
}
216+
else
216217
{
217218
throw new IllegalArgumentException("No such field(s), or malformed query.");
218219
}

singlecell/resources/chunks/CalculateGeneComponentScores.R

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

5-
seuratObj <- RIRA::ScoreUsingSavedComponent(seuratObj, componentOrName = savedComponent, fieldName = savedComponent)
5+
for (sc in savedComponent) {
6+
seuratObj <- RIRA::ScoreUsingSavedComponent(seuratObj, componentOrName = sc, fieldName = sc)
7+
}
68

79
saveData(seuratObj, datasetId)
810

0 commit comments

Comments
 (0)