Learn R Programming

methylKit (version 0.99.2)

readFeatureFlank: a function to read-in genomic features and their upstream and downstream adjecent regions such as CpG islands and their shores

Description

a function to read-in genomic features and their upstream and downstream adjecent regions such as CpG islands and their shores

Usage

readFeatureFlank(location, remove.unsual = TRUE, flank = 2000,
  clean = TRUE, feature.flank.name = NULL)

# S4 method for character readFeatureFlank(location, remove.unsual = TRUE, flank = 2000, clean = TRUE, feature.flank.name = NULL)

Arguments

location

for the bed file of the feature

remove.unsual

remove chromosomes with unsual names random, Un and antyhing with "_" character

flank

number of basepairs for the flanking regions

clean

If set to TRUE, flanks overlapping with other main features will be trimmed

feature.flank.name

the names for feature and flank ranges, it should be a character vector of length 2. example: c("CpGi","shores")

Value

a GenomicRangesList contatining one GRanges object for flanks and one for GRanges object for the main feature.

Examples

Run this code
# NOT RUN {
 # location of the example CpG file
 my.loc=system.file("extdata", "cpgi.hg18.bed.txt", package = "methylKit")
 cpg.obj=readFeatureFlank(location=my.loc,
 feature.flank.name=c("CpGi","shores"))

# }

Run the code above in your browser using DataLab