Description Usage Arguments Details Value References Examples
Given a filename referring to a BED file, this function returns a dataframe containing the first 6 columns of the BED file. The BED file referred to by the filename MUST have as its first 6 columns: coordinate chromosome, coordinate start position, coordinate end position, coordinate name, coordinate score, and coordinate strand. 0 and . can be used for missing score and strand information, respectively. Resulting dataframes can then be used as peaks or features for annotation.
1 | importBED(pathName)
|
pathName |
A filename giving a path to the BED file to be imported |
Use of read.delim from the utils package to import files was inspired by RStudio's default method of importing text files. Code to rename column names is based off of a StackOverflow post by Joshua Ulrich (see References).
A dataframe containing all coordinates given in the BED file. This dataframe contains 6 columns: coordinate chromosome, coordinate start position, coordinate end position, coordinate name, coordinate score, and coordinate strand. Note that the end coordinate will be one less than given in the BED file since standard BED format has right-open intervals.
Joshua Ulrich. "How to rename a single column in a data.frame?". 23 September 2011. Accessed 25 September 2019. https://stackoverflow.com/a/7532464
1 2 3 4 5 6 7 8 | pathToPeaks <- system.file("extdata",
"H3K27me3Peaks.bed", package = "PeakMapper")
pathToGenes <- system.file("extdata",
"WS263Genes.bed", package = "PeakMapper")
H3K27me3Peaks <- importBED(pathToPeaks)
WS263Genes <- importBED(pathToGenes)
H3K27me3Peaks$Name
WS263Genes$Score
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.