Description Usage Arguments Value References Examples
Main function to perform complex hypothesis testing using (un)conditional independence test
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | ccdf_testing(
exprmat = NULL,
variable2test = NULL,
covariate = NULL,
distance = c("L2", "L1", "L_sup"),
test = c("asymptotic", "permutations", "dist_permutations"),
method = c("linear regression", "logistic regression", "RF"),
fast = TRUE,
n_perm = 100,
n_perm_adaptive = c(100, 150, 250, 500),
thresholds = c(0.1, 0.05, 0.01),
parallel = TRUE,
n_cpus = NULL,
adaptive = FALSE,
space_y = FALSE,
number_y = ncol(exprmat)
)
|
exprmat |
a data frame of size |
variable2test |
a data frame of numeric or factor vector(s)
of size |
covariate |
a data frame of numeric or factor vector(s)
of size |
distance |
a character string indicating which distance to use to
compute the test, either |
test |
a character string indicating which method to use to
compute the test, either |
method |
a character string indicating which method to use to
compute the CCDF, either |
fast |
a logical flag indicating whether the fast implementation of
logistic regression should be used. Only if |
n_perm |
the number of permutations. Default is |
n_perm_adaptive |
a vector of the increasing numbers of
adaptive permutations when |
thresholds |
a vector of the decreasing thresholds to compute
adaptive permutations when |
parallel |
a logical flag indicating whether parallel computation
should be enabled. Default is |
n_cpus |
an integer indicating the number of cores to be used when
|
adaptive |
a logical flag indicating whether adaptive permutations
should be performed. Default is |
space_y |
a logical flag indicating whether the y thresholds are spaced.
When |
number_y |
an integer value indicating the number of y thresholds (and therefore
the number of regressions) to perform the test. Default is |
A list with the following elements:
which_test
: a character string carrying forward the value of
the 'which_test
' argument indicating which test was performed (either
'asymptotic','permutations','dist_permutations').
n_perm
: an integer carrying forward the value of the
'n_perm
' argument or 'n_perm_adaptive
' indicating the number of permutations performed
(NA
if asymptotic test was performed).
pval
: computed p-values. A data frame with one raw for
each gene, and with 2 columns: the first one 'raw_pval
' contains
the raw p-values, the second one 'adj_pval
' contains the FDR adjusted p-values
using Benjamini-Hochberg correction.
Gauthier M, Agniel D, ThiƩbaut R & Hejblum BP (2019). Distribution-free complex hypothesis testing for single-cell RNA-seq differential expression analysis, *bioRxiv* 445165. [DOI: 10.1101/2021.05.21.445165](https://doi.org/10.1101/2021.05.21.445165).
1 2 3 4 5 | X <- as.factor(rbinom(n=100, size = 1, prob = 0.5))
Y <- t(replicate(10, ((X==1)*rnorm(n = 50,0,1)) + ((X==0)*rnorm(n = 50,0.5,1))))
res_asymp <- ccdf_testing(exprmat=data.frame(Y=Y),
variable2test=data.frame(X=X), test="asymptotic",
n_cpus=1)$pvals # asymptotic test
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.