Computes a set of summary features for the cohort, in the form of a matrix. The fits must be available inside the cohort to retrieve some of these features, which are:

  • the matrix of driver events with mean CCF or binary value;

  • the matrix of the drivers occurrence acrross all the cohort;

  • the matrix of the clonal drivers occurrence acrross all the cohort;

  • the matrix of the subclonal drivers occurrence acrross all the cohort;

  • the matrix of the occurrence of all evolutionary trajectories across patients

The function returns a named list, so that names can be used to access the matrices.

get_features(x, patients = x$patients)

Arguments

x

A REVOLVER cohort.

patients

A vector of patient ids for which the features are extracted.

Value

A list of matrices.

Examples

# Data released in the 'evoverse.datasets'
data('TRACERx_NEJM_2017_REVOLVER', package = 'evoverse.datasets')

features = get_features(TRACERx_NEJM_2017_REVOLVER)
#> Warning: number of columns of result, 45, is not a multiple of vector length 80 of arg 2
#> Warning: number of columns of result, 45, is not a multiple of vector length 80 of arg 2
#> Warning: number of columns of result, 45, is not a multiple of vector length 80 of arg 2
#> Warning: number of columns of result, 45, is not a multiple of vector length 80 of arg 2
#> Warning: number of columns of result, 45, is not a multiple of vector length 80 of arg 2
#> Warning: number of columns of result, 45, is not a multiple of vector length 80 of arg 2
#> Warning: number of columns of result, 45, is not a multiple of vector length 80 of arg 2
#> Warning: number of columns of result, 45, is not a multiple of vector length 80 of arg 2
#> Warning: number of columns of result, 45, is not a multiple of vector length 80 of arg 2
#> Warning: number of columns of result, 45, is not a multiple of vector length 80 of arg 2
#> Warning: number of columns of result, 45, is not a multiple of vector length 80 of arg 2
#> Warning: number of columns of result, 45, is not a multiple of vector length 80 of arg 2
#> Warning: number of columns of result, 45, is not a multiple of vector length 80 of arg 2
#> Warning: number of columns of result, 45, is not a multiple of vector length 80 of arg 2
#> Warning: number of columns of result, 45, is not a multiple of vector length 80 of arg 2
#> Warning: number of columns of result, 45, is not a multiple of vector length 80 of arg 2
#> Warning: number of columns of result, 45, is not a multiple of vector length 80 of arg 2
#> Warning: number of columns of result, 45, is not a multiple of vector length 80 of arg 2
#> Warning: number of columns of result, 45, is not a multiple of vector length 80 of arg 2
#> Warning: number of columns of result, 45, is not a multiple of vector length 80 of arg 2
#> Warning: number of columns of result, 45, is not a multiple of vector length 80 of arg 2
#> Warning: number of columns of result, 45, is not a multiple of vector length 80 of arg 2
#> Warning: number of columns of result, 45, is not a multiple of vector length 80 of arg 2
#> Warning: number of columns of result, 45, is not a multiple of vector length 80 of arg 2
#> Warning: number of columns of result, 45, is not a multiple of vector length 80 of arg 2
#> Warning: number of columns of result, 45, is not a multiple of vector length 80 of arg 2
#> Warning: number of columns of result, 45, is not a multiple of vector length 80 of arg 2
#> Warning: number of columns of result, 45, is not a multiple of vector length 80 of arg 2
#> Warning: number of columns of result, 45, is not a multiple of vector length 80 of arg 2
#> Warning: number of columns of result, 45, is not a multiple of vector length 80 of arg 2
#> Warning: number of columns of result, 45, is not a multiple of vector length 80 of arg 2
#> Warning: number of columns of result, 45, is not a multiple of vector length 80 of arg 2
#> Warning: number of columns of result, 45, is not a multiple of vector length 80 of arg 2
#> Warning: number of columns of result, 45, is not a multiple of vector length 80 of arg 2
#> Warning: number of columns of result, 45, is not a multiple of vector length 80 of arg 2
#> Warning: number of columns of result, 45, is not a multiple of vector length 80 of arg 2
#> Warning: number of columns of result, 45, is not a multiple of vector length 80 of arg 2
#> Warning: number of columns of result, 45, is not a multiple of vector length 80 of arg 2
#> Warning: number of columns of result, 45, is not a multiple of vector length 80 of arg 2
#> Warning: number of columns of result, 45, is not a multiple of vector length 80 of arg 2
#> Warning: number of columns of result, 45, is not a multiple of vector length 80 of arg 2
#> Warning: number of columns of result, 45, is not a multiple of vector length 80 of arg 2
#> Warning: number of columns of result, 45, is not a multiple of vector length 80 of arg 2
#> Warning: number of columns of result, 45, is not a multiple of vector length 80 of arg 2
#> Warning: number of columns of result, 45, is not a multiple of vector length 80 of arg 2
#> Warning: number of columns of result, 45, is not a multiple of vector length 80 of arg 2
#> Warning: number of columns of result, 45, is not a multiple of vector length 80 of arg 2
#> Warning: number of columns of result, 45, is not a multiple of vector length 80 of arg 2
#> Warning: number of columns of result, 45, is not a multiple of vector length 80 of arg 2
#> Warning: number of columns of result, 45, is not a multiple of vector length 80 of arg 2
#> Warning: number of columns of result, 45, is not a multiple of vector length 80 of arg 2
#> Warning: number of columns of result, 45, is not a multiple of vector length 80 of arg 2
#> Warning: number of columns of result, 45, is not a multiple of vector length 80 of arg 2
#> Warning: number of columns of result, 45, is not a multiple of vector length 80 of arg 2

