plot_motif_occurrence {spatzie} | R Documentation

## Plot motif occurrence

### Description

Plots a histogram of motif values (either counts, instances, or scores) for anchor 1 and anchor 2 regions.

### Usage

    plot_motif_occurrence(
      interaction_data,
      method = c("counts", "instances", "scores")
    )

### Arguments

`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

### Value

plot containing histogram for each anchor

### Author(s)

Jennifer Hammelman

### Examples

    ## 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)

[Package spatzie version 1.0.1 Index]