Error in Calculating Similarity Networks : "vcontact2: Error in viral clusters"

Issue #38 new
Former user created an issue

Hi all,

I've been trying to use vcontact2 but I've been facing some issues, even with the test_data. I had a look at the previous issues and it seems like most of them got resolved thanks to a change in some package version. I tried changing them but still facing the error message.

Here is the version of my packages in my vcontact2 environment :

$ pip list
Package         Version
--------------- -------------------
appdirs         1.4.4
biopython       1.78
certifi         2020.12.5
ClusterShell    1.8.3
decorator       4.4.2
distlib         0.3.1
joblib          1.0.1
mock            4.0.3
networkx        2.5
niemads         1.0.14
numexpr         2.7.3
numpy           1.19.5
pandas          0.25.3
pip             21.0.1
psutil          5.8.0
pyparsing       2.4.7
python-dateutil 2.8.1
pytz            2021.1
scikit-learn    0.24.1
scipy           1.6.1
setuptools      49.6.0.post20210108
six             1.15.0
tables          3.6.1
threadpoolctl   2.1.0
treecluster     1.0.3
treeswift       1.1.14
vcontact2       0.9.19
virtualenv      20.4.2
wheel           0.36.2

Here is my command line :

vcontact2 --raw-proteins /home/user/software/vcontact2/test_data/VIRSorter_genomes.faa --proteins-fp  /home/user/software/vcontact2/test_data/VIRSorter_genomes_g2g.csv  --rel-mode "Diamond"  --db 'ProkaryoticViralRefSeq97-Merged' --pcs-mode MCL --vcs-mode ClusterONE --c1-bin /home/user/software/cluster_one-1.0.jar --output-dir vConTACT2_test

Here is the last part of the actual .log file :

------------------------Calculating Similarity Networks-------------------------
INFO:vcontact2.contig_clusters: Exporting for ClusterONE
INFO:vcontact2.contig_clusters: Clustering the PC Similarity-Network using ClusterONE
INFO:vcontact2.contig_clusters: 2 clusters loaded (singletons and non-connected nodes are dropped).
INFO:vcontact2.contig_clusters: Computing membership matrix...
INFO:vcontact2.cluster_refinements: Optimizing on distance: 9
INFO:vcontact2.evaluations: Performance evaluations at the genus level...
ERROR:vcontact2: Error in viral clusters
ERROR:vcontact2: cannot set a frame with no defined columns
Traceback (most recent call last):
  File "/home/user/.conda/envs/vContact2/bin/vcontact2", line 637, in main
    vc = vcontact2.cluster_refinements.ViralClusters(gc.contigs, profiles_fp, optimize=options.optimize)
  File "/home/user/.conda/envs/vContact2/lib/python3.7/site-packages/vcontact2/cluster_refinements.py", line 106, in __init__
    evaluations = vcontact2.evaluations.Evaluations(adj_contigs, levels=['genus'], focus='rev_pos_cluster')
  File "/home/user/.conda/envs/vContact2/lib/python3.7/site-packages/vcontact2/evaluations.py", line 42, in __init__
    clustering_wise_ppv, clustering_wise_sensitivity, accuracy = self.performance_metrics(contingency_tbl)
  File "/home/user/.conda/envs/vContact2/lib/python3.7/site-packages/vcontact2/evaluations.py", line 59, in performance_metrics
    ppv_tbl = self.calc_ppv(contingency_table)
  File "/home/user/.conda/envs/vContact2/lib/python3.7/site-packages/vcontact2/evaluations.py", line 111, in calc_ppv
    counts.loc['sum'] = counts.sum(axis=0)  # adds a new ROW with sum of column
  File "/home/conchae/.conda/envs/vContact2/lib/python3.7/site-packages/pandas/core/indexing.py", line 205, in __setitem__
    self._setitem_with_indexer(indexer, value)
  File "/home/user/.conda/envs/vContact2/lib/python3.7/site-packages/pandas/core/indexing.py", line 406, in _setitem_with_indexer
    return self._setitem_with_indexer_missing(indexer, value)
  File "/home/user/.conda/envs/vContact2/lib/python3.7/site-packages/pandas/core/indexing.py", line 635, in _setitem_with_indexer_missing
    raise ValueError("cannot set a frame with no defined columns")
ValueError: cannot set a frame with no defined columns

Thanks for your help !

Comments (2)

  1. Robby Concha-Eloko

    Hi again (I’m the one who opened the issue),

    A quick change in the code : the database I used was actually the '94 version.

    Cheers

  2. Log in to comment