Pavian is a interactive browser application for analyzing and visualization metagenomics classification results from classifiers such as Kraken, KrakenUniq, Kraken 2, Centrifuge and MetaPhlAn. Pavian also provides an alignment viewer for validation of matches to a particular genome.
For more information look at the publication at https://doi.org/10.1093/bioinformatics/btz715
Pavian: interactive analysis of metagenomics data for microbiome studies and pathogen identification. FP Breitwieser, SL Salzberg - Bioinformatics, 2020
Thank you for citing the publication if Pavian helps in your research :).
You can try out Pavian at https://fbreitwieser.shinyapps.io/pavian/.
Before using pavianCoreTools, it is essential to ensure that all its dependencies are installed. The provided script install_pavianCoreTools_packages.R automates this process, making it easy to set up the required R packages and other software dependencies.
To simplify the installation of dependencies for pavianCoreTools, follow the steps below:
- Download the script from the pavianCore repository:
wget https://raw.githubusercontent.com/Enthusiasm23/pavianCore/master/install_pavianCoreTools_packages.R
or
curl -O https://raw.githubusercontent.com/Enthusiasm23/pavianCore/master/install_pavianCoreTools_packages.R
- Grant execution permission to the script:
chmod +x install_pavianCoreTools_packages.R
- Execute the script to install the required dependencies:
Rscript install_pavianCoreTools_packages.R
The script will automatically install the required R packages and other necessary software, such as PhantomJS and Pandoc. If you encounter issues with the installation, make sure your R version is up-to-date and you have internet connectivity.
The pavianCoreTools
script complements the Pavian tool suite by providing a command-line interface for analyzing, organizing, and summarizing Kraken report data, facilitating the visualization and interpretation of analysis results outside the Pavian web application. This standalone script is designed for those who prefer a command-line environment or require batch processing capabilities.
For detailed usage and more information on pavianCoreTools
, visit the pavianCore repository.
To run the pavianCoreTools
script independently from the command line:
git clone https://github.com/Enthusiasm23/pavianCore.git
cd pavianCore/exec
chmod +x pavianCoreTools.R
Rscript pavianCoreTools.R [options]
To use the PavianCoreTools script independently, you may download it directly using wget
or curl
and execute it from the command line:
wget https://raw.githubusercontent.com/Enthusiasm23/pavianCore/master/exec/pavianCoreTools.R
chmod +x pavianCoreTools.R
Rscript pavianCoreTools.R [options]
curl -O https://raw.githubusercontent.com/Enthusiasm23/pavianCore/master/exec/pavianCoreTools.R
chmod +x pavianCoreTools.R
Rscript pavianCoreTools.R [options]
If you encounter a "Connection refused" error when using wget or curl, please navigate to the repository at pavianCore repository and manually download the pavianCoreTools.R script from the exec directory.
Replace [options] with any command-line arguments your script accepts. For detailed script usage and options, please refer to the --help parameter or view the script's documentation within the pavianCore repository.
Pavian is a R package, and thus requires R to run. Look here for how to install R. On Windows, you probably need to install Rtools. On Ubuntu, install r-base-dev
. Once you started R, the following commands will install the package:
if (!require(remotes)) { install.packages("remotes") }
remotes::install_github("fbreitwieser/pavian")
To run Pavian from R, type
pavian::runApp(port=5000)
Pavian will then be available at http://127.0.0.1:5000 in the web browser of you choice.
Alternatively, you can install and test Pavian with the following command:
shiny::runGitHub("fbreitwieser/pavian", subdir = "inst/shinyapp")
To try out Pavian, load the example files directly from the interface.
The alignment viewer uses Rsamtools. To install this package from Bioconductor, use the following commands
if (!requireNamespace("BiocManager", quietly = TRUE))
install.packages("BiocManager")
BiocManager::install("Rsamtools")
In order to install to Shinyapps.io, because of the Bioconductor repo dependencies, you need to first set the options using setRepositories()
in R. At that point a `rsconnect::deployApp('pavian/inst/shinapp/') should work.
As an alternative to installing Pavian in R, a Docker image is available at florianbw/pavian. When you run this docker image, Pavian will start automatically on port 80, which you need to make available to the hosting machine. On the shell, you can pull the image and remap the Docker port to port 5000 with the following commands:
docker pull 'florianbw/pavian'
docker run --rm -p 5000:80 florianbw/pavian
pavian natively supports the Kraken and MetaPhlAn-style report formats. In extension, you can use Centrifuge results by running centrifuge-kreport
on Centrifuge output files, and Kaiju results by running kraken-report
on Kaiju output files (see issue #11)
Error: Maximum upload size exceeded
The maximum upload size is defined by the option shiny.maxRequestSize
. To increase it to 500 MB, for example, type the following before pavian::runApp()
:
options(shiny.maxRequestSize=500*1024^2)
If your BAM file contains the unaligned reads, you can decrease the file size before uploading by getting rid of non-aligned reads using samtools view -F4.
We'd like to thank the creators, contributors and maintainers of several packages without whom Pavian wouldn't exist:
- Winston Chang, Hadley Wickham, Joe Cheng, JJ Allaire and all other developers at Rstudio and outside who contribute to the amazing set of packages behind shiny and the tidyverse (shiny, shinydashboard, DT, dplyr, plyr, htmltools, htmlwidgets, rmarkdown, knitr, ggplot2, rappdirs)
- Mike Bostock and all developers behind the amazong D3 visualization library
- Dean Atali for the shinyjs R package
- dreamR developers for the shinyWidgets R package
- Jonathan Owen for rhandsontable widget, based on the handsontable javascript library
- M. Morgan and the other developers behind Rsamtools, as well as Heng Li and the other developers behind samtools
- Christopher Garund and the other developers behind networkD3, on which sankeyD3 is based
- The developers of jstree, on which shinyFileTree is based