assignSubtypes-CohortList-list-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 'CohortList,list'
assignSubtypes(
  object,
  subtypes,
  ...,
  sampleCol = "sample_name",
  subtypeCol = "subtype"
)

Arguments

object

A CohortList.

subtypes

A list of data.frame objects, one per cohort, with to subtypes to assign to the colData slot of cohorts with a matching name.

...

Catch unnamed parameters. Not used.

sampleCol

A character vector indicating the name of the colum with sample identifiers in the subtype column. Must match the name of the sample identifier in colData.

subtypeCol

A character vectoring indicating the name of the column with the subtype labels in the subtypes data.frame.

Value

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

Examples

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

cohortList <- assignSubtypes(sampleCohortList,
  subtypes=cohortSubtypeDFs[names(sampleCohortList)],
  sampleCol='sample_name',
  subtypeCol='subtype')

bhklab/PDATK documentation built on Dec. 27, 2021, 7:46 a.m.