Skip to content

Commit

Permalink
p-value option in Fisher's exact test
Browse files Browse the repository at this point in the history
  • Loading branch information
rohitfarmer committed Apr 13, 2023
1 parent 29e6f8f commit 42d2c07
Show file tree
Hide file tree
Showing 17 changed files with 33 additions and 24 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ License: CC0 | file LICENSE
Encoding: UTF-8
LazyData: true
LazyDataCompression: xz
RoxygenNote: 7.2.2
RoxygenNote: 7.2.3
URL: https://github.com/niaid/HDStIM,
https://niaid.github.io/HDStIM/
BugReports: https://github.com/niaid/HDStIM/issues
Expand Down
5 changes: 3 additions & 2 deletions R/HDStIM.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#' @param cellpop_col Column in the tibble with the cell population IDs.
#' @param stim_lab A character vector of stim label(s).
#' @param unstim_lab A character of unstim label(s).
#' @param p_value The P-value for Fisher's exact test. Default is 0.05.
#' @param seed_val Seed value (integer) for \code{\link{kmeans}} clustering.
#' Default is NULL for no seed value.
#' @param umap Boolean (T/F) to carry out UMAP on the selected cells.
Expand Down Expand Up @@ -35,7 +36,7 @@
#' chi11$unstim_label, seed_val = 123, umap = FALSE, umap_cells = NULL,
#' verbose = FALSE)
HDStIM <- function(dat, state_markers, cellpop_col, stim_lab, unstim_lab,
seed_val = NULL, umap = FALSE, umap_cells = NULL,
p_value = 0.05, seed_val = NULL, umap = FALSE, umap_cells = NULL,
verbose = FALSE){
# For debugging.
#library(HDStIM)
Expand Down Expand Up @@ -159,7 +160,7 @@ HDStIM <- function(dat, state_markers, cellpop_col, stim_lab, unstim_lab,
f_stats))

# Select cells and save data only for the combinations that pass the Fisher's exact test.
if(f_p_val < 0.05){
if(f_p_val < p_value){
if(verbose == TRUE){message("Fisher's exact test significant.")}

# Identify responding stimulated cells cluster.
Expand Down
4 changes: 2 additions & 2 deletions docs/404.html

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

6 changes: 3 additions & 3 deletions docs/articles/HDStIM.html

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

2 changes: 1 addition & 1 deletion docs/articles/index.html

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

Loading

0 comments on commit 42d2c07

Please sign in to comment.