[Rflptools-commits] r11 - in pkg/RFLPtools: . R inst/doc man vignettes
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Fri Oct 26 04:35:31 CEST 2012
Author: stamats
Date: 2012-10-26 04:35:31 +0200 (Fri, 26 Oct 2012)
New Revision: 11
Added:
pkg/RFLPtools/vignettes/
pkg/RFLPtools/vignettes/HFU.jpg
pkg/RFLPtools/vignettes/RFLPtools.Rnw
pkg/RFLPtools/vignettes/logoUBT.png
Removed:
pkg/RFLPtools/inst/doc/HFU.jpg
pkg/RFLPtools/inst/doc/RFLPtools.Rnw
pkg/RFLPtools/inst/doc/logoUBT.png
Modified:
pkg/RFLPtools/DESCRIPTION
pkg/RFLPtools/NEWS
pkg/RFLPtools/R/read.blast.R
pkg/RFLPtools/inst/doc/RFLPtools.pdf
pkg/RFLPtools/man/0RFLP-package.Rd
pkg/RFLPtools/man/RFLPdist.Rd
pkg/RFLPtools/man/RFLPdist2.Rd
pkg/RFLPtools/man/RFLPdist2ref.Rd
pkg/RFLPtools/man/RFLPplot.Rd
pkg/RFLPtools/man/RFLPqc.Rd
pkg/RFLPtools/man/RFLPrefplot.Rd
pkg/RFLPtools/man/nrBands.Rd
pkg/RFLPtools/man/read.blast.Rd
pkg/RFLPtools/man/read.rflp.Rd
pkg/RFLPtools/man/sim2dist.Rd
pkg/RFLPtools/man/simMatrix.Rd
pkg/RFLPtools/man/write.hclust.Rd
Log:
several updates
Modified: pkg/RFLPtools/DESCRIPTION
===================================================================
--- pkg/RFLPtools/DESCRIPTION 2012-10-25 12:00:45 UTC (rev 10)
+++ pkg/RFLPtools/DESCRIPTION 2012-10-26 02:35:31 UTC (rev 11)
@@ -2,7 +2,7 @@
Type: Package
Title: Tools to analyse RFLP data
Version: 1.4
-Date: 2011-01-26
+Date: 2012-10-23
Author: Fabienne Flessa, Alexandra Kehl, Matthias Kohl
Maintainer: Matthias Kohl <Matthias.Kohl at stamats.de>
Description: RFLPtools provides functions to analyse DNA fragment samples
Modified: pkg/RFLPtools/NEWS
===================================================================
--- pkg/RFLPtools/NEWS 2012-10-25 12:00:45 UTC (rev 10)
+++ pkg/RFLPtools/NEWS 2012-10-26 02:35:31 UTC (rev 11)
@@ -7,6 +7,10 @@
###########################################################
- correction of some minor bugs
- added function linCombDist to compute a linear combination of distances
+- introduced vignettes folder
+- updated affiliations in vignette and added some explanations regarding the
+ use of NCBI BLAST
+- added option "sep" to function "read.blast".
###########################################################
## Version 1.3
Modified: pkg/RFLPtools/R/read.blast.R
===================================================================
--- pkg/RFLPtools/R/read.blast.R 2012-10-25 12:00:45 UTC (rev 10)
+++ pkg/RFLPtools/R/read.blast.R 2012-10-26 02:35:31 UTC (rev 11)
@@ -2,13 +2,14 @@
## Read BLAST data
###############################################################################
-read.blast <- function(file){
- x <- read.delim(file = file,
- header = FALSE, stringsAsFactors = FALSE)
+read.blast <- function(file, sep = "\t"){
+ x <- read.table(file = file, header = FALSE, sep = sep, quote = "\"",
+ dec = ".", fill = TRUE, comment.char = "",
+ stringsAsFactors = FALSE)
if(ncol(x) != 12)
stop("Data in given file", basename(file), "has wrong dimension!")
names(x) <- c("query.id", "subject.id", "identity", "alignment.length",
- "missmatches", "gap.opens", "q.start", "q.end", "s.start",
+ "mismatches", "gap.opens", "q.start", "q.end", "s.start",
"s.end", "evalue", "bit.score")
if(!all(sid <- x[,"subject.id"] %in% x[,"query.id"]))
warning("The following 'subject.id's do not occur as 'query.id's: ",
Deleted: pkg/RFLPtools/inst/doc/HFU.jpg
===================================================================
(Binary files differ)
Deleted: pkg/RFLPtools/inst/doc/RFLPtools.Rnw
===================================================================
--- pkg/RFLPtools/inst/doc/RFLPtools.Rnw 2012-10-25 12:00:45 UTC (rev 10)
+++ pkg/RFLPtools/inst/doc/RFLPtools.Rnw 2012-10-26 02:35:31 UTC (rev 11)
@@ -1,252 +0,0 @@
-%\VignetteIndexEntry{RFLPtools}
-%\VignetteDepends{stats, lattice, MKmisc, RColorBrewer}
-%\VignetteKeywords{RFLPtools}
-%\VignettePackage{RFLPtools}
-%
-\documentclass[11pt]{article}
-\usepackage{geometry}\usepackage{color}
-\definecolor{darkblue}{rgb}{0.0,0.0,0.75}
-\usepackage[%
-pdftitle={RFLPtools},%
-pdfauthor={F. Flessa, A. Kehl and M. Kohl},%
-pdfsubject={RFLPtools},%
-pdfkeywords={RFLPtools, RFLP, BLAST},%
-pagebackref,bookmarks,colorlinks,linkcolor=darkblue,citecolor=darkblue,%
-pagecolor=darkblue,raiselinks,plainpages,pdftex]{hyperref}
-%
-\markboth{\sl Package ``{\tt RFLPtools}''}{\sl Package ``{\tt RFLPtools}''}
-%
-% -------------------------------------------------------------------------------
-\newcommand{\code}[1]{{\tt #1}}
-\newcommand{\pkg}[1]{{\tt "#1"}}
-\newcommand{\myinfig}[2]{%
-% \begin{figure}[htbp]
- \begin{center}
- \includegraphics[width = #1\textwidth]{#2}
-% \caption{\label{#1}#3}
- \end{center}
-% \end{figure}
-}
-% -------------------------------------------------------------------------------
-%
-% -------------------------------------------------------------------------------
-\begin{document}
-\SweaveOpts{keep.source = TRUE, eval = TRUE, include = FALSE}
-%-------------------------------------------------------------------------------
-\title{RFLPtools: Analysis of DNA fragment samples and standalone BLAST report files}
-%-------------------------------------------------------------------------------
-\author{F. Flessa\thanks{Chair for Plant Systematics, Section Mycology,
-University of Bayreuth, 95440 Bayreuth, Germany, Fabienne.Flessa at uni-bayreuth.de},
-A. Kehl\thanks{Chair for Plant Systematics, Section Mycology,
-University of Bayreuth, 95440 Bayreuth, Germany, Alexandra.Kehl at uni-bayreuth.de} and
-M. Kohl\thanks{Department of Mechanical and Process Engineering,
-Furtwangen University, 78054 VS-Schwenningen, Germany, Matthias.Kohl at stamats.de}\\ \\
-\includegraphics[width = 3cm]{logoUBT.png}
-\includegraphics[width = 3cm]{HFU.jpg}
-}
-\maketitle
-\tableofcontents
-%-------------------------------------------------------------------------------
-\section{Introduction}
-%-------------------------------------------------------------------------------
-The package \pkg{RFLPtools} aims at
-\begin{itemize}
-\item the detection of similar band patterns based on DNA fingerprint fragment
-sizes (i.e. derived from RFLP-analysis)
-\item the analysis of standalone BLAST report files (i.e. DNA sequence analysis)
-\end{itemize}
-In this short vignette we describe and demonstrate the available functions.
-<<load>>=
-library(RFLPtools)
-@
-%-------------------------------------------------------------------------------
-\section{RFLP data}
-%-------------------------------------------------------------------------------
-We load example data and compute the Euclidean distance ...
-<<eucl>>=
-data(RFLPdata)
-res <- RFLPdist(RFLPdata)
-names(res) ## number of bands
-str(res$"6")
-@
-Of course, we can also use other well-known distances ...
-<<other>>=
-res1 <- RFLPdist(RFLPdata, distfun = function(x) dist(x, method = "manhattan"))
-res2 <- RFLPdist(RFLPdata, distfun = function(x) dist(x, method = "maximum"))
-str(res[[1]])
-str(res1[[1]])
-str(res2[[1]])
-@
-Correlation distances
-<<cor>>=
-library(MKmisc)
-res3 <- RFLPdist(RFLPdata, distfun = corDist)
-str(res3$"9")
-@
-As we obtain a list of \code{dist} objects we can easily perform hierarchical
-clustering ...
-<<hclust, fig = TRUE>>=
-par(mfrow = c(2,2))
-plot(hclust(res[[1]]), main = "Euclidean distance")
-plot(hclust(res1[[1]]), main = "Manhattan distance")
-plot(hclust(res2[[1]]), main = "Maximum distance")
-plot(hclust(res3[[1]]), main = "Pearson correlation distance")
-@
-\myinfig{1}{RFLPtools-hclust.pdf}
-We easily can apply other functions ...
-<<cutree>>=
-clust4bd <- hclust(res[[2]])
-cgroups50 <- cutree(clust4bd, h=50)
-cgroups50
-@
-Another possibility to display the similarity of the samples are so-called
-(dis-)similarity matrices ...
-<<sim1, fig = TRUE>>=
-library(RColorBrewer)
-library(MKmisc)
-myCol <- colorRampPalette(brewer.pal(8, "RdYlGn"))(128)
-ord <- order.dendrogram(as.dendrogram(hclust(res[[1]])))
-temp <- as.matrix(res[[1]])
-simPlot(temp[ord,ord], col = rev(myCol), minVal = 0,
- labels = colnames(temp), title = "(Dis-)Similarity Plot")
-@
-\myinfig{1}{RFLPtools-sim1.pdf}
-<<sim2, fig = TRUE>>=
-library(lattice)
-print(levelplot(temp[ord,ord], col.regions = rev(myCol),
- at = do.breaks(c(0, max(temp)), 128),
- xlab = "", ylab = "",
- ## Rotate labels of x-axis
- scales = list(x = list(rot = 90)),
- main = "(Dis-)Similarity Plot"))
-@
-\myinfig{1}{RFLPtools-sim2.pdf}
-Some bands may be missing ...
-<<sim3>>=
-## Euclidean distance
-data(RFLPdata)
-data(RFLPref)
-nrBands(RFLPdata)
-res0 <- RFLPdist2(RFLPdata, nrBands = 9, nrMissing = 0)
-res1 <- RFLPdist2(RFLPdata, nrBands = 9, nrMissing = 1)
-res2 <- RFLPdist2(RFLPdata, nrBands = 9, nrMissing = 2)
-res3 <- RFLPdist2(RFLPdata, nrBands = 9, nrMissing = 3)
-@
-<<sim4, fig = TRUE>>=
-## hierarchical clustering
-par(mfrow = c(2,2))
-plot(hclust(res0), main = "0 bands missing")
-plot(hclust(res1), main = "1 band missing")
-plot(hclust(res2), main = "2 bands missing")
-plot(hclust(res3), main = "3 bands missing")
-@
-\myinfig{1}{RFLPtools-sim4.pdf}
-Another possible visualization ...
-<<RFLPplot, fig = TRUE>>=
-par(mfrow = c(1,2))
-plot(hclust(RFLPdist(RFLPdata, nrBands = 3)), cex = 0.7)
-RFLPplot(RFLPdata, nrBands = 3, mar.bottom = 6, cex.axis = 0.8)
-@
-\myinfig{1}{RFLPtools-RFLPplot.pdf}
-Comparison to reference data ...
-<<RFLPrefplot, fig = TRUE>>=
-RFLPrefplot(RFLPdata, RFLPref, nrBands = 9, cex.axis = 0.8)
-@
-\myinfig{1}{RFLPtools-RFLPrefplot.pdf}
-%-------------------------------------------------------------------------------
-\section{BLAST data}
-%-------------------------------------------------------------------------------
-To analyze tabular report files generated with standalone BLAST from NCBI
-(cf.\ \url{ftp://ftp.ncbi.nlm.nih.gov/blast/executables/release}),
-a function for reading the BLAST report files is included (\code{read.blast}).
-<<read.blast>>=
-Dir <- system.file("extdata", package = "RFLPtools") # input directory
-filename <- file.path(Dir, "BLASTexample.txt")
-BLAST1 <- read.blast(file = filename)
-str(BLAST1)
-@
-This example BLAST data is also available as loadable example data.
-<<blast>>=
-data(BLASTdata)
-@
-The loaded \code{data.frame} can be used to compute similarities between the
-BLASTed sequences via function \code{simMatrix}. This function includes the following
-steps:
-\begin{enumerate}
-\item the length of each sequence ({\tt LS}) comprised in the input data file is extracted.
-\item if there is more than one comparison for one sequence including different parts of
-the respective sequence, that one with maximum base length is chosen.
-\item the number of matching bases ({\tt mB}) is calculated by multiplying two variables
-given in the BLAST output: the identity between sequences (\%) and the number of nucleotides
-divided by 100.
-\item the resulting value is rounded to the next integer.
-\item the similarity is calculated by dividing {\tt mB} by {\tt LS} and saved in the
-corresponding similarity matrix.
-\end{enumerate}
-If the similarity of a combination is not shown in the BLAST report file (because
-the similarity was lower than 70\%), this comparison is included in the similarity
-matrix with the result zero.
-<<simMatrix, eval = FALSE>>=
-res <- simMatrix(BLASTdata)
-@
-Optionally, the range of sequence length can be specified
-to exclude sequences which were too short or too long, respectively.
-<<blast1>>=
-res1 <- simMatrix(BLASTdata, sequence.range = TRUE, Min = 100, Max = 450)
-res2 <- simMatrix(BLASTdata, sequence.range = TRUE, Min = 500)
-@
-We visualize the similarity matrix ...
-<<blast2, fig = TRUE>>=
-library(MKmisc)
-simPlot(res2, col = myCol, minVal = 0, cex.axis = 0.5,
- labels = colnames(res2), title = "(Dis-)Similarity Plot")
-@
-\myinfig{1}{RFLPtools-blast2.pdf}
-Alternatively, ...
-<<blast3>>=
-library(lattice)
-txt <- trellis.par.get("add.text")
-txt$cex <- 0.5
-trellis.par.set("add.text" = txt)
-myCol <- colorRampPalette(brewer.pal(8, "RdYlGn"))(128)
-@
-<<blast31, fig = TRUE>>=
-print(levelplot(res2, col.regions = myCol,
- at = do.breaks(c(0, max(res2)), 128),
- xlab = "", ylab = "",
- ## Rotate labels of x axis
- scales = list(x = list(rot = 90)),
- main = "(Dis-)Similarity Plot"))
-@
-\myinfig{1}{RFLPtools-blast31.pdf}
-We can also convert the similarity matrix to an object of S3 class \code{"dist"}.
-<<blast4>>=
-res.d <- sim2dist(res2)
-@
-After the conversion we can for instance perform hierarchical clustering ...
-<<blast5, fig = TRUE>>=
-## hierarchical clustering
-plot(hclust(res.d), cex = 0.7)
-@
-\myinfig{1}{RFLPtools-blast5.pdf}
-%-------------------------------------------------------------------------------
-\begin{thebibliography}{1}
-
- \bibitem{Poussier00}
- Poussier, Stephane; Trigalet-Demery, Danielle; Vandewalle, Peggy; Goffinet, Bruno;
- Luisetti, Jacques; Trigalet, Andre.
- \newblock Genetic diversity of Ralstonia solanacearum as assessed by PCR-RFLP of
- the hrp gene region, AFLP and 16S rRNA sequence analysis, and identification of
- an African subdivision.
- \newblock Microbiology 2000 146:1679-1692
-
- \bibitem{Matsumoto96}
- Matsumoto, Masaru; Furuya, Naruto; Takanami, Yoichi; Matsuyama, Nobuaki.
- \newblock RFLP analysis of the PCR-amplified 28S rDNA in Rhizoctonia solani.
- \newblock Mycoscience 1996 37:351 - 356
-
-\end{thebibliography}
-%-------------------------------------------------------------------------------
-\end{document}
-
-
Modified: pkg/RFLPtools/inst/doc/RFLPtools.pdf
===================================================================
(Binary files differ)
Deleted: pkg/RFLPtools/inst/doc/logoUBT.png
===================================================================
(Binary files differ)
Modified: pkg/RFLPtools/man/0RFLP-package.Rd
===================================================================
--- pkg/RFLPtools/man/0RFLP-package.Rd 2012-10-25 12:00:45 UTC (rev 10)
+++ pkg/RFLPtools/man/0RFLP-package.Rd 2012-10-26 02:35:31 UTC (rev 11)
@@ -1,73 +1,73 @@
-\name{RFLPtools-package}
-\alias{RFLPtools-package}
-\alias{RFLPtools}
-\docType{package}
-\title{
-Tools to analyse RFLP-data
-}
-\description{
- \pkg{RFLPtools} provides functions to analyse DNA fragment samples
- (i.e. derived from RFLP-analysis) and standalone BLAST report
- files (i.e. DNA sequence analysis).
-}
-
-\details{
-\tabular{ll}{
-Package: \tab RFLPtools\cr
-Version: \tab 1.3 \cr
-Date: \tab 2010-07-20 \cr
-Depends: \tab R(>= 2.10.0), stats, utils, grDevices, RColorBrewer\cr
-Suggests: \tab lattice, MKmisc(>= 0.8)\cr
-License: \tab LGPL-3\cr
-}}
-
-
-\author{
- Fabienne Flessa \email{Fabienne.Flessa at uni-bayreuth.de},\cr
- Alexandra Kehl \email{Alexandra.Kehl at uni-bayreuth.de},\cr
- Matthias Kohl \email{Matthias.Kohl at stamats.de}\cr
-
-\emph{Maintainer:} Matthias Kohl \email{Matthias.Kohl at stamats.de}
-}
-
-\references{
- Local Blast download: \url{ftp://ftp.ncbi.nih.gov/blast/executables/release/}
-
- Blast News: \url{http://blast.ncbi.nlm.nih.gov/Blast.cgi?CMD=Web&PAGE_TYPE=BlastNews}
-
- Poussier, Stephane; Trigalet-Demery, Danielle; Vandewalle, Peggy; Goffinet, Bruno; Luisetti, Jacques; Trigalet, Andre.
- Genetic diversity of Ralstonia solanacearum as assessed by PCR-RFLP of the hrp gene region, AFLP and 16S rRNA sequence
- analysis, and identification of an African subdivision.
- Microbiology 2000 146:1679-1692
-
- Matsumoto, Masaru; Furuya, Naruto; Takanami, Yoichi; Matsuyama, Nobuaki.
- RFLP analysis of the PCR-amplified 28S rDNA in Rhizoctonia solani.
- Mycoscience 1996 37:351 - 356
-
- Persoh, D., Melcher, M., Flessa, F., Rambold, G.:
- First fungal community analyses of endophytic ascomycetes associated with Viscum album ssp. austriacum
- and itshost Pinus sylvestris. Fungal Biology 2010, in press.
-}
-\examples{
-data(RFLPdata)
-res <- RFLPdist(RFLPdata)
-plot(hclust(res[[1]]), main = "Euclidean distance")
-
-par(mfrow = c(1,2))
-plot(hclust(RFLPdist(RFLPdata, nrBands = 3)), cex = 0.7)
-RFLPplot(RFLPdata, nrBands = 3, mar.bottom = 6, cex.axis = 0.8)
-
-data(RFLPref)
-RFLPrefplot(RFLPdata, RFLPref, nrBands = 6, cex.axis = 0.8)
-
-
-library(MKmisc)
-data(BLASTdata)
-res <- simMatrix(BLASTdata, sequence.range = TRUE, Min = 500)
-myCol <- colorRampPalette(brewer.pal(8, "RdYlGn"))(128)
-simPlot(res, col = myCol, minVal = 0,
- labels = colnames(res), title = "(Dis-)Similarity Plot")
-}
-\keyword{package}
-\keyword{multivariate}
-\keyword{cluster}
+\name{RFLPtools-package}
+\alias{RFLPtools-package}
+\alias{RFLPtools}
+\docType{package}
+\title{
+Tools to analyse RFLP-data
+}
+\description{
+ \pkg{RFLPtools} provides functions to analyse DNA fragment samples
+ (i.e. derived from RFLP-analysis) and standalone BLAST report
+ files (i.e. DNA sequence analysis).
+}
+
+\details{
+\tabular{ll}{
+Package: \tab RFLPtools\cr
+Version: \tab 1.4 \cr
+Date: \tab 2012-10-23 \cr
+Depends: \tab R(>= 2.10.0), stats, utils, grDevices, RColorBrewer\cr
+Suggests: \tab lattice, MKmisc(>= 0.8)\cr
+License: \tab LGPL-3\cr
+}}
+
+
+\author{
+ Fabienne Flessa \email{Fabienne.Flessa at uni-bayreuth.de},\cr
+ Alexandra Kehl \email{Alexandra.Kehl at botgarten.uni-tuebingen.de},\cr
+ Matthias Kohl \email{Matthias.Kohl at stamats.de}\cr
+
+\emph{Maintainer:} Matthias Kohl \email{Matthias.Kohl at stamats.de}
+}
+
+\references{
+ Local Blast download: \url{ftp://ftp.ncbi.nih.gov/blast/executables/release/}
+
+ Blast News: \url{http://blast.ncbi.nlm.nih.gov/Blast.cgi?CMD=Web&PAGE_TYPE=BlastNews}
+
+ Poussier, Stephane; Trigalet-Demery, Danielle; Vandewalle, Peggy; Goffinet, Bruno; Luisetti, Jacques; Trigalet, Andre.
+ Genetic diversity of Ralstonia solanacearum as assessed by PCR-RFLP of the hrp gene region, AFLP and 16S rRNA sequence
+ analysis, and identification of an African subdivision.
+ Microbiology 2000 146:1679-1692
+
+ Matsumoto, Masaru; Furuya, Naruto; Takanami, Yoichi; Matsuyama, Nobuaki.
+ RFLP analysis of the PCR-amplified 28S rDNA in Rhizoctonia solani.
+ Mycoscience 1996 37:351 - 356
+
+ Persoh, D., Melcher, M., Flessa, F., Rambold, G.:
+ First fungal community analyses of endophytic ascomycetes associated with Viscum album ssp. austriacum
+ and itshost Pinus sylvestris. Fungal Biology 2010 Jul;114(7):585-96.
+}
+\examples{
+data(RFLPdata)
+res <- RFLPdist(RFLPdata)
+plot(hclust(res[[1]]), main = "Euclidean distance")
+
+par(mfrow = c(1,2))
+plot(hclust(RFLPdist(RFLPdata, nrBands = 3)), cex = 0.7)
+RFLPplot(RFLPdata, nrBands = 3, mar.bottom = 6, cex.axis = 0.8)
+
+data(RFLPref)
+RFLPrefplot(RFLPdata, RFLPref, nrBands = 6, cex.axis = 0.8)
+
+
+library(MKmisc)
+data(BLASTdata)
+res <- simMatrix(BLASTdata, sequence.range = TRUE, Min = 500)
+myCol <- colorRampPalette(brewer.pal(8, "RdYlGn"))(128)
+simPlot(res, col = myCol, minVal = 0,
+ labels = colnames(res), title = "(Dis-)Similarity Plot")
+}
+\keyword{package}
+\keyword{multivariate}
+\keyword{cluster}
Modified: pkg/RFLPtools/man/RFLPdist.Rd
===================================================================
--- pkg/RFLPtools/man/RFLPdist.Rd 2012-10-25 12:00:45 UTC (rev 10)
+++ pkg/RFLPtools/man/RFLPdist.Rd 2012-10-26 02:35:31 UTC (rev 11)
@@ -41,7 +41,7 @@
}
\author{
Fabienne Flessa \email{Fabienne.Flessa at uni-bayreuth.de},\cr
- Alexandra Kehl \email{Alexandra.Kehl at uni-bayreuth.de},\cr
+ Alexandra Kehl \email{Alexandra.Kehl at botgarten.uni-tuebingen.de},\cr
Matthias Kohl \email{Matthias.Kohl at stamats.de}
}
%\note{}
Modified: pkg/RFLPtools/man/RFLPdist2.Rd
===================================================================
--- pkg/RFLPtools/man/RFLPdist2.Rd 2012-10-25 12:00:45 UTC (rev 10)
+++ pkg/RFLPtools/man/RFLPdist2.Rd 2012-10-26 02:35:31 UTC (rev 11)
@@ -49,7 +49,7 @@
}
\author{
Fabienne Flessa \email{Fabienne.Flessa at uni-bayreuth.de},\cr
- Alexandra Kehl \email{Alexandra.Kehl at uni-bayreuth.de},\cr
+ Alexandra Kehl \email{Alexandra.Kehl at botgarten.uni-tuebingen.de},\cr
Matthias Kohl \email{Matthias.Kohl at stamats.de}
}
%\note{}
Modified: pkg/RFLPtools/man/RFLPdist2ref.Rd
===================================================================
--- pkg/RFLPtools/man/RFLPdist2ref.Rd 2012-10-25 12:00:45 UTC (rev 10)
+++ pkg/RFLPtools/man/RFLPdist2ref.Rd 2012-10-26 02:35:31 UTC (rev 11)
@@ -29,7 +29,7 @@
%\references{ ??? }
\author{
Fabienne Flessa \email{Fabienne.Flessa at uni-bayreuth.de},\cr
- Alexandra Kehl \email{Alexandra.Kehl at uni-bayreuth.de},\cr
+ Alexandra Kehl \email{Alexandra.Kehl at botgarten.uni-tuebingen.de},\cr
Matthias Kohl \email{Matthias.Kohl at stamats.de}
}
%\note{}
Modified: pkg/RFLPtools/man/RFLPplot.Rd
===================================================================
--- pkg/RFLPtools/man/RFLPplot.Rd 2012-10-25 12:00:45 UTC (rev 10)
+++ pkg/RFLPtools/man/RFLPplot.Rd 2012-10-26 02:35:31 UTC (rev 11)
@@ -40,7 +40,7 @@
%\references{ ??? }
\author{
Fabienne Flessa \email{Fabienne.Flessa at uni-bayreuth.de},\cr
- Alexandra Kehl \email{Alexandra.Kehl at uni-bayreuth.de},\cr
+ Alexandra Kehl \email{Alexandra.Kehl at botgarten.uni-tuebingen.de},\cr
Matthias Kohl \email{Matthias.Kohl at stamats.de}
}
%\note{}
Modified: pkg/RFLPtools/man/RFLPqc.Rd
===================================================================
--- pkg/RFLPtools/man/RFLPqc.Rd 2012-10-25 12:00:45 UTC (rev 10)
+++ pkg/RFLPtools/man/RFLPqc.Rd 2012-10-26 02:35:31 UTC (rev 11)
@@ -49,7 +49,7 @@
%\references{ ??? }
\author{
Fabienne Flessa \email{Fabienne.Flessa at uni-bayreuth.de},\cr
- Alexandra Kehl \email{Alexandra.Kehl at uni-bayreuth.de},\cr
+ Alexandra Kehl \email{Alexandra.Kehl at botgarten.uni-tuebingen.de},\cr
Matthias Kohl \email{Matthias.Kohl at stamats.de}
}
%\note{}
Modified: pkg/RFLPtools/man/RFLPrefplot.Rd
===================================================================
--- pkg/RFLPtools/man/RFLPrefplot.Rd 2012-10-25 12:00:45 UTC (rev 10)
+++ pkg/RFLPtools/man/RFLPrefplot.Rd 2012-10-26 02:35:31 UTC (rev 11)
@@ -35,7 +35,7 @@
%\references{ ??? }
\author{
Fabienne Flessa \email{Fabienne.Flessa at uni-bayreuth.de},\cr
- Alexandra Kehl \email{Alexandra.Kehl at uni-bayreuth.de},\cr
+ Alexandra Kehl \email{Alexandra.Kehl at botgarten.uni-tuebingen.de},\cr
Matthias Kohl \email{Matthias.Kohl at stamats.de}
}
%\note{}
Modified: pkg/RFLPtools/man/nrBands.Rd
===================================================================
--- pkg/RFLPtools/man/nrBands.Rd 2012-10-25 12:00:45 UTC (rev 10)
+++ pkg/RFLPtools/man/nrBands.Rd 2012-10-26 02:35:31 UTC (rev 11)
@@ -22,7 +22,7 @@
%\references{ ??? }
\author{
Fabienne Flessa \email{Fabienne.Flessa at uni-bayreuth.de},\cr
- Alexandra Kehl \email{Alexandra.Kehl at uni-bayreuth.de},\cr
+ Alexandra Kehl \email{Alexandra.Kehl at botgarten.uni-tuebingen.de},\cr
Matthias Kohl \email{Matthias.Kohl at stamats.de}
}
%\note{}
Modified: pkg/RFLPtools/man/read.blast.Rd
===================================================================
--- pkg/RFLPtools/man/read.blast.Rd 2012-10-25 12:00:45 UTC (rev 10)
+++ pkg/RFLPtools/man/read.blast.Rd 2012-10-26 02:35:31 UTC (rev 11)
@@ -7,17 +7,30 @@
Function to read BLAST data generated with standalone BLAST from NCBI.
}
\usage{
-read.blast(file)
+read.blast(file, sep = "\t")
}
\arguments{
\item{file}{ character: BLAST file to read in.}
+ \item{sep}{ the field separator character. Values on each line of the file are
+ separated by this character. Default \code{"\t"}.}
}
\details{
- The function reads data which was generated with standalone BLAST from NCBI.
- Pairwise similarities of DNA sequences are calculated among all sequences
- to analyse applying Standalone Blast
- (cf. ftp://ftp.ncbi.nih.gov/blast/executables/release/)
- with the parameters -m 8 -r 2 -G 5 -E 2.
+ The function reads data which was generated with standalone BLAST from NCBI;
+ see ftp://ftp.ncbi.nih.gov/blast/executables/release/.
+
+ Possible steps:\cr
+ 1) Install NCBI BLAST\cr
+ 2) Generate and import database(s)\cr
+ 3) Apply BLAST with options \code{outfmt} and \code{out}; e.g.\cr
+ \code{blastn -query Testquery -db Testdatabase -outfmt 6 -out out.txt}\cr
+ or\cr
+ \code{blastn -query Testquery -db Testdatabase -outfmt 10 -out out.csv}\cr
+ One can also call BLAST from inside R by using function \code{system}\cr
+ system("blastn -query Testquery -db Testdatabase -outfmt 6 -out out.txt")\cr
+ 4) Read in the results\cr
+ \code{test.res <- read.blast(file = "out.txt")}\cr
+ or\cr
+ \code{test.res <- read.blast(file = "out.csv", sep = ",")}
}
\value{
A \code{data.frame} with variables
@@ -43,7 +56,7 @@
}
\author{
Fabienne Flessa \email{Fabienne.Flessa at uni-bayreuth.de},\cr
- Alexandra Kehl \email{Alexandra.Kehl at uni-bayreuth.de},\cr
+ Alexandra Kehl \email{Alexandra.Kehl at botgarten.uni-tuebingen.de},\cr
Matthias Kohl \email{Matthias.Kohl at stamats.de}
}
%\note{}
Modified: pkg/RFLPtools/man/read.rflp.Rd
===================================================================
--- pkg/RFLPtools/man/read.rflp.Rd 2012-10-25 12:00:45 UTC (rev 10)
+++ pkg/RFLPtools/man/read.rflp.Rd 2012-10-26 02:35:31 UTC (rev 11)
@@ -36,7 +36,7 @@
%\references{ ??? }
\author{
Fabienne Flessa \email{Fabienne.Flessa at uni-bayreuth.de},\cr
- Alexandra Kehl \email{Alexandra.Kehl at uni-bayreuth.de},\cr
+ Alexandra Kehl \email{Alexandra.Kehl at botgarten.uni-tuebingen.de},\cr
Matthias Kohl \email{Matthias.Kohl at stamats.de}
}
%\note{}
Modified: pkg/RFLPtools/man/sim2dist.Rd
===================================================================
--- pkg/RFLPtools/man/sim2dist.Rd 2012-10-25 12:00:45 UTC (rev 10)
+++ pkg/RFLPtools/man/sim2dist.Rd 2012-10-26 02:35:31 UTC (rev 11)
@@ -24,7 +24,7 @@
%\references{ ??? }
\author{
Fabienne Flessa \email{Fabienne.Flessa at uni-bayreuth.de},\cr
- Alexandra Kehl \email{Alexandra.Kehl at uni-bayreuth.de},\cr
+ Alexandra Kehl \email{Alexandra.Kehl at botgarten.uni-tuebingen.de},\cr
Matthias Kohl \email{Matthias.Kohl at stamats.de}
}
%\note{}
Modified: pkg/RFLPtools/man/simMatrix.Rd
===================================================================
--- pkg/RFLPtools/man/simMatrix.Rd 2012-10-25 12:00:45 UTC (rev 10)
+++ pkg/RFLPtools/man/simMatrix.Rd 2012-10-26 02:35:31 UTC (rev 11)
@@ -46,7 +46,7 @@
}
\author{
Fabienne Flessa \email{Fabienne.Flessa at uni-bayreuth.de},\cr
- Alexandra Kehl \email{Alexandra.Kehl at uni-bayreuth.de},\cr
+ Alexandra Kehl \email{Alexandra.Kehl at botgarten.uni-tuebingen.de},\cr
Matthias Kohl \email{Matthias.Kohl at stamats.de}
}
%\note{}
Modified: pkg/RFLPtools/man/write.hclust.Rd
===================================================================
--- pkg/RFLPtools/man/write.hclust.Rd 2012-10-25 12:00:45 UTC (rev 10)
+++ pkg/RFLPtools/man/write.hclust.Rd 2012-10-26 02:35:31 UTC (rev 11)
@@ -35,7 +35,7 @@
%\references{ ??? }
\author{
Fabienne Flessa \email{Fabienne.Flessa at uni-bayreuth.de},\cr
- Alexandra Kehl \email{Alexandra.Kehl at uni-bayreuth.de},\cr
+ Alexandra Kehl \email{Alexandra.Kehl at botgarten.uni-tuebingen.de},\cr
Matthias Kohl \email{Matthias.Kohl at stamats.de}
}
%\note{}
Copied: pkg/RFLPtools/vignettes/HFU.jpg (from rev 8, pkg/RFLPtools/inst/doc/HFU.jpg)
===================================================================
(Binary files differ)
Copied: pkg/RFLPtools/vignettes/RFLPtools.Rnw (from rev 8, pkg/RFLPtools/inst/doc/RFLPtools.Rnw)
===================================================================
--- pkg/RFLPtools/vignettes/RFLPtools.Rnw (rev 0)
+++ pkg/RFLPtools/vignettes/RFLPtools.Rnw 2012-10-26 02:35:31 UTC (rev 11)
@@ -0,0 +1,290 @@
+%\VignetteIndexEntry{RFLPtools}
+%\VignetteDepends{stats, lattice, MKmisc, RColorBrewer}
+%\VignetteKeywords{RFLPtools}
+%\VignettePackage{RFLPtools}
+%
+\documentclass[11pt]{article}
+\usepackage{geometry}\usepackage{color}
+\usepackage[T1]{fontenc}
+\usepackage[utf8]{inputenc}
+%
+\definecolor{darkblue}{rgb}{0.0,0.0,0.75}
+\usepackage[%
+pdftitle={RFLPtools},%
+pdfauthor={F. Flessa, A. Kehl and M. Kohl},%
+pdfsubject={RFLPtools},%
+pdfkeywords={RFLPtools, RFLP, BLAST},%
+pagebackref,bookmarks,colorlinks,linkcolor=darkblue,citecolor=darkblue,%
+pagecolor=darkblue,raiselinks,plainpages,pdftex]{hyperref}
+%
+\markboth{\sl Package ``{\tt RFLPtools}''}{\sl Package ``{\tt RFLPtools}''}
+%
+% -------------------------------------------------------------------------------
+\newcommand{\code}[1]{{\tt #1}}
+\newcommand{\pkg}[1]{{\tt "#1"}}
+\newcommand{\myinfig}[2]{%
+% \begin{figure}[htbp]
+ \begin{center}
+ \includegraphics[width = #1\textwidth]{#2}
+% \caption{\label{#1}#3}
+ \end{center}
+% \end{figure}
+}
+% -------------------------------------------------------------------------------
+%
+% -------------------------------------------------------------------------------
+\begin{document}
+\SweaveOpts{keep.source = TRUE, eval = TRUE, include = FALSE}
+%-------------------------------------------------------------------------------
+\title{RFLPtools: Analysis of DNA fragment samples and standalone BLAST report files}
+%-------------------------------------------------------------------------------
+\author{F. Flessa\thanks{Chair for Plant Systematics, Section Mycology,
+University of Bayreuth, 95440 Bayreuth, Germany, Fabienne.Flessa at uni-bayreuth.de},
+A. Kehl\thanks{Botanical Garden, University of Tübingen, Hartmeyerstr.\ 123, 72076 Tübingen,
+Germany, Alexandra.Kehl at botgarten.uni-tuebingen.de} and
+M. Kohl\thanks{Department of Mechanical and Process Engineering,
+Furtwangen University, 78054 VS-Schwenningen, Germany, Matthias.Kohl at stamats.de}\\ \\
+\includegraphics[width = 3cm]{logoUBT.png}
+\includegraphics[width = 3cm]{logoTueb.png}
+\includegraphics[width = 3cm]{HFU.jpg}
+}
+\maketitle
+\tableofcontents
+%-------------------------------------------------------------------------------
+\section{Introduction}
+%-------------------------------------------------------------------------------
+The package \pkg{RFLPtools} aims at
+\begin{itemize}
+\item the detection of similar band patterns based on DNA fingerprint fragment
+sizes (i.e. derived from RFLP-analysis)
+\item the analysis of standalone BLAST report files (i.e. DNA sequence analysis)
+\end{itemize}
+In this short vignette we describe and demonstrate the available functions.
+<<load>>=
+library(RFLPtools)
+@
+%-------------------------------------------------------------------------------
+\section{RFLP data}
+%-------------------------------------------------------------------------------
+We load example data and compute the Euclidean distance ...
+<<eucl>>=
+data(RFLPdata)
+res <- RFLPdist(RFLPdata)
+names(res) ## number of bands
+str(res$"6")
+@
+Of course, we can also use other well-known distances implemented in function
+\code{dist}.
+<<other>>=
+res1 <- RFLPdist(RFLPdata, distfun = function(x) dist(x, method = "manhattan"))
+res2 <- RFLPdist(RFLPdata, distfun = function(x) dist(x, method = "maximum"))
+str(res[[1]])
+str(res1[[1]])
+str(res2[[1]])
+@
+Correlation distances can be applied using function \code{corDist} of package
+\pkg{MKmisc}.
+<<cor>>=
+library(MKmisc)
+res3 <- RFLPdist(RFLPdata, distfun = corDist)
+str(res3$"9")
+@
+As we obtain a list of \code{dist} objects we can easily perform hierarchical
+clustering.
+<<hclust, fig = TRUE>>=
+par(mfrow = c(2,2))
+plot(hclust(res[[1]]), main = "Euclidean distance")
+plot(hclust(res1[[1]]), main = "Manhattan distance")
+plot(hclust(res2[[1]]), main = "Maximum distance")
+plot(hclust(res3[[1]]), main = "Pearson correlation distance")
+@
+\myinfig{1}{RFLPtools-hclust.pdf}
+For splitting the dendrogram into clusters we apply function \code{cutree}.
+<<cutree>>=
+clust4bd <- hclust(res[[2]])
+cgroups50 <- cutree(clust4bd, h=50)
+cgroups50
+@
+Another possibility to display the similarity of the samples are so-called
+(dis-)similarity matrices which can be generated by function \code{simPlot} of
+package \pkg{MKmisc}.
+<<sim1, fig = TRUE>>=
+library(RColorBrewer)
+library(MKmisc)
+myCol <- colorRampPalette(brewer.pal(8, "RdYlGn"))(128)
+ord <- order.dendrogram(as.dendrogram(hclust(res[[1]])))
+temp <- as.matrix(res[[1]])
+simPlot(temp[ord,ord], col = rev(myCol), minVal = 0,
+ labels = colnames(temp), title = "(Dis-)Similarity Plot")
+@
+\myinfig{1}{RFLPtools-sim1.pdf}
+We can also use function \pkg{levelplot} of \pkg{lattice} to display (dis-)similarity
+matrices.
+<<sim2, fig = TRUE>>=
+library(lattice)
+print(levelplot(temp[ord,ord], col.regions = rev(myCol),
+ at = do.breaks(c(0, max(temp)), 128),
+ xlab = "", ylab = "",
+ ## Rotate labels of x-axis
+ scales = list(x = list(rot = 90)),
+ main = "(Dis-)Similarity Plot"))
+@
+\myinfig{1}{RFLPtools-sim2.pdf}
+If some bands may be missing we can apply function \code{RFLPdist2} specifying the
+number of missing bands we expect.
+<<sim3>>=
+## Euclidean distance
+data(RFLPdata)
+data(RFLPref)
+nrBands(RFLPdata)
+res0 <- RFLPdist2(RFLPdata, nrBands = 9, nrMissing = 0)
+res1 <- RFLPdist2(RFLPdata, nrBands = 9, nrMissing = 1)
+res2 <- RFLPdist2(RFLPdata, nrBands = 9, nrMissing = 2)
+res3 <- RFLPdist2(RFLPdata, nrBands = 9, nrMissing = 3)
+@
+Again hierarchical clustering of the results is straight forward.
+<<sim4, fig = TRUE>>=
+par(mfrow = c(2,2))
+plot(hclust(res0), main = "0 bands missing")
+plot(hclust(res1), main = "1 band missing")
+plot(hclust(res2), main = "2 bands missing")
+plot(hclust(res3), main = "3 bands missing")
+@
+\myinfig{1}{RFLPtools-sim4.pdf}
+In function \code{RFLPplot} we have also implemented another possibility for visualization.
+<<RFLPplot, fig = TRUE>>=
+par(mfrow = c(1,2))
+plot(hclust(RFLPdist(RFLPdata, nrBands = 3)), cex = 0.7)
+RFLPplot(RFLPdata, nrBands = 3, mar.bottom = 6, cex.axis = 0.8)
+@
+\myinfig{1}{RFLPtools-RFLPplot.pdf}
+We can also make a comparison to reference data.
+<<RFLPrefplot, fig = TRUE>>=
+RFLPrefplot(RFLPdata, RFLPref, nrBands = 9, cex.axis = 0.8)
+@
+\myinfig{1}{RFLPtools-RFLPrefplot.pdf}
+%-------------------------------------------------------------------------------
+\section{BLAST data}
+%-------------------------------------------------------------------------------
+To analyze tabular report files generated with standalone BLAST from NCBI
+(see \url{ftp://ftp.ncbi.nlm.nih.gov/blast/executables/release}),
+a function for reading the BLAST report files is included (\code{read.blast}).
+Possible steps are:
+\begin{enumerate}
[TRUNCATED]
To get the complete diff run:
svnlook diff /svnroot/rflptools -r 11
More information about the Rflptools-commits
mailing list