mergeMCols | R Documentation |
Merges mcols(gr2) into mcols(gr1). NA's are set for rows that occur in one GRanges but not the other. Once merged, the output GRanges will be sorted.
mergeMCols(gr1, gr2, append.gr1 = "_1", append.gr2 = "_2")
gr1 |
GRanges to merge metadata into |
gr2 |
GRanges with data to be merged |
append.gr1 |
String to append to gr1 columns that share names with gr2 (default: "_1") |
append.gr2 |
String to append to gr2 columns that share names with gr1 (default: "_2") |
GRanges
gr1 <- GRanges(seqnames = "chr2", ranges = IRanges(103, 106), strand = "+", score = 5L, GC = 0.45)
gr2 <- GRanges(
seqnames = c("chr1", "chr2"),
ranges = IRanges(c(107, 113), width = 3),
strand = c("+", "-"),
score = 3:4, GC = c(0.3, 0.5))
gr3 <- mergeMCols(gr1, gr2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.