DRAM
DRAM copied to clipboard
DRAM 1.5.0 installation issues
Hi, I've recently installed DRAM 1.5.0. using
wget https://raw.githubusercontent.com/WrightonLabCSU/DRAM/master/environment.yaml
conda env create -f environment.yaml -n DRAM
When I started DRAM-setup.py prepare_databases --output_dir DRAM_data --uniref_loc uniref90.fasta.gz
I had this error:
File "/home/karenhn/.conda/envs/DRAM/bin/DRAM-setup.py", line 124 set_db_locs_parser.add_argument('--camper_tar_gz_loc', default=None, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ SyntaxError: invalid syntax. Perhaps you forgot a comma?
I found in the script for DRAM-setup.py there's two lines which have been transposed [there are two help=mmseqs2... lines following each other, and one should be after the --viral_loc line]. Once I fixed that, I ran the script again but got a different error:
Traceback (most recent call last): File "/home/karenhn/.conda/envs/DRAM/bin/DRAM-setup.py", line 187, in <module> args.func(**args_dict) File "/home/karenhn/.conda/envs/DRAM/lib/python3.10/site-packages/mag_annotator/database_processing.py", line 5 31, in prepare_databases db_handler = DatabaseHandler(logger=LOGGER) File "/home/karenhn/.conda/envs/DRAM/lib/python3.10/site-packages/mag_annotator/database_handler.py", line 77, in __init__ self.load_config(config_loc) File "/home/karenhn/.conda/envs/DRAM/lib/python3.10/site-packages/mag_annotator/database_handler.py", line 82, in load_config conf = json.loads(open(config_file).read()) File "/home/karenhn/.conda/envs/DRAM/lib/python3.10/json/__init__.py", line 346, in loads return _default_decoder.decode(s) File "/home/karenhn/.conda/envs/DRAM/lib/python3.10/json/decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/home/karenhn/.conda/envs/DRAM/lib/python3.10/json/decoder.py", line 355, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
I have no idea what this means! The database_files and the database_processing.log are empty, and I tried
DRAM-setup.py export_config --output_file fix_me.txt
but that file is empty too.
Am I missing something obvious? Any help would be appreciated.
I ran to same issue. Apparently, DRAM-setup.py lines 123-127 were broken (release v1.5.0):
https://github.com/WrightonLabCSU/DRAM/blob/7735a04e58c300d53f9d3611a583b48e507bb843/scripts/DRAM-setup.py#L123C5-L127C101
set_db_locs_parser.add_argument('--viral_loc', default=None,
set_db_locs_parser.add_argument('--camper_tar_gz_loc', default=None,
help='The source for the CAMPER database files, this is a tar.gz file downloaded'
' from the release page https://github.com/WrightonLabCSU/CAMPER/releases')
help='mmseqs2 database file from ref seq viral gene collection')
this typo is fixed now with 9ff00c9933723e6d628362b35d486f6dc68709f9, if you install from master.
Thanks DRAM developers!
@tpall Did you have the same issue with the json.decoder bit too?
@tpall Did you have the same issue with the json.decoder bit too?
No, after installing development version from Github, DRAM-setup.py script runs alright.
I modified the last line of the environment.yaml file to install from Github.
channels:
- conda-forge
- bioconda
dependencies:
- python=3.10
- pandas=1.5.2
- pytest=7.2.0
- scikit-bio=0.5.7
- prodigal=2.6.3
- mmseqs2==13.45111
- hmmer=3.3.2
- trnascan-se=2.0.11
- scipy=1.8.1
- sqlalchemy=1.4.46
- barrnap=0.9
- altair=4.2.0
- openpyxl=3.0.10
- networkx=2.8.8
- ruby=3.1.2
- parallel=20221122
- pip
- pip:
- git+https://github.com/WrightonLabCSU/DRAM.git
I ran into this same issue. But when I tired manually editing the last line of the environment.yaml file, and re-installing with conda, I ended up with the following error message:
>>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<<
Traceback (most recent call last):
File "/datastore/tools/miniforge/lib/python3.10/site-packages/conda/exceptions.py", line 1132, in __call__
return func(*args, **kwargs)
File "/datastore/tools/miniforge/lib/python3.10/site-packages/conda_env/cli/main.py", line 78, in do_call
exit_code = getattr(module, func_name)(args, parser)
File "/datastore/tools/miniforge/lib/python3.10/site-packages/conda/notices/core.py", line 121, in wrapper
return func(*args, **kwargs)
File "/datastore/tools/miniforge/lib/python3.10/site-packages/conda_env/cli/main_create.py", line 97, in execute
spec = specs.detect(
File "/datastore/tools/miniforge/lib/python3.10/site-packages/conda_env/specs/__init__.py", line 68, in detect
if spec.can_handle():
File "/datastore/tools/miniforge/lib/python3.10/site-packages/conda_env/specs/yaml_file.py", line 18, in can_handle
self._environment = env.from_file(self.filename)
File "/datastore/tools/miniforge/lib/python3.10/site-packages/conda_env/env.py", line 171, in from_file
return from_yaml(yamlstr, filename=filename)
File "/datastore/tools/miniforge/lib/python3.10/site-packages/conda_env/env.py", line 140, in from_yaml
data = yaml_safe_load(yamlstr)
File "/datastore/tools/miniforge/lib/python3.10/site-packages/conda/common/serialize.py", line 51, in yaml_safe_load
return _yaml_safe().load(string)
File "/datastore/tools/miniforge/lib/python3.10/site-packages/ruamel/yaml/main.py", line 426, in load
return constructor.get_single_data()
File "/datastore/tools/miniforge/lib/python3.10/site-packages/ruamel/yaml/constructor.py", line 111, in get_single_data
node = self.composer.get_single_node()
File "/datastore/tools/miniforge/lib/python3.10/site-packages/ruamel/yaml/composer.py", line 70, in get_single_node
document = self.compose_document()
File "/datastore/tools/miniforge/lib/python3.10/site-packages/ruamel/yaml/composer.py", line 92, in compose_document
node = self.compose_node(None, None)
File "/datastore/tools/miniforge/lib/python3.10/site-packages/ruamel/yaml/composer.py", line 128, in compose_node
node = self.compose_mapping_node(anchor)
File "/datastore/tools/miniforge/lib/python3.10/site-packages/ruamel/yaml/composer.py", line 209, in compose_mapping_node
item_value = self.compose_node(node, item_key)
File "/datastore/tools/miniforge/lib/python3.10/site-packages/ruamel/yaml/composer.py", line 126, in compose_node
node = self.compose_sequence_node(anchor)
File "/datastore/tools/miniforge/lib/python3.10/site-packages/ruamel/yaml/composer.py", line 171, in compose_sequence_node
node.value.append(self.compose_node(node, index))
File "/datastore/tools/miniforge/lib/python3.10/site-packages/ruamel/yaml/composer.py", line 128, in compose_node
node = self.compose_mapping_node(anchor)
File "/datastore/tools/miniforge/lib/python3.10/site-packages/ruamel/yaml/composer.py", line 209, in compose_mapping_node
item_value = self.compose_node(node, item_key)
File "/datastore/tools/miniforge/lib/python3.10/site-packages/ruamel/yaml/composer.py", line 126, in compose_node
node = self.compose_sequence_node(anchor)
File "/datastore/tools/miniforge/lib/python3.10/site-packages/ruamel/yaml/composer.py", line 170, in compose_sequence_node
while not self.parser.check_event(SequenceEndEvent):
File "/datastore/tools/miniforge/lib/python3.10/site-packages/ruamel/yaml/parser.py", line 139, in check_event
self.current_event = self.state()
File "/datastore/tools/miniforge/lib/python3.10/site-packages/ruamel/yaml/parser.py", line 558, in parse_indentless_sequence_entry
if not self.scanner.check_token(
File "/datastore/tools/miniforge/lib/python3.10/site-packages/ruamel/yaml/scanner.py", line 168, in check_token
self.fetch_more_tokens()
File "/datastore/tools/miniforge/lib/python3.10/site-packages/ruamel/yaml/scanner.py", line 311, in fetch_more_tokens
raise ScannerError(
ruamel.yaml.scanner.ScannerError: while scanning for the next token
found character '\t' that cannot start any token
in "<unicode string>", line 23, column 53:
... thub.com/WrightonLabCSU/DRAM.git
^ (line: 23)
$ /datastore/tools/miniforge/bin/conda-env create --prefix /datastore/tools/gregoire/envs/DRAM -f environment.yaml
environment variables:
CIO_TEST=
active environment : None
shell level : 0
user config file : /files/home/dgregoire/.condarc
populated config files : /datastore/tools/miniforge/.condarc /files/home/dgregoire/.condarc conda version : 23.3.1 conda-build version : not installed python version : 3.10.12.final.0 virtual packages : __archspec=1=x86_64 __glibc=2.28=0 __linux=4.18.0=0 __unix=0=0 base environment : /datastore/tools/miniforge (read only) conda av data dir : /datastore/tools/miniforge/etc/conda conda av metadata url : None channel URLs : https://conda.anaconda.org/conda-forge/linux-64 https://conda.anaconda.org/conda-forge/noarch https://conda.anaconda.org/bioconda/linux-64 https://conda.anaconda.org/bioconda/noarch https://repo.anaconda.com/pkgs/main/linux-64 https://repo.anaconda.com/pkgs/main/noarch https://repo.anaconda.com/pkgs/r/linux-64 https://repo.anaconda.com/pkgs/r/noarch package cache : /datastore/tools/miniforge/pkgs /files/home/dgregoire/.conda/pkgs envs directories : /datastore/tools/anaconda3/envs /datastore/tools/gregoire/envs /files/home/dgregoire/.conda/envs /datastore/tools/miniforge/envs platform : linux-64 user-agent : conda/23.3.1 requests/2.31.0 CPython/3.10.12 Linux/4.18.0-425.13.1.el8_7.x86_64 almalinux/8.7 glibc/2.28 UID:GID : 3000:3000 netrc file : None offline mode : False
An unexpected error has occurred. Conda has prepared the above report.
If submitted, this report will be used by core maintainers to improve future releases of conda. Would you like conda to send this report to the core maintainers? [y/N]: n
No report sent. To permanently opt-out, use
$ conda config --set report_errors false
I ended up using the edit provided by @tpall in the environment.yaml, but I could not verify manually in the DRAM-setup.py whether the change took effect. Following the error above for conda, I tried re-creating the environment using mamba and it seems to have fixed the issue and I am setting up the databases from scratch just to make sure the entire setupworkflow is still proceeding.
Thank you for choosing to use DRAM. Unfortunately, at this time, we do not have the capacity to provide support for DRAM. We appreciate your understanding and encourage you to stay tuned for the release of DRAM2, expected in 2025.
Best regards, DRAM dev team