Anvi’o by D. Salas-Leiva
Please copy and customize the shells available at /scratch3/rogerlab_databases/other_dbs/Anvio7:
PrepContigsAnvio.1.sh
Creating_CDBAnvio.2.sh
Longreads_MAP.3.sh
ShortReads.MAP.3.sh
DiamondSearch.3.sh
ImportTax.4.sh
MergeProfiles.5.sh
ExportSplits-taxonomy.6.sh
python36-acc2taxextraplusv2plast.py
The number in the shell indicates the order in which these must be launched. Shells that have the same number can be launched simultaneously, if desired.
Before launching ImportTax.4.sh and remaining shells:
Diamond output needs to be ready, then apply:
source activate python36-generic python python36-acc2taxextraplusv2plast.py contigs.predicted_orfs.tsv
then you can launch Importax.4.sh and the remaining shells.
If you only have either short or long reads, then no merge (MergeProfiles.5.sh) is needed but you should import the profile (ask Dayana)
Using the GUI: After the wrapper is done, follow the instructions that show up at the end:
Either use a remote Desktop client software such as X2go to “dig a tunnel” to a perun node or type in: “ssh -X -Y -L 8080:localhost:8080 youraccount@perun.biochem.dal.ca” in a new terminal. Set the path by pasting in the following lines:
source activate anvio7
To open the GUI of Anvi’o
anvi-interactive -p YourFASTA_ProfDir/PROFILE.db -c YourFASTA.db --taxonomic-level t_phylum
t_phylum will categorize the contigs in domains, which is enough for removing bacterial or archaeal sequences.
Other options include: t_class, t_species, but these are not very accurate as this wrapper only uses bacterial-ORF identifiers.
Press “DRAW” in the browser window that pops up to see the graph. You can re-colour the layers and taxons, you can mouse over on contigs to see their lengths, functions, etc. You can load bins that were pre-made by MyCC by going to “Load bins”, or create your own bins by double-clicking on branches, groups of contigs, or individual contigs. After you save the bins, close the window, cancel the anvi-interactive command in the terminal, and “summarize” the bins made by MyCC or the ones you made by:
anvi-summarize -p YourFASTA/YourFASTA_ProfDir.db -c YourFASTA.db -C YourBinCollectionNameorMyCC -o YourSummaryName
You can then see that a .fa file of your binned contigs has been made in the YourSummaryName folder. You can further “refine” your bins by:
anvi-refine -p YourFASTA/YourFASTA_ProfDir.db -c YourFASTA.db -C YourBinCollectionNameorMyCC -b The_specific_bin_name --taxonomic-level t_phylum
Rerunning Anvi’o after the pipeline breaks at:
InterProScan: submit IPR_stalone.py
Acc2tax: submit acc2tax.py
Metabat: Metabat_MyCCparser.py
If you need to rerun Anvi’o after the assembly has been made, make a copy of it and save it somewhere else. When Anvi’o reruns, the assembly header names will change and may cause problems later down the line.
Note:
1. There are several different versions of Anvi'o installed on Perun. If you need to run an old version of Anvi'o, you need to keep using the same version when running all the shells and when using the GUI for anvi-interactive.
You can learn the version of Anvi'o by typing “anvi-interactive -v”. If you have an older version, some things will not work the way they should.
2. Here is the list of all available versions.
conda env list | grep anvio
anvio /scratch2/software/anaconda/envs/anvio
anvio-5.1.0 /scratch2/software/anaconda/envs/anvio-5.1.0
anvio-dev-jul-2021 /scratch2/software/anaconda/envs/anvio-dev-jul-2021
anvio-minimal /scratch2/software/anaconda/envs/anvio-minimal
anvio-pip /scratch2/software/anaconda/envs/anvio-pip
anvio4 /scratch2/software/anaconda/envs/anvio4
anvio6 /scratch2/software/anaconda/envs/anvio6
anvio7 /scratch2/software/anaconda/envs/anvio7
3. Anvi'o User Tutorial for Metagenomic Workflow
https://merenlab.org/2016/06/22/anvio-tutorial-v2/
Documentation by D. Salas-Leiva (updated Feb 12 2021).
Modified by Dandan Zhao on Feb 13, 2025.
