Introduction

This vignette exemplifies how to perform unsupervised footprint detection and quantification using FootprintCharter as per Baderna & Barzaghi et al., 2024 and Barzaghi et al., 2024.

FootprintCharter partitions molecules by their methylation patterns without relying on orthogonal genomic annotations such as TF motifs.

Loading libraries

suppressWarnings(library(SingleMoleculeFootprinting))
suppressWarnings(library(BSgenome.Mmusculus.UCSC.mm10))

Methylation = qs::qread(system.file("extdata", "Methylation_4.qs", package="SingleMoleculeFootprinting"))
RegionOfInterest = GRanges("chr6", IRanges(88106000, 88106500))
TFBSs = qs::qread(system.file("extdata", "TFBSs_1.qs", package="SingleMoleculeFootprinting"))

PlotAvgSMF(MethGR = Methylation[[1]], RegionOfInterest = RegionOfInterest, TFBSs = TFBSs)
## No sorted reads passed...plotting counts from all reads

MethSM = Methylation[[2]]

sessionInfo

## R version 4.4.1 (2024-06-14)
## Platform: aarch64-apple-darwin20
## Running under: macOS Ventura 13.6.7
## 
## Matrix products: default
## BLAS:   /Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/lib/libRblas.0.dylib 
## LAPACK: /Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/lib/libRlapack.dylib;  LAPACK version 3.12.0
## 
## locale:
## [1] C/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
## 
## time zone: America/New_York
## tzcode source: internal
## 
## attached base packages:
## [1] stats4    stats     graphics  grDevices utils     datasets  methods  
## [8] base     
## 
## other attached packages:
##  [1] BSgenome.Mmusculus.UCSC.mm10_1.4.3 BSgenome_1.74.0                   
##  [3] rtracklayer_1.66.0                 BiocIO_1.16.0                     
##  [5] Biostrings_2.74.0                  XVector_0.46.0                    
##  [7] GenomicRanges_1.58.0               GenomeInfoDb_1.42.0               
##  [9] IRanges_2.40.0                     S4Vectors_0.44.0                  
## [11] BiocGenerics_0.52.0                SingleMoleculeFootprinting_2.0.0  
## 
## loaded via a namespace (and not attached):
##   [1] RColorBrewer_1.1-3          jsonlite_1.8.9             
##   [3] magrittr_2.0.3              GenomicFeatures_1.58.0     
##   [5] farver_2.1.2                rmarkdown_2.29             
##   [7] zlibbioc_1.52.0             vctrs_0.6.5                
##   [9] memoise_2.0.1               Rsamtools_2.22.0           
##  [11] RCurl_1.98-1.16             QuasR_1.46.0               
##  [13] ggpointdensity_0.1.0        htmltools_0.5.8.1          
##  [15] S4Arrays_1.6.0              progress_1.2.3             
##  [17] curl_6.0.0                  SparseArray_1.6.0          
##  [19] sass_0.4.9                  bslib_0.8.0                
##  [21] plyr_1.8.9                  httr2_1.0.6                
##  [23] cachem_1.1.0                GenomicAlignments_1.42.0   
##  [25] lifecycle_1.0.4             pkgconfig_2.0.3            
##  [27] Matrix_1.7-1                R6_2.5.1                   
##  [29] fastmap_1.2.0               GenomeInfoDbData_1.2.13    
##  [31] MatrixGenerics_1.18.0       digest_0.6.37              
##  [33] colorspace_2.1-1            ShortRead_1.64.0           
##  [35] patchwork_1.3.0             AnnotationDbi_1.68.0       
##  [37] RSQLite_2.3.7               hwriter_1.3.2.1            
##  [39] labeling_0.4.3              filelock_1.0.3             
##  [41] fansi_1.0.6                 httr_1.4.7                 
##  [43] abind_1.4-8                 compiler_4.4.1             
##  [45] Rbowtie_1.46.0              withr_3.0.2                
##  [47] bit64_4.5.2                 BiocParallel_1.40.0        
##  [49] viridis_0.6.5               DBI_1.2.3                  
##  [51] qs_0.27.2                   biomaRt_2.62.0             
##  [53] rappdirs_0.3.3              DelayedArray_0.32.0        
##  [55] rjson_0.2.23                tools_4.4.1                
##  [57] glue_1.8.0                  restfulr_0.0.15            
##  [59] grid_4.4.1                  generics_0.1.3             
##  [61] gtable_0.3.6                tidyr_1.3.1                
##  [63] RApiSerialize_0.1.4         hms_1.1.3                  
##  [65] xml2_1.3.6                  stringfish_0.16.0          
##  [67] utf8_1.2.4                  ggrepel_0.9.6              
##  [69] pillar_1.9.0                stringr_1.5.1              
##  [71] dplyr_1.1.4                 BiocFileCache_2.14.0       
##  [73] lattice_0.22-6              bit_4.5.0                  
##  [75] deldir_2.0-4                tidyselect_1.2.1           
##  [77] knitr_1.49                  gridExtra_2.3              
##  [79] SummarizedExperiment_1.36.0 xfun_0.49                  
##  [81] Biobase_2.66.0              matrixStats_1.4.1          
##  [83] stringi_1.8.4               UCSC.utils_1.2.0           
##  [85] yaml_2.3.10                 evaluate_1.0.1             
##  [87] codetools_0.2-20            interp_1.1-6               
##  [89] GenomicFiles_1.42.0         tibble_3.2.1               
##  [91] cli_3.6.3                   RcppParallel_5.1.9         
##  [93] munsell_0.5.1               jquerylib_0.1.4            
##  [95] Rcpp_1.0.13-1               dbplyr_2.5.0               
##  [97] tidyverse_2.0.0             png_0.1-8                  
##  [99] XML_3.99-0.17               parallel_4.4.1             
## [101] ggplot2_3.5.1               blob_1.2.4                 
## [103] prettyunits_1.2.0           latticeExtra_0.6-30        
## [105] jpeg_0.1-10                 plyranges_1.26.0           
## [107] bitops_1.0-9                pwalign_1.2.0              
## [109] txdbmaker_1.2.0             viridisLite_0.4.2          
## [111] VariantAnnotation_1.52.0    scales_1.3.0               
## [113] purrr_1.0.2                 crayon_1.5.3               
## [115] rlang_1.1.4                 KEGGREST_1.46.0