assignSubtypes,CohortList,list-method {PDATK} | R Documentation

## Assign Subtype Annotations to a SurvivalExperiment Object

### Description

Assign Subtype Annotations to a SurvivalExperiment Object

### Usage

    ## 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

    data(sampleCohortList)
    data(cohortSubtypeDFs)

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

[Package PDATK version 1.2.0 Index]