Description Usage Arguments Value References Examples
View source: R/preprocessCSV.R
A wrapper function for running scGNNLTMG that uses the Left-Trunctruncated-Mixed-Gaussian(LTMG) model to translate the input gene expression data pre-processed by preprocessCSV into a discretised regulatory signal as the regularizer for the feature autoencoder of scGNN. It will take around 10-15 minutes for inferring LTMG tags, depending on the dataset. This step is optional but highly recommended prior to scGNN analysis.
1 2 3 4 5 6 7 8 |
scDataset |
A scDataset object containing a matrix with row names as cell samples and column names as genes containing scRNA-seq expression values pre-processed by preprocessCSV. If reading from a expression file, this argument needs not be provided. |
fromFile |
A Boolean value indicating whether to read RNA-seq matrix from a expression file. If TRUE, expr_mat needs not be provided, and it will check whether the expression file exists in readPath. If FALSE, expr_mat must be provided. |
readPath |
A character vector representing path to the expression file. If fromFile is TRUE, it must be provided. Otherwise optional. |
toFile |
A Boolean value indicating whether to write the returned LTMG object to file. If TRUE, outdir_path and savename must be provided. |
outdir_path |
A character vector representing the path to the parent directory where the object will be saved as a file. If toFile is TRUE, it must be provided. Otherwise optional. |
savename |
A character vector representing the name of the saved LTMG object file. If toFile is TRUE, it must be provided. Otherwise optional. |
Returns an LTMG matrix containing the inferred LTMG tags of expr_mat.
LTMGscRGNet \insertRefscGNNscRGNet
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | # 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)
# ~30 seconds
## End(Not run)
# Example 2:
# Preprocess the whole scRNA-seq dataset
## Not run:
inputCountsPath <- system.file("extdata", "GSE138852_counts.csv.gz", package = "scRGNet")
counts <- preprocessCSV(path = inputCountsPath)
LTMG <- runLTMG(counts)
# Take 10-14 minutes to finish running
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.