ChIPpeakAnno (version 3.4.0)

GFF2RangedData: Convert GFF format to RangedData

Description

Convert GFF format to RangedData. This function will be depreciated. Use function toGRanges instead.

Usage

GFF2RangedData(data.GFF,header=FALSE, ...)

Arguments

data.GFF
GFF format data frame or GFF file name, please refer to http://genome.ucsc.edu/FAQ/FAQformat#format3 for details
header
TRUE or FALSE, default to FALSE, indicates whether data.GFF file has GFF 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.

Examples

Run this code
  test.GFF = data.frame(cbind(seqname  = c("chr1", "chr2"), 
  source=rep("Macs", 2), 
  feature=rep("peak", 2), 
  start=c("100", "1000"), 
  end=c("200", "1100"), 
  score=c(60, 26), 
  strand=c(1, -1), 
  frame=c(".", 2), 
  group=c("peak1", "peak2")))
  test.rangedData = GFF2RangedData(test.GFF)

Run the code above in your browser using DataLab