Browse code

Various fixes and improvements; version number bumped to 0.99.3

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

Ulrich Bodenhofer authored on 10/04/2015 22:38:22
Showing14 changed files

... ...
@@ -1,18 +1,18 @@
1 1
 Package: msa
2 2
 Type: Package
3 3
 Title: Multiple Sequence Alignment
4
-Version: 0.99.2
5
-Date: 2015-04-09
4
+Version: 0.99.3
5
+Date: 2015-04-10
6 6
 Author: Enrico Bonatesta, Christoph Horejs-Kainrath, Ulrich Bodenhofer
7 7
 Maintainer: Ulrich Bodenhofer <bodenhofer@bioinf.jku.at>
8
-Description: This package provides a unified R/Bioconductor interface
9
-        to the multiple sequence alignment algorithms ClustalW,
10
-        ClustalOmega, and Muscle. All three algorithms are integrated
11
-        in the package, therefore, they do not depend on any external
12
-        software tools and are available for all major platforms. The
13
-        multiple sequence alignment algorithms are complemented by a
14
-        function for pretty-printing multiple sequence alignments using
15
-        the LaTeX package TeXshade.
8
+Description: This package provides a unified R/Bioconductor interface to the
9
+	     multiple sequence alignment algorithms ClustalW, ClustalOmega,
10
+	     and Muscle. All three algorithms are integrated in the package,
11
+	     therefore, they do not depend on any external software tools
12
+	     and are available for all major platforms. The multiple sequence
13
+	     alignment algorithms are complemented by a function for
14
+	     pretty-printing multiple sequence alignments using the LaTeX
15
+	     package TeXshade.
16 16
 License: GPL (>= 2)
17 17
 Copyright: See file inst/COPYRIGHT
18 18
 Depends: R (>= 3.1.0), methods, Biostrings (>= 2.30.0)
... ...
@@ -20,6 +20,7 @@ Imports: Rcpp (>= 0.11.1), BiocGenerics, IRanges (>= 1.20.0),
20 20
         S4Vectors, tools
21 21
 Suggests: Biobase, knitr
22 22
 LinkingTo: Rcpp
23
+SystemRequirements: GNU make
23 24
 VignetteBuilder: knitr
24 25
 LazyLoad: yes
25 26
 Collate: AllClasses.R AllGenerics.R params-methods.R version-methods.R
... ...
@@ -29,3 +30,4 @@ Collate: AllClasses.R AllGenerics.R params-methods.R version-methods.R
29 30
 biocViews: MultipleSequenceAlignment, Alignment, MultipleComparison,
30 31
         Sequencing
31 32
 NeedsCompilation: yes
33
+Packaged: 2015-04-10 22:07:02 UTC; bodenhof
... ...
@@ -1,13 +1,14 @@
1
-setClass("MsaMetaData", 
2
-        representation(version="character", 
3
-                       params="list", 
4
-                       call="character"))
1
+setClass("MsaMetaData",
2
+         slots=c(version="character",
3
+                 params="list",
4
+                 call="character"),
5
+         contains="VIRTUAL")
5 6
 
6
-setClass("MsaDNAMultipleAlignment", 
7
-        contains=c("DNAMultipleAlignment", "MsaMetaData"))
7
+setClass("MsaDNAMultipleAlignment",
8
+         contains=c("DNAMultipleAlignment", "MsaMetaData"))
8 9
 
9
-setClass("MsaRNAMultipleAlignment", 
10
-        contains=c("RNAMultipleAlignment", "MsaMetaData"))
10
+setClass("MsaRNAMultipleAlignment",
11
+         contains=c("RNAMultipleAlignment", "MsaMetaData"))
11 12
 
