intra_network {SingleCellSignalR} | R Documentation

## intra network

### Description

Computes intracellular networks linked to genes of interest.

### Usage

    intra_network(
      goi,
      data,
      genes,
      cluster,
      coi,
      cell.prop = 0.2,
      c.names = NULL,
      signal = NULL,
      write = TRUE,
      plot = TRUE,
      add.lig = TRUE,
      species = c("homo sapiens", "mus musculus"),
      connected = FALSE,
      verbose = TRUE
    )

### Arguments

`goi` | gene of interest (typically a receptor)
`data` | a data frame of n rows (genes) and m columns (cells) of read or UMI counts (note : rownames(data)=genes)
`genes` | a character vector of HUGO official gene symbols of length n
`cluster` | a numeric vector of length m
`coi` | name of the cluster of interest
`cell.prop` | a threshold, only the genes expressed in this proportion of the cells of the coi will be taken into account
`c.names` | (optional) cluster names
`signal` | (optional) a list (result of the **cell_signaling()** function)
`write` | a logical (if TRUE writes graphML and text files for the internal networks)
`plot` | a logical
`add.lig` | a logical (if TRUE adds the goi associated ligands from signal to the network)
`species` | "homo sapiens" or "mus musculus"
`connected` | a logical (if TRUE keeps only the genes connected to the goi)
`verbose` | a logical

### Details

'signal' is a list containing the cell-cell interaction tables. It is the result of the **cell_signaling()** function.

'cell.prop' is set to 0.2 by default to avoid unreadable downstream networks. However if the calculated network is too small or non-existent (or too big) the user can try lower (or higher) values.

If the user does not set 'c.names', the clusters will be named from 1 to the maximum number of clusters (cluster 1, cluster 2, ...). The user can exploit the 'c.names' vector in the list returned by the **cell_classifier()** function for this purpose. The user can also provide her own cluster names.

'species' must be equal to "homo sapiens" or "mus musculus". In the case of mouse data, the function converts mouse genes in human orthologs (according to Ensembl) such that the Reactome/KEGG interaction database can be exploited, and finally output genes are converted back to mouse.

If 'write' is TRUE, then the function writes two different files. A graphML file in the *network* folder for intracellular interactions downstream the gene of interest (goi) named "intracell_network_coi-receptors.graphml". A text file in the *network* folder containing the information about the pathways in which the interactions are in, named "intracell_network_pathway_analysis_coi-receptors.txt".

### Value

The function returns a list containing the internal networks linked to the genes of interest (goi)

### Examples

    data <- matrix(runif(1000,0,1),nrow=5,ncol=200)
    genes <- c("A2M","LRP1","AANAT","MTNR1A","ACE")
    cluster <- c(rep(1,100),rep(2,100))
    intra_network(goi=c("TGFBR1","ERBB2"),data,genes,cluster,coi="cluster 1")

[Package SingleCellSignalR version 1.2.0 Index]