get_specific_interactions {spatzie} | R Documentation

## Get interactions that contain a specific motif pair

### Description

Select interactions that contain anchor1_motif within anchor 1 and anchor2_motif within anchor 2.

### Usage

    get_specific_interactions(
      interaction_data,
      anchor1_motif = NULL,
      anchor2_motif = NULL
    )

### Arguments

`interaction_data` | an interactionData object of paired genomic regions
`anchor1_motif` | Motif name from `interactionData$anchor1_motifs`
`anchor2_motif` | Motif name from `interactionData$anchor2_motifs`

### Value

a `GenomicInteractions` object containing a subset subset of interactions that contain an instance of `anchor1_motif` in anchor 1 and `anchor2_motif` in anchor 2

### 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)
    yy1_pd_count_corr <- anchor_pair_enrich(yy1_pd_interaction,
                                            method = "score")
    yy1_yy1_interactions <- get_specific_interactions(
      yy1_pd_interaction,
      anchor1_motif = "YY1",
      anchor2_motif = "YY1")

    ## End(Not run)

    res <- get_specific_interactions(spatzie::int_data_yy1,
                                     anchor1_motif = "YY1",
                                     anchor2_motif = "YY1")

[Package spatzie version 1.0.1 Index]