Browse code

Version: 1.17.3 [2009-05-29] o Added applyCdfGroupFields() and cdfSetDimension().

Version: 1.17.2 [2009-02-20]
o BUG FIX: readChp() would crash (segmentation fault) for (at least)
some CHP files for GenomeWideSNP_5 generated by Affymetrix Power Tools.
o BUG FIX: Updated compareCels() to work with new readCelHeader().

Version: 1.17.1 [2009-05-09]
o Now readCelHeader() also reads DAT headers from Calvin CEL files.

Version: 1.17.0 [2009-04-20]
o Devel version bumped because of the new Bioconductor release.

Version: 1.16.0 [2009-04-20]
o Release version bumped because of the new Bioconductor release.

git-svn-id: file:///home/git/hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/affxparser@39806 bc3139a8-67e5-0310-9ffc-ced21a209358

Henrik Bengtsson authored on 30/05/2009 04:40:14
Showing 10 changed files

... ...
@@ -1,6 +1,6 @@
1 1
 Package: affxparser
2
-Version: 1.17.2
3
-Date: 2009-05-10
2
+Version: 1.17.3
3
+Date: 2009-05-29
4 4
 Title: Affymetrix File Parsing SDK
5 5
 Author: Henrik Bengtsson, James Bullard, Robert Gentleman, Kasper Daniel Hansen, Martin Morgan
6 6
 Maintainer: Kasper Daniel Hansen <[email protected]>
7 7
new file mode 100644
... ...
@@ -0,0 +1,44 @@
1
+########################################################################/**
2
+# @RdocFunction applyCdfGroupFields
3
+#
4
+# @title "Applies a function to a list of fields of each group in a CDF structure"
5
+#
6
+# \description{
7
+#  @get "title".
8
+# }
9
+#
10
+# @synopsis
11
+#
12
+# \arguments{
13
+#  \item{cdf}{A CDF @list structure.}
14
+#  \item{fcn}{A @function that takes a @list structure of fields
15
+#             and returns an updated @list of fields.}
16
+#  \item{...}{Arguments passed to the \code{fcn} function.}
17
+# }
18
+#
19
+# \value{
20
+#  Returns an updated CDF @list structure.
21
+# }
22
+#
23
+# @author
24
+#
25
+# \seealso{
26
+#   @see "applyCdfGroups".
27
+# }
28
+#
29
+# @keyword programming
30
+#**/####################################################################### 
31
+applyCdfGroupFields <- function(cdf, fcn, ...) {
32
+  applyCdfGroups(cdf, function(groups) {
33
+    lapply(groups, FUN=fcn, ...);
34
+  });
35
+} # applyCdfGroupFields()
36
+
37
+
38
+
39
+############################################################################
40
+# HISTORY:
41
+# 2009-05-29
42
+# o Added Rdoc comments.
43
+# o Created.
44
+############################################################################
... ...
@@ -6,8 +6,7 @@
6 6
 # \description{
7 7
 #  @get "title".
8 8
 #
9
-#  This @function is design to be used with @see "applyCdfGroups"
10
-#  on an Affymetrix Mapping (SNP) CDF @list structure.
9
+#  This @function is designed to be used with @see "applyCdfGroups".
11 10
 # }
12 11
 #
13 12
 # @synopsis
... ...
@@ -6,8 +6,7 @@
6 6
 # \description{
7 7
 #  @get "title".
8 8
 #
9
-#  This @function is design to be used with @see "applyCdfGroups"
10
-#  on an Affymetrix Mapping (SNP) CDF @list structure.
9
+#  This @function is designed to be used with @see "applyCdfGroups".
11 10
 # }
12 11
 #
13 12
 # @synopsis
