wwood / CoverM

Read coverage calculator for metagenomics
GNU General Public License v3.0
273 stars 30 forks source link

Unable to install CoverM #123

Closed maggieweng closed 1 year ago

maggieweng commented 1 year ago

I am unable to install CoverM both through bioconda and the precompiled binary (my macos says it "cannot execute binary file"). When I try to install with bioconda, it fails to collect package metadata. Is anyone else having this issue? (ETA: this is the error report from bioconda):

Collecting package metadata (current_repodata.json): failed

>>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<<

Traceback (most recent call last):
  File "/Users/jbl/miniconda3/lib/python3.9/site-packages/urllib3/response.py", line 438, in _error_catcher
    yield
  File "/Users/jbl/miniconda3/lib/python3.9/site-packages/urllib3/response.py", line 764, in read_chunked
    self._update_chunk_length()
  File "/Users/jbl/miniconda3/lib/python3.9/site-packages/urllib3/response.py", line 694, in _update_chunk_length
    line = self._fp.fp.readline()
  File "/Users/jbl/miniconda3/lib/python3.9/socket.py", line 704, in readinto
    return self._sock.recv_into(b)
  File "/Users/jbl/miniconda3/lib/python3.9/ssl.py", line 1241, in recv_into
    return self.read(nbytes, buffer)
  File "/Users/jbl/miniconda3/lib/python3.9/ssl.py", line 1099, in read
    return self._sslobj.read(len, buffer)
ConnectionResetError: [Errno 54] Connection reset by peer

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/jbl/miniconda3/lib/python3.9/site-packages/requests/models.py", line 753, in generate
    for chunk in self.raw.stream(chunk_size, decode_content=True):
  File "/Users/jbl/miniconda3/lib/python3.9/site-packages/urllib3/response.py", line 572, in stream
    for line in self.read_chunked(amt, decode_content=decode_content):
  File "/Users/jbl/miniconda3/lib/python3.9/site-packages/urllib3/response.py", line 793, in read_chunked
    self._original_response.close()
  File "/Users/jbl/miniconda3/lib/python3.9/contextlib.py", line 135, in __exit__
    self.gen.throw(type, value, traceback)
  File "/Users/jbl/miniconda3/lib/python3.9/site-packages/urllib3/response.py", line 455, in _error_catcher
    raise ProtocolError("Connection broken: %r" % e, e)
