git-svn-id: file:///home/git/hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/metagenomeSeq@84095 bc3139a8-67e5-0310-9ffc-ced21a209358
... | ... |
@@ -1,4 +1,5 @@ |
1 |
-#' Aggregates a MRexperiment object by a particular taxonomic level. |
|
1 |
+#' @name aggregateByTaxonomy |
|
2 |
+#' @title Aggregates a MRexperiment object by a particular taxonomic level. |
|
2 | 3 |
#' |
3 | 4 |
#' Using the featureData information in the MRexperiment, calling aggregateByTaxonomy on a |
4 | 5 |
#' MRexperiment and a particular featureData column (i.e. 'genus') will aggregate counts |
... | ... |
@@ -10,7 +11,8 @@ |
10 | 11 |
#' @param norm Whether to aggregate normalized counts or not. |
11 | 12 |
#' @param aggfun Aggregation function. |
12 | 13 |
#' @return An aggregated count matrix. |
13 |
-#' @aliases aggregateTax, aggTax |
|
14 |
+#' @aliases aggTax |
|
15 |
+#' @rdname aggregateByTaxonomy |
|
14 | 16 |
#' @export |
15 | 17 |
#' @examples |
16 | 18 |
#' |
... | ... |
@@ -34,4 +36,9 @@ aggregateByTaxonomy<-function(obj,lvl,norm=TRUE,aggfun = colSums){ |
34 | 36 |
rownames(newMat) = names(grps) |
35 | 37 |
colnames(newMat) = sampleNames(obj) |
36 | 38 |
newMat |
39 |
+} |
|
40 |
+#' @rdname aggregateByTaxonomy |
|
41 |
+#' @export |
|
42 |
+aggTax<-function(obj,lvl,norm=TRUE,aggfun = colSums){ |
|
43 |
+ aggregateByTaxonomy(obj,lvl,norm=TRUE,aggfun = colSums) |
|
37 | 44 |
} |
38 | 45 |
\ No newline at end of file |
... | ... |
@@ -1,10 +1,16 @@ |
1 | 1 |
\name{aggregateByTaxonomy} |
2 | 2 |
\alias{aggTax} |
3 | 3 |
\alias{aggregateByTaxonomy} |
4 |
-\alias{aggregateTax,} |
|
5 |
-\title{Aggregates a MRexperiment object by a particular taxonomic level.} |
|
4 |
+\title{Aggregates a MRexperiment object by a particular taxonomic level. |
|
5 |
+ |
|
6 |
+Using the featureData information in the MRexperiment, calling aggregateByTaxonomy on a |
|
7 |
+MRexperiment and a particular featureData column (i.e. 'genus') will aggregate counts |
|
8 |
+to the desired level by with the aggfun function (default colSums). Possible aggfun alternatives |
|
9 |
+include colMeans and colMedians.} |
|
6 | 10 |
\usage{ |
7 | 11 |
aggregateByTaxonomy(obj, lvl, norm = TRUE, aggfun = colSums) |
12 |
+ |
|
13 |
+aggTax(obj, lvl, norm = TRUE, aggfun = colSums) |
|
8 | 14 |
} |
9 | 15 |
\arguments{ |
10 | 16 |
\item{obj}{A MRexperiment object.} |
... | ... |
@@ -21,6 +27,9 @@ aggregateByTaxonomy(obj, lvl, norm = TRUE, aggfun = colSums) |
21 | 27 |
An aggregated count matrix. |
22 | 28 |
} |
23 | 29 |
\description{ |
30 |
+Aggregates a MRexperiment object by a particular taxonomic |
|
31 |
+level. |
|
32 |
+ |
|
24 | 33 |
Using the featureData information in the MRexperiment, |
25 | 34 |
calling aggregateByTaxonomy on a MRexperiment and a |
26 | 35 |
particular featureData column (i.e. 'genus') will aggregate |