We first load the MMAPPR2data package:

library(MMAPPR2data, quietly = TRUE)

This package contains the following two functions, which provide easy access to the BAM files and their indices, returning BamFile objects:

exampleWTbam()
## class: BamFile 
## path: /tmp/Rtmp56aMqf/Rinst1b987505cc04/MMAPPR2data/extdata/wt.bam
## index: /tmp/Rtmp56aMqf/Rinst1b987505cc04/MMAPPR2data/extdata/wt.bam.bai
## isOpen: FALSE 
## yieldSize: NA 
## obeyQname: FALSE 
## asMates: FALSE 
## qnamePrefixEnd: NA 
## qnameSuffixStart: NA
exampleMutBam()
## class: BamFile 
## path: /tmp/Rtmp56aMqf/Rinst1b987505cc04/MMAPPR2data/extdata/mut.bam
## index: /tmp/Rtmp56aMqf/Rinst1b987505cc04/MMAPPR2data/extdata/mut.bam.bai
## isOpen: FALSE 
## yieldSize: NA 
## obeyQname: FALSE 
## asMates: FALSE 
## qnamePrefixEnd: NA 
## qnameSuffixStart: NA

Annotation data for the region is also included with the package and can be accessed with these two functions:

goldenFasta()
## [1] "/tmp/Rtmp56aMqf/Rinst1b987505cc04/MMAPPR2data/extdata/slc24a5.fa.gz"
goldenGFF()
## [1] "/tmp/Rtmp56aMqf/Rinst1b987505cc04/MMAPPR2data/extdata/slc24a5.gff.gz"

For details on the source of these files, and on their construction see ?MMAPPR2data and the inst/scripts/folder.

sessionInfo()
## R version 4.0.3 (2020-10-10)
## Platform: x86_64-pc-linux-gnu (64-bit)
## Running under: Ubuntu 18.04.5 LTS
## 
## Matrix products: default
## BLAS:   /home/biocbuild/bbs-3.12-bioc/R/lib/libRblas.so
## LAPACK: /home/biocbuild/bbs-3.12-bioc/R/lib/libRlapack.so
## 
## locale:
##  [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
##  [3] LC_TIME=en_US.UTF-8        LC_COLLATE=C              
##  [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
##  [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
##  [9] LC_ADDRESS=C               LC_TELEPHONE=C            
## [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       
## 
## attached base packages:
## [1] stats     graphics  grDevices utils     datasets  methods   base     
## 
## other attached packages:
## [1] MMAPPR2data_1.4.0 BiocStyle_2.18.0 
## 
## loaded via a namespace (and not attached):
##  [1] XVector_0.30.0         knitr_1.30             magrittr_1.5          
##  [4] GenomicRanges_1.42.0   BiocGenerics_0.36.0    zlibbioc_1.36.0       
##  [7] IRanges_2.24.0         BiocParallel_1.24.0    rlang_0.4.8           
## [10] stringr_1.4.0          GenomeInfoDb_1.26.0    tools_4.0.3           
## [13] parallel_4.0.3         xfun_0.18              htmltools_0.5.0       
## [16] yaml_2.2.1             digest_0.6.27          crayon_1.3.4          
## [19] bookdown_0.21          GenomeInfoDbData_1.2.4 BiocManager_1.30.10   
## [22] S4Vectors_0.28.0       bitops_1.0-6           RCurl_1.98-1.2        
## [25] evaluate_0.14          rmarkdown_2.5          stringi_1.5.3         
## [28] compiler_4.0.3         Biostrings_2.58.0      Rsamtools_2.6.0       
## [31] stats4_4.0.3

Thanks to Mike Love’s alpineData package for vignette structure inspiration.