Package: CellOracleR 0.1.0

CellOracleR: In Silico Gene Perturbation Analysis with Single-Cell Data

An R implementation of the CellOracle framework for in silico gene perturbation analysis and gene regulatory network (GRN) inference from single-cell RNA-seq data. Predicts cell state transitions in response to transcription factor perturbations by combining GRN models with single-cell expression data. Key features include motif analysis for base GRN construction, cluster-specific GRN inference using regularized regression, perturbation simulation with signal propagation, and comprehensive visualization of predicted cell fate changes. Based on the methodology described in Kamimoto et al. (2023) <doi:10.15252/msb.202211547>.

Authors:Zaoqu Liu [aut, cre], Kenji Kamimoto [ctb]

CellOracleR_0.1.0.tar.gz
CellOracleR_0.1.0.zip(r-4.7-x86_64)CellOracleR_0.1.0.zip(r-4.7-arm64)CellOracleR_0.1.0.zip(r-4.6-x86_64)CellOracleR_0.1.0.zip(r-4.6-arm64)CellOracleR_0.1.0.zip(r-4.5-x86_64)
CellOracleR_0.1.0.tgz(r-4.6-x86_64)CellOracleR_0.1.0.tgz(r-4.6-arm64)CellOracleR_0.1.0.tgz(r-4.5-x86_64)CellOracleR_0.1.0.tgz(r-4.5-arm64)
CellOracleR_0.1.0.tar.gz(r-4.7-arm64)CellOracleR_0.1.0.tar.gz(r-4.7-x86_64)CellOracleR_0.1.0.tar.gz(r-4.6-arm64)CellOracleR_0.1.0.tar.gz(r-4.6-x86_64)
CellOracleR_0.1.0.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
CellOracleR/json (API)

