Title: Inferring Functional Gene Co-Expression Networks from Single Cell Data
Version: 1.0.1
Description: Uses statistical network modeling to understand the co-expression relationships among genes and to construct sparse gene co-expression networks from single-cell gene expression data.
License: GPL-3
Depends: R (≥ 3.5.0), parallel, glasso
Suggests: knitr, rmarkdown
VignetteBuilder: knitr
Encoding: UTF-8
LazyData: true
RoxygenNote: 7.0.2
NeedsCompilation: no
Packaged: 2020-08-15 00:29:18 UTC; wei
Author: Wei Vivian Li ORCID iD [aut, cre]
Maintainer: Wei Vivian Li <vivian.li@rutgers.edu>
Repository: CRAN
Date/Publication: 2020-08-26 14:20:02 UTC

Description

Calculate scLink's correlation matrix

Usage

sclink_cor(expr, ncores, nthre = 20, dthre = 0.9)

Arguments

expr

A gene expression matrix with rows representing cells and columns representing genes. Gene names are given as column names. Can be the output of sclink_norm or user constructed gene expression matrices.

ncores

Number of cores if using parallel computation.

nthre

An integer specifying a threshold on the number of complete observations. Defaults to 20.

dthre

A number specifying the threshold on dropout probabilities. Defaults to 0.9.

Value

A correlation matrix for gene co-expression relationships.

Author(s)

Wei Vivian Li, vivian.li@rutgers.edu

Examples


count = readRDS(system.file("extdata", "example.rds", package = "scLink"))
count.norm = sclink_norm(count, scale.factor = 1e6, filter.genes = TRUE, n = 500)
corr = sclink_cor(expr = count.norm, ncores = 1)


Description

Infer gene co-expression networks

Usage

sclink_net(expr, ncores, lda = seq(1, 0.1, -0.05), nthre = 20, dthre = 0.9)

Arguments

expr

A gene expression matrix with rows representing cells and columns representing genes. Gene names are given as column names. Can be the output of sclink_norm or user constructed gene expression matrices.

ncores

Number of cores if using parallel computation.

lda

A vector specifying a sequence of lambda values to be used in the penalized likelihood.

nthre

An integer specifying a threshold on the number of complete observations. Defaults to 20.

dthre

A number specifying the threshold on dropout probabilities. Defaults to 0.9.

Value

A list for gene co-expression relationships. The list contains a cor element for scLink's correlation matrix and a summary element for the gene networks. summary is a list with each element corresponding to the result of one lambda value. Each element of summary contains the following information:

adj:

the adjacency matrix specifying the gene-gene edges;

Sigma:

the estimated concentration matrix;

nedge:

number of edges in the gene network;

bic:

BIC score;

lambda:

value of lambda in the penalty.

Author(s)

Wei Vivian Li, vivian.li@rutgers.edu

Examples


count = readRDS(system.file("extdata", "example.rds", package = "scLink"))
count.norm = sclink_norm(count, scale.factor = 1e6, filter.genes = TRUE, n = 500)
networks = sclink_net(expr = count.norm, ncores = 1, lda = seq(0.5, 0.1, -0.05))


Description

Pre-process data for scLink

Usage

sclink_norm(
  count,
  scale.factor = 1e+06,
  filter.genes = FALSE,
  gene.names = NULL,
  n = 500
)

Arguments

count

A full gene count matrix with rows representing cells and columns representing genes. Gene names are given as column names.

scale.factor

A number specifying the sclae factor used for library size normalization. Defaults to 1e6.

filter.genes

A Boolean specifying whether scLink should select genes based on mean expression. When set to FALSE, users need to speicfy a set of genes to be used for network construction with gene.names. When set to TRUE, scLink will select genes based on their mean expression, and users need to specify the number of genes to be selected with n.

gene.names

A character vector specifying the genes used for network construction. Only needed when filter.genes = FALSE.

n

An integer specifying the number of genes to be selected by scLink (defaults to 500). Only needed when filter.genes = TRUE.

Value

A transformed and normalized gene expression matrix that can be used for correlation calculation and network construction.

Author(s)

Wei Vivian Li, vivian.li@rutgers.edu

Examples


count = readRDS(system.file("extdata", "example.rds", package = "scLink"))
count.norm = sclink_norm(count, scale.factor = 1e6, filter.genes = TRUE, n = 500)