vinisalazar / metaphor

Metaphor: a general-purpose workflow for assembly and binning of metagenomes
https://metaphor-workflow.readthedocs.io/
Other
35 stars 3 forks source link

vamb: error: unrecognized arguments: --jgi output/mapping/cobinning/bam_contigs_depths.txt #77

Open francesco-ricci opened 4 weeks ago

francesco-ricci commented 4 weeks ago

Hello,

I get the following error:

usage: vamb outdir tnf_input rpkm_input [options] vamb: error: unrecognized arguments: --jgi output/mapping/cobinning/bam_contigs_depths.txt

This is possibly related to the format of the file bam_contigs_depths.txt. After inspection, this file seems fine to me:

contigName contigLen totalAvgDepth Blank-3L7-to-contigs.sorted.bam Blank-3L7-to-contigs.sorted.bam-var FR2A1L7-to-contigs.sorted.bam FR2A1L7-to-contigs.sorted.bam-var FR2A2L7-to-contigs.sorted.bam FR2A2L7-to-contigs.sorted.bam-var FR2A3L7-to-contigs.sorted.bam FR2A3L7-to-contigs.sorted.bam-var FR2B1L7-to-contigs.sorted.bam FR2B1L7-to-contigs.sorted.bam-var FR2B2L7-to-contigs.sorted.bam FR2B2L7-to-contigs.sorted.bam-var FR2B3L7-to-contigs.sorted.bam FR2B3L7-to-contigs.sorted.bam-var FR2C1L7-to-contigs.sorted.bam FR2C1L7-to-contigs.sorted.bam-varFR2C2L7-to-contigs.sorted.bam FR2C2L7-to-contigs.sorted.bam-var FR2C3L7-to-contigs.sorted.bam FR2C3L7-to-contigs.sorted.bam-var SWSC1-1L7-to-contigs.sorted.bam SWSC1-1L7-to-contigs.sorted.bam-var SWSC2-1L7-to-contigs.sorted.bam SWSC2-1L7-to-contigs.sorted.bam-var S1Ck127_1077651_flag_0_multi_2.9778_len_1029 1029 5.86121 0 0 0 0 0 0 0 0 0.632537 0.865957 0.682594 0.745388 0.828214 0.657236 1.12059 1.71893 0.666667 0.689446 1.9306 5.12158 0 0 0 0 S1Ck127_4669795_flag_1_multi_3.0000_len_1001 1001 4.57932 0 0 0.0987074 0.286722 0 0 0 0 0.622797 0.538728 0.336075 0.223391 0.616921 0.236605 1.23032 0.666889 1.49824 2.135 0.176263 0.145364 0 0 0 0 S1Ck127_10417218_flag_1_multi_3.0000_len_1678 1678 4.56937 0 0 0.196335 0.181464 0.78534 0.954528 0.196335 0.157889 0.39267 0.631552 0.196335 0.342569 0.441754 0.637067 0.66623 0.709735 1.49804 3.5049 0.196335 0.157888 0 0 0 0 S1Ck127_12572503_flag_1_multi_4.0000_len_1061 1061 5.53128 0 0 0.472009 0.834107 0.329308 0.550774 1.15258 4.76901 0 0 0.448957 0.502612 1.31723 1.04102 1.31723 1.84321 0.164654 0.137693 0.329308 0.550775 0 0 0 0

Any clue why this might happen?

Thanks Francesco

vinisalazar commented 3 weeks ago

Hi @francesco-ricci,

The problem here seems to be that the vamb command line is not accepting the --jgi option. This option was added in Vamb v2. Although the Metaphor environment specifies vamb v3.0.2, it is possible it may have installed an older one. Could you confirm the vamb version installed in the environment?

Or possibly, delete the vamb environment and let Metaphor reinstall it. Hopefully that fixes the problem.

Let me know how it goes.

francesco-ricci commented 3 weeks ago

Thansk Vini, I have vamb v4.1.3.

vinisalazar commented 3 weeks ago

Did you do any manual installation of vamb at all? Metaphor by default uses v3.0.2. Deleting and reinstalling it should solve the problem.

I will patch this on the next version of Metaphor, so as to use the latest version of vamb (along with the mkl problem you reported on the other issue). Should be done about a week from now.

francesco-ricci commented 3 weeks ago

Can't remember I might have tried to update vamb among the various fixes I tried.

I'll follow your advice thanks Vini!

francesco-ricci commented 3 weeks ago

Hi VIni,

so I uninstalled metaphor and reinstalled it, but vamb was not installed. When I try to install vamb v3.0.2 I get the following error message:

(metaphor) [fricci@m3-login2 output]$ mamba install vamb==3.0.2

Looking for: ['vamb==3.0.2']

bioconda/linux-64 Using cache bioconda/noarch Using cache conda-forge/linux-64 Using cache conda-forge/noarch Using cache pkgs/r/linux-64 No change pkgs/main/linux-64 No change pkgs/main/noarch No change pkgs/r/noarch No change

Pinned packages:

warning libmamba Added empty dependency for problem type SOLVER_RULE_UPDATE Could not solve for environment specs The following packages are incompatible └─ vamb 3.0.2 is installable with the potential options ├─ vamb 3.0.2 would require │ └─ python >=3.6,<3.7.0a0 , which can be installed; └─ vamb 3.0.2 would require └─ python >=3.7,<3.8.0a0 , which can be installed.

francesco-ricci commented 3 weeks ago

Managed to fix this by using pip to install vamb==3.0.9 and then I had to modify the vamb script pasecontigs.py [by changing _vambtools.PushArry(_np.int) to _vambtools.PushArry(nt)]

francesco-ricci commented 3 weeks ago

Still getting an error from vamb:

Traceback (most recent call last): File "/home/fricci/rp24/fra/software/miniconda3/envs/metaphor/lib/python3.11/site-packages/metaphor/config/conda/62c4f57b116324c01c3221a9b5c2a0ef/bin/vamb", line $ from vamb.main import main File "/home/fricci/rp24/fra/software/miniconda3/envs/metaphor/lib/python3.11/site-packages/metaphor/config/conda/62c4f57b116324c01c3221a9b5c2a0ef/lib/python3.7/si$ from . import cluster File "/home/fricci/rp24/fra/software/miniconda3/envs/metaphor/lib/python3.11/site-packages/metaphor/config/conda/62c4f57b116324c01c3221a9b5c2a0ef_/lib/python3.7/si$ import torch as torch File "/home/fricci/rp24/fra/software/miniconda3/envs/metaphor/lib/python3.11/site-packages/metaphor/config/conda/62c4f57b116324c01c3221a9b5c2a0ef/lib/python3.7/si$ from torch.C import * # noqa: F403 ImportError: /home/fricci/rp24/fra/software/miniconda3/envs/metaphor/lib/python3.11/site-packages/metaphor/config/conda/62c4f57b116324c01c3221a9b5c2a0ef/lib/python3$

I'll wait for you patch Vini.

Thanks Francesco