Skip to content

Commit

Permalink
Fix test-dimensionReduction, now passing
Browse files Browse the repository at this point in the history
  • Loading branch information
akshayarav committed Jan 19, 2024
1 parent 17ad581 commit 3f86b06
Show file tree
Hide file tree
Showing 9 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion R/getTopHVG.R
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ setTopHVG <- function(inSCE,
}
} else {
# Use pre-calculated variability metrics
features <- getTopHVG(inSCE, method = method, hvgNumber = hvgNumber,
features <- getTopHVG(inSCE, method = method, hvgNumber = hvgNumber,useFeatureSubset = NULL,
featureDisplay = NULL)
useAssay <- metadata(inSCE)$sctk$runFeatureSelection[[method]]$useAssay
}
Expand Down
2 changes: 1 addition & 1 deletion R/importGeneSets.R
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ importGeneSetsFromCollection <- function(inSCE, geneSetCollection,
#' by = "feature_name")
#' @export
#' @importFrom SummarizedExperiment rowData
importGeneSetsFromMSigDB <- function(inSCE, categoryIDs,
importGeneSetsFromMSigDB <- function(inSCE, categoryIDs = "H",
species = "Homo sapiens",
mapping = c("gene_symbol",
"human_gene_symbol",
Expand Down
2 changes: 1 addition & 1 deletion R/plotPCA.R
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ plotPCA <- function(inSCE, colorBy=NULL, shape=NULL, pcX="PC1",
if(!(reducedDimName %in% names(SingleCellExperiment::reducedDims(inSCE)))){
if (runPCA){
inSCE <- scaterPCA(inSCE, useAssay = useAssay,
reducedDimName = reducedDimName)
reducedDimName = reducedDimName, useFeatureSubset = NULL)
} else {
stop(reducedDimName,
" dimension not found. Run scaterPCA() or set runPCA to TRUE.")
Expand Down
4 changes: 2 additions & 2 deletions R/runFeatureSelection.R
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
#' "modelGeneVar")
runFeatureSelection <- function(inSCE,
useAssay,
method = c("vst", "mean.var.plot",
"dispersion", "modelGeneVar", "cell_ranger")){
method = "modelGeneVar")
{
method <- match.arg(method)
seuratMethods <- c("vst", "mean.var.plot", "dispersion")
scranMethods <- c("modelGeneVar")
Expand Down
2 changes: 1 addition & 1 deletion R/runVAM.R
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
#' sce <- runVAM(inSCE = sce,
#' geneSetCollectionName = "GeneSetCollection",
#' useAssay = "logcounts")
runVAM <- function(inSCE, geneSetCollectionName, useAssay,
runVAM <- function(inSCE, geneSetCollectionName = "H", useAssay = "logcounts",
resultNamePrefix = NULL, center = FALSE, gamma = TRUE) {
###################################################
### create gene set collection
Expand Down
Binary file modified tests/testthat/SCE_cellData.txt.gz
Binary file not shown.
Binary file modified tests/testthat/SCE_featureData.txt.gz
Binary file not shown.
Binary file modified tests/testthat/assays/SCE_counts.mtx.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion tests/testthat/test-dimensionReduction.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ test_that(desc = "Testing scaterPCA", {
testthat::expect_true("PCA1" %in% reducedDimNames(sce))

sce <- scaterPCA(sce, useAssay = "hvgAltExplogcounts", useAltExp = "hvgAltExp",
reducedDimName = "PCA2")
useFeatureSubset = NULL, reducedDimName = "PCA2")
testthat::expect_true("PCA2" %in% reducedDimNames(sce))

expect_error({
Expand Down

0 comments on commit 3f86b06

Please sign in to comment.