Skip to contents

Reads the purple.somatic.vcf.gz file and extracts variants within kataegis regions.

Usage

purple_kataegis(x)

Arguments

x

Path to the purple.somatic.vcf.gz file.

Value

A list with a tibble containing variants in kataegis clusters and various metrics for each variant, and a tibble with a description of each metric.

Examples

x <- system.file("extdata/purple/purple.somatic.vcf.gz", package = "gpgr")
(k <- purple_kataegis(x))
#> $data
#> # A tibble: 26 × 10
#>    CHROM      POS KT    PURPLE_AF PURPLE_CN PURPLE_MACN PURPLE_VCN SUBCL MH   
#>    <chr>    <int> <chr>     <dbl>     <dbl>       <dbl>      <dbl> <dbl> <chr>
#>  1 chr2  45006212 REV_1     0.260      1.52       0          0.396     1 NA   
#>  2 chr2  45007103 REV_1     0.240      1.52       0          0.365     1 NA   
#>  3 chr2  45007598 REV_1     0.291      1.52       0          0.444     1 NA   
#>  4 chr2  45007709 REV_1     0.276      1.52       0          0.42      1 NA   
#>  5 chr3  71010245 REV_2     0.405      1.16       0.461      0.469     1 NA   
#>  6 chr3  71010553 REV_2     0.239      1.16       0.461      0.276     1 NA   
#>  7 chr3  71011404 REV_2     0.364      1.16       0.461      0.421     1 NA   
#>  8 chr3  71011410 REV_2     0.349      1.16       0.461      0.405     1 NA   
#>  9 chr3  71011474 REV_2     0.330      1.16       0.461      0.382     1 NA   
#> 10 chr3  71327944 FWD_1     0.249      1.26       0.438      0.314     1 NA   
#> # ℹ 16 more rows
#> # ℹ 1 more variable: TNC <chr>
#> 
#> $description
#> # A tibble: 8 × 2
#>   ID          Description                                                     
#>   <chr>       <chr>                                                           
#> 1 KT          Forward/reverse kataegis id                                     
#> 2 MH          Microhomology                                                   
#> 3 PURPLE_AF   Purity adjusted allelic frequency of variant                    
#> 4 PURPLE_CN   Purity adjusted copy number surrounding variant location        
#> 5 PURPLE_MACN Purity adjusted minor allele ploidy surrounding variant location
#> 6 PURPLE_VCN  Purity adjusted ploidy of variant                               
#> 7 SUBCL       Non-zero subclonal likelihood                                   
#> 8 TNC         Tri-nucleotide context                                          
#>