Last data update: 2014.03.03

R: Convert BED format to RangedData
BED2RangedDataR Documentation

Convert BED format to RangedData

Description

Convert BED format to RangedData. This function will be depreciated.

Usage

BED2RangedData(data.BED,header=FALSE, ...)

Arguments

data.BED

BED format data frame or BED filename, please refer to http://genome.ucsc.edu/FAQ/FAQformat#format1 for details

header

TRUE or FALSE, default to FALSE, indicates whether data.BED file has BED header

...

any parameter need to be passed into read.delim function

Value

RangedData with slot start holding the start position of the feature, slot end holding the end position of the feature, slot names holding the id of the feature, slot space holding the chromosome location where the feature is located. In addition, the following variables are included.

strand

1 for positive strand and -1 for negative strand where the feature is located. Default to 1 if not present in the BED formated data frame

Note

For converting the peakList in BED format to RangedData before calling annotatePeakInBatch function

Author(s)

Lihua Julie Zhu

See Also

See also as toGRanges.

Examples

    test.bed = data.frame(cbind(chrom = c("1", "2"), 
                          chromStart=c("100", "1000"),
                          chromEnd=c("200", "1100"), 
                          name=c("peak1", "peak2")))
    test.rangedData = BED2RangedData(test.bed)

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(ChIPpeakAnno)
Loading required package: grid
Loading required package: IRanges
Loading required package: BiocGenerics
Loading required package: parallel

Attaching package: 'BiocGenerics'

The following objects are masked from 'package:parallel':

    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
    clusterExport, clusterMap, parApply, parCapply, parLapply,
    parLapplyLB, parRapply, parSapply, parSapplyLB

The following objects are masked from 'package:stats':

    IQR, mad, xtabs

The following objects are masked from 'package:base':

    Filter, Find, Map, Position, Reduce, anyDuplicated, append,
    as.data.frame, cbind, colnames, do.call, duplicated, eval, evalq,
    get, grep, grepl, intersect, is.unsorted, lapply, lengths, mapply,
    match, mget, order, paste, pmax, pmax.int, pmin, pmin.int, rank,
    rbind, rownames, sapply, setdiff, sort, table, tapply, union,
    unique, unsplit

Loading required package: S4Vectors
Loading required package: stats4

Attaching package: 'S4Vectors'

The following objects are masked from 'package:base':

    colMeans, colSums, expand.grid, rowMeans, rowSums

Loading required package: Biostrings
Loading required package: XVector
Loading required package: GenomicRanges
Loading required package: GenomeInfoDb
Loading required package: VennDiagram
Loading required package: futile.logger

> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/ChIPpeakAnno/BED2RangedData.Rd_%03d_medium.png", width=480, height=480)
> ### Name: BED2RangedData
> ### Title: Convert BED format to RangedData
> ### Aliases: BED2RangedData BED2RangedData-deprecated
> ### Keywords: misc
> 
> ### ** Examples
> 
>     test.bed = data.frame(cbind(chrom = c("1", "2"), 
+                           chromStart=c("100", "1000"),
+                           chromEnd=c("200", "1100"), 
+                           name=c("peak1", "peak2")))
>     test.rangedData = BED2RangedData(test.bed)
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>