Skip to content

Commit

Permalink
Created corr analysis function
Browse files Browse the repository at this point in the history
  • Loading branch information
salsalsal97 committed Jan 4, 2025
1 parent 4d715d2 commit 6f6db4d
Show file tree
Hide file tree
Showing 8 changed files with 311 additions and 245 deletions.
116 changes: 58 additions & 58 deletions .Rhistory
Original file line number Diff line number Diff line change
@@ -1,27 +1,3 @@
n_per_group = 10,
cells_per_case = 20,
cells_per_control = 20,
ncells_variation_type = "Poisson",
pval = 0.05,
foldchange = 2)
error_hierarchicell(data_summ,
method = "Pseudobulk_mean",
n_genes = 1000,
n_per_group = 10,
cells_per_case = 3,
cells_per_control = 3,
ncells_variation_type = "Poisson",
pval = 0.05,
foldchange = 2)
error_hierarchicell(data_summ,
method = "Pseudobulk_mean",
n_genes = 1000,
n_per_group = 10,
cells_per_case = 300,
cells_per_control = 300,
ncells_variation_type = "Poisson",
pval = 0.05,
foldchange = 2)
error_hierarchicell(data_summ,
method = "Pseudobulk_mean",
n_genes = 1000,
Expand Down Expand Up @@ -473,40 +449,64 @@ library(Hmisc)
?select
?select
?setnames
?quantile
?as.formula
library(rworkflows)
getwd()
setwd("../Power_Analysis_package/")
rworkflows::use_workflow()
getwd()
rworkflows::use_workflow()
rworkflows::use_workflow()
rworkflows::use_workflow(branches=c("master","main","devel","RELEASE_**","Rworkflows_test"),save_dir="C:/Users/salma/Power_Analysis_package")
rworkflows::use_workflow(branches=c("master","main","devel","RELEASE_**","Rworkflows_test"),save_dir="C:/Users/salma/Power_Analysis_package/.github")
here::here
here::here(".git","w")
rworkflows::use_workflow(branches=c("master","main","devel","RELEASE_**","Rworkflows_test"),save_dir="C:/Users/salma/Power_Analysis_package/.github/workflows")
getwd()
devtools::check()
getwd()
devtools::load_all()
?rowSums
Matrix::rowSums
?Matrix::rowSums
?select
library(Hmisc)
?select
?get
?names
?aes
?factor
?unique
library(ensembldb)
browseVignettes("ensembldb")
?lapply
?element_text
?duplicted
?duplicated
?length
?sapply
?as.character
?matrix
?unique
conflicts()
conflicts()
library(BiocGenerics)
conflicts()
?geom_bar_repel
library(ggrepel)
?geom_bar_repel
library(ggplot2)
geom_bar_repel
?geom_bar_repel
?get
?select
?scales
?percent
?unit
library(ggplot2)
?unit
class("hello")
test <- list(1,2,3)
test
for(j in list){
for(j in list){
print(j)
}
for(j in test){
print(j)
}
test <- c(1,2,3)
for(j in test){
print(j)
}
getwd()
setwd("C:/Users/salma/Power_Analysis_package")
devtools::document()
?usethis::use_vignette()
usethis::use_vignette("poweranalysis")
#usethis::use_vignette("poweranalysis")
devtools::load_all()
sessionInfo()
getwd()
devtools::document()
devtools::document()
warnings()
devtools::document()
?geom_bar_repel
devtools::document()
install.packages("roxygen2")
install.packages("roxygen2")
install.packages("roxygen2")
install.packages("roxygen2")
library(roxygen2)
packageVersion("roxygen2")
devtools::install()
devtools::check()
devtools::build()
18 changes: 15 additions & 3 deletions R/correlation_analysis.r
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,20 @@ correlation_analysis <- function(dataset_name="placeholder",
numSubsets="placeholder",
output_path=getwd()){

# create correlation plots for each p-value cut-off

return("TestOut")
# run plot_mean_correlation for each p-value (saving outputs)
mean_correlation_results <- plot_mean_correlation(dataset_name,
allstudies,
celltypes,
pvals,
data_names,
output_path)

# run correlation_boxplots for each p-value (saving outputs)
boxplot_results <- correlation_boxplots(mean_correlation_results,
numRealDatasets=length(allstudies),
pvals=pvals,
output_path=output_path)

return(list(mean_correlation_results = mean_correlation_results, boxplot_results = boxplot_results))

}
Loading

0 comments on commit 6f6db4d

Please sign in to comment.