assignSubtypes,SurvivalExperiment,data.frame-method {PDATK} | R Documentation

## Assign Subtype Annotations to a SurvivalExperiment Object

### Description

Assign Subtype Annotations to a SurvivalExperiment Object

### Usage

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

    data(sampleICGCmicro)
    data(cohortSubtypeDFs)

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

[Package PDATK version 1.2.0 Index]