combine_pd_eset: Title combine_pd_eset

View source: R/combine_pd_eset.R

combine_pd_esetR Documentation

Title combine_pd_eset

Description

combine_pd_eset combines the expression set (eset) with phenotype data (pdata).

Usage

combine_pd_eset(
  eset,
  pdata,
  id_pdata = "ID",
  feas = NULL,
  feature_manipulation = TRUE,
  scale = TRUE,
  choose_who_when_duplicate = "eset"
)

Arguments

eset

Expression set matrix or data frame.

pdata

Phenotype data.

id_pdata

String indicating the column name in pdata that corresponds to the eset column.

feas

Vector of feature names to include in the combined dataset. Default is NULL, which includes all features.

feature_manipulation

Logical value indicating whether to perform feature manipulation on the data. Default is TRUE.

scale

Logical value indicating whether to scale the expression set. Default is TRUE.

choose_who_when_duplicate

String indicating the preference when encountering duplicate IDs in pdata and eset.

Examples

# Loading TCGA-STAD expresion data(raw count matrix)
data("eset_stad", package = "IOBR")
# transform count data to tpm
eset <- count2tpm(eset_stad, idType = "ensembl")
colnames(eset) <- substring(colnames(eset), 1, 12)
# Loading TCGA-STAD microenvironment signature data
data("sig_stad", package = "IOBR")
eset <- count2tpm(eset_stad)
colnames(eset) <- substring(colnames(eset), 1, 12)
input <- combine_pd_eset(eset = eset, pdata = sig_stad, feas = unique(unlist(signature_collection)))

IOBR/IOBR documentation built on April 4, 2024, 1:07 a.m.