context.mode: Building context mode

Description Usage Arguments Value Examples

View source: R/context_mode.R

Description

a context-specific gene-gene network is constructed from the scRNA-seq data by WGCNA package.

Usage

1
context.mode(data, qt.gene = 0.4, qt.cell = 0.5, nThreads = 1)

Arguments

data

A expression count matrix. The rows correspond to genes and the columns correspond to cells.

qt.gene

A numeric value between 0 and 1 (default: 0.4) indicating the top percent of expressed genes to be reserved for buliding a context-specific gene-gene network. Used only if network = "context".

qt.cell

A numeric value between 0 and 1 (default: 0.5) indicating the top percent of expressed cells to be reserved for buliding a context-specific gene-gene network. Used only if network = "context".

nThreads

The number of cores to use. Default is 1.

Value

A context-specific gene-gene network.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
#Loading example scRNA-seq data.
load(system.file("data","yan.Rdata",package = "scNPF"))
exp.data <- yan$data
dim(exp.data)
label <- yan$label

#Parallel
context.network <- context.mode(data=exp.data,nThreads=8)
dim(context.network)
class(context.network)

BMILAB/scNPF documentation built on Nov. 19, 2020, 1:41 a.m.