Skip to content

Commit 035009d

Browse files
committed
Support new gene component
1 parent a847538 commit 035009d

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

singlecell/resources/chunks/CalculateGeneComponentScores.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ for (datasetId in names(seuratObjects)) {
1010

1111
for (sc in savedComponent) {
1212
logger::log_info(paste0('Processing ', datasetId, ' for ', sc))
13-
seuratObj <- RIRA::ScoreUsingSavedComponent(seuratObj, componentOrName = sc, fieldName = sc)
13+
seuratObj <- RIRA::ScoreUsingSavedComponent(seuratObj, componentOrName = sc, fieldName = sc, layer = ifelse(useScaledData, yes = 'scale.data', no = 'data'))
1414
}
1515

1616
saveData(seuratObj, datasetId)

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
import org.labkey.api.singlecell.pipeline.SingleCellStep;
88
import org.labkey.api.util.PageFlowUtil;
99

10+
import java.util.Arrays;
1011
import java.util.Collection;
11-
import java.util.Collections;
1212

1313
public class CalculateGeneComponentScores extends AbstractRiraStep
1414
{
@@ -21,16 +21,16 @@ public static class Provider extends AbstractPipelineStepProvider<SingleCellStep
2121
{
2222
public Provider()
2323
{
24-
super("CalculateGeneComponentScores", "Calculate Gene Module Scores", "RIRA", "This will generate UCell scores for a set of pre-defined gene modules", Collections.singletonList(
24+
super("CalculateGeneComponentScores", "Calculate Gene Module Scores", "RIRA", "This will generate UCell scores for a set of pre-defined gene modules", Arrays.asList(
2525
SeuratToolParameter.create("savedComponent", "Saved Component(s)", "This is the name of the saved component (from RIRA) to apply", "ldk-simplecombo", new JSONObject()
2626
{{
27-
put("storeValues", "Tcell_EffectorDifferentiation;TCR_EarlyStimulationComponent;CD4_Activation_Axis");
27+
put("storeValues", "Tcell_EffectorDifferentiation;TCR_EarlyStimulationComponent;CD4_Activation_Axis;PRF1_EffectorAxis");
2828
put("multiSelect", true);
2929
put("allowBlank", false);
3030
put("joinReturnValue", true);
3131
put("delimiter", ";");
32-
33-
}}, "Tcell_EffectorDifferentiation", null, true, true).delimiter(";")
32+
}}, "Tcell_EffectorDifferentiation", null, true, true).delimiter(";"),
33+
SeuratToolParameter.create("useScaledData", "Use scale.data", "By default, these are calculated against the data slot. If checked, it will use scale.data instead", "checkbox", null, false)
3434
), null, null);
3535
}
3636

0 commit comments

Comments
 (0)