Browse code

Minor corrections and extensions (see inst/NEWS); version number bumped to 1.3.6

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

Ulrich Bodenhofer authored on 18/04/2016 15:12:00
Showing6 changed files

... ...
@@ -1,12 +1,12 @@
1 1
 Package: msa
2 2
 Type: Package
3 3
 Title: Multiple Sequence Alignment
4
-Version: 1.3.5
5
-Date: 2016-04-07
4
+Version: 1.3.6
5
+Date: 2016-04-18
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 to the
9
-	     multiple sequence alignment algorithms ClustalW, ClustalOmega,
8
+Description: The 'msa' package provides a unified R/Bioconductor interface to
9
+             the multiple sequence alignment algorithms ClustalW, ClustalOmega,
10 10
 	     and Muscle. All three algorithms are integrated in the package,
11 11
 	     therefore, they do not depend on any external software tools
12 12
 	     and are available for all major platforms. The multiple sequence
... ...
@@ -60,7 +60,6 @@ msaPrettyPrint <- function(x, y, output=c("pdf", "tex", "dvi", "asis"),
60 60
         stop("The parameter x has an invalid argument! \n",
61 61
              "x must be a multiple alignment object!")
62 62
 
63
-
64 63
     if (output != "asis")
65 64
     {
66 65
         if (!is.numeric(paperWidth) || length(paperWidth) != 1 ||
... ...
@@ -211,7 +210,7 @@ msaPrettyPrint <- function(x, y, output=c("pdf", "tex", "dvi", "asis"),
211 210
 
212 211
         jobname <- substr(file, 1, nchar(file) - 4)
213 212
 
214
-        if (length(grep("[^\\w/\\\\:.]", jobname, perl=TRUE)) > 0)
213
+        if (length(grep("[^\\w-/\\\\:.]", jobname, perl=TRUE)) > 0)
215 214
         {
216 215
             warning("Cannot use file name '", file,
217 216
                     "' because it contains invalid characters => \n",
... ...
@@ -1,6 +1,11 @@
1 1
 Change history of package msa:
2 2
 ==============================
3 3
 
4
+Version 1.3.6:
5
+- msaPrettyPrint() now also accepts dashes in file names
6
+- added section about pretty-printing wide alignments to package
7
+  vignette
8
+
4 9
 Version 1.3.5:
5 10
 - adaptation of displaying help text by msa() function 
6 11
 
7 12
new file mode 100644
8 13
Binary files /dev/null and b/vignettes/JKU_EN_noName.pdf differ
... ...
@@ -143,6 +143,7 @@ Institute of Bioinformatics\\
143 143
 Johannes Kepler University Linz\\
144 144
 A-4040 Linz, Austria
145 145
 \end{tabular}}}
146
+\put(9.5,0.4){\makebox(0,0)[cb]{\includegraphics[height=0.8cm]{JKU_EN_noName}}}
146 147
 \put(19,0){\makebox(0,0)[rb]{\fontfamily{phv}\normalsize\begin{tabular}[b]{r}
147 148
 Tel. +43 732 2468 4520\\
148 149
 Fax +43 732 2468 4539\\
... ...
@@ -684,6 +684,41 @@ is to check sequence names carefully and to avoid problematic sequence names fro
684 684
 Note, moreover, that too long sequence names will lead to less appealing outputs,
685 685
 so users are generally advised to consider sequence names carefully.
686 686
 
687
+\subsection{Pretty-Printing Wide Alignments}
688
+
689
+If the alignment to be printed with \verb+msaPrettyPrint()+ is wide
690
+(thousands of columns or wider), \LaTeX\ may terminate prematurely because of
691
+exceeded \TeX\ capacity. Unfortunately, this problem remains opaque to the
692
+user, since \verb+texi2dvi()+ and \verb+texi2pdf()+ do not convey much details
693
+about \LaTeX\ problems when typesetting a document. We recommend the following
694
+if a user encounters problems with running \verb+msaPrettyPrint()+'s output
695
+with \verb+texi2dvi()+ and \verb+texi2pdf()+:
696
+\begin{enumerate}
697
+\item Run \verb+pdflatex+ on the generated \verb+.tex+ file to see
698
+  whether it is actually a problem with \TeX\ capacity.
699
+\item If so, split the alignment into multiple chunks and run
700
+  \verb+msaPrettyPrint()+ on each chunk separately.
701
+\end{enumerate}
702
+
703
+The following example
704
+demonstrates this approach for a multiple aligment object `\verb+aln+':
705
+<<SplitAlignmentIntoJunks,eval=FALSE>>=
706
+chunkSize <- 300 ## how much fits on one page depends on the length of
707
+                 ## names and the number of sequences;
708
+                 ## change to what suits your needs
709
+
710
+for (start in seq(1, ncol(aln), by=chunkSize))
711
+{
712
+    end <- min(start + chunkSize - 1, ncol(aln))
713
+    alnPart <- DNAMultipleAlignment(subseq(unmasked(aln), start, end))
714
+
715
+    msaPrettyPrint(x=alnPart, output="pdf", subset=NULL,
716
+                   file=paste0("aln_", start, "-", end, ".pdf"))
717
+}
718
+@
719
+\noindent This creates multiple PDF files all of which show one part of the alignment.
720
+Please note, however, that the numbering of columns is restarted for each chunk.
721
+
687 722
 \subsection{Further Caveats}
688 723
 
689 724
 \begin{itemize}
... ...
@@ -782,6 +817,10 @@ bibliography below).
782 817
 \section{Change Log}
783 818
 
784 819
 \begin{description}
820
+\item[Version 1.3.6:] \mbox{ }  \begin{itemize}
821
+   \item \verb+msaPrettyPrint()+ now also accepts dashes in file names
822
+   \item added section about pretty-printing wide alignments to package vignette
823
+  \end{itemize}
785 824
 \item[Version 1.3.5:] \mbox{ }  \begin{itemize}
786 825
    \item adaptation of displaying help text by \verb+msa()+ function
787 826
   \end{itemize}