trare_preprocessing: Preprocess prior to LINKER_run and run_rewiring method

View source: R/preprocessing.R

trare_preprocessingR Documentation

Preprocess prior to LINKER_run and run_rewiring method

Description

Preprocess data prior to GRN inference process. Help them for more information.

Usage

trare_preprocessing(
  data_matrix,
  geneinfo = NULL,
  nassay = 1,
  low_var_genes_th = 0.25,
  low_var_samples_th = 1,
  verbose = TRUE
)

rewiring_add_phenotype(TraReObj, phenotype_f)

Arguments

data_matrix

Matrix of log-normalized estimated counts of the gene expression data (Nr Genes x Nr samples) or SummarizedExperiment object (with or without the sample phenotype information).

geneinfo

array of the regulator gene names that are in the specified data matrix.

nassay

If SummarizedExperiment object is passed as input to lognorm_est_counts, name of the assay containing the desired matrix. Default: 1 (first item in assay's list).

low_var_genes_th

Perform a filtering to drop out low variance (<th) genes across samples. Default: 0.25

low_var_samples_th

Perform a filtering to drop out low variance (<th) samples across genes. Default: 1

verbose

whether to show or not messages during function run.

TraReObj

TraReObj from trare_preprocesing

phenotype_f

dataframe containing samples as rownames and a column named 'phenotype' containing the binary phenotype labels (character of numeric)

Value

TraReObj containing preprocessed input matrix

class generator function for class "TraReClass"

Slots

lognorm_counts

Matrix of log-normalized estimated counts of the gene expression data (Nr Genes x Nr samples),

target_idx

Index array of the target genes on the lognorm_counts matrix.

regulator_idx

Index array of the regulatory genes on the lognorm_counts matrix.

pheno

When provided dataframe containing samples as rownames and a column named 'phenotype' containing the binary phenotype labels (character of numeric). By default 0.

Examples

#For this example, we are going to load a example matrix
lognorm_est_counts_p <- paste0(system.file('extdata',package='TraRe'),
                                 '/expression_rewiring_example.txt')
lognorm_est_counts <- as.matrix(read.delim(lognorm_est_counts_p, header=TRUE,row.names=1))

# Load gene info, its an array of regulators' names.
gene_info_p <- paste0(system.file('extdata',package='TraRe'),
                         '/geneinfo_rewiring_example.txt')
gene_info <- read.delim(gene_info_p,header=TRUE)
geneinfo <- gene_info[gene_info[,'regulator'] == 1,'uniq_isos']

#TraReObj <- trare_preprocessing(data_matrix = lognorm_est_counts,
  ##                                  geneinfo = geneinfo, verbose = FALSE)


ubioinformat/TraRe documentation built on March 10, 2024, 1:11 a.m.