| Title: | methylTFR Annotations for mm10 |
|---|---|
| Description: | Precomputed transcription factor binding sites, motif GC frequency tables and a genome-wide GC distribution for use with the methylTFR package. Binding sites are genome-wide motif matches extended to the footprint window methylTFR reads across; the GC tables record how each motif's sites distribute over genome-wide GC quintiles, which is what allows a deviation score to be corrected for sequence composition. The data are hosted on AnnotationHub and retrieved on first use; this package provides the accessors and the documentation. |
| Authors: | Irem B. Gunduz [aut, cre] (ORCID: <https://orcid.org/0000-0003-2641-0916>), ERA-NET Transcan-Neu III - EPILUNAR [fnd] (Grant 01KT2409), Saarland University [fnd] (NanoBioMed Young Investigator Grant) |
| Maintainer: | Irem B. Gunduz <[email protected]> |
| License: | Artistic-2.0 |
| Version: | 0.99.12 |
| Built: | 2026-10-02 12:57:11 UTC |
| Source: | https://github.com/BiocStaging/methylTFRAnnotationMm10 |
Genome annotations that methylTFR needs to compute GC-bias-corrected transcription factor (TF) deviation scores from DNA methylation data on the Mus musculus mm10 assembly.
The package provides three kinds of resources, each with an accessor:
getTFbindsitesGenome-wide TF binding sites,
one GRanges per motif, extended to the footprint window
(see tf_bindsites).
getGCfreqMotif GC frequency tables: how
each motif's binding sites distribute over genome-wide GC quintiles
(see motif_gcfreq).
getGenomeGCThe genome-wide GC distribution
in 30 nt windows (see genomewide_GC).
availableMotifSets lists the motif sets that can be
requested. The three objects are passed to
methylTFR::run_methyltfr().
The data are too large to ship with the package. They are hosted on
AnnotationHub, downloaded on first use and served from the local
AnnotationHub cache afterwards. The metadata of every resource is
listed in system.file("extdata", "metadata.csv", package =
"methylTFRAnnotationMm10"), and the scripts that produced them are in
system.file("scripts", package = "methylTFRAnnotationMm10").
To read the .rds files from a local directory instead of
AnnotationHub (for example on a machine without internet access), set
options(methylTFRAnnotationMm10.datadir = "/path/to/files") or the
environment variable METHYL_TFRANNOTATION_Mm10_DIR.
Maintainer: Irem B. Gunduz [email protected] (ORCID)
Other contributors:
ERA-NET Transcan-Neu III - EPILUNAR (Grant 01KT2409) [funder]
Saarland University (NanoBioMed Young Investigator Grant) [funder]
vignette("methylTFRAnnotationMm10")
Returns the names accepted by the motifSet
argument of getTFbindsites and
getGCfreq.
availableMotifSets()availableMotifSets()
A character vector of motif set names.
methylTFRAnnotationMm10 for an overview of the
package.
availableMotifSets()availableMotifSets()
GC content of the mm10 genome in non-overlapping 30 nt
windows. Returned by getGenomeGC; the AnnotationHub
record title is genomewide_GC_mm10.rds.
A GRanges, one range per 30 nt window on the primary
chromosomes, with metadata columns
GC_biasNumeric, GC fraction of the window (0 to 1);
NaN for windows made of N.
GC_binInteger, genome-wide GC quintile of the window, 1 (lowest) to 5 (highest).
and S4Vectors::metadata() entries gc_breaks (the six
quintile boundaries), bin_scope ("genome": quantiles
taken genome-wide) and step (window step, 30).
methylTFR overlaps each methylation call with these
windows to assign it a GC bin; the motif tables in
motif_gcfreq use the same boundaries.
This page documents a data resource rather than a
function; the object is returned by getGenomeGC.
Computed from the UCSC mm10 BSgenome package; see
system.file("scripts", "make-data.R", package =
"methylTFRAnnotationMm10").
getGenomeGC, methylTFRAnnotationMm10
# AnnotationHub records of this resource and their descriptions md <- utils::read.csv(system.file("extdata", "metadata.csv", package = "methylTFRAnnotationMm10" )) md[grepl("genomewide_GC", md$Title), c("Title", "RDataClass")] # Loading the resource downloads it from AnnotationHub on first use: # gc <- getGenomeGC() # table(gc$GC_bin); S4Vectors::metadata(gc)$gc_breaks# AnnotationHub records of this resource and their descriptions md <- utils::read.csv(system.file("extdata", "metadata.csv", package = "methylTFRAnnotationMm10" )) md[grepl("genomewide_GC", md$Title), c("Title", "RDataClass")] # Loading the resource downloads it from AnnotationHub on first use: # gc <- getGenomeGC() # table(gc$GC_bin); S4Vectors::metadata(gc)$gc_breaks
Load the motif GC frequency tables for a motif set. Downloaded from AnnotationHub on first use and cached locally thereafter.
getGCfreq(motifSet = "altius")getGCfreq(motifSet = "altius")
motifSet |
Motif set to load. One of
|
Each table describes the GC composition around one motif's
binding sites. Column corresponds to the -th 30 nt
window along the (extended) binding site; row gives the
fraction of binding sites whose window at that position falls into
genome-wide GC quintile (row 1 lowest, row 5 highest GC).
Columns therefore sum to one. methylTFR combines these
fractions with the observed methylation per GC bin to obtain the
methylation a motif would be expected to show from sequence
composition alone. See motif_gcfreq for the data
format.
A named list of numeric matrices with five rows (GC
quintiles), one matrix per motif.
motif_gcfreq, getTFbindsites,
getGenomeGC
# Point the package at a temporary directory holding a small mock # table so the example runs without downloading from AnnotationHub. mock_dir <- file.path(tempdir(), "gcfreq_example") dir.create(mock_dir, showWarnings = FALSE) freq <- matrix(c(0.1, 0.2, 0.4, 0.2, 0.1), nrow = 5, ncol = 3) saveRDS(list(MA0001.1 = freq), file.path(mock_dir, "altius_motif_gcfreq.rds")) old_opt <- options(methylTFRAnnotationMm10.datadir = mock_dir) gcfreqs <- getGCfreq("altius") gcfreqs$MA0001.1 colSums(gcfreqs$MA0001.1) options(old_opt) unlink(mock_dir, recursive = TRUE)# Point the package at a temporary directory holding a small mock # table so the example runs without downloading from AnnotationHub. mock_dir <- file.path(tempdir(), "gcfreq_example") dir.create(mock_dir, showWarnings = FALSE) freq <- matrix(c(0.1, 0.2, 0.4, 0.2, 0.1), nrow = 5, ncol = 3) saveRDS(list(MA0001.1 = freq), file.path(mock_dir, "altius_motif_gcfreq.rds")) old_opt <- options(methylTFRAnnotationMm10.datadir = mock_dir) gcfreqs <- getGCfreq("altius") gcfreqs$MA0001.1 colSums(gcfreqs$MA0001.1) options(old_opt) unlink(mock_dir, recursive = TRUE)
Load the genome-wide GC distribution for mm10. Downloaded from AnnotationHub on first use and cached locally thereafter.
getGenomeGC(assembly = "mm10")getGenomeGC(assembly = "mm10")
assembly |
Genome assembly. Only |
The genome is tiled into non-overlapping 30 nt windows. Each
window carries its GC fraction and its genome-wide GC quintile.
methylTFR uses the table to assign every methylation call to
a GC bin. See genomewide_GC for the data format.
The package serves a single assembly, so the argument can be left
out. It is kept so that code written as
getGenomeGC("mm10") works; any other assembly is an error.
A GRanges with metadata columns GC_bias (GC
fraction of the window) and GC_bin (quintile, 1 to 5).
# Point the package at a temporary directory holding a small mock # object so the example runs without downloading from AnnotationHub. mock_dir <- file.path(tempdir(), "genomegc_example") dir.create(mock_dir, showWarnings = FALSE) gr <- GenomicRanges::GRanges(c("chr1:1-30", "chr1:31-60", "chr1:61-90")) gr$GC_bias <- c(0.30, 0.43, 0.63) gr$GC_bin <- c(1L, 3L, 5L) saveRDS(gr, file.path(mock_dir, "genomewide_GC_mm10.rds")) old_opt <- options(methylTFRAnnotationMm10.datadir = mock_dir) getGenomeGC() options(old_opt) unlink(mock_dir, recursive = TRUE)# Point the package at a temporary directory holding a small mock # object so the example runs without downloading from AnnotationHub. mock_dir <- file.path(tempdir(), "genomegc_example") dir.create(mock_dir, showWarnings = FALSE) gr <- GenomicRanges::GRanges(c("chr1:1-30", "chr1:31-60", "chr1:61-90")) gr$GC_bias <- c(0.30, 0.43, 0.63) gr$GC_bin <- c(1L, 3L, 5L) saveRDS(gr, file.path(mock_dir, "genomewide_GC_mm10.rds")) old_opt <- options(methylTFRAnnotationMm10.datadir = mock_dir) getGenomeGC() options(old_opt) unlink(mock_dir, recursive = TRUE)
Load genome-wide transcription factor binding sites for a motif set. Downloaded from AnnotationHub on first use and cached locally thereafter.
getTFbindsites(motifSet = "altius")getTFbindsites(motifSet = "altius")
motifSet |
Motif set to load. One of
|
Each element of the returned list holds the binding sites of
one motif. Every range is the motif match extended by 200 bp on either
side, the footprint window across which methylTFR reads
methylation. See tf_bindsites for the data format.
A GRangesList with one GRanges per motif,
named by motif ID.
# Point the package at a temporary directory holding a small mock # object so the example runs without downloading from AnnotationHub. mock_dir <- file.path(tempdir(), "tfbs_example") dir.create(mock_dir, showWarnings = FALSE) mock_grl <- GenomicRanges::GRangesList( MA0001.1 = GenomicRanges::GRanges( c("chr1:1001-1411", "chr2:5001-5411"), strand = c("+", "-") ) ) saveRDS(mock_grl, file.path(mock_dir, "altius_tf_bindsites.rds")) old_opt <- options(methylTFRAnnotationMm10.datadir = mock_dir) getTFbindsites("altius") options(old_opt) unlink(mock_dir, recursive = TRUE)# Point the package at a temporary directory holding a small mock # object so the example runs without downloading from AnnotationHub. mock_dir <- file.path(tempdir(), "tfbs_example") dir.create(mock_dir, showWarnings = FALSE) mock_grl <- GenomicRanges::GRangesList( MA0001.1 = GenomicRanges::GRanges( c("chr1:1001-1411", "chr2:5001-5411"), strand = c("+", "-") ) ) saveRDS(mock_grl, file.path(mock_dir, "altius_tf_bindsites.rds")) old_opt <- options(methylTFRAnnotationMm10.datadir = mock_dir) getTFbindsites("altius") options(old_opt) unlink(mock_dir, recursive = TRUE)
Per-motif tables describing the GC composition around
each motif's binding sites on mm10. Returned by
getGCfreq; the AnnotationHub record titles are
<motifSet>_motif_gcfreq.rds.
A named list with one numeric matrix per motif (names
are motif IDs, matching the names of the corresponding
tf_bindsites list). Each matrix has
Genome-wide GC quintiles, from lowest (row 1) to
highest (row 5) GC. Quintile boundaries are the ones stored with
genomewide_GC, so both objects share one scale.
A 30 nt window slides one
base at a time along the binding site (motif plus 200 bp on either
side, padded by a further 65 bp so edge windows are complete).
Column is the -th window.
Entries are the fraction of the motif's binding sites whose window at
that position falls into each quintile; every column sums to one.
Windows containing N are ignored.
The tables are what make the methylTFR deviation score bias-corrected. A motif whose sites sit in GC-rich sequence overlaps hypomethylated CpG islands more often; combining these fractions with the observed methylation per GC bin gives the methylation expected from sequence composition alone, which is then subtracted.
Available motif sets:
jaspar2020JASPAR2020 CORE matrices, scanned genome-wide.
cisbpv2CIS-BP v2 PWMs (pwms_v2 from
chromVARmotifs), scanned genome-wide.
altiusVierstra motif archetypes v1.0.
This page documents a data resource rather than a
function; the object is returned by getGCfreq.
Built with methylTFRAnnotationBuilder
(https://github.com/EpigenomeInformatics/methylTFRAnnotationBuilder)
from BSgenome sequences; see
system.file("scripts", "make-data.R", package =
"methylTFRAnnotationMm10")
and system.file("extdata", "metadata.csv", package =
"methylTFRAnnotationMm10") for the exact sources and versions.
getGCfreq, methylTFRAnnotationMm10
# AnnotationHub records of this resource and their descriptions md <- utils::read.csv(system.file("extdata", "metadata.csv", package = "methylTFRAnnotationMm10" )) md[grepl("_motif_gcfreq", md$Title), c("Title", "RDataClass")] # Loading the resource downloads it from AnnotationHub on first use: # gcfreqs <- getGCfreq("jaspar2020") # length(gcfreqs); dim(gcfreqs[[1]]); colSums(gcfreqs[[1]])# AnnotationHub records of this resource and their descriptions md <- utils::read.csv(system.file("extdata", "metadata.csv", package = "methylTFRAnnotationMm10" )) md[grepl("_motif_gcfreq", md$Title), c("Title", "RDataClass")] # Loading the resource downloads it from AnnotationHub on first use: # gcfreqs <- getGCfreq("jaspar2020") # length(gcfreqs); dim(gcfreqs[[1]]); colSums(gcfreqs[[1]])
Genome-wide predicted transcription factor binding sites
on mm10. Returned by getTFbindsites; the
AnnotationHub record titles are <motifSet>_tf_bindsites.rds.
A GRangesList with one GRanges per motif,
named by motif ID. Each range is a motif match on the primary
chromosomes (chr1-19, X, Y; chrM excluded) extended by 200 bp
on either side of the match, so all ranges of a motif have the same
width (motif width + 400 bp). The strand of the match is kept; there
are no metadata columns. Coordinates are 1-based.
Available motif sets:
jaspar2020JASPAR2020 CORE matrices, scanned genome-wide.
cisbpv2CIS-BP v2 PWMs (pwms_v2 from
chromVARmotifs), scanned genome-wide.
altiusVierstra motif archetypes v1.0.
This page documents a data resource rather than a
function; the object is returned by getTFbindsites.
See motif_gcfreq.
getTFbindsites, methylTFRAnnotationMm10
# AnnotationHub records of this resource and their descriptions md <- utils::read.csv(system.file("extdata", "metadata.csv", package = "methylTFRAnnotationMm10" )) md[grepl("_tf_bindsites", md$Title), c("Title", "RDataClass")] # Loading the resource downloads it from AnnotationHub on first use: # tfbs <- getTFbindsites("jaspar2020") # length(tfbs); head(lengths(tfbs)); tfbs[[1]]# AnnotationHub records of this resource and their descriptions md <- utils::read.csv(system.file("extdata", "metadata.csv", package = "methylTFRAnnotationMm10" )) md[grepl("_tf_bindsites", md$Title), c("Title", "RDataClass")] # Loading the resource downloads it from AnnotationHub on first use: # tfbs <- getTFbindsites("jaspar2020") # length(tfbs); head(lengths(tfbs)); tfbs[[1]]