git-svn-id: https://hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/bsseq@103653 bc3139a8-67e5-0310-9ffc-ced21a209358
... | ... |
@@ -16,8 +16,8 @@ data.frame2GRanges(df, keepColumns = FALSE, ignoreStrand = FALSE) |
16 | 16 |
\code{seqnames}, \code{start}, \code{end} and optionally a |
17 | 17 |
\code{strand column}.} |
18 | 18 |
\item{keepColumns}{In case \code{df} has additional columns, should |
19 |
- these columns be stored as metadata for the return GRanges or should |
|
20 |
- they be discarded.} |
|
19 |
+ these columns be stored as metadata columns on the return GRanges |
|
20 |
+ or should they be discarded.} |
|
21 | 21 |
\item{ignoreStrand}{In case \code{df} has a \code{strand} column, |
22 | 22 |
should this column be ignored.} |
23 | 23 |
} |
git-svn-id: https://hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/bsseq@78143 bc3139a8-67e5-0310-9ffc-ced21a209358
... | ... |
@@ -26,7 +26,7 @@ data.frame2GRanges(df, keepColumns = FALSE, ignoreStrand = FALSE) |
26 | 26 |
\code{names} for the return object. |
27 | 27 |
} |
28 | 28 |
\value{ |
29 |
- An object of class \code{"GRanges"} |
|
29 |
+ An object of class \code{GRanges} |
|
30 | 30 |
} |
31 | 31 |
\author{ |
32 | 32 |
Kasper Daniel Hansen \email{khansen@jhsph.edu} |
git-svn-id: https://hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/bsseq@67929 bc3139a8-67e5-0310-9ffc-ced21a209358
1 | 1 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,38 @@ |
1 |
+\name{data.frame2GRanges} |
|
2 |
+\alias{data.frame2GRanges} |
|
3 |
+\title{ |
|
4 |
+ Converts a data frame to a GRanges. |
|
5 |
+} |
|
6 |
+\description{ |
|
7 |
+ Converting a data.frame to a GRanges object. The data.frame needs |
|
8 |
+ columns like chr, start and end (strand is optional). Additional |
|
9 |
+ columns may be kept in the GRanges object. |
|
10 |
+} |
|
11 |
+\usage{ |
|
12 |
+data.frame2GRanges(df, keepColumns = FALSE, ignoreStrand = FALSE) |
|
13 |
+} |
|
14 |
+\arguments{ |
|
15 |
+ \item{df}{A \code{data.frame} with columns \code{chr} or |
|
16 |
+ \code{seqnames}, \code{start}, \code{end} and optionally a |
|
17 |
+ \code{strand column}.} |
|
18 |
+ \item{keepColumns}{In case \code{df} has additional columns, should |
|
19 |
+ these columns be stored as metadata for the return GRanges or should |
|
20 |
+ they be discarded.} |
|
21 |
+ \item{ignoreStrand}{In case \code{df} has a \code{strand} column, |
|
22 |
+ should this column be ignored.} |
|
23 |
+} |
|
24 |
+\note{ |
|
25 |
+ In case \code{df} has \code{rownames}, they will be used as |
|
26 |
+ \code{names} for the return object. |
|
27 |
+} |
|
28 |
+\value{ |
|
29 |
+ An object of class \code{"GRanges"} |
|
30 |
+} |
|
31 |
+\author{ |
|
32 |
+ Kasper Daniel Hansen \email{khansen@jhsph.edu} |
|
33 |
+} |
|
34 |
+\examples{ |
|
35 |
+df <- data.frame(chr = "chr1", start = 1:3, end = 2:4, |
|
36 |
+ strand = c("+","-","+")) |
|
37 |
+data.frame2GRanges(df, ignoreStrand = TRUE) |
|
38 |
+} |