Skip to content

Commit

Permalink
use max of configured dimensions for PCA #48
Browse files Browse the repository at this point in the history
  • Loading branch information
sreichl committed Apr 11, 2024
1 parent 2de4ad6 commit f242120
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion workflow/scripts/mixscape.R
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ variable_features_only <- snakemake@config[["variable_features_only"]]
calcPerturbSig_params <- snakemake@config[["CalcPerturbSig"]]
runMixscape_params <- snakemake@config[["RunMixscape"]]
grna_split_symbol <- snakemake@config[["grna_split_symbol"]]
npcs <- max(snakemake@config[["RunMixscape"]][["ndims"]], snakemake@config[["MixscapeLDA"]][["npcs"]])

if (calcPerturbSig_params[["split_by_col"]]==''){
perturbSig_split_by <- NULL
Expand Down Expand Up @@ -69,7 +70,7 @@ if (dim(GetAssayData(object = data, slot = "scale.data", assay = assay))[1]==0){
}

# Run Principle Component Analysis (PCA) to reduce the dimensionality of the data.
data <- RunPCA(object = data, features = features)
data <- RunPCA(object = data, features = features, npcs = npcs)

### Mixscape Analysis

Expand Down

0 comments on commit f242120

Please sign in to comment.