Return the genotypes for a certain set of genes and type of events. Input 'x' should be a TRONCO compliant dataset - see is.compliant. In this case column names are substituted with events' types.

as.gene(x, genes, types = NA)

Arguments

x

A TRONCO compliant dataset.

genes

The genes to consider, if NA all available genes are used.

types

The types of events to consider, if NA all available types are used.

Value

A matrix, subset of as.genotypes(x) with colnames substituted with events' types.

Examples

data(test_dataset)
as.gene(test_dataset, genes = c('EZH2', 'ASXL1'))
#>            ins_del EZH2 ins_del ASXL1 missense_point_mutations EZH2
#> patient 1             0             0                             0
#> patient 2             0             0                             0
#> patient 3             0             0                             0
#> patient 4             0             0                             0
#> patient 5             0             0                             0
#> patient 6             0             0                             0
#> patient 7             0             0                             0
#> patient 8             0             0                             0
#> patient 9             0             1                             0
#> patient 10            0             0                             0
#> patient 11            0             0                             0
#> patient 12            0             0                             0
#> patient 13            0             0                             0
#> patient 14            0             0                             0
#> patient 15            0             0                             0
#> patient 16            0             0                             0
#> patient 17            0             0                             1
#> patient 18            0             0                             0
#> patient 19            0             0                             0
#> patient 20            0             0                             1
#> patient 21            0             1                             0
#> patient 22            0             0                             0
#> patient 23            0             0                             1
#> patient 24            0             1                             1
#> patient 25            0             0                             0
#> patient 26            0             0                             0
#> patient 27            1             1                             0
#> patient 28            0             0                             0
#> patient 29            0             1                             1
#> patient 30            0             0                             0
#> patient 31            0             0                             0
#> patient 32            0             1                             0
#> patient 33            0             0                             0
#> patient 34            0             0                             0
#> patient 35            0             0                             0
#> patient 36            0             0                             0
#> patient 37            0             0                             0
#> patient 38            0             0                             1
#> patient 39            0             1                             0
#> patient 40            0             0                             0
#>            nonsense_point_mutations EZH2 nonsense_point_mutations ASXL1
#> patient 1                              0                              0
#> patient 2                              0                              1
#> patient 3                              0                              0
#> patient 4                              0                              1
#> patient 5                              0                              0
#> patient 6                              1                              0
#> patient 7                              0                              1
#> patient 8                              0                              1
#> patient 9                              0                              0
#> patient 10                             0                              0
#> patient 11                             0                              0
#> patient 12                             0                              0
#> patient 13                             0                              0
#> patient 14                             0                              0
#> patient 15                             0                              0
#> patient 16                             0                              0
#> patient 17                             0                              0
#> patient 18                             0                              0
#> patient 19                             0                              0
#> patient 20                             0                              0
#> patient 21                             0                              0
#> patient 22                             0                              0
#> patient 23                             0                              0
#> patient 24                             0                              0
#> patient 25                             0                              0
#> patient 26                             0                              0
#> patient 27                             0                              0
#> patient 28                             0                              0
#> patient 29                             0                              0
#> patient 30                             0                              0
#> patient 31                             0                              0
#> patient 32                             0                              0
#> patient 33                             0                              0
#> patient 34                             0                              0
#> patient 35                             0                              0
#> patient 36                             0                              0
#> patient 37                             0                              0
#> patient 38                             0                              0
#> patient 39                             0                              0
#> patient 40                             0                              0