Learn R Programming

scLink (version 1.0.1)

sclink_net: Infer gene co-expression networks

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.

Examples

Run this code
# NOT RUN {
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))
# }

Run the code above in your browser using DataLab