urllib3.exceptions.ProtocolError: ("Connection broken: ConnectionResetError(54, 'Connection reset by peer')", ConnectionResetError(54, 'Connection reset by peer'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/jbl/miniconda3/lib/python3.9/site-packages/conda/exceptions.py", line 1079, in __call__
    return func(*args, **kwargs)
  File "/Users/jbl/miniconda3/lib/python3.9/site-packages/conda/cli/main.py", line 84, in _main
    exit_code = do_call(args, p)
  File "/Users/jbl/miniconda3/lib/python3.9/site-packages/conda/cli/conda_argparse.py", line 83, in do_call
    return getattr(module, func_name)(args, parser)
  File "/Users/jbl/miniconda3/lib/python3.9/site-packages/conda/cli/main_install.py", line 20, in execute
    install(args, parser, 'install')
  File "/Users/jbl/miniconda3/lib/python3.9/site-packages/conda/cli/install.py", line 261, in install
    unlink_link_transaction = solver.solve_for_transaction(
  File "/Users/jbl/miniconda3/lib/python3.9/site-packages/conda/core/solve.py", line 114, in solve_for_transaction
    unlink_precs, link_precs = self.solve_for_diff(update_modifier, deps_modifier,
  File "/Users/jbl/miniconda3/lib/python3.9/site-packages/conda/core/solve.py", line 157, in solve_for_diff
    final_precs = self.solve_final_state(update_modifier, deps_modifier, prune, ignore_pinned,
  File "/Users/jbl/miniconda3/lib/python3.9/site-packages/conda/core/solve.py", line 262, in solve_final_state
    ssc = self._collect_all_metadata(ssc)
  File "/Users/jbl/miniconda3/lib/python3.9/site-packages/conda/common/io.py", line 88, in decorated
    return f(*args, **kwds)
  File "/Users/jbl/miniconda3/lib/python3.9/site-packages/conda/core/solve.py", line 425, in _collect_all_metadata
    index, r = self._prepare(prepared_specs)
  File "/Users/jbl/miniconda3/lib/python3.9/site-packages/conda/core/solve.py", line 1020, in _prepare
    reduced_index = get_reduced_index(self.prefix, self.channels,
  File "/Users/jbl/miniconda3/lib/python3.9/site-packages/conda/core/index.py", line 288, in get_reduced_index
    new_records = SubdirData.query_all(spec, channels=channels, subdirs=subdirs,
  File "/Users/jbl/miniconda3/lib/python3.9/site-packages/conda/core/subdir_data.py", line 140, in query_all
    result = tuple(concat(executor.map(subdir_query, channel_urls)))
  File "/Users/jbl/miniconda3/lib/python3.9/concurrent/futures/_base.py", line 608, in result_iterator
    yield fs.pop().result()
  File "/Users/jbl/miniconda3/lib/python3.9/concurrent/futures/_base.py", line 445, in result
    return self.__get_result()
  File "/Users/jbl/miniconda3/lib/python3.9/concurrent/futures/_base.py", line 390, in __get_result
    raise self._exception
  File "/Users/jbl/miniconda3/lib/python3.9/concurrent/futures/thread.py", line 52, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/Users/jbl/miniconda3/lib/python3.9/site-packages/conda/core/subdir_data.py", line 132, in <lambda>
    subdir_query = lambda url: tuple(SubdirData(Channel(url), repodata_fn=repodata_fn).query(
  File "/Users/jbl/miniconda3/lib/python3.9/site-packages/conda/core/subdir_data.py", line 145, in query
    self.load()
  File "/Users/jbl/miniconda3/lib/python3.9/site-packages/conda/core/subdir_data.py", line 210, in load
    _internal_state = self._load()
  File "/Users/jbl/miniconda3/lib/python3.9/site-packages/conda/core/subdir_data.py", line 375, in _load
    raw_repodata_str = fetch_repodata_remote_request(
  File "/Users/jbl/miniconda3/lib/python3.9/site-packages/conda/core/subdir_data.py", line 701, in fetch_repodata_remote_request
    resp = session.get(join_url(url, filename), headers=headers, proxies=session.proxies,
  File "/Users/jbl/miniconda3/lib/python3.9/site-packages/requests/sessions.py", line 555, in get
    return self.request('GET', url, **kwargs)
  File "/Users/jbl/miniconda3/lib/python3.9/site-packages/requests/sessions.py", line 542, in request
    resp = self.send(prep, **send_kwargs)
  File "/Users/jbl/miniconda3/lib/python3.9/site-packages/requests/sessions.py", line 697, in send
    r.content
  File "/Users/jbl/miniconda3/lib/python3.9/site-packages/requests/models.py", line 831, in content
    self._content = b''.join(self.iter_content(CONTENT_CHUNK_SIZE)) or b''
  File "/Users/jbl/miniconda3/lib/python3.9/site-packages/requests/models.py", line 756, in generate
    raise ChunkedEncodingError(e)
requests.exceptions.ChunkedEncodingError: ("Connection broken: ConnectionResetError(54, 'Connection reset by peer')", ConnectionResetError(54, 'Connection reset by peer'))

$ /Users/jbl/miniconda3/bin/conda install -c bioconda coverm environment variables: CIO_TEST= CONDA_BACKUP_JAVA_HOME=:- CONDA_BACKUP_JAVA_LD_LIBRARY_PATH=:- CONDA_DEFAULT_ENV=mag_tools CONDA_EXE=/Users/jbl/miniconda3/bin/conda CONDA_PREFIX=/Users/jbl/miniconda3/envs/mag_tools CONDA_PREFIX_1=/Users/jbl/opt/miniconda3 CONDA_PREFIX_2=/Users/jbl/miniconda3 CONDA_PROMPT_MODIFIER=(mag_tools) CONDA_PYTHON_EXE=/Users/jbl/miniconda3/bin/python CONDA_ROOT=/Users/jbl/miniconda3 CONDA_SHLVL=3 CURL_CA_BUNDLE= JAVA_LD_LIBRARY_PATH=/Users/jbl/miniconda3/envs/mag_tools/lib/server PATH=/Users/jbl/miniconda3/bin:/Users/jbl/miniconda3/envs/mag_tools/bin:/Us ers/jbl/Desktop/canu-1.9/Darwin-amd64/bin:/Users/jbl/miniconda3/envs/m ag_tools/bin:/Users/jbl/opt/miniconda3/condabin:/Library/Frameworks/Py thon.framework/Versions/3.8/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin :/sbin:/opt/X11/bin:/Users/jbl/local/bin/coverm-x86_64-unknown-linux- musl-0.6.1 REQUESTS_CA_BUNDLE= SSL_CERT_FILE=

 active environment : mag_tools
active env location : /Users/jbl/miniconda3/envs/mag_tools
        shell level : 3
   user config file : /Users/jbl/.condarc

populated config files : /Users/jbl/.condarc conda version : 4.10.3 conda-build version : not installed python version : 3.9.5.final.0 virtual packages : osx=10.14.6=0 unix=0=0 __archspec=1=x86_64 base environment : /Users/jbl/miniconda3 (writable) conda av data dir : /Users/jbl/miniconda3/etc/conda conda av metadata url : None channel URLs : https://conda.anaconda.org/bioconda/osx-64 https://conda.anaconda.org/bioconda/noarch https://conda.anaconda.org/conda-forge/osx-64 https://conda.anaconda.org/conda-forge/noarch https://repo.anaconda.com/pkgs/main/osx-64 https://repo.anaconda.com/pkgs/main/noarch https://repo.anaconda.com/pkgs/r/osx-64 https://repo.anaconda.com/pkgs/r/noarch package cache : /Users/jbl/miniconda3/pkgs /Users/jbl/.conda/pkgs envs directories : /Users/jbl/miniconda3/envs /Users/jbl/.conda/envs platform : osx-64 user-agent : conda/4.10.3 requests/2.25.1 CPython/3.9.5 Darwin/18.7.0 OSX/10.14.6 UID:GID : 502:20 netrc file : None offline mode : False

An unexpected error has occurred. Conda has prepared the above report.

jianshu93 commented 1 year ago

Dear Maggie,

I have being using MacOS version of CoverM. By default, it iss not supported/tested on MacOS via conda. You have to compile from source yourself. You need to install Rust first and then clone the repo to compile yourself. Other dependencies such as bwa samtools and fastANI should also be installed. Ben correct me if something is not clear.

Jianshu

maggieweng commented 1 year ago

Thanks so much for your help! Did it used to be supported on MacOS? I was able to compile from source though, so it is working now.

On Fri, Jul 8, 2022 at 12:22 PM Jianshu_Zhao @.***> wrote:

Dear Maggie,

I have being using MacOS version of CoverM. By default, it iss not supported/tested on MacOS via conda. You have to compile from source yourself. You need to install Rust first and then clone the repo to compile yourself. Other dependencies such as bwa samtools and fastANI should also be installed. Ben correct me if something is not clear.

Jianshu

— Reply to this email directly, view it on GitHub https://github.com/wwood/CoverM/issues/123#issuecomment-1179165311, or unsubscribe https://github.com/notifications/unsubscribe-auth/AUWUGN4GCH646KF5UYQS7UDVTBIUJANCNFSM53BG444Q . You are receiving this because you authored the thread.Message ID: @.***>

wwood commented 1 year ago

Hi both, yes that's right it should work on OSX but I haven't tested specficially. If you compile from source and then run cargo test that should allay most fears.

I've attempted to run the CI on macosx now that GitHub actions seems to support this - will see how it goes.

wwood commented 1 year ago

The CI now works on OSX, so I'm going to close this. On the conda side, I guess an osx package can be made that is the same sans bwa_mem2 (when the next version of coverm is released).

For anyone that gets here before then, in order to get it to work on osx you have to download from source, use the coverm-osx.yml environment file to create the conda env, and then it should work except for bwa_mem2-based mapping.

Thanks, ben

jianshu93 commented 1 year ago

Hello Ben,

Thanks for the update and yes next release when both bwa mem and mem2 are supported, a conda package for macOS can be made and added to the anaconda coverm website for those want want to use it on macOS via conda.

Jianshu