Fail to set up conda environment for GATK with the gatkcondaenv.yml file
I cannot successfully create the conda environment the following command `conda env create -n gatk -f gatkcondaenv.yml`, and have no idea how to fix it. Is there any solution to this problem?
Thank you very much
a) GATK version used
The Genome Analysis Toolkit (GATK) v4.1.4.1
HTSJDK Version: 2.21.0
Picard Version: 2.21.2
b) Exact GATK commands used
conda env create -n gatk -f gatkcondaenv.yml
c) The entire error log if applicable.
conda env create -n gatk -f gatkcondaenv.yml
Collecting package metadata (repodata.json): failed
# >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<<
Traceback (most recent call last):
File "/Users/fanwei/anaconda3/lib/python3.7/site-packages/urllib3/response.py", line 685, in _update_chunk_length
self.chunk_left = int(line, 16)
ValueError: invalid literal for int() with base 16: b''
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/fanwei/anaconda3/lib/python3.7/site-packages/urllib3/response.py", line 425, in _error_catcher
yield
File "/Users/fanwei/anaconda3/lib/python3.7/site-packages/urllib3/response.py", line 752, in read_chunked
self._update_chunk_length()
File "/Users/fanwei/anaconda3/lib/python3.7/site-packages/urllib3/response.py", line 689, in _update_chunk_length
raise httplib.IncompleteRead(line)
http.client.IncompleteRead: IncompleteRead(0 bytes read)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/fanwei/anaconda3/lib/python3.7/site-packages/requests/models.py", line 750, in generate
for chunk in self.raw.stream(chunk_size, decode_content=True):
File "/Users/fanwei/anaconda3/lib/python3.7/site-packages/urllib3/response.py", line 560, in stream
for line in self.read_chunked(amt, decode_content=decode_content):
File "/Users/fanwei/anaconda3/lib/python3.7/site-packages/urllib3/response.py", line 781, in read_chunked
self._original_response.close()
File "/Users/fanwei/anaconda3/lib/python3.7/contextlib.py", line 130, in __exit__
self.gen.throw(type, value, traceback)
File "/Users/fanwei/anaconda3/lib/python3.7/site-packages/urllib3/response.py", line 443, in _error_catcher
raise ProtocolError("Connection broken: %r" % e, e)
urllib3.exceptions.ProtocolError: ('Connection broken: IncompleteRead(0 bytes read)', IncompleteRead(0 bytes read))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/fanwei/anaconda3/lib/python3.7/site-packages/conda/exceptions.py", line 1079, in __call__
return func(*args, **kwargs)
File "/Users/fanwei/anaconda3/lib/python3.7/site-packages/conda_env/cli/main.py", line 80, in do_call
exit_code = getattr(module, func_name)(args, parser)
File "/Users/fanwei/anaconda3/lib/python3.7/site-packages/conda_env/cli/main_create.py", line 111, in execute
result[installer_type] = installer.install(prefix, pkg_specs, args, env)
File "/Users/fanwei/anaconda3/lib/python3.7/site-packages/conda_env/installers/conda.py", line 32, in install
prune=getattr(args, 'prune', False), update_modifier=UpdateModifier.FREEZE_INSTALLED)
File "/Users/fanwei/anaconda3/lib/python3.7/site-packages/conda/core/solve.py", line 117, in solve_for_transaction
should_retry_solve)
File "/Users/fanwei/anaconda3/lib/python3.7/site-packages/conda/core/solve.py", line 158, in solve_for_diff
force_remove, should_retry_solve)
File "/Users/fanwei/anaconda3/lib/python3.7/site-packages/conda/core/solve.py", line 262, in solve_final_state
ssc = self._collect_all_metadata(ssc)
File "/Users/fanwei/anaconda3/lib/python3.7/site-packages/conda/common/io.py", line 88, in decorated
return f(*args, **kwds)
File "/Users/fanwei/anaconda3/lib/python3.7/site-packages/conda/core/solve.py", line 415, in _collect_all_metadata
index, r = self._prepare(prepared_specs)
File "/Users/fanwei/anaconda3/lib/python3.7/site-packages/conda/core/solve.py", line 1011, in _prepare
self.subdirs, prepared_specs, self._repodata_fn)
File "/Users/fanwei/anaconda3/lib/python3.7/site-packages/conda/core/index.py", line 228, in get_reduced_index
repodata_fn=repodata_fn)
File "/Users/fanwei/anaconda3/lib/python3.7/site-packages/conda/core/subdir_data.py", line 105, in query_all
result = tuple(concat(executor.map(subdir_query, channel_urls)))
File "/Users/fanwei/anaconda3/lib/python3.7/concurrent/futures/_base.py", line 598, in result_iterator
yield fs.pop().result()
File "/Users/fanwei/anaconda3/lib/python3.7/concurrent/futures/_base.py", line 435, in result
return self.__get_result()
File "/Users/fanwei/anaconda3/lib/python3.7/concurrent/futures/_base.py", line 384, in __get_result
raise self._exception
File "/Users/fanwei/anaconda3/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/Users/fanwei/anaconda3/lib/python3.7/site-packages/conda/core/subdir_data.py", line 98, in <lambda>
package_ref_or_match_spec))
File "/Users/fanwei/anaconda3/lib/python3.7/site-packages/conda/core/subdir_data.py", line 110, in query
self.load()
File "/Users/fanwei/anaconda3/lib/python3.7/site-packages/conda/core/subdir_data.py", line 174, in load
_internal_state = self._load()
File "/Users/fanwei/anaconda3/lib/python3.7/site-packages/conda/core/subdir_data.py", line 248, in _load
repodata_fn=self.repodata_fn)
File "/Users/fanwei/anaconda3/lib/python3.7/site-packages/conda/core/subdir_data.py", line 485, in fetch_repodata_remote_request
timeout=timeout)
File "/Users/fanwei/anaconda3/lib/python3.7/site-packages/requests/sessions.py", line 546, in get
return self.request('GET', url, **kwargs)
File "/Users/fanwei/anaconda3/lib/python3.7/site-packages/requests/sessions.py", line 533, in request
resp = self.send(prep, **send_kwargs)
File "/Users/fanwei/anaconda3/lib/python3.7/site-packages/requests/sessions.py", line 686, in send
r.content
File "/Users/fanwei/anaconda3/lib/python3.7/site-packages/requests/models.py", line 828, in content
self._content = b''.join(self.iter_content(CONTENT_CHUNK_SIZE)) or b''
File "/Users/fanwei/anaconda3/lib/python3.7/site-packages/requests/models.py", line 753, in generate
raise ChunkedEncodingError(e)
requests.exceptions.ChunkedEncodingError: ('Connection broken: IncompleteRead(0 bytes read)', IncompleteRead(0 bytes read))
-
Hi fanwayne , I will see if I can recreate this. Did you follow these instructions?
-
Hi Tiffany, many thanks for your support. I think I have just fixed this issue. This may be a connecting issue. I added severall alternative channels to the file .condarc and changed the mirror for pip command. The gatk envrionment was successfully created after I retried several times of the command "conda env create -n gatk -f gatkcondaenv.yml".
The bottom of the log showed the following text and I can activate the gatk through conda now. Thank you.
#
# To activate this environment, use
#
# $ conda activate gatk
#
# To deactivate an active environment, use
#
# $ conda deactivate -
Hi fanwayne,
Would you please share the channels that you used and how exactly you did that?
Many thanks in advance
Nawar
-
Hi NawarDalila. I'm not sure whether the following channels would work in countries other than China.
Below are the details in my .condarc under the home path.
auto_activate_base: false
ssl_verify: true
channels:
- conda-forge
- bioconda
- defaults
- https://mirrors.ustc.edu.cn/anaconda/pkgs/main/
- https://mirrors.ustc.edu.cn/anaconda/pkgs/free/
- https://mirrors.ustc.edu.cn/anaconda/cloud/conda-forge/
show_channel_urls: trueI also changed the pip mirror with the following commands.
mkdir ~/.pip
vim ~/.pip/pip.conf
[global]
index-url = https://mirrors.cloud.tencent.com/pypi/simpleBy the way, I changed "- anaconda::tensorflow=1.12.0=mkl_py36h69b6ba0_0" with
"- anaconda::tensorflow=1.12.0=mkl_py36h2b2bbaf_0" in the gatkcondaenv.yml file. -
Thank you very much for sharing. I will try and see what happens.
Please sign in to leave a comment.
5 comments