Comments (1)
Hi @natalia-rodilla,
Thank you very much for the detailed report and the test case. I was able to reproduce your error on my system.
As you have discerned already, it seems to be a bug that happens only when there is a single genome in a given cluster. This is where it is failing in the genomesimilarity.py
code:
if len(cluster) == 1:
return cluster[0]
The problem is that the pick_representative_with_largest_Qscore()
function (in which this code is), seems to expect that the cluster
variable is a list, when in fact it is a set.
The very simple fix was to cast cluster
to a list before trying to extract the sole element, which I implemented in commit fbc6cf3 .
This is the output I get on your test set after running with the fixed code in the development branch of anvi'o:
Run mode .....................................: fastANI
CITATION
===============================================
Anvi'o will use 'fastANI' by Jain et al. (DOI: 10.1038/s41467-018-07641-9) to
compute ANI. If you publish your findings, please do not forget to properly
credit their work.
[fastANI] Kmer size ..........................: 16
[fastANI] Fragment length ....................: 3,000
[fastANI] Min fraction of alignment ..........: 0.25
[fastANI] Num threads to use .................: 1
[fastANI] Log file path ......................: /var/folders/nc/7dlw5z2j16q3s14586qddwl8nhxpgh/T/tmpeywzl020
fastANI similarity metric ....................: calculated
Number of genomes considered .................: 7
Number of redundant genomes ..................: 5
Final number of dereplicated genomes .........: 2
ANI RESULTS
===============================================
* Matrix and clustering of 'ani' written to output directory
* Matrix and clustering of 'alignment fraction' written to output directory
* Matrix and clustering of 'mapping fragments' written to output directory
* Matrix and clustering of 'total fragments' written to output directory
* Cleaning up the temp directory (you can use `--debug` if you would like to keep
it for testing purposes)
The similarity scores output gets written, and the resulting representative genomes for each cluster in derep99Q_test10/GENOMES/
are BA_92.fa
and UW8_POB.fa
. :)
So if you were to install anvio-dev
by following the instructions here: https://anvio.org/install/linux/dev/
and pull the latest commits to the repository, you will be able to run this program without this error.
from anvio.
Related Issues (20)
- [BUG] pulp v2.8 made API changes that cause errors generating workflow DAG diagrams HOT 1
- [BUG] Can't create phylogenomic tree, as phylogenomic-tree.txt and default collection has different number of items.
- [BUG] Can't create phylogenomic tree, as phylogenomic-tree.txt and default collection has different number of items. HOT 3
- [BUG] Can't visualise the pangenome with average nucleotide identity HOT 1
- [BUG] anvi-setup-scgs-taxonomy STILL writes SCGs database to default location HOT 2
- [FEATURE REQUEST] add parameter --temp for temporary files path HOT 5
- [FEATURE REQUEST] Refactoring Anvio to be more eukaryote friendly/account for different genetic architectures
- [FEATURE REQUEST] Different gene caller option(s) for `anvi-gen-contigs-database` HOT 5
- [FEATURE REQUEST] See external/third-party dependencies on program documentation pages HOT 1
- [FEATURE REQUEST] Adding a program to annotate viral PHROGs via their HMMs
- [FEATURE REQUEST] A shortcut for importing layer orders that doesn't go through `anvi-import-misc-data`
- [FEATURE REQUEST] Environment variables for KEGG, Pfam, and other data directories so sys admins can set a global --xxxx-data-dir value
- [FEATURE REQUEST] Annotate which KOfams were added by our bitscore relaxation heuristic
- [FEATURE REQUEST] A conda package for anvi'o with a minimal installation option
- [BUG] `--prodigal-single-mode` breaks metagenomic workflow HOT 5
- [BUG] anvio-cluster-contigs fails with Generate input data
- [BUG] anvi-meta-pan-genome does not allow me to use gene calls not from prodigal HOT 10
- [BUG] Missing USearch in installation instruction and workflow DAG declarations HOT 1
- [BUG] contigs.db has issues when inputing aa_sequence in the external-gene-call file HOT 4
- [BUG] MaxBin2 failing due to one missing coverage HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from anvio.