nichenetr

repository·master·Indexed 20 days ago

https://github.com/saeyslab/nichenetr

An R implementation of the NicheNet method for studying intercellular communication. It predicts how ligands from sender cells influence gene expression in receiver cells by integrating ligand-receptor interactions, signaling pathways, and transcription factor regulation. The package supports human and mouse data, providing workflows for ligand prioritization, signaling path inference, and Circos plot visualization, with specific support for Seurat objects.

Tokens
61.3K
Snippets
120
Records
161
Agent score
68%

What's inside nichenetr

  1. Overview of NicheNet functionality

    master

    NicheNet is an R implementation designed to study intercellular communication (CCC) by linking ligands to their downstream target genes. Unlike traditional approaches that only link ligands to receptors, NicheNet incorporates intracellular signaling and transcriptional regulation to predict how ligands influence gene expression in receiver cells.

    Core capabilities include:

    • Assessing how well sender-cell ligands predict gene expression changes in receiver cells.
    • Prioritizing ligands based on their effect on gene expression.
    • Inferring putative ligand-target links and potential signaling paths.
    • Validating the prior ligand-target model.
    • Constructing user-defined prior ligand-target models.

    Input requirements: Users must provide cell type-annotated expression data (single-cell or sorted bulk) for human or mouse. The analysis extracts three key features: a list of potential ligands, a gene set capturing downstream effects, and a background set of genes.

  2. What is Differential NicheNet?

    master
    Differential NicheNet is an extension of NicheNet designed to predict ligand-receptor pairs that are both differentially expressed and active between different niches or conditions of interest. It allows for the comparison of cell-cell communication patterns across different microenvironments (e.g., comparing high vs. low pEMT status in tumors).
  3. Using NicheNet with steady-state data

    master

    NicheNet is designed to prioritize ligand-receptor interactions based on their observed effect on gene expression (target genes). Therefore, it requires some form of differential expression in the receiver cell population to function effectively. This differential expression can be:

    1. Between two conditions: e.g., comparing a treated vs. control state.
    2. Between two cell types: e.g., comparing a progenitor cell to a differentiated cell type where differentiation is influenced by the microenvironment.

    If you only have steady-state (homeostatic) data and want to find ligand-receptor pairs, you can infer them based solely on expression levels (similar to CellphoneDB), but NicheNet's core strength—prioritizing based on downstream target gene enrichment—will be limited.

    Warning: If you use all expressed genes in a cell type as your geneset_oi (gene set of interest) in steady-state data, you risk falsely linking ligands to 'cell-intrinsic' genes (genes that are part of the cell's identity rather than being regulated by the environment). This leads to noisy and irrelevant predictions.

  4. Sender-agnostic vs. Sender-focused approaches

    master

    NicheNet supports two approaches for identifying potential ligands:

    1. Sender-agnostic approach: Considers all ligands for which the cognate receptor is expressed in the receiver population. It does not define specific sender populations.
    2. Sender-focused approach: Filters the list of potential ligands to only those that are expressed in specific sender cell populations.

    It is recommended to run both approaches to get a comprehensive view of potential regulators.

  5. Prioritize ligands based on expression values

    master

    NicheNet includes functionality to prioritize ligands using criteria beyond just ligand activity. You can prioritize ligands based on:

    • Ligand and receptor expression
    • Cell type specificity
    • Condition specificity

    This general prioritization scheme is intended to replace the deprecated Differential NicheNet functionality. For detailed implementation steps, refer to the seurat_steps_prioritization vignette.

    # To view the prioritization guide:
    vignette("seurat_steps_prioritization", package="nichenetr")
  6. How NicheNet constructs ligand-target regulatory potential

    master

    NicheNet predicts how strongly a ligand may regulate a target gene by integrating biological knowledge from three main sources:

    1. Ligand-receptor interactions
    2. Signal transduction (e.g., protein-protein and kinase-substrate interactions)
    3. Gene regulatory interactions (e.g., ChIP-seq and motifs)

    The process involves two main steps:

    • Network Integration: Individual data sources are integrated into a ligand-signaling network (pathways from ligands to transcriptional regulators) and a gene regulatory network (interactions between regulators and target genes).
    • Network Propagation: Using algorithms like Personalized PageRank (PPR), the signal is propagated from the ligand, through receptors and signaling proteins, to transcriptional regulators, and finally to target genes. A high regulatory potential score indicates that the target gene's regulators are downstream of the ligand's signaling network.
  7. Score ligand-receptor interactions by receptor expression strength

    master

    You can prioritize the most important receptors for a given ligand by scoring interactions based on the expression strength of the receptor. This helps identify which receptors are most likely driving the observed ligand activity in a specific cell type.

    Methodology: The score ligand_scaled_receptor_expression_fraction is calculated by averaging the normalized ranks of the receptor's expression and its expression fraction:

    $$ ext{score} = 0.5 imes ext{normalized rank(expression)} + 0.5 imes ext{normalized rank(fraction)}$$

    This approach ensures that ligands are prioritized based on receptors that are both highly expressed and present in a significant fraction of the receiver cells.

    # Score ligand-receptor interactions based on receptor expression strength
    exprs_sender_receiver = lr_network %>% 
      inner_join(exprs_tbl_ligand, by = c("ligand")) %>% 
      inner_join(exprs_tbl_receptor, by = c("receptor")) %>% inner_join(DE_sender_receiver %>% distinct(niche, sender, receiver))
      
    ligand_scaled_receptor_expression_fraction_df = exprs_sender_receiver %>% 
      group_by(ligand, receiver) %>% 
      mutate(rank_receptor_expression = dense_rank(receptor_expression), 
             rank_receptor_fraction  = dense_rank(receptor_fraction)) %>% 
      mutate(ligand_scaled_receptor_expression_fraction = 0.5*( (rank_receptor_fraction / max(rank_receptor_fraction)) + ((rank_receptor_expression / max(rank_receptor_expression))) ) )  %>% 
      distinct(ligand, receptor, receiver, ligand_scaled_receptor_expression_fraction) %>% 
      distinct() %>% 
      ungroup() 
  8. Distinguishing between upregulated and downregulated target genes in NicheNet

    master

    NicheNet's prioritization algorithm does not inherently distinguish between up- and downregulated genes. The regulatory potential score represents the evidence/probability that a ligand regulates a target gene, regardless of whether that regulation is inducing (upregulation) or repressive (downregulation).

    Key implications:

    • Prioritization Bias: If your gene set of interest contains more upregulated genes than downregulated genes, ligands that primarily upregulate genes will naturally receive higher priority scores.
    • Input Strategy: To capture the full scope of signaling, it is recommended to include both upregulated and downregulated genes in your gene set of interest. However, you can choose to analyze only one direction if your research question specifically targets one (e.g., finding only inducing ligands).
    • Verification: Because the model treats all retrieved interactions as 'active', you should manually verify the direction of effect (up vs. down) by visualizing the expression of target genes (e.g., using a heatmap).
  9. Understand the difference between NicheNet and Differential NicheNet

    master

    The core difference lies in how ligands are prioritized:

    1. Default NicheNet: Prioritizes ligands based on ligand activity (target gene enrichment) alone.
    2. Differential NicheNet: Prioritizes ligands based on both ligand activity and differential expression (DE) of the L-R pairs compared to other niches/conditions.

    Resulting Patterns:

    • Differential NicheNet tends to find more 'high-DE, low-activity' hits. These may be biologically important but have low activity scores due to incomplete prior knowledge or because they are involved in non-transcriptional signaling (e.g., cell adhesion).
    • Default NicheNet tends to find 'low-DE, high-activity' hits. These might be regulated post-transcriptionally or represent signaling that is maintained even if the ligand expression itself isn't highly differential.
  10. Understand the differences between NicheNet and Differential NicheNet

    master

    The Differential NicheNet pipeline differs from the default NicheNet pipeline in how it prioritizes ligand-receptor (L-R) pairs. While default NicheNet prioritizes pairs based on ligand activity alone, Differential NicheNet incorporates information from the differential expression (DE) of L-R pairs compared to other niches or spatial locations.

    Prioritization Patterns

    • Differential NicheNet: Tends to find hits that are high-DE but low-activity. These may be biologically important ligands that have low predicted activity due to incomplete prior knowledge in NicheNet, or ligands that lack strong signaling effects (e.g., cell adhesion).
    • Default NicheNet: Tends to find hits that are low-DE but high-activity. These may represent ligands regulated post-transcriptionally, or cases where high activity is an artifact of inaccurate prior knowledge.

    Candidate Selection

    When evaluating results, ligands that exhibit both high DE and high activity are considered the strongest candidates for regulating the biological process of interest and are recommended for experimental validation.

  11. How NicheNet's prior knowledge model works

    master

    At the core of NicheNet is a prior knowledge model that integrates three types of databases to form a complete communication network:

    1. Ligand-receptor interactions
    2. Signaling pathways
    3. Transcription factor (TF) regulation

    This integrated model allows NicheNet to span from ligands to downstream target genes, enabling the prediction of which ligands influence expression, which target genes are affected, and which signaling mediators are involved. While a pre-built model is provided, users can construct their own custom models.

  12. Understand NicheNet ligand-receptor interaction scores

    master

    The interaction scores in the ligand-receptor matrix/heatmap represent the prior interaction potential.

    Key characteristics:

    • Basis: It is a proxy for the confidence of the interaction based on integrated prior knowledge (e.g., number and quality of ligand-receptor and PPI data sources).
    • Independence from expression: These scores are based solely on prior knowledge and do not reflect the expression levels in your specific dataset.
    • Filtering: Expression data is only used to determine if a ligand or receptor is expressed (yes/no). If a pair is not expressed, it will not appear in the heatmap, but lowly expressed pairs can still have high prior scores.