View source: R/plot_motif_occurrence.R
plot_motif_occurrence | R Documentation |
Plots a histogram of motif values (either counts, instances, or scores) for anchor 1 and anchor 2 regions.
plot_motif_occurrence(
interaction_data,
method = c("counts", "instances", "scores")
)
interaction_data |
an interactionData object of paired genomic regions |
method |
way to interpret motif matching for each anchor region as "counts" number of motifs per region, "instances" motif present or absent each region, or "scores" maximum motif PWM match score for each region |
plot containing histogram for each anchor
Jennifer Hammelman
## Not run:
genome_id <- "BSgenome.Mmusculus.UCSC.mm9"
if (!(genome_id %in% rownames(utils::installed.packages()))) {
BiocManager::install(genome_id, update = FALSE, ask = FALSE)
}
genome <- BSgenome::getBSgenome(genome_id)
motifs_file <- system.file("extdata/motifs_subset.txt.gz",
package = "spatzie")
motifs <- TFBSTools::readJASPARMatrix(motifs_file, matrixClass = "PFM")
yy1_pd_interaction <- scan_motifs(spatzie::interactions_yy1, motifs, genome)
yy1_pd_interaction <- filter_motifs(yy1_pd_interaction, 0.4)
plot_motif_occurrence(yy1_pd_interaction,"counts")
## End(Not run)
plot_motif_occurrence(spatzie::anchor_pair_example_score)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.