sv_df <- sigrap::chord_mantavcf2df(sv_vcf) # prepare SV VCF as data.frame
res <- sigrap::chord_run(
  vcf.snv = snvindel_vcf,
  df.sv = sv_df,
  sv.caller = "manta",
  # vcf.sv = sv_vcf, # alternative
  sample.name = "sample_A",
  ref.genome = "hg38",
  verbose = TRUE
)
#> 
#> #====== Loading variants from vcfs ======#
#> 
#> ## SNVs
#> Warning in fun(libname, pkgname): 
#>    No reference genome loaded. Please install and load a BSgenome.
#>    For example:
#>       install.packages('BiocManager')
#>       BiocManager::install('BSgenome.Hsapiens.UCSC.hg19')
#>       library('BSgenome.Hsapiens.UCSC.hg19')
#> 
#>    Then specify the BSgenome to the ref.genome arguemnts to the relevant functions.
#>    For example:
#>       extractSigsSnv(..., ref.genome=BSgenome.Hsapiens.UCSC.hg19)
#> Reading in vcf file...
#> Converting chrom name style to style in ref.genome...
#> Loading required package: BiocGenerics
#> 
#> Attaching package: 'BiocGenerics'
#> The following objects are masked from 'package:dplyr':
#> 
#>     combine, intersect, setdiff, union
#> The following objects are masked from 'package:stats':
#> 
#>     IQR, mad, sd, var, xtabs
#> The following objects are masked from 'package:base':
#> 
#>     anyDuplicated, aperm, append, as.data.frame, basename, cbind,
#>     colnames, dirname, do.call, duplicated, eval, evalq, Filter, Find,
#>     get, grep, grepl, intersect, is.unsorted, lapply, Map, mapply,
#>     match, mget, order, paste, pmax, pmax.int, pmin, pmin.int,
#>     Position, rank, rbind, Reduce, rownames, sapply, setdiff, sort,
#>     table, tapply, union, unique, unsplit, which.max, which.min
#> Loading required package: S4Vectors
#> Loading required package: stats4
#> 
#> Attaching package: 'S4Vectors'
#> The following objects are masked from 'package:dplyr':
#> 
#>     first, rename
#> The following objects are masked from 'package:base':
#> 
#>     expand.grid, I, unname
#> 
#> Attaching package: 'IRanges'
#> The following objects are masked from 'package:dplyr':
#> 
#>     collapse, desc, slice
#> 
#> ## Indels
#> vcf file is the same for both SNVs and indels. Skipping reading vcf for indels
#> 
#> ## SVs
#> 
#> #====== Counting mutation contexts ======#
#> 
#> ## Single base substitutions
#> Loading variants...
#> Initializing SNV signature output vector...
#> Removing rows with multiple ALT sequences...
#> Subsetting for SNVs...
#> Getting SNV trinucleotide contexts...
#> Converting trinucleotide contexts to substitution contexts...
#> Counting substitution context occurrences...
#> Returning context counts...
#> 
#> ## Indel contexts (types x lengths)
#> Loading variants...
#> Removing rows with multiple ALT sequences...
#> Determining indel type...
#> Initializing indel signature output vector...
#> Determining indel length and sequence...
#> Determining the start/end positions for the left/right flanks of each indel...
#> Retrieving flanking sequences...
#> Calculating the number of copies of the indel sequence are present in the 3' flanking sequence...
#> Calculating the (max) number of bases that are homologous to the 5'/3' flanking sequence...
#> Determining indel contexts...
#> Counting indel context occurrences...
#> Returning indel context counts...
#> 
#> ## SV contexts (types x lengths)
#> Creating SV type/length lookup table...
#> Counting DEL, DUP, and INV context occurrences...
#> Counting TRA occurrences...
#> Returning SV contexts...
#> 
#> #====== Exporting output =========#
#> output.path not specified. Directly returning output
#>