Browse code

limma 3.41.16

- Update Users Guide: update Rsubread reference, correct remarks
about prior distribution for 1/sigma^2 in Section 13.2 and rerun
the Yoruba and Pasilla case studies.

- Add head() and tail() S3 methods for all limma data classes.

Gordon Smyth authored on 09/09/2019 10:12:29
Showing 6 changed files

... ...
@@ -1,6 +1,6 @@
1 1
 Package: limma
2
-Version: 3.41.15
3
-Date: 2019-07-24
2
+Version: 3.41.16
3
+Date: 2019-09-09
4 4
 Title: Linear Models for Microarray Data
5 5
 Description: Data analysis, linear models and differential expression for microarray data.
6 6
 Author: Gordon Smyth [cre,aut], Yifang Hu [ctb], Matthew Ritchie [ctb], Jeremy Silver [ctb], James Wettenhall [ctb], Davis McCarthy [ctb], Di Wu [ctb], Wei Shi [ctb], Belinda Phipson [ctb], Aaron Lun [ctb], Natalie Thorne [ctb], Alicia Oshlack [ctb], Carolyn de Graaf [ctb], Yunshun Chen [ctb], Mette Langaas [ctb], Egil Ferkingstad [ctb], Marcus Davy [ctb], Francois Pepin [ctb], Dongseok Choi [ctb]
... ...
@@ -20,7 +20,7 @@ importFrom("stats", "approx", "approxfun", "as.dendrogram", "as.dist", "cmdscale
20 20
            "pnorm", "ppoints", "predict", "pt", "qchisq", "qf",
21 21
            "qnorm", "qt", "quantile", "residuals", "rnorm", "sd",
22 22
            "uniroot", "var", "weighted.mean")
23
-importFrom("utils", "getFromNamespace", "read.delim", "read.table", "write.table")
23
+importFrom("utils", "getFromNamespace", "head", "read.delim", "read.table", "tail", "write.table")
24 24
 if( tools:::.OStype() == "windows" ) importFrom("utils", "winMenuAddItem")
25 25
 
26 26
 S3method("[",MAList)
... ...
@@ -83,6 +83,12 @@ S3method(fitted,MArrayLM)
83 83
 S3method(fry,default)
84 84
 S3method(goana,default)
85 85
 S3method(goana,MArrayLM)
86
+S3method(head,RGList)
87
+S3method(head,MAList)
88
+S3method(head,EListRaw)
89
+S3method(head,EList)
90
+S3method(head,MArrayLM)
91
+S3method(head,TestResults)
86 92
 S3method(kegga,default)
87 93
 S3method(kegga,MArrayLM)
88 94
 S3method(labels,TestResults)
... ...
@@ -130,4 +136,10 @@ S3method(plotDensities,RGList)
130 136
 S3method(plotDensities,MAList)
131 137
 S3method(plotDensities,EListRaw)
132 138
 S3method(plotDensities,EList)
139
+S3method(tail,RGList)
140
+S3method(tail,MAList)
141
+S3method(tail,EListRaw)
142
+S3method(tail,EList)
143
+S3method(tail,MArrayLM)
144
+S3method(tail,TestResults)
133 145
 S3method(unique,TestResults)
... ...
@@ -1,4 +1,9 @@
1
-#	CLASSES.R
1
+#  CLASSES.R
2
+#  This file defines data classes and extends standard base R methods to them.
3
+#  Other non-data classes are defined elsewhere in limma. See plotMDS.R for
4
+#  the "MDS" class, decideTests.R for the "TestResults" class and
5
+#  geneset-roast.R for the "Roast" class,
6
+
2 7
 
3 8
 setClass("RGList",
4 9
 #  Class to hold initial read-in two-color data
... ...
@@ -21,7 +26,7 @@ representation("list")
21 26
 )
22 27
 
23 28
 setClass("MArrayLM",
24
-#  Linear model fit
29
+#  Class to hold linear model fit
25 30
 representation("list")
26 31
 )
27 32
 
... ...
@@ -251,3 +256,26 @@ as.data.frame.MArrayLM <- function(x, row.names = NULL, optional = FALSE, ...)
251 256
 }
