Learn R Programming

GenomicInteractions (version 1.6.2)

GenomicInteractions: Function to create a GenomicInteractions object

Description

Create GenomicInteractions objects from two GRanges ojects.

Usage

GenomicInteractions(anchor1, anchor2, counts, ...)
"GenomicInteractions"(anchor1, anchor2, counts, ...)
"GenomicInteractions"(anchor1)
"GenomicInteractions"(anchor1, anchor2)
"GenomicInteractions"(anchor1, anchor2, counts, ...)
"GenomicInteractions"(anchor1, anchor2, counts, ...)
"GenomicInteractions"(anchor1, anchor2, counts, ...)
"GenomicInteractions"(anchor1, anchor2, counts, ...)

Arguments

anchor1, anchor2
GRanges objects.
counts
An integer vector, defaults to 1.
...
Additional data to be added to mcols

Value

a GenomicInteractions object

Examples

Run this code

library(GenomicRanges)

anchor.one = GRanges(c("chr1", "chr1", "chr1", "chr1"), IRanges(c(10, 20, 30, 20), width=5))
anchor.two = GRanges(c("chr1", "chr1", "chr1", "chr2"), IRanges(c(100, 200, 300, 50), width=5))
interaction_counts = sample(1:10, 4)
test <- GenomicInteractions(anchor.one, anchor.two, counts=interaction_counts)

Run the code above in your browser using DataLab