generateNetwork: Infer a cell-cell network from the encoded space using...

Description Usage Arguments Value References Examples

View source: R/graph.R

Description

Compute a cell network from a feature matrix using KNN.

Usage

1
generateNetwork(feature_mat, k = NULL, hardwareSetup = NULL)

Arguments

feature_mat

An encoded matrix generated by the feature auto-encoder.

k

Number of neighbours in KNN graph. If k is not provided, then the best heuristic k = floor(sqrt(N)) will be used, where N is the sample size.

hardwareSetup

Hardware setup for running isolation forest

Value

An igraph object to plot the cell network.

References

\insertRef

scGNNscRGNet \insertRefisotreescRGNet \insertRefisolationForestscRGNet \insertRefstatsscRGNet \insertRefdefaultKscRGNet \insertRefigraphscRGNet

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
# Example 1:
# Tested examples. Not run for fast package compiling
## Not run: 
# Accessing the demo gene_counts_small dataset available with the package
inputCountsPath <- system.file("extdata", "GSE138852_small.csv", package = "scRGNet")
# Preprocess the raw counts
counts <- preprocessCSV(path = inputCountsPath)
ltmg <- runLTMG(counts)
hyperParams <- setHyperParams(regu_epochs = 5L)
hardwareSetup <- setHardware(coresUsage = 1L)
z <- runFeatureAE(scDataset = counts, LTMG_mat = ltmg, hyperParams, hardwareSetup)
net <- generateNetwork(z)

## End(Not run)

ff98li/scRGNet documentation built on Jan. 14, 2022, 4:58 a.m.