Skip to content

Commit

Permalink
updated doc and others for multivariateAnalysisR and dummy dataset
Browse files Browse the repository at this point in the history
  • Loading branch information
ccahsh committed Nov 15, 2023
1 parent 0920802 commit 8648e21
Show file tree
Hide file tree
Showing 10 changed files with 50 additions and 15 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Package: projectR
Type: Package
Title: Functions for the projection of weights from PCA, CoGAPS, NMF,
correlation, and clustering
Version: 1.17.11
Version: 1.17.12
Author: Gaurav Sharma, Charles Shin, Jared Slosberg, Loyal Goff, Genevieve Stein-O'Brien
Maintainer: Genevieve Stein-O'Brien <[email protected]>
Description: Functions for the projection of data into the spaces defined by PCA, CoGAPS, NMF, correlation, and clustering.
Expand Down
5 changes: 3 additions & 2 deletions R/multivariateAnalysisR.R
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#' @param CIheight height of CI png
#' @param CIspacing spacing between each CI in CI graph
#'
#' @return none; ANOVA and Confidence Intervals are visualized and exported in both PNG and CSV
#' @return a sorted list of ANOVA and CI results; ANOVA and Confidence Intervals are visualized and exported in both PNG and CSV
#' @export
#'

Expand Down Expand Up @@ -387,5 +387,6 @@ multivariateAnalysisR <- function(
)
CI_export_path <- file.path(getwd(), exportFolder, "multivariateAnalysisR_CI.csv")
write.csv(CI_CSV_df, CI_export_path, row.names = FALSE)


return(sortedGrossList)
}
6 changes: 6 additions & 0 deletions R/package.R
Original file line number Diff line number Diff line change
Expand Up @@ -117,3 +117,9 @@
#' @format A gene (rows) by cell (column) matrix
"glial_counts"

#' Truncated Seurat Object with latent space projection
#' done to unspecified cells in different stages for multivariateAnalysisR analysis
#' @name multivariateAnalysisR_seurat_test
#' @docType data
#' @format A Seurat Object with 31034 observations of 4 variables in meta.data:
"multivariateAnalysisR_seurat_test"
Binary file removed data/multivariateAnalysisR-seurat-test.RData
Binary file not shown.
Binary file added data/multivariateAnalysisR_seurat_test.RData
Binary file not shown.
2 changes: 1 addition & 1 deletion man/multivariateAnalysisR.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 18 additions & 0 deletions man/multivariateAnalysisR_seurat_test.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 12 additions & 2 deletions tests/testthat/test_projectR.R
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,17 @@ test_that("results are as expected",{
expect_true(all(!is.na(pca.ESepiGen4c1l)))

#multivariateAnalysisR check
output <- multivariateAnalysisR(multivariateAnalysisR_seurat_test)
expect_true(is.null(output))
output <- multivariateAnalysisR(seuratobj = multivariateAnalysisR_seurat_test,
patternKeys = list("Pattern_1", "Pattern_2"),
dictionaries = list(
list("stage" = "E18"),
list("stage" = "Adult")
)
)
expect_is(output, "list")
expect_length(output, 2)
expect_true("patternKey" %in% names(output[[1]]))
expect_true("ANOVA" %in% names(output[[1]]))
expect_true("CI" %in% names(output[[1]]))

})
2 changes: 1 addition & 1 deletion vignettes/projectR.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,7 @@ The arguments for `multivariateAnalysisR` are:


### Output
The outputs of `multivariateAnalysisR` are two pairs of exported PNG/CSV files: one for ANOVA analysis, another for CI. No values are returned from the function. From the ANOVA analysis, researchers can see the general ranking of differential uses of patterns across the specified clusters. From the CI analysis, researchers can identify the specific differential use cases between every pair of clusters.
`multivariateAnalysisR` returns a sorted list of the generated ANOVA and CI values. It also exports two pairs of exported PNG/CSV files: one for ANOVA analysis, another for CI. From the ANOVA analysis, researchers can see the general ranking of differential uses of patterns across the specified clusters. From the CI analysis, researchers can identify the specific differential use cases between every pair of clusters.

### Comparing differential uses of patterns across different clusters
Demonstrative example will be added soon.
Expand Down
16 changes: 8 additions & 8 deletions vignettes/projectR.html

Large diffs are not rendered by default.

0 comments on commit 8648e21

Please sign in to comment.