Description Usage Arguments Value Author(s) Examples
measureTrPhe
idenfifies mutually exclusive transcriptional phenotypes in single cell data (normalised read counts, SingleCellExperiment): genes expressed in one cell type but not the other (or all other) using one-tailed Wilcox, KS or other differential expression tests
measureTrPheSingle
: idenfifies mutually exclusive transcriptional phenotypes for 2 clusters of single cells
clusterCOMBS
: produces a data.table specifying all combinations of clusters for differential expression analysis.
countNonZeros
: count non-zero cells per gene and per cluster
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | measureTrPhe(data, method = c("wilcox", "ks")[1], mode = c("pairwise",
"one_vs_all")[1], cutoff = 1, assays_matrix_name = "norm_counts",
colData_cluster_col = "clusters", pval_corr_method = "fdr",
low_exprs_threshold = 0.1, low_exprs_cells = 6,
n_cores = detectCores() - 1)
measureTrPheSingle(norm_counts, combinations, combinations_ind = 1,
cutoff = 0.05, pval_corr_method = "fdr", low_exprs_threshold = 1,
low_exprs_cells = 6, method = c("wilcox", "ks")[1])
clusterCOMBS(clusters, mode = c("pairwise", "one_vs_all")[1])
countNonZeros(data, low_exprs_threshold = 0.1,
colData_cluster_col = "clusters", assays_matrix_name = "norm_counts")
|
data |
object of class SingleCellExperiment containing single cell data (normalised read counts, cells already assigned to clusters) |
method |
method for detecting differentially expressed genes. Currently only Wilcox and KS tests are implemented wilcox.test, ks.test. |
mode |
compare clusters to each other ( |
cutoff |
FDR-corrected p-value cutoff |
assays_matrix_name |
name of the matrix in |
colData_cluster_col |
name of the column in |
pval_corr_method |
multiple hypothesis p-value correction method. Details: p.adjust - method. |
low_exprs_threshold |
threshold (normalised read count) below which gene doesn't qualify as being expressed in a cell |
low_exprs_cells |
remove genes that are expressed at a level higher or equal |
n_cores |
number of cores to be used in parallel processing (over combinations of clusters). More details: parLapply, makeCluster, detectCores |
combinations |
data.table containing phenotype id (phenotypes) and which clusters are to be compared |
combinations_ind |
which combination should be analysed? |
clusters |
character vector, clusters (cell types) present in the data |
clusters |
character vector, clusters (cell types) present in the data |
measureTrPhe
: data.table containing data.table containing phenotype id (phenotypes), which genes are assigned to them, test statistic and difference in medians between clusters
measureTrPheSingle
: data.table containing phenotype id (phenotypes), which genes are assigned to them, test statistic and difference in medians between clusters
clusterCOMBS
: data.table containing phenotype id (phenotypes) and which clusters are to be compared
countNonZeros
: data.table containing the number of cells, number of non-zero cells per each gene and cluster
Vitalii Kleshchevnikov
1 2 3 4 5 6 7 8 9 10 11 12 | library(ArrayExpress)
library(SingleCellExperiment)
library(data.table)
library(ggplot2)
file_paths = getAE("E-MTAB-6153", type = "processed", path = "../regulatory_networks_by_cmap/data/organogenesis_scRNAseq", local = T)
# keep only normalised counts
file_paths$processedFiles = file_paths$processedFiles[file_paths$processedFiles == "normalisedCounts.tsv"]
# get the list of column names
cnames = getcolproc(file_paths)
data = readEMTAB6153ProcData(path = "../regulatory_networks_by_cmap/data/organogenesis_scRNAseq", procFile = "normalisedCounts.tsv", procol = cnames)
pVals = measureTrPhe(data, method = "wilcox", mode = c("pairwise", "one_vs_all")[1], cutoff = 1, assays_matrix_name = "norm_counts", colData_cluster_col = "clusters", pval_corr_method = "fdr", low_exprs_threshold = 0.1, low_exprs_cells = 6, n_cores = detectCores() - 1)
qplot(x = pVals$diff_median, y = -log10(pVals$pVals), geom = "bin2d", xlim = c(-1,50), ylim = c(-1, 300), bins = 150) + theme_light()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.