print(names(features))
#> [1] "Matrix_mean_CCF"          "Matrix_drivers"          
#> [3] "Matrix_clonal_drivers"    "Matrix_subclonal_drivers"
#> [5] "Matrix_trajectories"     

print(features)
#> $Matrix_mean_CCF
#> # A tibble: 99 × 80
#>    patientID   APC ARHGAP35 ARID1B ARID2 ASXL1   ATM  BAP1  BRAF  CBLB CCND1
#>    <chr>     <dbl>    <dbl>  <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
#>  1 CRUK0001      0    0.38       0  0        0     0     0 0         0     0
#>  2 CRUK0002      0    0          0  0        0     0     0 0         0     0
#>  3 CRUK0003      0    0          0  0        0     0     0 0         0     0
#>  4 CRUK0004      0    0          0  0        0     0     0 0         0     0
#>  5 CRUK0005      0    0          0  0        0     0     0 0.99      0     0
#>  6 CRUK0006      0    0          0  0        0     0     0 0         0     0
#>  7 CRUK0007      0    0          0  0        0     0     0 0         0     0
#>  8 CRUK0008      0    0          0  0.43     0     0     0 0         0     0
#>  9 CRUK0009      0    0.988      0  0        0     0     0 0.988     0     0
#> 10 CRUK0010      0    0          0  0        0     0     0 0         0     0
#> # ℹ 89 more rows
#> # ℹ 69 more variables: CDKN2A <dbl>, CHEK2 <dbl>, CIC <dbl>, CMTR2 <dbl>,
#> #   COL2A1 <dbl>, COL5A2 <dbl>, CREBBP <dbl>, CTNNB1 <dbl>, CUX1 <dbl>,
#> #   CYLD <dbl>, DICER1 <dbl>, DNM2 <dbl>, EGFR <dbl>, EP300 <dbl>, FANCC <dbl>,
#> #   FANCM <dbl>, FAS <dbl>, FAT1 <dbl>, FBXW7 <dbl>, FGFR1 <dbl>, FLT4 <dbl>,
#> #   GATA3 <dbl>, IKZF1 <dbl>, KEAP1 <dbl>, KMT2C <dbl>, KMT2D <dbl>,
#> #   KRAS <dbl>, LATS1 <dbl>, MAP3K1 <dbl>, MET <dbl>, MGA <dbl>, MLH1 <dbl>, …
#> 
#> $Matrix_drivers
#> # A tibble: 99 × 80
#>    patientID   APC ARHGAP35 ARID1B ARID2 ASXL1   ATM  BAP1  BRAF  CBLB CCND1
#>    <chr>     <dbl>    <dbl>  <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
#>  1 CRUK0001      0        1      0     0     0     0     0     0     0     0
#>  2 CRUK0002      0        0      0     0     0     0     0     0     0     0
#>  3 CRUK0003      0        0      0     0     0     0     0     0     0     0
#>  4 CRUK0004      0        0      0     0     0     0     0     0     0     0
#>  5 CRUK0005      0        0      0     0     0     0     0     1     0     0
#>  6 CRUK0006      0        0      0     0     0     0     0     0     0     0
#>  7 CRUK0007      0        0      0     0     0     0     0     0     0     0
#>  8 CRUK0008      0        0      0     1     0     0     0     0     0     0
#>  9 CRUK0009      0        1      0     0     0     0     0     1     0     0
#> 10 CRUK0010      0        0      0     0     0     0     0     0     0     0
#> # ℹ 89 more rows
#> # ℹ 69 more variables: CDKN2A <dbl>, CHEK2 <dbl>, CIC <dbl>, CMTR2 <dbl>,
#> #   COL2A1 <dbl>, COL5A2 <dbl>, CREBBP <dbl>, CTNNB1 <dbl>, CUX1 <dbl>,
#> #   CYLD <dbl>, DICER1 <dbl>, DNM2 <dbl>, EGFR <dbl>, EP300 <dbl>, FANCC <dbl>,
#> #   FANCM <dbl>, FAS <dbl>, FAT1 <dbl>, FBXW7 <dbl>, FGFR1 <dbl>, FLT4 <dbl>,
#> #   GATA3 <dbl>, IKZF1 <dbl>, KEAP1 <dbl>, KMT2C <dbl>, KMT2D <dbl>,
#> #   KRAS <dbl>, LATS1 <dbl>, MAP3K1 <dbl>, MET <dbl>, MGA <dbl>, MLH1 <dbl>, …
#> 
#> $Matrix_clonal_drivers
#> # A tibble: 99 × 80
#>    patientID   APC ARHGAP35 ARID1B ARID2 ASXL1   ATM  BAP1  BRAF  CBLB CCND1
#>    <chr>     <dbl>    <dbl>  <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
#>  1 CRUK0001      0        0      0     0     0     0     0     0     0     0
#>  2 CRUK0002      0        0      0     0     0     0     0     0     0     0
#>  3 CRUK0003      0        0      0     0     0     0     0     0     0     0
#>  4 CRUK0004      0        0      0     0     0     0     0     0     0     0
#>  5 CRUK0005      0        0      0     0     0     0     0     1     0     0
#>  6 CRUK0006      0        0      0     0     0     0     0     0     0     0
#>  7 CRUK0007      0        0      0     0     0     0     0     0     0     0
#>  8 CRUK0008      0        0      0     0     0     0     0     0     0     0
#>  9 CRUK0009      0        1      0     0     0     0     0     1     0     0
#> 10 CRUK0010      0        0      0     0     0     0     0     0     0     0
#> # ℹ 89 more rows
#> # ℹ 69 more variables: CDKN2A <dbl>, CHEK2 <dbl>, CIC <dbl>, CMTR2 <dbl>,
#> #   COL2A1 <dbl>, COL5A2 <dbl>, CREBBP <dbl>, CTNNB1 <dbl>, CUX1 <dbl>,
#> #   CYLD <dbl>, DICER1 <dbl>, DNM2 <dbl>, EGFR <dbl>, EP300 <dbl>, FANCC <dbl>,
#> #   FANCM <dbl>, FAS <dbl>, FAT1 <dbl>, FBXW7 <dbl>, FGFR1 <dbl>, FLT4 <dbl>,
#> #   GATA3 <dbl>, IKZF1 <dbl>, KEAP1 <dbl>, KMT2C <dbl>, KMT2D <dbl>,
#> #   KRAS <dbl>, LATS1 <dbl>, MAP3K1 <dbl>, MET <dbl>, MGA <dbl>, MLH1 <dbl>, …
#> 
#> $Matrix_subclonal_drivers
#> # A tibble: 99 × 80
#>    patientID   APC ARHGAP35 ARID1B ARID2 ASXL1 ATM   BAP1   BRAF CBLB  CCND1
#>    <chr>     <dbl> <chr>    <chr>  <chr> <chr> <chr> <chr> <dbl> <chr> <chr>
#>  1 CRUK0001      0 1        0      0     0     0     0         0 0     0    
#>  2 CRUK0002      0 0        0      0     0     0     0         0 0     0    
#>  3 CRUK0003      0 0        0      0     0     0     0         0 0     0    
#>  4 CRUK0004      0 0        0      0     0     0     0         0 0     0    
#>  5 CRUK0005      0 0        0      0     0     0     0         0 0     0    
#>  6 CRUK0006      0 0        0      0     0     0     0         0 0     0    
#>  7 CRUK0008      0 0        0      1     0     0     0         0 0     0    
#>  8 CRUK0009      0 0        0      0     0     0     0         0 0     0    
#>  9 CRUK0011      0 0        0      0     0     0     0         0 0     0    
#> 10 CRUK0013      0 0        0      0     0     0     0         0 0     0    
#> # ℹ 89 more rows
#> # ℹ 69 more variables: CDKN2A <dbl>, CHEK2 <dbl>, CIC <chr>, CMTR2 <dbl>,
#> #   COL2A1 <dbl>, COL5A2 <chr>, CREBBP <dbl>, CTNNB1 <chr>, CUX1 <dbl>,
#> #   CYLD <chr>, DICER1 <dbl>, DNM2 <chr>, EGFR <chr>, EP300 <chr>, FANCC <chr>,
#> #   FANCM <chr>, FAS <chr>, FAT1 <chr>, FBXW7 <dbl>, FGFR1 <dbl>, FLT4 <chr>,
#> #   GATA3 <dbl>, IKZF1 <chr>, KEAP1 <dbl>, KMT2C <dbl>, KMT2D <chr>,
#> #   KRAS <chr>, LATS1 <chr>, MAP3K1 <chr>, MET <dbl>, MGA <chr>, MLH1 <chr>, …
#> 
#> $Matrix_trajectories
#> # A tibble: 99 × 263
#>    patientID `ARHGAP35 --> TERT` `ARID1B --> ASXL1` `ARID1B --> COL5A2`
#>    <chr>                   <dbl>              <dbl>               <dbl>
#>  1 CRUK0001                    0                  0                   0
#>  2 CRUK0002                    0                  0                   0
#>  3 CRUK0003                    0                  0                   0
#>  4 CRUK0004                    0                  0                   0
#>  5 CRUK0005                    0                  0                   0
#>  6 CRUK0006                    0                  0                   0
#>  7 CRUK0007                    0                  0                   0
#>  8 CRUK0008                    0                  0                   0
#>  9 CRUK0009                    1                  0                   0
#> 10 CRUK0010                    0                  0                   0
#> # ℹ 89 more rows
#> # ℹ 259 more variables: `ARID1B --> KRAS` <dbl>, `ARID2 --> KRAS` <dbl>,
#> #   `ATM --> CCND1` <dbl>, `ATM --> MGA` <dbl>, `ATM --> NCOR1` <dbl>,
#> #   `BAP1 --> PIK3CA` <dbl>, `BAP1 --> RB1` <dbl>, `BAP1 --> TP53` <dbl>,
#> #   `BRAF --> TERT` <dbl>, `CBLB --> ARID1B` <dbl>, `CBLB --> DNM2` <dbl>,
#> #   `CBLB --> LATS1` <dbl>, `CBLB --> PTPRC` <dbl>, `CCND1 --> ARID1B` <dbl>,
#> #   `CCND1 --> FAS` <dbl>, `CCND1 --> IKZF1` <dbl>, `CCND1 --> UBR5` <dbl>, …
#>