252 257
 
253 258
 unique.TestResults <- function(x,...) unique([email protected],...)
259
+
260
+head.RGList <- head.MAList <- head.EListRaw <- head.EList <- head.MArrayLM <- head.TestResults <-
261
+function (x, n = 6L, ...) 
262
+{
263
+	stopifnot(length(n) == 1L)
264
+	n <- if (n < 0L) 
265
+		max(nrow(x) + n, 0L)
266
+	else
267
+		min(n, nrow(x))
268
+	x[seq_len(n),]
269
+}
270
+
271
+tail.RGList <- tail.MAList <- tail.EListRaw <- tail.EList <- tail.MArrayLM <- tail.TestResults <-
272
+function (x, n = 6L, ...) 
273
+{
274
+	stopifnot(length(n) == 1L)
275
+	nrx <- nrow(x)
276
+	n <- if (n < 0L) 
277
+		max(nrx + n, 0L)
278
+	else
279
+		min(n, nrx)
280
+	x[seq.int(to = nrx, length.out = n),]
281
+}
... ...
@@ -1,3 +1,11 @@
1
+ 9 Sep 2019: limma 3.41.16
2
+
3
+- Update Users Guide: update Rsubread reference, correct remarks
4
+  about prior distribution for 1/sigma^2 in Section 13.2 and rerun
5
+  the Yoruba and Pasilla case studies.
6
+
7
+- Add head() and tail() S3 methods for all limma data classes.
8
+
1 9
 24 July 2019: limma 3.41.15
2 10
 
3 11
 - Add argument `gene.weights` to fry() so as to match the arguments
4 12
Binary files a/inst/doc/usersguide.pdf and b/inst/doc/usersguide.pdf differ
5 13
new file mode 100644
... ...
@@ -0,0 +1,61 @@
1
+\name{head}
2
+\alias{head.RGList}
3
+\alias{head.MAList}
4
+\alias{head.EListRaw}
5
+\alias{head.EList}
6
+\alias{head.MArrayLM}
7
+\alias{head.TestResults}
8
+\alias{tail.RGList}
9
+\alias{tail.MAList}
10
+\alias{tail.EListRaw}
11
+\alias{tail.EList}
12
+\alias{tail.MArrayLM}
13
+\alias{tail.TestResults}
14
+
15
+\title{Return the First to Last Part of a Data Object}
16
+
17
+\description{
18
+Retrieve the first or last parts of an RGList, MAList, EListRaw, EList, MArrayLM or TestResults object.
19
+}
20
+
21
+\usage{
22
+\method{head}{EList}(x, n = 6L, \dots)
23
+\method{tail}{EList}(x, n = 6L, \dots)
24
+}
25
+
26
+\arguments{
27
+  \item{x}{an object of class \code{RGList}, \code{MAList}, \code{EListRaw}, \code{EList}, \code{MArrayLM} or \code{TestResults}.}
28
+  \item{n}{
29
+    a single integer.
30
+    If positive or zero, number rows of resulting object.
31
+    If negative, all but the \code{n} last/first rows of \code{x}.
32
+  }
33
+  \item{\dots}{other arguments are not currently used.}
34
+}
35
+
36
+\details{
37
+\code{head} (\code{tail}) returns the first (last) \code{n} rows when \code{n >= 0} or all but the last (first) \code{n} rows when \code{n < 0}.
38
+}
39
+
40
+\value{
41
+An object like \code{x} but generally with fewer rows.
42
+}
43
+
44
+\author{Gordon Smyth}
45
+
46
+\seealso{
47
+  \code{\link{head}} in the utils package.
48
+  
49
+  \link{02.Classes} gives an overview of data classes used in LIMMA.
50
+}
51
+
52
+\examples{
53
+E <- matrix(rnorm(40),20,2)
54
+rownames(E) <- paste0("Gene",1:20)
55
+colnames(E) <- c("A","B")
56
+y <- new("EList",list(E=E))
57
+head(y)
58
+tail(y)
59
+}
60
+
61
+\keyword{array}