CellCellCommunication

Cell-cell communication inference

This is implemented based on LIANA, which is a Python package for cell-cell communication inference and provides a list of existing methods including CellPhoneDB, Connectome, log2FC, NATMI, SingleCellSignalR, Rank_Aggregate, Geometric Mean, scSeqComm, and CellChat.

You can also try python -c 'import liana; liana.mt.show_methods()' to see the methods available.

Note that this process does not do any visualization. You can use CellCellCommunicationPlots to visualize the results.

Input

  • sobjfile: The seurat object file in RDS or h5seurat format or AnnData file.

Output

  • outfile: Default: {{in.sobjfile | stem}}-ccc.txt.
    The output file with the 'liana_res' data frame.
    Stats are provided for both ligand and receptor entities, more specifically: ligand and receptor are the two entities that potentially interact. As a reminder, CCC events are not limited to secreted signalling, but we refer to them as ligand and receptor for simplicity.
    Also, in the case of heteromeric complexes, the ligand and receptor columns represent the subunit with minimum expression, while *complex corresponds to the actual complex, with subunits being separated by .
    source and target columns represent the source/sender and target/receiver cell identity for each interaction, respectively
    • *_props: represents the proportion of cells that express the entity.
      By default, any interactions in which either entity is not expressed in above 10%% of cells per cell type is considered as a false positive, under the assumption that since CCC occurs between cell types, a sufficient proportion of cells within should express the genes.
    • *_means: entity expression mean per cell type.
    • lr_means: mean ligand-receptor expression, as a measure of ligand-receptor interaction magnitude.
    • cellphone_pvals: permutation-based p-values, as a measure of interaction specificity.

Environment Variables

  • method (choice): Default: cellchat.
    The method to use for cell-cell communication inference.
    • CellPhoneDB: Use CellPhoneDB method.
      Magnitude Score: lr_means; Specificity Score: cellphone_pvals.
    • Connectome: Use Connectome method.
    • log2FC: Use log2FC method.
    • NATMI: Use NATMI method.
    • SingleCellSignalR: Use SingleCellSignalR method.
    • Rank_Aggregate: Use Rank_Aggregate method.
    • Geometric_Mean: Use Geometric Mean method.
    • scSeqComm: Use scSeqComm method.
    • CellChat: Use CellChat method.
    • cellphonedb: alias for CellPhoneDB
    • connectome: alias for Connectome
    • log2fc: alias for log2FC
    • natmi: alias for NATMI
    • singlesignaler: alias for SingleCellSignalR
    • rank_aggregate: alias for Rank_Aggregate
    • geometric_mean: alias for Geometric_Mean
    • scseqcomm: alias for scSeqComm
    • cellchat: alias for CellChat
  • subset: An expression in string to subset the cells.
    When a .rds or .h5seurat file is provided for in.sobjfile, you can provide an expression in R, which will be passed to base::subset() in R to subset the cells.
    But you can always pass an expression in python to subset the cells.
    See https://anndata.readthedocs.io/en/latest/tutorials/notebooks/getting-started.html#subsetting-using-metadata.
    You should use adata to refer to the AnnData object. For example, adata.obs.groups == "g1" will subset the cells with groups equal to g1.
  • subset_using: Default: auto.
    The method to subset the cells.
    • auto: Automatically detect the method to use.
      Note that this is not always accurate. We simply check if [ is in the expression.
      If so, we use python to subset the cells; otherwise, we use R.
    • python: Use python to subset the cells.
    • r: Use R to subset the cells.
  • split_by: The column name in metadata to split the cells to run the method separately.
    The results will be combined together with this column in the final output.
  • assay: The assay to use for the analysis.
    Only works for Seurat object.
  • seed (type=int): Default: 1337.
    The seed for the random number generator.
  • ncores (type=int): Default: 1.
    The number of cores to use.
  • groupby: Default: seurat_clusters.
    The column name in metadata to group the cells.
    Typically, this column should be the cluster id.
  • species (choice): Default: human.
    The species of the cells.
    • human: Human cells, the 'consensus' resource will be used.
    • mouse: Mouse cells, the 'mouseconsensus' resource will be used.
  • expr_prop (type=float): Default: 0.1.
    Minimum expression proportion for the ligands and receptors (+ their subunits) in the corresponding cell identities. Set to 0 to return unfiltered results.
  • min_cells (type=int): Default: 5.
    Minimum cells (per cell identity if grouped by groupby) to be considered for downstream analysis.
  • n_perms (type=int): Default: 1000.
    Number of permutations for the permutation test.
    Relevant only for permutation-based methods (e.g., CellPhoneDB).
    If 0 is passed, no permutation testing is performed.
  • rscript: Default: Rscript.
    The path to the Rscript executable used to convert RDS file to AnnData.
    if in.sobjfile is an RDS file, it will be converted to AnnData file (h5ad).
    You need Seurat, SeuratDisk and digest installed.
  • <more>: Other arguments for the method.
    The arguments are passed to the method directly.
    See the method documentation for more details and also help(liana.mt.<method>.__call__) in Python.

Reference