Return a dataset where all events for a gene are merged in a unique event, i.e., a total of gene-level alterations diregarding the event type. Input 'x' is checked to be a TRONCO compliant dataset - see is.compliant.

as.alterations(x, new.type = "Alteration", new.color = "khaki", silent = FALSE)

Arguments

x

A TRONCO compliant dataset.

new.type

The types label of the new event type, 'Alteration' by default.

new.color

The color of the event new.type, default 'khaki'.

silent

A parameter to disable/enable verbose messages.

Value

A TRONCO compliant dataset with alteration profiles.

Examples

data(muts)
as.alterations(muts)
#> *** Aggregating events of type(s) { Mutation }
#> in a unique event with label " Alteration ".
#> One input type provided, using renaming functions.
#> $genotypes
#>                              G1 G2 G3 G4 G5 G6 G7 G8 G9 G10 G11 G12 G13
#> TCGA-A6-2672-01A-01W-0833-10  1  0  1  1  1  0  0  0  0   0   0   0   0
#> TCGA-A6-2674-01A-02W-0831-10  0  0  0  0  0  0  0  0  0   1   1   1   1
#> TCGA-A6-2676-01A-01W-0833-10  1  1  1  0  0  1  1  1  1   0   0   0   0
#> 
#> $annotations
#>     type         event   
#> G1  "Alteration" "A2BP1" 
#> G2  "Alteration" "ABCA10"
#> G3  "Alteration" "ABCA3" 
#> G4  "Alteration" "ABCA4" 
#> G5  "Alteration" "ACSM5" 
#> G6  "Alteration" "ADCY2" 
#> G7  "Alteration" "APC"   
#> G8  "Alteration" "ASB16" 
#> G9  "Alteration" "ABAT"  
#> G10 "Alteration" "ABCC3" 
#> G11 "Alteration" "ABHD12"
#> G12 "Alteration" "ABR"   
#> G13 "Alteration" "ACAD11"
#> 
#> $types
#>            color  
#> Alteration "khaki"
#>