Skip to contents

This function is used to generated the standard input files that can be directly uploaded to scMINER Portal for visualization and beyond.

Usage

generatePortalInputs(
  input_expression.eset = NULL,
  input_expression.seuratObj = NULL,
  group_by = NULL,
  input_activity.eset = NULL,
  input_network.dir = NULL,
  input_network.table = NULL,
  output_dir = NULL
)

Arguments

input_expression.eset

A eset object of expression data which has been filerted, normalized and log-transformed. Default: NULL.

input_expression.seuratObj

A Seurat object with reduction results (umap and/or tsne). Default: NULL.

group_by

Character, name of the column in phenoData of eset object or meta.data of Seurat Obj that defines the groups for colorcoding in scMINER Portal. Default: NULL.

input_activity.eset

A eset object of activity data calculated by scMINER. Default: NULL.

input_network.dir

Character, the path to the SJARACNe directory. Default: NULL.

input_network.table

A table of network information, it contains at least three column: "CellGroup" (name of groups), "NetworkType" (type of network, TF or SIG) and "NetworkFile" (path to network files). Default: NULL.

output_dir

Character, the path to the output directory. Default: NULL.

Value

This function generated 1-3 standard files which can be uploaded to scMINER Portal directly.

Examples

if (FALSE) { # \dontrun{
## 1. the most commonly used command
generatePortalInputs(input_expression.eset = pbmc14k_expression.eset,
                     group_by = "cellType",
                     input_activity.eset = activity_clustered.eset,
                     input_network.dir = "./SJARACNe",
                     output_dir = "./scMINERportal")

## 2. prepare expression data from Seurat object ("pbmc14.obj")
generatePortalInputs(input_expression.seuratObj = pbmc14.obj,
                     output_dir = "./path-to-output_dir")

## 3. prepare network data from a table
network.table <- data.frame(CellGroup = c("CD4Treg", "CD4Treg", "B", "B"),
                            NetworkType = c("SIG", "TF", "SIG", "TF"),
                            NetworkFile = c("./sjaracne/CD4Treg/SIG/consensus_network_ncol_.txt",
                                            "./sjaracne/CD4Treg/TF/consensus_network_ncol_.txt",
                                            "./sjaracne/B/SIG/consensus_network_ncol_.txt",
                                            "./sjaracne/B/TF/consensus_network_ncol_.txt"))
generatePortalInputs(input_expression.eset = pbmc14k_expression.eset,
                     group_by = "cellType",
                     input_network.table = network.table,
                     output_dir = "./path-to-output_dir")
} # }