Puumanamana / CoCoNet

Tool for unsupervised contig binning from viral metagenomes
Apache License 2.0
15 stars 1 forks source link

FileNotFoundError: [Errno 2] Unable to open file (unable to open file: name = 'output/coverage.h5', errno = 2, error message = 'No such file or directory', flags = 0, o_flags = 0) #2

Closed felipehcoutinho closed 3 years ago

felipehcoutinho commented 3 years ago

Hello and congratulations on putting together this amazing tool!

I am trying to run CoCoNet using only sequence composition and keep running into an error. The command I used was:

coconet run --fasta ../Set5_Genomes/Mixed_Set5_Viruses_No_Prophage_Genomes.fasta --threads 24 --features 'composition'

Which gives this output before failing:

19:54:29 (Mem: 0.3 GB) CRITICAL: Could not find any coverage files 19:54:29 (Mem: 0.3 GB) CRITICAL: Could not find any coverage files 19:54:29 (Mem: 0.3 GB) CRITICAL: Could not find any coverage files 19:54:30 (Mem: 0.3 GB) INFO: Using 24 threads 19:54:30 (Mem: 0.3 GB) INFO: Features: composition 19:54:36 (Mem: 0.3 GB) INFO: Processing 61,647 contigs 19:54:57 (Mem: 0.3 GB) INFO: Length filter (L>2048 bp) -> 59,116 contigs remaining 20:13:46 (Mem: 0.3 GB) INFO: Complete contigs filtering (DTR > 10 bp) -> 56899 contigs remaining 20:13:46 (Mem: 0.3 GB) INFO: Making train/test examples 20:13:51 (Mem: 1.3 GB) INFO: Parameters: fragment_step=128, fragment_length=1024, #training_samples=4000000, #test_samples=10000 Traceback (most recent call last): File "/home/felipe/.local/bin/coconet", line 8, in sys.exit(main()) File "/home/felipe/.local/lib/python3.8/site-packages/coconet/coconet.py", line 62, in main learn(cfg) File "/home/felipe/.local/lib/python3.8/site-packages/coconet/coconet.py", line 197, in learn model = load_model(cfg) File "/home/felipe/.local/lib/python3.8/site-packages/coconet/dl.py", line 67, in load_model input_shapes = config.get_input_shapes() File "/home/felipe/.local/lib/python3.8/site-packages/coconet/core/config.py", line 198, in get_input_shapes with h5py.File(self.io['h5'], 'r') as handle: File "/home/felipe/.local/lib/python3.8/site-packages/h5py/_hl/files.py", line 442, in init fid = make_fid(name, mode, userblock_size, File "/home/felipe/.local/lib/python3.8/site-packages/h5py/_hl/files.py", line 195, in make_fid fid = h5f.open(name, flags, fapl=fapl) File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper File "h5py/h5f.pyx", line 96, in h5py.h5f.open FileNotFoundError: [Errno 2] Unable to open file (unable to open file: name = 'output/coverage.h5', errno = 2, error message = 'No such file or directory', flags = 0, o_flags = 0)

So it seems it requires coverage files even in the composition only mode? Appreciate your help with this.

I have installed through pip and this is the output of pip freeze:

