| Title: | Fast Cell-Cell Communication Analysis with Statistical Framework |
|---|---|
| Description: | A high-performance R package for cell-cell communication (CCC) analysis in single-cell RNA sequencing data. FastCCCR implements an innovative statistical framework based on exact null distribution computation, Cauchy combination of multiple statistical methods, and reference-based inference. The package is optimized with Rcpp for computational efficiency and supports both Seurat V4 and V5 objects. Key features include: (1) Multiple scoring methods with Cauchy combination, (2) Reference panel construction and query inference, (3) Support for multiple ligand-receptor databases (CellPhoneDB, CellChat, NicheNet), (4) High-performance vectorized and parallel computation. |
| Authors: | Zaoqu Liu [aut, cre] (ORCID: <https://orcid.org/0000-0002-5520-5765>), Wenjing Zhong [ctb], Marvin Yao [ctb] |
| Maintainer: | Zaoqu Liu <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 1.0.0 |
| Built: | 2026-05-26 08:19:42 UTC |
| Source: | https://github.com/Zaoqu-Liu/FastCCCR |
A high-performance R package for cell-cell communication (CCC) analysis in single-cell RNA sequencing data. FastCCCR implements an innovative statistical framework based on exact null distribution computation, Cauchy combination of multiple statistical methods, and reference-based inference.
fastccc: Simple wrapper for CCC analysis
fastccc_cauchy: Full analysis with Cauchy combination
statistical_analysis_method: Single method analysis
build_reference: Build reference panel
infer_query: Infer using reference
plot_ccc_network: Network visualization
plot_ccc_heatmap: Heatmap visualization
plot_ccc_chord: Chord diagram
CellPhoneDB v4.1.0, v5.0.0
CellChat v1.6.1
NicheNet v1.1.1, v2.1.5
FastCCCR supports both Seurat V4 and V5 objects. The package automatically detects the Seurat version and uses the appropriate methods.
Zaoqu Liu [email protected]
Liu, Z. et al. (2026). FastCCCR: Fast Cell-Cell Communication Analysis with Statistical Framework.
Useful links:
Determine which interactions pass expression threshold
analyze_interactions_percents( cluster_percents, interactions, threshold = 0.1, sep = "|" )analyze_interactions_percents( cluster_percents, interactions, threshold = 0.1, sep = "|" )
cluster_percents |
data.table of expression percentages |
interactions |
data.table of interactions |
threshold |
Minimum percentage threshold |
sep |
Separator for cell type pair names |
data.table of logical values (TRUE = passes threshold)
Compute sum distributions for all genes at once (FAST!)
batch_compute_gene_distributions_cpp( expr_mat, bin_edges_r, n_fft = 30L, max_value = 20, n_threads = 0L )batch_compute_gene_distributions_cpp( expr_mat, bin_edges_r, n_fft = 30L, max_value = 20, n_threads = 0L )
expr_mat |
Expression matrix (genes x cells) |
n_fft |
Number of convolutions to compute |
max_value |
Maximum value to clip (for histogram) |
n_threads |
Number of threads (0 = auto) |
bin_edges |
Histogram bin edges |
List of lists: gene_sum_pmf[gene][n]
Compute p-values for all valid interactions at once (FAST!)
batch_compute_pvalues_cpp( ligand_pmfs, receptor_pmfs, observed_values, precision = 0.01 )batch_compute_pvalues_cpp( ligand_pmfs, receptor_pmfs, observed_values, precision = 0.01 )
ligand_pmfs |
List of ligand PMF arrays (one per interaction) |
receptor_pmfs |
List of receptor PMF arrays (one per interaction) |
observed_values |
Vector of observed interaction strengths |
precision |
PMF precision (default 0.01) |
Vector of p-values
Build a CCC reference panel from atlas data
build_reference( seurat_obj, reference_name, database, celltype_col, save_path = ".", min_percentile = 0.1, min_genes_per_cell = 50L, debug_mode = FALSE )build_reference( seurat_obj, reference_name, database, celltype_col, save_path = ".", min_percentile = 0.1, min_genes_per_cell = 50L, debug_mode = FALSE )
seurat_obj |
Seurat object with reference data |
reference_name |
Name for the reference |
database |
Database name or path |
celltype_col |
Column name for cell type |
save_path |
Path to save reference |
min_percentile |
Minimum expression percentage |
min_genes_per_cell |
Minimum genes per cell for QC |
debug_mode |
Whether to save debug files |
Invisibly returns save path
Calculate mean expression per cluster for each gene
calculate_cluster_mean(counts_dt, labels_dt)calculate_cluster_mean(counts_dt, labels_dt)
counts_dt |
data.table of expression (cells x genes) |
labels_dt |
data.table with cell_type column |
data.table (clusters x genes)
Compute null distribution of mean expression per cluster
calculate_cluster_mean_distribution( counts_dt, labels_dt, n_fft = NULL, mode = "continuous", parallel = FALSE, n_cores = NULL )calculate_cluster_mean_distribution( counts_dt, labels_dt, n_fft = NULL, mode = "continuous", parallel = FALSE, n_cores = NULL )
counts_dt |
data.table of expression (cells x genes) |
labels_dt |
data.table with cell_type column |
n_fft |
Maximum n for exact convolution. NULL = auto (30 for continuous, 100 for digit) |
mode |
Distribution mode ("continuous" or "digit") |
parallel |
Whether to use parallel computation |
n_cores |
Number of cores for parallel |
data.table where each cell contains a Distribution object
Calculate mean expression per cluster
calculate_cluster_means_cpp(expr, labels, n_clusters)calculate_cluster_means_cpp(expr, labels, n_clusters)
expr |
Expression matrix (genes x cells) |
labels |
Integer vector of cluster labels (1-indexed) |
n_clusters |
Number of clusters |
Matrix of means (genes x clusters)
Calculate percentage of cells expressing each gene per cluster
calculate_cluster_percents(counts_dt, labels_dt)calculate_cluster_percents(counts_dt, labels_dt)
counts_dt |
data.table of expression |
labels_dt |
data.table with cell_type column |
data.table (clusters x genes)
Calculate percentage of cells expressing each gene per cluster
calculate_cluster_percents_cpp(expr, labels, n_clusters)calculate_cluster_percents_cpp(expr, labels, n_clusters)
expr |
Expression matrix (genes x cells) |
labels |
Integer vector of cluster labels (1-indexed) |
n_clusters |
Number of clusters |
Matrix of percentages (genes x clusters)
Calculate quantile expression per cluster
calculate_cluster_quantile(counts_dt, labels_dt, qt = 0.9)calculate_cluster_quantile(counts_dt, labels_dt, qt = 0.9)
counts_dt |
data.table of expression |
labels_dt |
data.table with cell_type column |
qt |
Quantile (0-1) |
data.table (clusters x genes)
Compute null distribution of quantile expression per cluster
calculate_cluster_quantile_distribution( counts_dt, labels_dt, quantile = 0.9, mode = "continuous", parallel = FALSE, n_cores = NULL )calculate_cluster_quantile_distribution( counts_dt, labels_dt, quantile = 0.9, mode = "continuous", parallel = FALSE, n_cores = NULL )
counts_dt |
data.table of expression |
labels_dt |
data.table with cell_type column |
quantile |
Quantile to compute (0-1) |
mode |
Distribution mode ("continuous" or "digit") |
parallel |
Whether to use parallel computation |
n_cores |
Number of cores |
data.table where each cell contains a Distribution object
Calculate quantile expression per cluster
calculate_cluster_quantiles_cpp(expr, labels, n_clusters, quantile = 0.9)calculate_cluster_quantiles_cpp(expr, labels, n_clusters, quantile = 0.9)
expr |
Expression matrix (genes x cells) |
labels |
Integer vector of cluster labels (1-indexed) |
n_clusters |
Number of clusters |
quantile |
Quantile to compute (0-1) |
Matrix of quantiles (genes x clusters)
Calculate L-R interaction strengths for all cell type pairs
calculate_interaction_strengths_cpp( mean_expr, ligand_idx, receptor_idx, method = 1L )calculate_interaction_strengths_cpp( mean_expr, ligand_idx, receptor_idx, method = 1L )
mean_expr |
Mean expression matrix (genes x clusters) |
ligand_idx |
Ligand gene indices (0-indexed) |
receptor_idx |
Receptor gene indices (0-indexed) |
method |
Method: 1 = arithmetic, 2 = geometric |
3D array (n_interactions x n_clusters x n_clusters)
Compute p-values for L-R interactions
calculate_interactions_pvalue( mean_pmf_dt, interactions, interactions_strength, percents_analysis, method = "Arithmetic", parallel = FALSE, n_cores = NULL )calculate_interactions_pvalue( mean_pmf_dt, interactions, interactions_strength, percents_analysis, method = "Arithmetic", parallel = FALSE, n_cores = NULL )
mean_pmf_dt |
data.table of cluster distributions (clusters x genes) |
interactions |
data.table of interactions |
interactions_strength |
data.table of interaction strengths |
percents_analysis |
data.table of logical (passes threshold) |
method |
"Arithmetic" or "Geometric" |
parallel |
Whether to use parallel processing (reserved for future) |
n_cores |
Number of cores for parallel processing (reserved for future) |
data.table of p-values (cell type pairs x interactions)
Calculate L-R interaction strengths for all cell type pairs. Uses C++ implementation for ~20x speedup.
calculate_interactions_strength( mean_counts, interactions, method = "Arithmetic", sep = "|" )calculate_interactions_strength( mean_counts, interactions, method = "Arithmetic", sep = "|" )
mean_counts |
data.table of mean expression (clusters x genes) |
interactions |
data.table of interactions |
method |
"Arithmetic" or "Geometric" |
sep |
Separator for cell type pair names |
data.table (cell type pairs x interactions)
Combine p-values from multiple methods using Cauchy distribution
cauchy_combine(pval_list, weights = NULL)cauchy_combine(pval_list, weights = NULL)
pval_list |
List of p-value data.tables |
weights |
Optional weight vector (NULL for equal weights) |
data.table of combined p-values
Combine p-values using Cauchy distribution
cauchy_combine_cpp(pvals, weights = NULL)cauchy_combine_cpp(pvals, weights = NULL)
pvals |
Matrix of p-values (rows = tests, cols = methods) |
weights |
Weight vector (NULL for equal weights) |
Vector of combined p-values
Combine p-value files in a directory
cauchy_combine_files(result_dir, task_id = NULL, pattern = "*_pvals.tsv")cauchy_combine_files(result_dir, task_id = NULL, pattern = "*_pvals.tsv")
result_dir |
Directory containing p-value files |
task_id |
Task ID to filter files (NULL for all) |
pattern |
File pattern to match |
data.table of combined p-values
Combine p-values and compute Cauchy statistic
cauchy_combine_with_stat(pval_list, weights = NULL)cauchy_combine_with_stat(pval_list, weights = NULL)
pval_list |
List of p-value data.tables |
weights |
Optional weight vector |
List with combined p-values and statistics
Additional filtering based on differential expression
check_interactions_by_DEG(mean_counts, mean_pmf_dt, interactions, pvals)check_interactions_by_DEG(mean_counts, mean_pmf_dt, interactions, pvals)
mean_counts |
data.table of mean expression |
mean_pmf_dt |
data.table of distributions |
interactions |
data.table of interactions |
pvals |
data.table of p-values |
Updated p-values with DEG filtering
Calculate cluster markers using FastCCC statistics
cluster_markers_method( seurat_obj, celltype_col, cluster_method = "Mean", quantile = 0.9 )cluster_markers_method( seurat_obj, celltype_col, cluster_method = "Mean", quantile = 0.9 )
seurat_obj |
Seurat object |
celltype_col |
Column for cell type |
cluster_method |
Method ("Mean" or "Quantile") |
quantile |
Quantile value |
List with mean counts, distributions, and p-values
Add complex expression scores to cluster scores
combine_complex_distribution(mean_counts, complex_table, agg_func = "min")combine_complex_distribution(mean_counts, complex_table, agg_func = "min")
mean_counts |
data.table of cluster means |
complex_table |
data.table of complex composition |
agg_func |
Aggregation function ("min" or "mean") |
data.table with complex scores added
Add complex distributions to cluster distributions
combine_complex_distribution_dt(dist_dt, complex_table, complex_func = "min")combine_complex_distribution_dt(dist_dt, complex_table, complex_func = "min")
dist_dt |
data.table of distributions (clusters x genes) |
complex_table |
data.table of complex composition |
complex_func |
Function to combine subunit distributions ("min" or "avg") |
data.table with complex distributions added
Create Distribution from Samples
create_distribution(samples, mode = "continuous")create_distribution(samples, mode = "continuous")
samples |
Numeric vector of samples |
mode |
"continuous" or "digit" |
Distribution object
Create summary of significant interactions
create_significant_df(pvals, database_path, threshold = 0.05)create_significant_df(pvals, database_path, threshold = 0.05)
pvals |
data.table of p-values |
database_path |
Path to database |
threshold |
P-value threshold |
data.table of significant interactions
Transform expression values to rank-based bins
digitize_transform_cpp(x, n_bins = 50L)digitize_transform_cpp(x, n_bins = 50L)
x |
Numeric vector (non-zero values) |
n_bins |
Number of bins |
Integer vector of bin indices
Functions for computing distributions of protein complexes
Functions for computing distributions of cluster statistics
R6 class representing probability distributions for CCC analysis
An R6 class representing probability mass functions (PMF) with optimized operations for cell-cell communication analysis. Supports both discrete PMF arrays and normal distribution approximations.
The Distribution class supports the following operations:
Addition: Sum of two independent random variables (FFT convolution)
Power: Sum of n i.i.d. random variables
Division: Average of n i.i.d. random variables
And (&): Special operation for L+R combination
dtypeDistribution type: "normal" or "other"
locLocation parameter (mean for normal)
scaleScale parameter (sd for normal)
pmf_arrayPMF array
is_alignWhether PMF is aligned to standard bins
is_normal_typeWhether distribution is normal type
is_analyticWhether distribution has analytic CDF
is_complex_analyticWhether from complex combination
cdf_analytic_funcAnalytic CDF function (for normal)
min_cdf_non_zeroLower bound of support
min_cdf_oneUpper bound of support
support_lengthLength of support
ligandLigand distribution (for complex analytic)
receptorReceptor distribution (for complex analytic)
modeDistribution mode: "continuous" or "digit"
new()
Create a new Distribution object
Distribution$new( dtype = "other", loc = NULL, scale = NULL, samples = NULL, pmf_array = NULL, is_align = NULL, mode = "continuous", eps = 1e-04 )
dtypeType: "normal", "gaussian", or "other"
locLocation parameter (mean)
scaleScale parameter (sd)
samplesSample data to construct PMF
pmf_arrayPre-computed PMF array
is_alignWhether PMF is aligned
modeDistribution mode ("continuous" or "digit")
epsTolerance for PMF sum check
A new Distribution object
get_mean()
Get mean of distribution
Distribution$get_mean()
Mean value
get_std()
Get standard deviation
Distribution$get_std()
SD value
get_var()
Get variance
Distribution$get_var()
Variance value
get_pmf_array()
Get PMF array
Distribution$get_pmf_array()
PMF array
get_cdf_array()
Get CDF array
Distribution$get_cdf_array()
CDF array
add()
Add two distributions (convolution)
Distribution$add(other)
otherAnother Distribution object
New Distribution representing sum
power()
Sum of n i.i.d. copies
Distribution$power(n)
nNumber of copies
New Distribution
divide()
Average of n i.i.d. copies
Distribution$divide(n)
nNumber of copies
New Distribution
and_op()
Special "and" operation for L+R
Distribution$and_op(other)
otherAnother Distribution
New Distribution
mul_op()
Geometric mean of two distributions (sqrt(X*Y))
Distribution$mul_op(other)
otherAnother Distribution
Uses C++ implementation for ~80x speedup over R version. Computes distribution of sqrt(X*Y) given distributions of X and Y.
New Distribution representing sqrt(XY)
copy()
Copy the distribution
Distribution$copy()
A deep copy of this Distribution
print()
Print method
Distribution$print()
clone()
The objects of this class are cloneable with this method.
Distribution$clone(deep = FALSE)
deepWhether to make a deep clone.
Compute histogram with specified breaks
fast_histogram_cpp(x, breaks)fast_histogram_cpp(x, breaks)
x |
Numeric vector |
breaks |
Break points |
Counts per bin
Simple wrapper for FastCCC analysis
fastccc(seurat_obj, database = "CPDBv5.0.0", celltype_col = "cell_type", ...)fastccc(seurat_obj, database = "CPDBv5.0.0", celltype_col = "cell_type", ...)
seurat_obj |
Seurat object |
database |
Database name (default: "CPDBv5.0.0") |
celltype_col |
Cell type column name |
... |
Additional arguments passed to fastccc_cauchy |
List with analysis results
Run FastCCC analysis with multiple methods and Cauchy combination
fastccc_cauchy( seurat_obj, database, celltype_col, single_unit_summary_list = c("Mean", "Median", "Q3", "Quantile_0.9"), complex_aggregation_list = c("Minimum", "Average"), LR_combination_list = c("Arithmetic", "Geometric"), min_percentile = 0.1, save_path = NULL, use_DEG = FALSE, parallel = FALSE, n_cores = NULL )fastccc_cauchy( seurat_obj, database, celltype_col, single_unit_summary_list = c("Mean", "Median", "Q3", "Quantile_0.9"), complex_aggregation_list = c("Minimum", "Average"), LR_combination_list = c("Arithmetic", "Geometric"), min_percentile = 0.1, save_path = NULL, use_DEG = FALSE, parallel = FALSE, n_cores = NULL )
seurat_obj |
Seurat object |
database |
Database name or path |
celltype_col |
Column name for cell type labels |
single_unit_summary_list |
Methods for single-unit summary |
complex_aggregation_list |
Methods for complex aggregation |
LR_combination_list |
Methods for L-R combination |
min_percentile |
Minimum expression percentage threshold |
save_path |
Path to save results (NULL for current directory) |
use_DEG |
Whether to filter by DEG |
parallel |
Whether to use parallel computation |
n_cores |
Number of cores for parallel |
List with results
Fast convolution using FFT
fft_convolve_cpp(x, y)fft_convolve_cpp(x, y)
x |
First vector |
y |
Second vector |
Convolution result
Compute distribution of average of k random variables
get_average_distribution(dist_list)get_average_distribution(dist_list)
dist_list |
List of Distribution objects |
Distribution object
Extract expression data without interaction filtering
get_count_data(seurat_obj, celltype_col)get_count_data(seurat_obj, celltype_col)
seurat_obj |
Seurat object |
celltype_col |
Column name for cell type |
List with counts_dt and labels_dt
Extract and preprocess data from Seurat object for CCC analysis
get_input_data( seurat_obj, database, celltype_col, convert_type = "hgnc_symbol", filter_genes = FALSE, min_cells = 1L )get_input_data( seurat_obj, database, celltype_col, convert_type = "hgnc_symbol", filter_genes = FALSE, min_cells = 1L )
seurat_obj |
Seurat object |
database |
Database name or path |
celltype_col |
Column name for cell type labels |
convert_type |
Gene name type ("hgnc_symbol") |
filter_genes |
Whether to filter low-expressed genes |
min_cells |
Minimum cells expressing a gene |
List containing counts_dt, labels_dt, complex_table, interactions
Load expression and metadata from files
get_input_data_from_files( counts_file, meta_file, database, celltype_col = "cell_type", convert_type = "hgnc_symbol" )get_input_data_from_files( counts_file, meta_file, database, celltype_col = "cell_type", convert_type = "hgnc_symbol" )
counts_file |
Path to counts file (CSV/TSV) |
meta_file |
Path to metadata file |
database |
Database name or path |
celltype_col |
Column name for cell type |
convert_type |
Gene name type |
List with processed data
Load ligand-receptor interactions from database
get_interactions(database, select_list = NULL)get_interactions(database, select_list = NULL)
database |
Database name or path |
select_list |
Optional vector of interaction IDs to select |
data.table with interaction information
Get Minimum Distribution
get_minimum_distribution(dist_list)get_minimum_distribution(dist_list)
dist_list |
List of Distribution objects |
Distribution object
Compute distribution of min(X1, X2, ..., Xk)
get_minimum_distribution_cpp(pmf_list)get_minimum_distribution_cpp(pmf_list)
pmf_list |
List of PMF vectors |
PMF of minimum
Extract network data from results
get_network_data(results, pval_threshold = 0.05)get_network_data(results, pval_threshold = 0.05)
results |
Results from fastccc |
pval_threshold |
P-value threshold |
List with nodes and edges data frames
Get PMF Array from Digitized Samples
get_pmf_from_digit_samples(samples, n_bins = 50L)get_pmf_from_digit_samples(samples, n_bins = 50L)
samples |
Digitized samples (integer 0 to n_bins) |
n_bins |
Number of bins |
PMF array
Get p-value from Distribution
get_pvalue(value, dist, mode = "continuous")get_pvalue(value, dist, mode = "continuous")
value |
Observed value |
dist |
Distribution object or PMF array |
mode |
"continuous" or "digit" |
P-value
Calculate p-values for multiple observed values
get_pvalues_from_pmf_cpp(values, pmf, precision = 0.01)get_pvalues_from_pmf_cpp(values, pmf, precision = 0.01)
values |
Numeric vector of observed values |
pmf |
PMF array |
precision |
Precision (bin width) |
Vector of p-values
Extract network data based on interaction strength
get_strength_network_data(results, pval_threshold = 0.05)get_strength_network_data(results, pval_threshold = 0.05)
results |
Results containing both pvals and strength |
pval_threshold |
P-value threshold |
List with nodes and edges
Get threshold from Distribution (for significance)
get_threshold(dist, alpha = 0.05, mode = "digit")get_threshold(dist, alpha = 0.05, mode = "digit")
dist |
Distribution object |
alpha |
Significance level (right-tail area) |
mode |
"continuous" or "digit" |
Threshold value
Infer cell-cell communication for query data using reference
infer_query( seurat_obj, reference_path, database, celltype_col, celltype_mapping = NULL, save_path = NULL, min_genes_per_cell = 50L, debug_mode = FALSE, k = NULL )infer_query( seurat_obj, reference_path, database, celltype_col, celltype_mapping = NULL, save_path = NULL, min_genes_per_cell = 50L, debug_mode = FALSE, k = NULL )
seurat_obj |
Query Seurat object |
reference_path |
Path to reference panel |
database |
Database name or path |
celltype_col |
Column name for cell type |
celltype_mapping |
Optional named list mapping reference to query cell types |
save_path |
Path to save results |
min_genes_per_cell |
Minimum genes per cell |
debug_mode |
Whether to output debug files |
k |
Scaling factor for confidence interval (NULL for auto) |
List with inference results
Load Reference Config
load_reference_config(ref_path)load_reference_config(ref_path)
ref_path |
Reference path |
List with configuration
Compute distribution of sqrt(X*Y) given distributions of X and Y
multiply_distributions_cpp(pmf1, pmf2)multiply_distributions_cpp(pmf1, pmf2)
pmf1 |
PMF of first distribution |
pmf2 |
PMF of second distribution |
PMF of sqrt(X*Y)
Create chord diagram of cell-cell communication
plot_ccc_chord(results, pval_threshold = 0.05, min_interactions = 1, ...)plot_ccc_chord(results, pval_threshold = 0.05, min_interactions = 1, ...)
results |
Results from fastccc |
pval_threshold |
P-value threshold |
min_interactions |
Minimum interactions for connection |
... |
Additional arguments passed to circlize::chordDiagram |
NULL (plots to device)
Create heatmap visualization of interaction strengths
plot_ccc_heatmap( results, show_pval = TRUE, pval_threshold = 0.05, cluster_rows = TRUE, cluster_cols = TRUE, top_n = 50, ... )plot_ccc_heatmap( results, show_pval = TRUE, pval_threshold = 0.05, cluster_rows = TRUE, cluster_cols = TRUE, top_n = 50, ... )
results |
Results from fastccc |
show_pval |
Whether to overlay p-value significance |
pval_threshold |
P-value threshold |
cluster_rows |
Whether to cluster rows |
cluster_cols |
Whether to cluster columns |
top_n |
Show only top N interactions by variance |
... |
Additional arguments passed to ComplexHeatmap |
ComplexHeatmap object
Create network visualization of cell-cell communication
plot_ccc_network( results, pval_threshold = 0.05, min_interactions = 1, layout = "circle", vertex_size_scale = 1, edge_width_scale = 1, ... )plot_ccc_network( results, pval_threshold = 0.05, min_interactions = 1, layout = "circle", vertex_size_scale = 1, edge_width_scale = 1, ... )
results |
Results from fastccc or related functions |
pval_threshold |
P-value threshold for significance |
min_interactions |
Minimum interactions to show edge |
layout |
Network layout algorithm |
vertex_size_scale |
Scale factor for vertex size |
edge_width_scale |
Scale factor for edge width |
... |
Additional arguments passed to plot |
igraph plot (invisibly returns igraph object)
Run FastCCC with a single statistical method
statistical_analysis_method( seurat_obj, database, celltype_col, single_unit_summary = "Mean", complex_aggregation = "Minimum", LR_combination = "Arithmetic", min_percentile = 0.1, style = NULL, use_DEG = FALSE, save_path = NULL, parallel = FALSE, n_cores = NULL )statistical_analysis_method( seurat_obj, database, celltype_col, single_unit_summary = "Mean", complex_aggregation = "Minimum", LR_combination = "Arithmetic", min_percentile = 0.1, style = NULL, use_DEG = FALSE, save_path = NULL, parallel = FALSE, n_cores = NULL )
seurat_obj |
Seurat object |
database |
Database name or path |
celltype_col |
Column name for cell type labels |
single_unit_summary |
Single-unit summary method |
complex_aggregation |
Complex aggregation method |
LR_combination |
L-R combination method |
min_percentile |
Minimum expression percentage |
style |
Preset style ("cpdb" for CellPhoneDB-like) |
use_DEG |
Whether to filter by DEG |
save_path |
Path to save results |
parallel |
Whether to use parallel |
n_cores |
Number of cores |
List with results
Compute sum of k distributions using repeated convolution
sum_distributions_cpp(pmf_list)sum_distributions_cpp(pmf_list)
pmf_list |
List of PMF vectors |
PMF of sum