annoGR2DF {Repitools} | R Documentation |
GRanges
to a data.frame
.Converting a GRanges
that might be annotated with some kind of results
to a data.frame
is useful, because it allows easier writing to file
and viewing in other programs, like a spreadsheet program.
## S4 method for signature 'GRanges' annoGR2DF(anno)
anno |
A |
The column name seqnames
is changed to chr
, and if all the
strands are *
, then the strand
column is dropped.
A data.frame
of the annotation.
Dario Strbenac
require(GenomicRanges) chrs <- c("chr1", "chr3", "chr7", "chr22") starts <- seq(1000, 4000, 1000) ends <- seq(1500, 4500, 1000) t <- c(3.11, 0.93, 2.28, -0.18) gc <- c("High", "High", "Low", "High") gr <- GRanges(chrs, IRanges(starts, ends), strand = '*', t, gc) annoGR2DF(gr)