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 Under development (unstable) (2024-10-21 r87258)
## Platform: x86_64-pc-linux-gnu
## Running under: Ubuntu 24.04.1 LTS
## 
## Matrix products: default
## BLAS:   /home/biocbuild/bbs-3.21-bioc/R/lib/libRblas.so 
## LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.12.0
## 
## locale:
##  [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
##  [3] LC_TIME=en_GB              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       
## 
## time zone: America/New_York
## tzcode source: system (glibc)
## 
## 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.75.0                   
##  [3] rtracklayer_1.67.0                 BiocIO_1.17.0                     
##  [5] Biostrings_2.75.0                  XVector_0.47.0                    
##  [7] GenomicRanges_1.59.0               GenomeInfoDb_1.43.0               
##  [9] IRanges_2.41.0                     S4Vectors_0.45.0                  
## [11] BiocGenerics_0.53.0                SingleMoleculeFootprinting_2.1.0  
## 
## loaded via a namespace (and not attached):
##   [1] RColorBrewer_1.1-3          jsonlite_1.8.9             
##   [3] magrittr_2.0.3              GenomicFeatures_1.59.0     
##   [5] farver_2.1.2                rmarkdown_2.28             
##   [7] zlibbioc_1.53.0             vctrs_0.6.5                
##   [9] memoise_2.0.1               Rsamtools_2.23.0           
##  [11] RCurl_1.98-1.16             QuasR_1.47.0               
##  [13] ggpointdensity_0.1.0        htmltools_0.5.8.1          
##  [15] S4Arrays_1.7.1              progress_1.2.3             
##  [17] curl_5.2.3                  SparseArray_1.7.0          
##  [19] sass_0.4.9                  bslib_0.8.0                
##  [21] plyr_1.8.9                  httr2_1.0.5                
##  [23] cachem_1.1.0                GenomicAlignments_1.43.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.19.0       digest_0.6.37              
##  [33] colorspace_2.1-1            ShortRead_1.65.0           
##  [35] patchwork_1.3.0             AnnotationDbi_1.69.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.5.0             
##  [45] Rbowtie_1.47.0              withr_3.0.2                
##  [47] bit64_4.5.2                 BiocParallel_1.41.0        
##  [49] viridis_0.6.5               DBI_1.2.3                  
##  [51] qs_0.27.2                   highr_0.11                 
##  [53] biomaRt_2.63.0              rappdirs_0.3.3             
##  [55] DelayedArray_0.33.1         rjson_0.2.23               
##  [57] tools_4.5.0                 glue_1.8.0                 
##  [59] restfulr_0.0.15             grid_4.5.0                 
##  [61] generics_0.1.3              gtable_0.3.6               
##  [63] tidyr_1.3.1                 RApiSerialize_0.1.4        
##  [65] hms_1.1.3                   xml2_1.3.6                 
##  [67] stringfish_0.16.0           utf8_1.2.4                 
##  [69] ggrepel_0.9.6               pillar_1.9.0               
##  [71] stringr_1.5.1               dplyr_1.1.4                
##  [73] BiocFileCache_2.15.0        lattice_0.22-6             
##  [75] bit_4.5.0                   deldir_2.0-4               
##  [77] tidyselect_1.2.1            knitr_1.48                 
##  [79] gridExtra_2.3               SummarizedExperiment_1.37.0
##  [81] xfun_0.48                   Biobase_2.67.0             
##  [83] matrixStats_1.4.1           stringi_1.8.4              
##  [85] UCSC.utils_1.3.0            yaml_2.3.10                
##  [87] evaluate_1.0.1              codetools_0.2-20           
##  [89] interp_1.1-6                GenomicFiles_1.43.0        
##  [91] tibble_3.2.1                cli_3.6.3                  
##  [93] RcppParallel_5.1.9          munsell_0.5.1              
##  [95] jquerylib_0.1.4             Rcpp_1.0.13                
##  [97] dbplyr_2.5.0                tidyverse_2.0.0            
##  [99] png_0.1-8                   XML_3.99-0.17              
## [101] parallel_4.5.0              ggplot2_3.5.1              
## [103] blob_1.2.4                  prettyunits_1.2.0          
## [105] latticeExtra_0.6-30         jpeg_0.1-10                
## [107] plyranges_1.27.0            bitops_1.0-9               
## [109] pwalign_1.3.0               txdbmaker_1.3.0            
## [111] viridisLite_0.4.2           VariantAnnotation_1.53.0   
## [113] scales_1.3.0                purrr_1.0.2                
## [115] crayon_1.5.3                rlang_1.1.4                
## [117] KEGGREST_1.47.0