Learn R Programming

Repitools (version 1.18.0)

mergeReplicates: Merge GRanges that are of replicate experiments.

Description

A lane of next generation sequencing data can be stored as a GRanges object. Sometimes, a GRangesList of various lanes can have experimental replicates. This function allows the merging of such elements.

Usage

"mergeReplicates"(reads, types, verbose = TRUE)

Arguments

reads
A GRangesList.
types
A vector the same length as reads, that gives what type of experiment each element is of.
verbose
Whether to print the progess of processing.

Value

GRangesList with one element per experiment type.

Details

The experiment type that each element of the merged list is of, is stored in the first element of the metadata list.

Examples

Run this code
  library(GenomicRanges)
  grl <- GRangesList(GRanges("chr1", IRanges(5, 10)),
                     GRanges("chr18", IRanges(25, 50)),
                     GRanges("chr22", IRanges(1, 100)))
  antibody <- c("MeDIP", "MeDIP", "H3K4me3")
  mergeReplicates(grl, antibody)

Run the code above in your browser using DataLab