14 13
new file mode 100644
... ...
@@ -0,0 +1,60 @@
1
+########################################################################/**
2
+# @RdocFunction cdfSetDimension
3
+#
4
+# @title "Sets the dimension of an object"
5
+#
6
+# \description{
7
+#  @get "title".
8
+#
9
+#  This @function is designed to be used with @see "applyCdfGroupFields".
10
+# }
11
+#
12
+# @synopsis
13
+#
14
+# \arguments{
15
+#  \item{groups}{A @list of groups.}
16
+#  \item{which}{An @integer or @character @vector of groups be returned.}
17
+#  \item{...}{Not used.}
18
+# }
19
+#
20
+# \value{
21
+#  Returns a @list structure of groups.
22
+# }
23
+#
24
+# \seealso{
25
+#  @see "applyCdfGroupFields".
26
+# }
27
+#
28
+# @author
29
+#
30
+# @keyword programming
31
+# @keyword internal
32
+#**/####################################################################### 
33
+cdfSetDimension <- function(field, dim, ...) {
34
+  n <- length(field);
35
+  ndim <- length(dim);
36
+
37
+  naDim <- whichVector(is.na(dim));
38
+  if (length(naDim) > 0) {
39
+    if (length(naDim) > 1) {
40
+      stop("Cannot infer dimension. Only one of the dimension can be unknown: ", paste(dim, collapse="x"));
41
+    }
42
+    dimNA <- n / prod(dim[-naDim]);
43
+    if (dimNA %% 1 == 0) {
44
+      dim[naDim] <- dimNA;
45
+      dim(field) <- dim;
46
+    }
47
+  } else if (n == prod(dim)) {
48
+    dim(field) <- dim;
49
+  }
50
+
51
+  field;
52
+} # cdfSetDimension()
53
+
54
+
55
+############################################################################
56
+# HISTORY:
57
+# 2009-05-29
58
+# o Added Rdoc comments.
59
+# o Created.
60
+############################################################################
... ...
@@ -1,6 +1,28 @@
1 1
 Package: affxparser
2 2
 ===================
3 3
 
4
+Version: 1.17.3 [2009-05-29]
5
+o Added applyCdfGroupFields() and cdfSetDimension().
6
+
7
+
8
+Version: 1.17.2 [2009-02-20]
9
+o BUG FIX: readChp() would crash (segmentation fault) for (at least)
10
+  some CHP files for GenomeWideSNP_5 generated by Affymetrix Power Tools.
11
+o BUG FIX: Updated compareCels() to work with new readCelHeader().
12
+
13
+
14
+Version: 1.17.1 [2009-05-09]
15
+o Now readCelHeader() also reads DAT headers from Calvin CEL files.
16
+
17
+
18
+Version: 1.17.0 [2009-04-20]
19
+o Devel version bumped because of the new Bioconductor release.
20
+
21
+
22
+Version: 1.16.0 [2009-04-20]
23
+o Release version bumped because of the new Bioconductor release.
24
+
25
+
4 26
 Version: 1.15.6 [2009-02-20]
5 27
 o Added optional argument 'newChipType' to convertCel() for overriding
6 28
   the default chip type.  Useful for updating the formal chip type 
... ...
@@ -15,8 +15,7 @@
15 15
 \description{
16 16
  Gets a subset of groups fields in a CDF structure.
17 17
 
18
- This \code{\link[base]{function}} is design to be used with \code{\link{applyCdfGroups}}()
19
- on an Affymetrix Mapping (SNP) CDF \code{\link[base]{list}} structure.
18
+ This \code{\link[base]{function}} is designed to be used with \code{\link{applyCdfGroups}}().
20 19
 }
21 20
 
22 21
 \usage{cdfGetFields(groups, fields, ...)}
... ...
@@ -15,8 +15,7 @@
15 15
 \description{
16 16
  Gets a subset of groups in a CDF structure.
17 17
 
18
- This \code{\link[base]{function}} is design to be used with \code{\link{applyCdfGroups}}()
19
- on an Affymetrix Mapping (SNP) CDF \code{\link[base]{list}} structure.
18
+ This \code{\link[base]{function}} is designed to be used with \code{\link{applyCdfGroups}}().
20 19
 }
21 20
 
22 21
 \usage{cdfGetGroups(groups, which, ...)}