pturl==0.5.2 arm-mango==1.1.0 atomicwrites==1.1.5 attrdict==2.0.1 attrs==19.3.0 backcall==0.2.0 bayesian-optimization==1.2.0 bcrypt==3.1.7 beautifulsoup4==4.8.2 biopython==1.76 blinker==1.4 Brlapi==0.7.0 CacheControl==0.12.6 certifi==2019.11.28 chardet==3.0.4 checkm-genome==1.1.3 checkv==0.7.0 Click==7.0 coconet-binning==1.1.0 colorama==0.4.3 coloredlogs==7.3 command-not-found==0.3 cryptography==2.8 cupshelpers==1.0 cutadapt==2.8 cwltool==2.0.20200224214940 cycler==0.10.0 Cython==0.29.22 dataclasses==0.6 dbus-python==1.2.16 decorator==4.4.2 defer==1.0.6 DendroPy==4.5.1 distro==1.4.0 distro-info===0.23ubuntu1 dnaio==0.4.1 duplicity==0.8.12.0 entrypoints==0.3 fasteners==0.14.1 future==0.18.2 gensim==3.8.3 h5py==3.2.1 hdmedians==0.14.2 hnswlib==0.5.1 html5lib==1.0.1 HTSeq==0.13.5 httplib2==0.14.0 humanfriendly==4.18 idna==2.8 importlib-metadata==1.5.0 ipython==7.22.0 ipython-genutils==0.2.0 isodate==0.6.0 jedi==0.18.0 joblib==0.14.0 keyring==18.0.1 kiwisolver==1.3.1 language-selector==0.1 launchpadlib==1.10.13 lazr.restfulclient==0.14.2 lazr.uri==1.0.3 lockfile==0.12.2 louis==3.12.0 lxml==4.5.0 macaroonbakery==1.3.1 Mako==1.1.0 MarkupSafe==1.1.0 matplotlib==3.3.3 mistune==0.8.4 monotonic==1.5 more-itertools==4.2.0 msgpack==0.6.2 mypy-extensions==0.4.3 natsort==7.1.1 netifaces==0.10.4 networkx==2.4 numpy==1.20.2 oauthlib==3.1.0 olefile==0.46 omega-index==0.2 packaging==20.3 pandas==1.2.0 paramiko==2.6.0 parso==0.8.2 pexpect==4.6.0 pickleshare==0.7.5 Pillow==7.0.0 plotly==4.14.3 pluggy==0.13.0 prompt-toolkit==3.0.18 protobuf==3.6.1 prov==1.5.2 psutil==5.5.1 py==1.8.1 pybind11==2.6.2 pycairo==1.16.2 pycups==1.9.73 Pygments==2.8.1 PyGObject==3.36.0 PyJWT==1.7.1 pymacaroons==0.13.0 PyNaCl==1.3.0 pyparsing==2.4.6 pyRFC3339==1.1 pysam==0.16.0.1 pytest==4.6.9 python-apt==2.0.0+ubuntu0.20.4.3 python-dateutil==2.7.3 python-debian===0.1.36ubuntu1 python-igraph==0.9.1 pytz==2019.3 pyxdg==0.26 PyYAML==5.3.1 rdflib==4.2.2 rdflib-jsonld==0.4.0 reportlab==3.5.34 requests==2.22.0 requests-unixsocket==0.2.0 retrying==1.3.3 ruamel.yaml==0.15.89 schema-salad==5.0.20200220195218 scikit-bio==0.5.6 scikit-learn==0.24.1 scipy==1.5.4 seaborn==0.11.1 SecretStorage==2.3.1 shellescape==3.4.1 simplejson==3.16.0 six==1.14.0 sklearn==0.0 smart-open==4.2.0 soupsieve==1.9.5 SPARQLWrapper==1.8.5 ssh-import-id==5.10 systemd-python==234 texttable==1.6.3 threadpoolctl==2.1.0 torch==1.8.1 tqdm==4.59.0 traitlets==5.0.5 typing-extensions==3.7.4.1 ubuntu-advantage-tools==20.3 ubuntu-drivers-common==0.0.0 ufw==0.36 unattended-upgrades==0.1 urllib3==1.25.8 usb-creator==0.3.7 wadllib==1.3.3 wcwidth==0.1.8 webencodings==0.5.1 xkit==0.0.0 xopen==0.8.4 zipp==1.0.0

Puumanamana commented 3 years ago

Hi Felipe, Thank you for reporting this issue. I fixed the problem, you should be able to bin your contigs without the coverage files. To include the latest changes, you will need to install the development version (as described in the documentation) Cédric

felipehcoutinho commented 3 years ago

Thank you, that fixed the issue.