assignSubtypes-SurvivalExperiment-data.frame-method: Assign Subtype Annotations to a SurvivalExperiment Object

Description Usage Arguments Value Examples

Description

Assign Subtype Annotations to a SurvivalExperiment Object

Usage

1
2
3
4
5
6
7
8
## S4 method for signature 'SurvivalExperiment,data.frame'
assignSubtypes(
  object,
  subtypes,
  ...,
  sampleCol = "sample_name",
  subtypeCol = "subtype"
)

Arguments

object

A SurvivalExperiment object where the subtype annotations will be added to the colData slot as the subtype column.

subtypes

A data.frame with

...

Force subsequent arguments to be named. Not used.

sampleCol

A character vector specifying the name of the column containing the sample names. These must match the colnames of the SurvivalExperiment. If the sample names are the rownames of the subtypes data.frame then set this parameter to 'rownames'. Defaults to 'sample_name'.

subtypeCol

A character vector specifying the name of the subtype column in the subtypes data.frame object. Defaults to 'subtype'.

Value

The SurvivalExperiment with the subtypes in the subtypes column of the colData slot and a metadata item, hasSubtypes, set to TRUE.

Examples

1
2
3
4
5
6
7
data(sampleICGCmicro)
data(cohortSubtypeDFs)

cohortList <- assignSubtypes(sampleICGCmicro,
  subtypes=cohortSubtypeDFs$ICGCMICRO,
  sampleCol='sample_name',
  subtypeCol='subtype')

bhklab/PanCuRx documentation built on Dec. 30, 2021, 4:59 p.m.