Commit information:
Commit id: 13226f5c172a2e5e54a61e521a57d13b5ef50863
Commit message:
Added sl param to aggTax
Committed by nosson <nosson at gmail.com>
Commit date: 2014-02-28T12:16:03-08:00
From: Bioconductor Git-SVN Bridge <bioc-sync@bioconductor.org>
git-svn-id: file:///home/git/hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/metagenomeSeq@86937 bc3139a8-67e5-0310-9ffc-ced21a209358
... | ... |
@@ -1,7 +1,7 @@ |
1 | 1 |
Package: metagenomeSeq |
2 | 2 |
Title: Statistical analysis for sparse high-throughput sequencing |
3 |
-Version: 1.5.40 |
|
4 |
-Date: 2013-02-24 |
|
3 |
+Version: 1.5.41 |
|
4 |
+Date: 2013-02-28 |
|
5 | 5 |
Author: Joseph Nathaniel Paulson, Mihai Pop, Hector Corrada Bravo |
6 | 6 |
Maintainer: Joseph N. Paulson <jpaulson@umiacs.umd.edu> |
7 | 7 |
Description: metagenomeSeq is designed to determine features (be it Operational |
... | ... |
@@ -12,6 +12,7 @@ |
12 | 12 |
#' @param norm Whether to aggregate normalized counts or not. |
13 | 13 |
#' @param log Whether or not to log2 transform the counts - if MRexperiment object. |
14 | 14 |
#' @param aggfun Aggregation function. |
15 |
+#' @param sl scaling value, default is 1000. |
|
15 | 16 |
#' @return An aggregated count matrix. |
16 | 17 |
#' @aliases aggTax |
17 | 18 |
#' @rdname aggregateByTaxonomy |
... | ... |
@@ -21,9 +22,9 @@ |
21 | 22 |
#' # not run |
22 | 23 |
#' # aggregateByTaxonomy(mouseData,lvl="genus",norm=TRUE,aggfun=colMedians) |
23 | 24 |
#' |
24 |
-aggregateByTaxonomy<-function(obj,lvl,alternate=FALSE,norm=TRUE,log=FALSE,aggfun = colSums){ |
|
25 |
+aggregateByTaxonomy<-function(obj,lvl,alternate=FALSE,norm=TRUE,log=FALSE,aggfun = colSums,sl=1000){ |
|
25 | 26 |
if(class(obj)=="MRexperiment"){ |
26 |
- mat = MRcounts(obj,norm=norm,log=log) |
|
27 |
+ mat = MRcounts(obj,norm=norm,log=log,sl=sl) |
|
27 | 28 |
} else { |
28 | 29 |
stop("Object needs to be a MRexperiment object. If it's a matrix, see aggregateM.") |
29 | 30 |
} |
... | ... |
@@ -49,6 +50,6 @@ aggregateByTaxonomy<-function(obj,lvl,alternate=FALSE,norm=TRUE,log=FALSE,aggfun |
49 | 50 |
} |
50 | 51 |
#' @rdname aggregateByTaxonomy |
51 | 52 |
#' @export |
52 |
-aggTax<-function(obj,lvl,alternate=FALSE,norm=TRUE,log=FALSE,aggfun = colSums){ |
|
53 |
- aggregateByTaxonomy(obj,lvl,alternate=alternate,norm=norm,log=log,aggfun = aggfun) |
|
53 |
+aggTax<-function(obj,lvl,alternate=FALSE,norm=TRUE,log=FALSE,aggfun = colSums,sl=1000){ |
|
54 |
+ aggregateByTaxonomy(obj,lvl,alternate=alternate,norm=norm,log=log,aggfun = aggfun,sl=sl) |
|
54 | 55 |
} |
55 | 56 |
\ No newline at end of file |
... | ... |
@@ -9,10 +9,10 @@ to the desired level using the aggfun function (default colSums). Possible aggfu |
9 | 9 |
include colMeans and colMedians.} |
10 | 10 |
\usage{ |
11 | 11 |
aggregateByTaxonomy(obj, lvl, alternate = FALSE, norm = TRUE, log = FALSE, |
12 |
- aggfun = colSums) |
|
12 |
+ aggfun = colSums, sl = 1000) |
|
13 | 13 |
|
14 | 14 |
aggTax(obj, lvl, alternate = FALSE, norm = TRUE, log = FALSE, |
15 |
- aggfun = colSums) |
|
15 |
+ aggfun = colSums, sl = 1000) |
|
16 | 16 |
} |
17 | 17 |
\arguments{ |
18 | 18 |
\item{obj}{A MRexperiment object.} |
... | ... |
@@ -30,6 +30,8 @@ aggTax(obj, lvl, alternate = FALSE, norm = TRUE, log = FALSE, |
30 | 30 |
if MRexperiment object.} |
31 | 31 |
|
32 | 32 |
\item{aggfun}{Aggregation function.} |
33 |
+ |
|
34 |
+ \item{sl}{scaling value, default is 1000.} |
|
33 | 35 |
} |
34 | 36 |
\value{ |
35 | 37 |
An aggregated count matrix. |