Browse code

Minor changes in the way the help text is displayed by the msa() function; version number bumped to 1.3.5

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

Ulrich Bodenhofer authored on 10/04/2016 14:57:52
Showing7 changed files

... ...
@@ -1,8 +1,8 @@
1 1
 Package: msa
2 2
 Type: Package
3 3
 Title: Multiple Sequence Alignment
4
-Version: 1.3.4
5
-Date: 2016-04-06
4
+Version: 1.3.5
5
+Date: 2016-04-07
6 6
 Author: Enrico Bonatesta, Christoph Horejs-Kainrath, Ulrich Bodenhofer
7 7
 Maintainer: Ulrich Bodenhofer <bodenhofer@bioinf.jku.at>
8 8
 Description: This package provides a unified R/Bioconductor interface to the
... ...
@@ -232,9 +232,13 @@ stratifyFilenames <- function(x)
232 232
 
233 233
 printHelp <- function(method)
234 234
 {
235
-    files <- system.file(c("extdata/msaCommonHelp.txt",
236
-                           paste0("extdata/msa", method, "Help.txt")),
237
-                         package="msa")
235
+    file <- system.file("extdata/msaCommonHelp.txt", package="msa")
236
+    cat(readLines(file), sep="\n")
238 237
 
239
-    file.show(files)
238
+    cat ("Press [enter] to continue")
239
+    line <- readline()
240
+
241
+    file <- system.file(paste0("extdata/msa", method, "Help.txt"),
242
+                        package="msa")
243
+    file.show(file)
240 244
 }
... ...
@@ -11,6 +11,12 @@ msa <- function(inputSeqs,
11 11
                 help=FALSE,
12 12
                 ...)
13 13
 {
14
+    if (help && identical(method, c("ClustalW", "ClustalOmega", "Muscle")))
15
+    {
16
+        file <- system.file("extdata/msaHelpPrefix.txt", package="msa")
17
+        cat(readLines(file), sep="\n")
18
+    }
19
+
14 20
     method <- match.arg(method)
15 21
 
16 22
     msaFun <- match.fun(paste0("msa", method))
... ...
@@ -30,5 +36,8 @@ msa <- function(inputSeqs,
30 36
     if (is(out, "MsaMetaData"))
31 37
         out@call <- deparse(sys.call())
32 38
 
33
-    out
39
+    if (is.null(out))
40
+        invisible(out)
41
+    else
42
+        out
34 43
 }
... ...
@@ -1,6 +1,9 @@
1 1
 Change history of package msa:
2 2
 ==============================
3 3
 
4
+Version 1.3.5:
5
+- adaptation of displaying help text by msa() function 
6
+
4 7
 Version 1.3.4:
5 8
 - added function for checking and fixing sequence names for
6 9
   possibly problematic characters that could lead to LaTeX
... ...
@@ -7,4 +7,3 @@ Furthermore, until now, not all functionalities are realized. A more
7 7
 sophisticated implementation (and help) will be available in the subsequent 
8 8
 version.
9 9
 
10
-
11 10
new file mode 100644
... ...
@@ -0,0 +1,12 @@
1
+This is the help text of the default method ClustalW. To view help
2
+information for any of the other methods, change the 'method' argument
3
+
4
+    msa(method="ClustalOmega", help=TRUE)
5
+    msa(method="Muscle", help=TRUE)
6
+
7
+or directly call the respective method with 'help=TRUE':
8
+
9
+    msaClustalOmega(help=TRUE)
10
+    msaMuscle(help=TRUE)
11
+
12
+
... ...
@@ -782,6 +782,9 @@ bibliography below).
782 782
 \section{Change Log}
783 783
 
784 784
 \begin{description}
785
+\item[Version 1.3.5:] \mbox{ }  \begin{itemize}
786
+   \item adaptation of displaying help text by \verb+msa()+ function
787
+  \end{itemize}
785 788
 \item[Version 1.3.4:] \mbox{ }  \begin{itemize}
786 789
    \item added function for checking and fixing sequence names for
787 790
      possibly problematic characters that could lead to \LaTeX\ errors