PscanRBackgrounds 0.99.7
PscanRBackgrounds provides the precomputed promoter backgrounds used by the
PscanR motif enrichment package.
PscanR compares the motif scores of a set of foreground promoters against the
distribution of the same scores over all promoters of an organism. Computing
that distribution means scanning every promoter of a genome with every motif
of a JASPAR collection, which takes hours; this package distributes the
result for the most common combinations.
Version 2 of the backgrounds covers three JASPAR CORE releases (2020, 2022, 2024), seven genome assemblies of five organisms, and five promoter windows, for 105 backgrounds. Each background is a separate ExperimentHub resource. The files are hosted on Zenodo, in one record per JASPAR release: https://doi.org/10.5281/zenodo.23183695 (2020), https://doi.org/10.5281/zenodo.23183713 (2022) and https://doi.org/10.5281/zenodo.23183720 (2024). All 105 files are also archived as a single ZIP in https://doi.org/10.5281/zenodo.21821764.
if (!require("BiocManager", quietly = TRUE))
install.packages("BiocManager")
BiocManager::install("PscanRBackgrounds")
library(PscanRBackgrounds)
The metadata of all resources is installed with the package and can be inspected without network access.
metadata <- read.csv(system.file(
"extdata", "metadata.csv", package = "PscanRBackgrounds"
))
nrow(metadata)
#> [1] 105
head(metadata[c("Title", "Genome", "Species", "TaxonomyId")])
#> Title Genome Species
#> 1 PscanR_bg_v2_J2020_dm6_200u_50d_UCSC dm6 Drosophila melanogaster
#> 2 PscanR_bg_v2_J2020_dm6_450u_50d_UCSC dm6 Drosophila melanogaster
#> 3 PscanR_bg_v2_J2020_dm6_500u_0d_UCSC dm6 Drosophila melanogaster
#> 4 PscanR_bg_v2_J2020_dm6_950u_50d_UCSC dm6 Drosophila melanogaster
#> 5 PscanR_bg_v2_J2020_dm6_1000u_0d_UCSC dm6 Drosophila melanogaster
#> 6 PscanR_bg_v2_J2020_hg38_200u_50d_UCSC hg38 Homo sapiens
#> TaxonomyId
#> 1 7227
#> 2 7227
#> 3 7227
#> 4 7227
#> 5 7227
#> 6 9606
table(metadata$Genome)
#>
#> TAIR9 dm6 hg38 hs1 mm10 mm39 sacCer3
#> 15 15 15 15 15 15 15
Titles follow the pattern
PscanR_bg_v2_J<release>_<assembly>_<up>u_<down>d_<source>. The installed
catalog records the provenance of every background: annotation source and
retrieval date, promoter, motif and annotation hashes, scanner version and
commit, and the SHA-256 checksum of the file.
catalog <- read.delim(system.file(
"extdata", "catalog_v2.tsv", package = "PscanRBackgrounds"
))
table(catalog$assembly, catalog$jaspar_release)
#>
#> 2020 2022 2024
#> TAIR9 5 5 5
#> dm6 5 5 5
#> hg38 5 5 5
#> hs1 5 5 5
#> mm10 5 5 5
#> mm39 5 5 5
#> sacCer3 5 5 5
catalog[1, c("artifact", "motif_count", "promoter_count",
"annotation_source", "pscanr_version")]
#> artifact motif_count promoter_count
#> 1 backgrounds/J2020_dm6_200u_50d_UCSC.psbg2.txt 143 22400
#> annotation_source pscanr_version
#> 1 ncbiRefSeqCurated 0.99.0
Each resource uses the FilePath dispatch class: retrieval downloads the
text file once, caches it, and returns its local path.
library(ExperimentHub)
eh <- ExperimentHub()
backgrounds <- query(eh, "PscanRBackgrounds")
length(backgrounds)
#> [1] 105
hg38 <- query(backgrounds, c("hg38", "JASPAR2020", "200u_50d"))
hg38
#> ExperimentHub with 1 record
#> # snapshotDate(): 2026-11-10
#> # names(): EH10548
#> # package(): PscanRBackgrounds
#> # $dataprovider: JASPAR; UCSC
#> # $species: Homo sapiens
#> # $rdataclass: character
#> # $rdatadateadded: 2026-10-07
#> # $title: PscanR_bg_v2_J2020_hg38_200u_50d_UCSC
#> # $description: PscanR version-2 promoter background for JASPAR 2020 CORE ve...
#> # $taxonomyid: 9606
#> # $genome: hg38
#> # $sourcetype: TXT
#> # $sourceurl: https://doi.org/10.5281/zenodo.23183695
#> # $sourcesize: NA
#> # $tags: c("200u_50d", "Arabidopsis_thaliana_Data",
#> # "Drosophila_melanogaster_Data", "Genome", "hg38",
#> # "Homo_sapiens_Data", "JASPAR2020", "Mus_musculus_Data", "Promoter",
#> # "PscanR", "Saccharomyces_cerevisiae_Data", "TFBS")
#> # retrieve record with 'object[["EH10548"]]'
path <- hg38[[1]]
readLines(path, n = 3)
#> [1] "[SHORT TFBS MATRIX]"
#> [2] "MA0004.1\t39719\t0.826759564669762\t0.0749456643424372"
#> [3] "MA0006.1\t39719\t0.88062892110581\t0.0715779563878344"
PscanR users normally do not open the files directly: PscanR selects the background matching the requested JASPAR release, organism, assembly and promoter window, verifies its checksum, and combines it with the JASPAR matrices into the object its enrichment functions take.
The backgrounds are distributed under CC BY 4.0. Cite the Zenodo record and
the Pscan method (Zambelli, Pesole and Pavesi, 2009,
https://doi.org/10.1093/nar/gkp464). The installed DATA_SOURCES.md lists
the upstream sources; scripts/make-data.R describes how the backgrounds
were generated, and scripts/make-metadata.R builds the ExperimentHub
metadata. The generation pipeline is maintained at
https://github.com/Federico77z/PscanRBackgrounds-pipeline.
sessionInfo()
#> R version 4.6.1 (2026-06-24)
#> Platform: x86_64-pc-linux-gnu
#> Running under: Ubuntu 24.04.5 LTS
#>
#> Matrix products: default
#> BLAS: /home/biocbuild/bbs-3.24-bioc/R/lib/libRblas.so
#> LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.12.0 LAPACK version 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] stats graphics grDevices utils datasets methods base
#>
#> other attached packages:
#> [1] ExperimentHub_3.3.2 AnnotationHub_4.3.3 BiocFileCache_3.3.2
#> [4] dbplyr_2.6.0 BiocGenerics_0.59.12 generics_0.1.4
#> [7] PscanRBackgrounds_0.99.7 BiocStyle_2.41.0
#>
#> loaded via a namespace (and not attached):
#> [1] rappdirs_0.3.4 sass_0.4.10 BiocVersion_3.24.0
#> [4] RSQLite_3.53.3 digest_0.6.39 magrittr_2.0.5
#> [7] evaluate_1.0.5 bookdown_0.48 fastmap_1.2.0
#> [10] blob_1.3.0 jsonlite_2.0.0 AnnotationDbi_1.75.2
#> [13] DBI_1.3.0 BiocManager_1.30.27 httr_1.4.9
#> [16] purrr_1.2.2 Biostrings_2.81.9 httr2_1.3.0
#> [19] jquerylib_0.1.4 cli_3.6.6 crayon_1.5.3
#> [22] rlang_1.3.0 XVector_0.53.0 Biobase_2.73.2
#> [25] bit64_4.8.6 withr_3.0.3 cachem_1.1.0
#> [28] yaml_2.3.12 BiocBaseUtils_1.15.1 otel_0.3.0
#> [31] tools_4.6.1 memoise_2.0.1 dplyr_1.2.1
#> [34] filelock_1.0.3 curl_8.1.0 png_0.1-9
#> [37] vctrs_0.7.3 R6_2.6.1 stats4_4.6.1
#> [40] lifecycle_1.0.5 Seqinfo_1.3.2 KEGGREST_1.53.6
#> [43] S4Vectors_0.51.10 IRanges_2.47.5 bit_4.6.0
#> [46] pkgconfig_2.0.3 pillar_1.11.1 bslib_0.12.0
#> [49] glue_1.8.1 xfun_0.62 tibble_3.3.1
#> [52] tidyselect_1.2.1 knitr_1.52 htmltools_0.5.9
#> [55] rmarkdown_2.32 compiler_4.6.1