# Install 'CellOracleR' in R:
install.packages('CellOracleR', repos = c('https://zaoqu-liu.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/zaoqu-liu/celloracler/issues

Uses libs:
  • openblas– Optimized BLAS
  • c++– GNU Standard C++ Library v3
  • openmp– GCC OpenMP (GOMP) support library

On CRAN:

Conda:

openblascppopenmp

4.18 score 6 stars 7 scripts 81 exports 147 dependencies

Last updated from:e60a1b9d84 (on main). Checks:13 ERROR, 2 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-arm64ERROR285
linux-devel-x86_64ERROR368
source / vignettesOK417
linux-release-arm64ERROR288
linux-release-x86_64ERROR300
macos-release-arm64ERROR253
macos-release-x86_64ERROR707
macos-oldrel-arm64ERROR289
macos-oldrel-x86_64ERROR579
windows-devel-arm64ERROR374
windows-devel-x86_64ERROR348
windows-release-arm64ERROR349
windows-release-x86_64ERROR262
windows-oldrel-x86_64ERROR374
wasm-releaseOK256

Exports:annotate_peaksbuild_coef_matrix_cppbuild_knn_graph_cppcalculate_embedding_shift_cppcalculate_grid_arrows_cppcalculate_relative_ratio_cppcenter_cols_cppclean_transition_prob_cppclip_to_range_cppcol_delta_cor_full_cppcol_delta_cor_partial_cppcolSds_cppcompare_networkscompute_embedding_knn_subset_cppcompute_fate_probabilitycompute_pseudotimecorrelation_to_transition_prob_cppcreate_base_grncreate_oraclecreate_perturb_conditioncreate_tfinfodo_simulation_cppexport_networkextract_expressionextract_peaks_from_signacfilter_linksfind_network_motifsfit_grnfit_grn_baggingfit_grn_coef_matrixgaussian_kernel_cppget_bagging_ridge_coefsget_base_grn_from_ciceroget_bayesian_ridge_coefsget_embeddingget_linksget_network_entropyget_network_scoreget_perturb_valueidentify_hubsknn_distances_to_weights_cppknn_impute_cppLinksload_base_grnload_oracleload_tfinfomarkov_simulatemarkov_walk_batch_cppmarkov_walk_cppNetnetwork_summarynormalize_flow_cppOraclepairwise_dist_cpppermute_rows_nsign_cppplot_clusterplot_degree_distributionplot_gene_expressionplot_network_graphplot_pseudotimeplot_quiverplot_score_comparisonplot_scores_as_rankplot_simulation_combinedplot_simulation_flowplot_transition_sankeyrow_norms_cpprowSds_cppsankeysave_oraclesave_tfinfoscale_cols_cppscan_motifsscore_cv_vs_meansetup_parallelshortest_pathsshuffle_coef_matrix_cppsimulate_shiftsimulation_summarysummarize_trajectoriesTFinfo

Dependencies:abindaskpassbase64encBHbitopsbslibcachemcaToolscliclustercodetoolscommonmarkcowplotcpp11crosstalkcurldata.tabledeldirdigestdotCall64dplyrdqrngevaluatefarverfastDummiesfastmapfitdistrplusFNNfontawesomeforeachfsfuturefuture.applygenericsggplot2ggrepelggridgesglmnetglobalsgluegoftestgplotsgridExtragtablegtoolsherehighrhtmltoolshtmlwidgetshttpuvhttricaigraphirlbaisobanditeratorsjquerylibjsonliteKernSmoothknitrlabelinglaterlatticelazyevallifecyclelistenvlmtestmagrittrMASSMatrixmatrixStatsmemoisemimeminiUInlmeopensslotelparallellypatchworkpbapplypillarpkgconfigplotlyplyrpngpolyclipprogressrpromisespurrrR6RANNrappdirsRColorBrewerRcppRcppAnnoyRcppArmadilloRcppEigenRcppHNSWRcppProgressRcppThreadRcppTOMLreshape2reticulaterlangrmarkdownROCRrprojrootRSpectraRtsneS7sassscalesscattermoresctransformSeuratSeuratObjectshapeshinysitmosourcetoolsspspamspatstat.dataspatstat.explorespatstat.geomspatstat.randomspatstat.sparsespatstat.univarspatstat.utilsstringistringrsurvivalsystensortibbletidyrtidyselecttinytexutf8uwotvctrsviridisLitewithrxfunxtableyamlzoo

Algorithm Principles
Introduction | 1. Gene Regulatory Network (GRN) Inference | 1.1 Mathematical Formulation | 1.2 Ridge Regression | 1.3 Bootstrap Aggregation (Bagging) | 2. Signal Propagation Simulation | 2.1 Perturbation Model | 2.2 Iterative Propagation | 2.3 Non-negativity Constraint | 3. Transition Probability Estimation | 3.1 Correlation-Based Approach | 3.2 Probability Conversion | 3.3 Embedding Shift Calculation | 4. Markov Chain Simulation | 4.1 State Transition Model | 4.2 Trajectory Simulation | 4.3 Fate Probability | 5. Network Analysis Metrics | 5.1 Centrality Measures | 5.2 Network Entropy | Summary | References | Session Info

Last update: 2026-01-24
Started: 2026-01-24

Case Study: Hematopoiesis
Introduction | Biological Background | Hematopoietic Hierarchy | Key Transcription Factors | Simulated Data Setup | Analysis Workflow | Step 1: Create Oracle Object | Step 2: Import Base GRN | Step 3: Fit GRN | Step 4: Simulate Perturbations | Step 5: Analyze Fate Changes | Step 6: Network Analysis | Results Interpretation | GATA1 Knockout | PU.1 Knockout | Key Findings | Code for Full Analysis | Conclusions | References | Session Info

Last update: 2026-01-24
Started: 2026-01-24

Getting Started with CellOracleR
Introduction | Key Features | Workflow Overview | Installation | Load Libraries | Step 1: Prepare Data | Creating Demo Data | Step 2: Create Oracle Object | Step 3: Import Base GRN | Option A: From Motif Analysis (Recommended) | Option B: From Pre-built Database | Option C: Custom Dictionary | Import to Oracle | Step 4: Preprocessing | Step 5: Fit Cluster-Specific GRN | Step 6: Simulate Perturbation | Step 7: Calculate Transition Probabilities | Step 8: Visualize Results | Cluster Overview | Simulation Flow Field | Gene Expression Changes | Step 9: Network Analysis | Top Regulators | Saving and Loading | Advanced: Comparing Multiple Perturbations | Summary | Next Steps | Session Info

Last update: 2026-01-24
Started: 2026-01-24

GRN Inference Details
Overview | Pipeline Architecture | Step 1: Input Data Preparation | Expression Matrix | TF-Target Prior Dictionary | Step 2: Cluster-Specific GRN Fitting | Per-Cluster Fitting | Step 3: Ridge Regression Details | Regularization Parameter (α) | Handling Zero Variance | Step 4: Bootstrap Aggregation | Algorithm | Coefficient Stability Assessment | Step 5: Links Object | Links Data Structure | Performance Considerations | Computational Complexity | Parallelization | C++ Acceleration | Best Practices | 1. Data Quality | 2. Appropriate Clustering | 3. TF-Target Prior Quality | Summary | Session Info

Last update: 2026-01-24
Started: 2026-01-24

Visualization Gallery
Introduction | Cell Embedding Visualizations | Basic Cluster Plot | Gene Expression Overlay | Simulation Flow Visualizations | Quiver Plot (Vector Field) | Streamline Plot | Network Visualizations | Network Graph | Degree Distribution | Network Scores Ranking | Pseudotime Visualizations | Pseudotime on Embedding | Gene Expression along Pseudotime | Comparison Visualizations | Perturbation Comparison | Customization Guide | Color Palettes | Theme Options | Summary | Session Info

Last update: 2026-01-24
Started: 2026-01-24

Readme and manuals

Help Manual

Help pageTopics
Annotate peaks with nearby genesannotate_peaks
Build coefficient matrix from gene-wise resultsbuild_coef_matrix_cpp
Build sparse connectivity matrix from KNN indicesbuild_knn_graph_cpp
Calculate embedding shift from transition probabilitycalculate_embedding_shift_cpp
Grid arrow computationcalculate_grid_arrows_cpp
Calculate relative ratio for OOD detectioncalculate_relative_ratio_cpp
Center matrix columnscenter_cols_cpp
Handle NA and zero-sum rows in transition matrixclean_transition_prob_cpp
Clip delta_X to distribution rangeclip_to_range_cpp
Compute full delta correlation matrixcol_delta_cor_full_cpp
Compute column-wise delta correlation (partial neighbors)col_delta_cor_partial_cpp
Column-wise standard deviationcolSds_cpp
Compare networks between clusterscompare_networks
Compute embedding KNN with subset selectioncompute_embedding_knn_subset_cpp
Compute fate probability to terminal statescompute_fate_probability
Compute pseudotime based on transition probabilitycompute_pseudotime
Calculate transition probability from correlationcorrelation_to_transition_prob_cpp
Create base GRN from scATAC-seq datacreate_base_grn
Create Oracle object from Seuratcreate_oracle
Create perturbation conditioncreate_perturb_condition
Create TFinfo object from peak datacreate_tfinfo
Simulate signal propagation in GRN (C++ implementation)do_simulation_cpp
Export network to various formatsexport_network
Extract expression matrix from Seurat objectextract_expression
Process ATAC-seq peaks from Signacextract_peaks_from_signac
Filter links by thresholdfilter_links
Find network motifsfind_network_motifs
Fit GRN for perturbation simulationfit_grn
Fit GRN with bagging (batch version)fit_grn_bagging
Fit GRN coefficient matrix (single Ridge regression)fit_grn_coef_matrix
Gaussian kernel on distance matrixgaussian_kernel_cpp
Get Bagging Ridge coefficients for a single target geneget_bagging_ridge_coefs
Get base GRN from Cicero/ATAC dataget_base_grn_from_cicero
Get Bayesian Ridge coefficients for a single target geneget_bayesian_ridge_coefs
Get embedding from Seurat objectget_embedding
Get Links object for network analysisget_links
Calculate network entropyget_network_entropy
Calculate network scoresget_network_score
Get perturbation values from expression dataget_perturb_value
Identify hub genesidentify_hubs
Compute KNN connectivity weights from distancesknn_distances_to_weights_cpp
KNN imputation using precomputed neighborsknn_impute_cpp
Links Class for Network AnalysisLinks
Load pre-built base GRNload_base_grn
Load Oracle object from fileload_oracle
Load TFinfo object from fileload_tfinfo
Markov simulation of cell trajectoriesmarkov_simulate
Batch Markov simulation with duplicationmarkov_walk_batch_cpp
Markov chain random walk simulationmarkov_walk_cpp
Net Class for GRN InferenceNet
Calculate network statistics summarynetwork_summary
Normalize flow vectorsnormalize_flow_cpp
Oracle Class for In Silico Gene Perturbation AnalysisOracle
Compute pairwise Euclidean distancespairwise_dist_cpp
Permute rows with sign flip for randomizationpermute_rows_nsign_cpp
Plot cells by clusterplot_cluster
Plot degree distributionplot_degree_distribution
Plot gene expression on embeddingplot_gene_expression
Plot GRN as network graphplot_network_graph
Plot pseudotime on embeddingplot_pseudotime
Plot quiver (cell-level velocity arrows)plot_quiver
Compare network scores between clustersplot_score_comparison
Plot network scores as ranked bar plotplot_scores_as_rank
Create combined simulation plotplot_simulation_combined
Plot perturbation simulation vector fieldplot_simulation_flow
Create Sankey diagram from Oracle transition resultsplot_transition_sankey
Print method for Linksprint.Links
Print method for Netprint.Net
Print method for Oracleprint.Oracle
Print method for TFinfoprint.TFinfo
Row-wise L2 normrow_norms_cpp
Row-wise standard deviationrowSds_cpp
Save Oracle objectsave_oracle
Save TFinfo objectsave_tfinfo
Scale matrix columnsscale_cols_cpp
Scan peaks for TF motifsscan_motifs
Score CV vs Mean for variable gene selectionscore_cv_vs_mean
Setup parallel backendsetup_parallel
Calculate shortest paths between genesshortest_paths
Shuffle coefficient matrix for randomization controlshuffle_coef_matrix_cpp
Simulate gene perturbation shiftsimulate_shift
Summary of simulation resultssimulation_summary
Summarize Markov simulation trajectoriessummarize_trajectories
TFinfo Class for Motif AnalysisTFinfo
Visualization Functionsvisualization