... ...
@@ -6,39 +6,39 @@
6 6
 % by the Rdoc compiler part of the R.oo package.
7 7
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8 8
 
9
- \name{compareCels}
9
+\name{compareCels}
10 10
 \alias{compareCels}
11 11
 
12 12
 
13
- \title{Compares the contents of two CEL files}
13
+\title{Compares the contents of two CEL files}
14 14
 
15
- \usage{compareCels(pathname, other, readMap=NULL, otherReadMap=NULL, verbose=0, ...)}
15
+\usage{compareCels(pathname, other, readMap=NULL, otherReadMap=NULL, verbose=0, ...)}
16 16
 
17
- \description{
18
-   Compares the contents of two CEL files.
19
- }
17
+\description{
18
+  Compares the contents of two CEL files.
19
+}
20 20
 
21
- \arguments{
22
-   \item{pathname}{The pathname of the first CEL file.}
23
-   \item{other}{The pathname of the seconds CEL file.}
24
-   \item{readMap}{An optional read map for the first CEL file.}
25
-   \item{otherReadMap}{An optional read map for the second CEL file.}
26
-   \item{verbose}{An \code{\link[base]{integer}}. The larger the more details are printed.}
27
-   \item{...}{Not used.}
28
- }
21
+\arguments{
22
+  \item{pathname}{The pathname of the first CEL file.}
23
+  \item{other}{The pathname of the seconds CEL file.}
24
+  \item{readMap}{An optional read map for the first CEL file.}
25
+  \item{otherReadMap}{An optional read map for the second CEL file.}
26
+  \item{verbose}{An \code{\link[base]{integer}}. The larger the more details are printed.}
27
+  \item{...}{Not used.}
28
+}
29 29
 
30
- \value{
31
-   Returns \code{\link[base:logical]{TRUE}} if the two CELs are equal, otherwise \code{\link[base:logical]{FALSE}}.  If \code{\link[base:logical]{FALSE}},
32
-   the attribute \code{reason} contains a string explaining what
33
-   difference was detected, and the attributes \code{value1} and
34
-   \code{value2} contain the two objects/values that differs.
35
- }
30
+\value{
31
+  Returns \code{\link[base:logical]{TRUE}} if the two CELs are equal, otherwise \code{\link[base:logical]{FALSE}}.  If \code{\link[base:logical]{FALSE}},
32
+  the attribute \code{reason} contains a string explaining what
33
+  difference was detected, and the attributes \code{value1} and
34
+  \code{value2} contain the two objects/values that differs.
35
+}
36 36
 
37
- \author{Henrik Bengtsson (\url{http://www.braju.com/R/})}
37
+\author{Henrik Bengtsson (\url{http://www.braju.com/R/})}
38 38
 
39
- \seealso{
40
-   \code{\link{convertCel}}().
41
- }
39
+\seealso{
40
+  \code{\link{convertCel}}().
41
+}
42 42
 
43 43
 
44 44
 
... ...
@@ -12,7 +12,7 @@
12 12
 
13 13
  \title{Converts a CEL into the same CEL but with another format}
14 14
 
15
- \usage{convertCel(filename, outFilename, readMap=NULL, writeMap=NULL, version="4", newChipType = NULL, ..., .validate=FALSE, verbose=FALSE)}
15
+ \usage{convertCel(filename, outFilename, readMap=NULL, writeMap=NULL, version="4", newChipType=NULL, ..., .validate=FALSE, verbose=FALSE)}
16 16
 
17 17
  \description{
18 18
    Converts a CEL into the same CEL but with another format.
... ...
@@ -28,7 +28,7 @@
28 28
    \item{writeMap}{An optional write map for the output CEL file.}
29 29
    \item{version}{The version of the output file format.}
30 30
    \item{newChipType}{An optional string for overriding the chip type
31
-     in the CEL file header.}
31
+      in the CEL file header.}
32 32
    \item{...}{Not used.}
33 33
    \item{.validate}{If \code{\link[base:logical]{TRUE}}, a consistency test between the generated
34 34
      and the original CEL is performed.}