Description Usage Arguments Value Author(s) Examples
View source: R/peakEnrichment4Features.R
This function checks which other-ends from a chicagoData
object overlap with a set of genomic features.
1 2 | overlapFragWithFeatures(x = NULL, folder = NULL, list_frag, position_otherEnd = NULL,
sep = "\t")
|
x |
a |
folder |
the name of the folder where the files containing the features of interest are stored. |
list_frag |
a list where each element is the name of a file containing a feature of interest (e. g. H3K4me1, CTCF, DHS etc.). These files must have a bed format, with no header. Each element of the list must be named. |
position_otherEnd |
the name of the file containing the coordinates of the restriction fragments
and the corresponding IDs. The coordinates should be "chromosome", "start" and "end", and the ID should be numeric.
|
sep |
the field separator character. Values are separated by this character on each line of the file containing
the coordinates of the restriction fragments (called by |
a data table (data.table
) built from x
, where a column was added for each genomic feature present in list_frag
.
The new columns contain logical values indicating whether there was an overlap or not.
Mikhail Spivakov, Jonathan Cairns, Paula Freire Pritchett
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | data(cdUnitTest)
##modifications to cdUnitTest, ensuring it uses correct design directory
designDir <- file.path(system.file("extdata", package="Chicago"), "unitTestDesign")
cdUnitTest <- modifySettings(cd=cdUnitTest, designDir=designDir)
##get the unit test ChIP tracks
dataPath <- system.file("extdata", package="Chicago")
ChIPdir <- file.path(dataPath, "unitTestChIP")
dir(ChIPdir)
##get a list of the unit test ChIP tracks
featuresFile <- file.path(ChIPdir, "featuresmESC.txt")
featuresTable <- read.delim(featuresFile, header=FALSE, as.is=TRUE)
featuresList <- as.list(featuresTable$V2)
names(featuresList) <- featuresTable$V1
##test for overlap
overlapFragWithFeatures(cdUnitTest, folder=ChIPdir, list_frag = featuresList)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.