This function uses vectors of the number of samples in two sets that have detection of a set of genes and the total number of cells in each set to compute Chi-quared tests with 1 DOF for differential detection.
vec_chisq_test(x, x.total, y, y.total)an integer vector with the number of cells in group x with detection of each gene.
an integer value with the total number of cells in group x.
an integer vector with the number of cells in group y with detection of each gene.
an integer value with the total number of cells in group y.
a data.frame with the following result for each gene:
stats: The value of the chi-squared test statistic
pval: The p-value as reported by pchisq
logFC: The log2(fold change) in detection frequency between samples (x / y)
diff: The difference in proportions between the samples (x - y)