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 × 11
#>    CHROM      POS KT    AF     PURPLE_AF PURPLE_CN PURPLE_MACN PURPLE_VCN SUBCL
#>    <chr>    <int> <chr> <chr>      <dbl>     <dbl>       <dbl>      <dbl> <dbl>
#>  1 chr2  45006212 REV_1 0.2143     0.260      1.52       0          0.396     1
#>  2 chr2  45007103 REV_1 0.1977     0.240      1.52       0          0.365     1
#>  3 chr2  45007598 REV_1 0.24       0.291      1.52       0          0.444     1
#>  4 chr2  45007709 REV_1 0.2273     0.276      1.52       0          0.42      1
#>  5 chr3  71010245 REV_2 0.3165     0.405      1.16       0.461      0.469     1
#>  6 chr3  71010553 REV_2 0.1863     0.239      1.16       0.461      0.276     1
#>  7 chr3  71011404 REV_2 0.2841     0.364      1.16       0.461      0.421     1
#>  8 chr3  71011410 REV_2 0.2727     0.349      1.16       0.461      0.405     1
#>  9 chr3  71011474 REV_2 0.2577     0.330      1.16       0.461      0.382     1
#> 10 chr3  71327944 FWD_1 0.1982     0.249      1.26       0.438      0.314     1
#> # ℹ 16 more rows
#> # ℹ 2 more variables: MH <chr>, TNC <chr>
#> 
#> $description
#> # A tibble: 9 × 2
#>   ID          Description                                                       
#>   <chr>       <chr>                                                             
#> 1 AF          Allele Frequency, for each ALT allele, in the same order as listed
#> 2 KT          Forward/reverse kataegis id                                       
#> 3 MH          Microhomology                                                     
#> 4 PURPLE_AF   Purity adjusted allelic frequency of variant                      
#> 5 PURPLE_CN   Purity adjusted copy number surrounding variant location          
#> 6 PURPLE_MACN Purity adjusted minor allele ploidy surrounding variant location  
#> 7 PURPLE_VCN  Purity adjusted ploidy of variant                                 
#> 8 SUBCL       Non-zero subclonal likelihood                                     
#> 9 TNC         Tri-nucleotide context                                            
#>