Create Small Insertions and Deletions (IDs) counts matrix from input data.

getIDCounts(data, reference = NULL)

Arguments

data

A data.frame with variants having 6 columns: sample name, chromosome, start position, end position, ref, alt.

reference

A BSgenome object with the reference genome to be used.

Value

A matrix with Small Insertions and Deletions (IDs) counts per patient.

Examples

library('BSgenome.Hsapiens.1000genomes.hs37d5')
#> Loading required package: BSgenome
#> Loading required package: S4Vectors
#> Loading required package: stats4
#> 
#> Attaching package: ‘S4Vectors’
#> The following object is masked from ‘package:utils’:
#> 
#>     findMatches
#> The following objects are masked from ‘package:base’:
#> 
#>     I, expand.grid, unname
#> Loading required package: IRanges
#> Loading required package: GenomeInfoDb
#> Loading required package: GenomicRanges
#> Loading required package: Biostrings
#> Loading required package: XVector
#> 
#> Attaching package: ‘Biostrings’
#> The following object is masked from ‘package:base’:
#> 
#>     strsplit
#> Loading required package: BiocIO
#> Loading required package: rtracklayer
#> 
#> Attaching package: ‘rtracklayer’
#> The following object is masked from ‘package:BiocIO’:
#> 
#>     FileForFormat
data(id_example_reduced)
res <- getIDCounts(data = id_example_reduced, reference = BSgenome.Hsapiens.1000genomes.hs37d5)