Skip to content

🌈 Interactive & Command-Line Analysis of Metagenomics Data with Enhanced pavianCoreTools

Notifications You must be signed in to change notification settings

Enthusiasm23/pavianCore

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Pavian and pavianCoreTools

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/.

pavianCoreTools Dependencies Installation

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.

Installation Script Usage

To simplify the installation of dependencies for pavianCoreTools, follow the steps below:

  1. 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
  1. Grant execution permission to the script:
chmod +x install_pavianCoreTools_packages.R
  1. Execute the script to install the required dependencies:
Rscript install_pavianCoreTools_packages.R

Note:

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.

pavianCoreTools

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.

Usage

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]

Standalone Script Usage

To use the PavianCoreTools script independently, you may download it directly using wget or curl and execute it from the command line:

Downloading and Executing with wget:

wget https://raw.githubusercontent.com/Enthusiasm23/pavianCore/master/exec/pavianCoreTools.R
chmod +x pavianCoreTools.R
Rscript pavianCoreTools.R [options]

Downloading and Executing with curl:

curl -O https://raw.githubusercontent.com/Enthusiasm23/pavianCore/master/exec/pavianCoreTools.R
chmod +x pavianCoreTools.R
Rscript pavianCoreTools.R [options]

Troubleshooting:

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.

Note:

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.

Installation and deployment (Original Pavian)

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.

Installing Rsamtools

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")

Installing to Shinyapps.io

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.

Docker image

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

Screenshots

image

Build Status

Supported formats

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.

Acknowledgments

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

About

🌈 Interactive & Command-Line Analysis of Metagenomics Data with Enhanced pavianCoreTools

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • R 70.5%
  • TeX 22.9%
  • HTML 5.1%
  • CSS 0.9%
  • Dockerfile 0.4%
  • Makefile 0.1%
  • Shell 0.1%