12
-setClass("MsaAAMultipleAlignment", 
13
-        contains=c("AAMultipleAlignment", "MsaMetaData"))
13
+setClass("MsaAAMultipleAlignment",
14
+         contains=c("AAMultipleAlignment", "MsaMetaData"))
... ...
@@ -1,8 +1,5 @@
1
-print.MsaMetaData <- function(x, show=c("version", "standardParams",
2
-                                        "algParams", "call"))
1
+print.MsaMetaData <- function(x, show)
3 2
 {
4
-    show <- match.arg(show, several.ok=TRUE)
5
-
6 3
     sep <- FALSE
7 4
 
8 5
     if ("version" %in% show)
... ...
@@ -48,14 +45,22 @@ print.MsaMetaData <- function(x, show=c("version", "standardParams",
48 45
     }
49 46
 }
50 47
 
51
-setMethod("print", signature("MsaMetaData"), print.MsaMetaData)
52
-
53 48
 
54
-print.MsaMultipleAlignment <- function(x, show=c("version", "call"))
49
+print.MsaMultipleAlignment <- function(x, show=c("alignment", "version",
50
+                                                 "call"))
55 51
 {
56
-    print(as(x, "MsaMetaData"), show=show)
57
-    cat("\n")
58
-    print(as(x, substr(class(x), 4, nchar(class(x)))))
52
+    show <- match.arg(show,
53
+                      choices=c("alignment", "version", "call",
54
+                                "standardParams", "algParams"),
55
+                      several.ok=TRUE)
56
+
57
+    print.MsaMetaData(x, show=show)
58
+
59
+    if ("alignment" %in% show)
60
+    {
61
+        cat("\n")
62
+        print(as(x, substr(class(x), 4, nchar(class(x)))))
63
+    }
59 64
 }
60 65
 
61 66
 setMethod("print", signature("MsaDNAMultipleAlignment"),
... ...
@@ -1,7 +1,3 @@
1
-setMethod("show", signature("MsaMetaData"),
2
-          function(object) print(object, show=c("version", "standardParams",
3
-                                                "algParams", "call")))
4
-
5 1
 setMethod("show", signature("MsaDNAMultipleAlignment"),
6 2
           function(object) print(object))
7 3
 setMethod("show", signature("MsaRNAMultipleAlignment"),
... ...
@@ -2,16 +2,15 @@
2 2
 \docType{class}
3 3
 \alias{class:MsaMetaData}
4 4
 \alias{MsaMetaData-class}
5
-\alias{show,MsaMetaData-method}
5
+\alias{MsaMetaData}
6 6
 \alias{params,MsaMetaData-method}
7
-\alias{print,MsaMetaData-method}
8 7
 \alias{version}
9 8
 \alias{version,MsaMetaData-method}
10 9
 \title{Class \code{MsaMetaData}}
11 10
 \description{S4 class for storing metadata about multiple sequence
12 11
   alignment results}
13 12
 \section{Objects}{
14
-  Objects of these classes are not be created and used directly. This
13
+  Objects of this virtual class are not be created and used directly. This
15 14
   is an auxiliary class used by the classes
16 15
   \code{\linkS4class{MsaAAMultipleAlignment}},
17 16
   \code{\linkS4class{MsaDNAMultipleAlignment}}, and
... ...
@@ -31,20 +30,6 @@ The following slots are defined for \code{MsaMetaData} objects:
31 30
 }
32 31
 \section{Methods}{
33 32
   \describe{
34
-    \item{\code{print(x, show=c("version", "standardParams",
35
-	"algParams", "call"))}:}{displays the object; the \code{show}
36
-      parameter can be used to determine which information should be
37
-      present in the output. If \code{show} contains \code{"version"},
38
-      the \code{version} slot is shown. If \code{show} contains
39
-      \code{"call"}, the \code{call} slot is shown.
40
-      If \code{show} contains \code{"standardParams"}, the
41
-      settings of the the parameters that are common to all three
42
-      multiple sequence alignment algorithms. If \code{show}
43
-      contains \code{"algParams"}, the
44
-      algorith-specific parameters are shown. 
45
-    }
46
-    \item{\code{show(object)}:}{displays the object; synonymous to
47
-      calling  \code{print} with default \code{show} argument}
48 33
     \item{\code{version(object)}:}{accessor to the \code{version} slot}
49 34
     \item{\code{params(x)}:}{accessor to the \code{params} slot}
50 35
   }
... ...
@@ -73,10 +58,10 @@ version(myAlignment)
73 58
 show(myAlignment)
74 59
 
75 60
 ## print the results
76
-print(myAlignment, show="version")
61
+print(myAlignment, show="alignment")
62
+print(myAlignment, show=c("alignment", "version"))
77 63
 print(myAlignment, show="standardParams")
78 64
 print(myAlignment, show="algParams")
79
-print(myAlignment, show="call")
80 65
 print(myAlignment, show=c("call", "version"))
81 66
 
82 67
 ## show the params
... ...
@@ -45,17 +45,37 @@
45 45
 }
46 46
 \section{Methods}{
47 47
   \describe{
48
-    \item{\code{print(x, show=c("version", "call"))}:}{displays the
49
-      alignment in the same way as \code{show}, but allows for
50
-      specifying which metadata should be displayed (determined by the
51
-      \code{show} argument).}
48
+    \item{\code{print(x, show=c("alignment", "version", "call"))}:}{
49
+      prints information about the object \code{x}; the \code{show}
50
+      argument allows for determining what should be printed.
51
+      The \code{show} must be a character vector and may contain any
52
+      combination of the following five strings:
53
+      if \code{show} contains \code{"alignment"}, the multiple
54
+      sequence alignment is printed using the corresponding method
55
+      from the \pkg{Biostrings} package.
56
+      If \code{show} contains \code{"version"},
57
+      the \code{version} slot is shown. If \code{show} contains
58
+      \code{"call"}, the \code{call} slot is shown.
59
+      If \code{show} contains \code{"standardParams"}, the
60
+      settings of the parameters that are common to all three
61
+      multiple sequence alignment algorithms are shown. If \code{show}
62
+      contains \code{"algParams"}, the
63
+      algorithm-specific parameters are shown. 
64
+      The order in which the strings are placed in the \code{show}
65
+      argument does not have an effect on the order in which
66
+      data are printed. The default is
67
+      \code{show=c("alignment", "version", "call")}, i.e. by default,
68
+      the multiple sequence alignment is shown along with version and
69
+      call information.
70
+    }
52 71
     \item{\code{show(object)}:}{displays the alignment along with
53 72
       metadata; synonymous to calling \code{print} with default
54
-      \code{show} argument}
73
+      \code{show} argument \code{c("alignment", "version", "call")}}
55 74
     \item{\code{version(object)}:}{displays the algorithm with which
56 75
       the multiple alignment has been computed along with its
57
-      version number.}
58
-    \item{\code{params(x)}:}{accessor to the \code{params} slot.}
76
+      version number (see also \code{\linkS4class{MsaMetaData}}).}
77
+    \item{\code{params(x)}:}{accessor to the \code{params} slot (see
78
+      also \code{\linkS4class{MsaMetaData}})}
59 79
   }
60 80
 }
61 81
 \author{Enrico Bonatesta and Christoph Horejs-Kainrath
... ...
@@ -80,10 +100,10 @@ version(myAlignment)
80 100
 show(myAlignment)
81 101
 
82 102
 ## print the results
83
-print(myAlignment, show="version")
103
+print(myAlignment, show="alignment")
104
+print(myAlignment, show=c("alignment", "version"))
84 105
 print(myAlignment, show="standardParams")
85 106
 print(myAlignment, show="algParams")
86
-print(myAlignment, show="call")
87 107
 print(myAlignment, show=c("call", "version"))
88 108
 
89 109
 ## show the params
... ...
@@ -31,11 +31,10 @@
31 31
 #include <stdlib.h>
32 32
 #include <string.h>
33 33
 
34
-#include <R.h>
35
-#include <Rinternals.h>
36
-
37 34
 #include "RClustalOmega.h"
38 35
 
36
+#include <R.h>
37
+#include <Rinternals.h>
39 38
 #include <Rdefines.h>
40 39
 
41 40
 extern "C" {
... ...
@@ -2,7 +2,6 @@
2 2
 #define _RClustalOmega_H
3 3
 
4 4
 #include <Rcpp.h>
5
-#include <R_ext/Rdynload.h>
6 5
 
7 6
 /*
8 7
  * note : RcppExport is an alias to `extern "C"` defined by Rcpp.
... ...
@@ -2,7 +2,6 @@
2 2
 #define RCLUSTALW_H
3 3
 
4 4
 #include <Rcpp.h>
5
-#include <R_ext/Rdynload.h>
6 5
  
7 6
 /*
8 7
  * note : RcppExport is an alias to `extern "C"` defined by Rcpp.
... ...
@@ -15,5 +15,5 @@ namespace clustalw {
15 15
 			~RClustalWMain();
16 16
 			void run(UserArgs args, ClustalWInput *input, ClustalWOutput *output);
17 17
 	};
18
-	#endif
19 18
 }
19
+#endif
... ...
@@ -1,8 +1,14 @@
1
-.PHONY: all mylibs
1
+OS := $(shell uname)
2
+ifeq ($(OS), Darwin)
3
+	PKG_LIBS=`Rscript -e "Rcpp:::LdFlags()"` -Wl,-all_load ./libgc.a ./libClustalW.a ./libClustalOmega.a ./libMuscle.a  -Wl,-noall_load
4
+else 
5
+	PKG_LIBS=`Rscript -e "Rcpp:::LdFlags()"` -Wl,--whole-archive ./libgc.a ./libClustalW.a ./libClustalOmega.a ./libMuscle.a  -Wl,--no-whole-archive
6
+endif
2 7
 
3
-PKG_LIBS=`Rscript -e "Rcpp:::LdFlags()"` -Wl,--whole-archive ./libgc.a ./libClustalW.a ./libClustalOmega.a ./libMuscle.a  -Wl,--no-whole-archive
4 8
 PKG_CXXFLAGS=-I"./gc-7.2/include" -I"./Muscle/" -I"./ClustalW/src" -I"./ClustalOmega/src" `Rscript -e "Rcpp:::CxxFlags()"`
5 9
 
10
+.PHONY: all mylibs
11
+
6 12
 all: $(SHLIB)
7 13
 $(SHLIB): mylibs
8 14
 
... ...
@@ -5,7 +5,6 @@
5 5
 #include "seqvect.h"
6 6
 
7 7
 #include <Rcpp.h>
8
-#include <R_ext/Rdynload.h>
9 8
 
10 9
 /*
11 10
  * note : RcppExport is an alias to `extern "C"` defined by Rcpp.
... ...
@@ -1,9 +1,10 @@
1
+#include "RClustalOmega.h"
2
+#include "RClustalW.h"
3
+#include "RMuscle.h"
4
+
1 5
 #include <R.h>
2 6
 #include <Rinternals.h>
3 7
 #include <R_ext/Rdynload.h>
4
-#include "RClustalW.h"
5
-#include "RMuscle.h"
6
-#include "RClustalOmega.h"
7 8
 
8 9
 static const R_CallMethodDef callMethods[] = {
9 10
     /* RMuscle.cpp */
... ...
@@ -8,6 +8,8 @@
8 8
     pdftitle={msa - An R Package for Multiple Sequence Alignment},
9 9
     pdfauthor={Enrico Bonatesta, Christoph Horejs-Kainrath, and Ulrich Bodenhofer}}
10 10
 
11
+\usepackage[OT1]{fontenc}
12
+
11 13
 \title{{\Huge msa}\\[5mm] An R Package for Multiple Sequence Alignment}
12 14
 \author{Enrico Bonatesta, Christoph Horejs-Kainrath, and Ulrich Bodenhofer}
13 15
 \affiliation{Institute of Bioinformatics, Johannes Kepler University