Return all genotypes for input 'x', which should be a TRONCO compliant dataset see is.compliant. Function keysToNames can be used to translate colnames to events.

as.genotypes(x)

Arguments

x

A TRONCO compliant dataset.

Value

A TRONCO genotypes matrix.

Examples

data(test_dataset)
as.genotypes(test_dataset)
#>            gene 4 gene 5 gene 7 gene 29 gene 30 gene 31 gene 32 gene 33 gene 34
#> patient 1       0      0      0       1       0       0       0       0       0
#> patient 2       0      0      0       1       0       0       0       0       1
#> patient 3       0      0      0       1       1       0       0       0       0
#> patient 4       0      0      0       1       0       0       0       0       1
#> patient 5       0      0      0       1       0       0       0       0       0
#> patient 6       0      0      0       1       0       0       0       0       0
#> patient 7       0      0      0       1       0       0       0       0       0
#> patient 8       0      0      0       1       0       0       0       0       0
#> patient 9       0      0      1       1       0       0       0       0       0
#> patient 10      0      0      0       1       0       0       0       0       0
#> patient 11      0      0      0       1       0       0       0       0       0
#> patient 12      0      0      0       1       1       0       0       0       0
#> patient 13      0      0      0       1       0       0       0       0       0
#> patient 14      0      0      0       1       0       0       0       0       0
#> patient 15      0      0      0       0       0       0       0       0       0
#> patient 16      0      0      0       0       0       0       0       0       0
#> patient 17      0      0      0       0       1       0       0       1       0
#> patient 18      0      0      0       0       0       0       0       0       0
#> patient 19      0      0      0       0       0       0       0       0       0
#> patient 20      0      0      0       0       0       0       0       1       0
#> patient 21      0      0      1       0       0       0       1       0       0
#> patient 22      0      0      0       0       0       0       0       0       0
#> patient 23      1      0      0       0       0       0       0       1       0
#> patient 24      1      0      1       0       0       0       0       1       1
#> patient 25      1      0      0       0       0       0       0       0       0
#> patient 26      0      0      0       0       0       0       0       0       0
#> patient 27      0      1      1       0       0       0       1       0       0
#> patient 28      0      0      0       0       0       0       0       0       0
#> patient 29      0      0      1       0       0       0       0       1       0
#> patient 30      0      0      0       0       0       0       0       0       0
#> patient 31      0      0      0       0       0       0       0       0       0
#> patient 32      0      0      1       0       0       1       0       0       0
#> patient 33      0      0      0       0       0       0       0       0       0
#> patient 34      0      0      0       0       0       0       1       0       0
#> patient 35      0      0      0       0       0       0       0       0       0
#> patient 36      0      0      0       0       0       0       0       0       0
#> patient 37      0      0      0       0       0       0       0       0       0
#> patient 38      0      0      0       0       0       0       0       1       0
#> patient 39      0      0      1       0       0       0       0       0       0
#> patient 40      0      0      0       0       0       0       0       0       0
#>            gene 36 gene 40 gene 44 gene 47 gene 49 gene 50 gene 51 gene 52
#> patient 1        0       0       0       0       0       0       0       0
#> patient 2        0       0       0       0       0       0       0       0
#> patient 3        0       0       0       0       0       0       0       0
#> patient 4        0       0       0       0       0       0       0       0
#> patient 5        0       0       0       0       0       0       0       0
#> patient 6        0       0       0       0       0       0       0       0
#> patient 7        0       0       0       0       0       1       0       0
#> patient 8        0       0       0       0       0       0       0       0
#> patient 9        0       0       0       0       0       0       0       0
#> patient 10       0       0       0       0       0       0       0       0
#> patient 11       0       0       0       0       0       0       0       0
#> patient 12       0       0       1       0       0       0       0       0
#> patient 13       0       0       0       0       0       0       0       0
#> patient 14       0       0       0       0       0       0       0       0
#> patient 15       1       0       0       0       0       0       0       0
#> patient 16       0       0       0       0       0       0       0       0
#> patient 17       0       0       0       0       0       0       0       0
#> patient 18       0       0       0       0       0       0       0       0
#> patient 19       0       0       0       0       0       0       0       1
#> patient 20       0       0       0       0       0       0       1       0
#> patient 21       0       0       0       0       0       0       0       0
#> patient 22       0       1       0       0       0       0       0       0
#> patient 23       0       0       0       0       0       0       0       0
#> patient 24       0       0       0       0       0       0       0       0
#> patient 25       0       0       0       0       0       0       0       0
#> patient 26       0       0       0       0       0       0       0       0
#> patient 27       0       0       0       0       0       0       0       0
#> patient 28       0       0       0       0       0       0       0       0
#> patient 29       0       0       0       0       0       0       0       0
#> patient 30       0       0       0       0       0       0       0       0
#> patient 31       0       0       0       1       0       0       0       0
#> patient 32       0       0       0       0       0       0       0       0
#> patient 33       0       0       0       0       0       0       0       0
#> patient 34       0       0       0       0       0       0       0       0
#> patient 35       0       0       0       0       0       0       0       0
#> patient 36       0       0       0       0       0       0       0       0
#> patient 37       0       0       0       0       0       0       0       0
#> patient 38       0       0       0       0       1       0       0       0
#> patient 39       0       0       0       0       0       0       0       0
#> patient 40       0       0       0       0       0       0       0       0
#>            gene 53 gene 54 gene 55 gene 56 gene 66 gene 69 gene 77 gene 88
#> patient 1        0       0       0       0       0       0       0       0
#> patient 2        0       0       0       0       0       0       0       0
#> patient 3        0       0       0       0       0       0       0       0
#> patient 4        0       0       0       0       0       0       0       0
#> patient 5        0       0       1       0       0       0       0       0
#> patient 6        0       0       0       0       0       0       0       0
#> patient 7        0       0       0       0       0       0       0       0
#> patient 8        0       0       0       0       0       0       0       0
#> patient 9        0       0       0       0       0       0       0       0
#> patient 10       0       0       0       0       0       0       0       0
#> patient 11       0       0       0       0       0       0       0       0
#> patient 12       0       0       0       0       0       0       0       1
#> patient 13       0       0       1       0       0       0       0       1
#> patient 14       0       0       0       0       0       0       0       0
#> patient 15       0       0       0       0       0       0       0       0
#> patient 16       0       1       0       0       0       0       0       0
#> patient 17       1       0       0       0       0       0       0       0
#> patient 18       0       0       0       0       0       0       0       0
#> patient 19       0       0       0       0       0       0       0       0
#> patient 20       0       0       0       0       0       0       0       0
#> patient 21       0       0       0       0       0       0       0       0
#> patient 22       0       0       0       0       0       0       0       0
#> patient 23       0       0       0       1       0       0       0       0
#> patient 24       0       0       0       0       0       0       0       0
#> patient 25       0       0       0       1       0       1       0       0
#> patient 26       0       0       0       0       0       0       0       1
#> patient 27       0       0       0       0       0       0       0       0
#> patient 28       0       0       0       0       0       0       0       0
#> patient 29       0       0       0       0       0       0       0       1
#> patient 30       0       0       1       0       0       0       0       0
#> patient 31       0       0       0       0       0       0       1       0
#> patient 32       0       0       0       0       0       0       0       0
#> patient 33       0       0       0       0       0       0       0       0
#> patient 34       0       0       1       0       1       0       1       0
#> patient 35       0       0       0       0       0       0       0       0
#> patient 36       0       0       0       0       0       0       0       0
#> patient 37       0       0       0       0       0       0       0       0
#> patient 38       0       0       0       0       0       0       0       0
#> patient 39       0       0       0       0       0       0       0       0
#> patient 40       0       0       0       0       0       0       0       1
#>            gene 89 gene 91 gene 111 XOR_EZH2 OR_CSF3R
#> patient 1        0       0        0        0        0
#> patient 2        0       1        0        0        0
#> patient 3        0       0        0        0        0
#> patient 4        0       1        0        0        0
#> patient 5        0       0        1        0        1
#> patient 6        1       0        0        1        0
#> patient 7        0       1        0        0        0
#> patient 8        0       1        0        0        0
#> patient 9        0       0        0        0        0
#> patient 10       0       0        0        0        0
#> patient 11       0       0        0        0        0
#> patient 12       0       0        0        0        0
#> patient 13       0       0        0        0        1
#> patient 14       0       0        1        0        1
#> patient 15       0       0        0        0        0
#> patient 16       0       0        0        0        0
#> patient 17       0       0        0        1        0
#> patient 18       0       0        0        0        0
#> patient 19       0       0        0        0        0
#> patient 20       0       0        0        1        0
#> patient 21       0       0        0        0        0
#> patient 22       0       0        0        0        0
#> patient 23       0       0        0        1        0
#> patient 24       0       0        0        1        0
#> patient 25       0       0        0        0        0
#> patient 26       0       0        0        0        0
#> patient 27       0       0        0        1        0
#> patient 28       0       0        0        0        0
#> patient 29       0       0        0        1        0
#> patient 30       0       0        0        0        1
#> patient 31       0       0        0        0        0
#> patient 32       0       0        0        0        0
#> patient 33       0       0        0        0        0
#> patient 34       0       0        0        0        1
#> patient 35       0       0        1        0        1
#> patient 36       0       0        0        0        0
#> patient 37       0       0        0        0        0
#> patient 38       0       0        0        1        0
#> patient 39       0       0        0        0        0
#> patient 40       0       0        0        0        0