Skip to contents

Reads the purple.somatic.vcf.gz file.

Usage

purple_snv_vcf_read(x)

Arguments

x

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

Value

A list with the input file as a tibble (with specific INFO fields) and a tibble with a description of each INFO field.

Examples

x <- system.file("extdata/purple/purple.somatic.vcf.gz", package = "gpgr")
(snv <- purple_snv_vcf_read(x))
#> $data
#> # A tibble: 423 × 12
#>    CHROM     POS PURPLE_AF PURPLE_CN PURPLE_GERMLINE PURPLE_MACN PURPLE_VCN
#>    <chr>   <int>     <dbl>     <dbl> <chr>                 <dbl>      <dbl>
#>  1 chr1  3086201     0.173         2 NOISE                 0.959      0.346
#>  2 chr1  3294434     0.286         2 NOISE                 0.959      0.572
#>  3 chr1  3400513     0.136         2 NOISE                 0.959      0.272
#>  4 chr1  6957208     0.581         2 NOISE                 0.959      1.16 
#>  5 chr1  6975198     0.581         2 NOISE                 0.959      1.16 
#>  6 chr1  7100329     0.596         2 NOISE                 0.959      1.19 
#>  7 chr1  7185898     0.476         2 NOISE                 0.959      0.951
#>  8 chr1  7186176     0.568         2 NOISE                 0.959      1.14 
#>  9 chr1  7186250     0.741         2 NOISE                 0.959      1.48 
#> 10 chr1  7290559     0.630         2 NOISE                 0.959      1.26 
#> # ℹ 413 more rows
#> # ℹ 5 more variables: HMF_HOTSPOT <lgl>, KT <chr>, MH <chr>, SUBCL <dbl>,
#> #   TNC <chr>
#> 
#> $description
#> # A tibble: 10 × 2
#>    ID              Description                                                  
#>    <chr>           <chr>                                                        
#>  1 HMF_HOTSPOT     calculated by flag of overlapping values in field HMF from s…
#>  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_GERMLINE Germline classification surrounding variant location         
#>  7 PURPLE_MACN     Purity adjusted minor allele ploidy surrounding variant loca…
#>  8 PURPLE_VCN      Purity adjusted ploidy of variant                            
#>  9 SUBCL           Non-zero subclonal likelihood                                
#> 10 TNC             Tri-nucleotide context                                       
#>