Skip to contents

This function is used to convert a data frame generated from the SJARACNe network file (by read.delim() or others) to a list that the names are the source genes and the values are a data frame of target information of each source gene. This is an Iinternal function for cal_Activity(), getActivity_individual(), getActivity_inBatch().

Usage

get_net2target_list(net_dat = NULL)

Arguments

net_dat

a data frame generated from SJARANCe network file. These columns are needed: "source", "target", "MI" and "spearman".

Value

A list of source genes, for each source gene, the value is a data frame with "target", "MI" and "spearman" as the columns

Examples

net_data <-  read.table(system.file("extdata/demo_pbmc14k/SJARACNe/B/TF/bt100_pc001/consensus_network_ncol_.txt", package = "scMINER"),
                        header = TRUE, sep = "\t", stringsAsFactors = FALSE, quote = "",
                        colClasses = c("character", "character", "character", "character", "numeric", "numeric", "numeric", "numeric", "numeric"))
target_list <- get_net2target_list(net_data)