Return the association sample -> stage, if any. Input 'x' should be a
TRONCO compliant dataset - see is.compliant
.
as.stages(x)
A matrix with 1 column annotating stages and rownames as sample IDs.
data(test_dataset)
data(stage)
test_dataset = annotate.stages(test_dataset, stage)
#> Warning: 6 missing stages were added as NA.
as.stages(test_dataset)
#> stage
#> patient 1 Stage II
#> patient 2 Stage I
#> patient 3 Stage II
#> patient 4 Stage I
#> patient 5 Stage I
#> patient 6 Stage II
#> patient 7 Stage I
#> patient 8 Stage I
#> patient 9 <NA>
#> patient 10 Stage I
#> patient 11 Stage III
#> patient 12 Stage I
#> patient 13 <NA>
#> patient 14 Stage I
#> patient 15 Stage I
#> patient 16 Stage II
#> patient 17 Stage I
#> patient 18 Stage III
#> patient 19 Stage I
#> patient 20 Stage II
#> patient 21 Stage I
#> patient 22 Stage III
#> patient 23 <NA>
#> patient 24 Stage I
#> patient 25 Stage II
#> patient 26 Stage II
#> patient 27 <NA>
#> patient 28 Stage I
#> patient 29 Stage II
#> patient 30 Stage III
#> patient 31 Stage III
#> patient 32 Stage I
#> patient 33 Stage I
#> patient 34 Stage II
#> patient 35 Stage II
#> patient 36 Stage III
#> patient 37 Stage I
#> patient 38 <NA>
#> patient 39 Stage III
#> patient 40 <NA>