Pipeline for the identification of giant virus genomes from metagenomic datasets
An easy to install and use pipeline to bin, clean, annotate, classify, and quantify genomes of giant viruses from metagenomic datasets. This program also includes the software ViraScreen which can save you a lot of time by screening your raw fastq reads for signs of giant viruses before you start the pipeline.
Minch, B. and Moniruzzaman, M., 2024. Expansion of the genomic and functional diversity of global ocean giant viruses. bioRxiv, pp.2024-07.
It is recommended that you create a conda environment in which to install all of these packages to.
It's as easy as cloning this repository and making sure you have all the dependencies installed
git clone https://github.com/BenMinch/PIGv
Download the hmm database wget -O hmm.tar.gz https://zenodo.org/record/4762520/files/hmm.tar.gz?download=1
and then tar -xvzf hmm.tar.gz
Take all the files inside of this folder and copy them into the hmm folder provided inside the PIGv program from the github clone.
Unpack the diamond program inside the viral_screening folder gunzip diamond-linux64.tar.gz|tar -xvzf
Note: if you have a different computer model than linux64, you may need to install a different version of diamond and can do so here
Download the CheckV database and move it inside the resources folder checkv download_database ./
. Make sure you do this in your conda environment after you have finished downloading dependencies.
ViraScreen is a time-saver to scan your raw read files before you move forward with trimming, assembly and mapping in order to see if you have a good chance of getting a giant virus genome from the dataset. The program uses a blast search against a database of MCP proteins from 1500 known giant viruses and uses this data to predict the chance of a genome being inside your sample. This prediction is based on a model that was trained from over 50 uses of the program in conjunction with PIGv.
python Viral_Screeninator.py -i input_folder
A single csv file is output that will contain columns for the filename, the number of MCP hits in that query file and the chance of getting a genome from this dataset (a number from 0-1 representing a proportion).
Once you have screened your reads and want to move forward with using PIGv, you'll find that it is quite easy. An example folder has some test inputs you can use to make sure the program is running correctly. It should give you 2 genomes. To run the examples you must first unzip the .fa files and run
cat korea.fa1 korea.fa2 > korea.fa
to combine the split fasta file (due to github filelimits).
Different starting points
Minimal usage
python PIGv.py -1 read_1.fastq -2 read_2.fastq -o Output_directory -t 12 -type reads
Minimal usage
python PIGv.py -i assembled_contigs.fa -o Output_directory -t 12 -cov metagenome.coverm -annot True -type contigs
Inputs
Outputs
A script has been included to run PIGv on a plethora of files at the same time. The process is assentially the same but instead of an input assembly and coverage file, you can input a folder of assemblies and a separate folder of coverage files. This will create a separate output folder for each sample.
PIGv batch Contigs is a super useful mode and is the Recommended running mode of PIGv due to its speed and low memory usage. It does require a bit more preprocessing but it is worth it.
python PIGv_batch.py -i assemblies -ref reference.csv -reads trimmed_reads -type contigs -n Test -t 4
PIGv Batch also works in reads mode and you can input a directory of trimmed fastq reads as the input. Just make sure the only differences between fwrd and reverse is "_1" and "_2".
In light of the recent discovery of Mirusvircota viruses, PIGv can also search for signals of these viruses in your sample. If any bins get flagged as potential mirusviruses they will be in a separate folder in the results folder. Otherwise, the table searching for mirusvirus marker genes can be found in the "03_NCLDV_Markersearch" folder.
This wrapper tool is built on the foundation of many other great tools.
Screening of giant viruses was adapted from Aylward et al. 2021.
PIGv Copyright (C) 2023 Benjamin Minch
This program is free software: you can redistribute it and/or modify it under the terms of the MIT License.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the MIT License for more details.