allind / EukDetect

MIT License
40 stars 15 forks source link

FileNotFoundError: [Errno 2] No such file or directory: \'snakemake\'\n' #30

Closed shibataryohei closed 1 year ago

shibataryohei commented 1 year ago

Hi @allind,

Thank you very much for the excellent pipeline! I'm new to EukDetect.

When I run python tests/test_eukdetect.py, I can't solve an error message FileNotFoundError: [Errno 2] No such file or directory: \'snakemake\'\n'. I guess this is because of some errors in my path in .yml file. I've pasted the code below and would appreciate it if you advise me to fix it.

My environments are macOS Monterey ver 12.0.1, MacBook Pro (2021), and Apple M1 Pro.

This screenshot indicates my /Users/shibataryohei/Git/EukDetect directory. Screen Shot 2022-11-01 at 16 48 46

eukdetect_dir: "/Users/shibataryohei/Git/EukDetect"
output_dir: "tests" #directory where output should be written

paired_end: true #true or false

fwd_suffix: "_R1.fastq.gz" #filename excluding sample name. no need to edit if paired_end= false
rev_suffix: "_R2.fastq.gz" #filename excludign sample name. no need to edit if paired_end = false
se_suffix: ".fastq.gz" #file name excluding sample name. no need to edit if paired_end = true
readlen: 125 #targeted length of your reads. pre-trimming reads not recommended

fq_dir: "/Users/shibataryohei/Git/EukDetect/tests" #full path to directory with raw fastq files
database_dir: "/Users/shibataryohei/Git/EukDetect/eukdb" #full path to folder with all eukdetect_db files and taxa.sqlite files
database_prefix: "ncbi_eukprot_met_arch_markers.fna" #database prefix

samples: #list sample names here. fastqs must correspond to {samplename}{se_suffix} for SE reads or {samplename}{fwd_suffix} and {samplename}{rev_suffix} for PE
  test:

Thanks, Rio

allind commented 1 year ago

Hi Rio,

Thanks for reaching out. I wonder if something went awry with installation and snakemake didn't install properly. If you run "which snakemake" from within the eukdetect environment, do you get a file path? Could you also past the entire error message that you're getting?

Thanks, Abigail

shibataryohei commented 1 year ago

Hi Abigail,

Thank you very much for your kind and rapid instruction! As you told me, snakemake was not installed in my environment and, after the installation, I got the new error, pasted below.

(snakemake) shibataryohei@ryoheis-mbp-2 EukDetect % python tests/test_eukdetect.py
EEEE.
======================================================================
ERROR: test_class (__main__._01_HelpText)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/shibataryohei/Git/EukDetect/tests/test_eukdetect.py", line 18, in test_class
    code, stdout, stderr = run(command)
  File "/Users/shibataryohei/Git/EukDetect/tests/test_eukdetect.py", line 11, in run
    process = subprocess.run(shlex.split(command), stdout=subprocess.PIPE, stderr=subprocess.PIPE)
  File "/opt/miniconda3/envs/snakemake/lib/python3.10/subprocess.py", line 501, in run
    with Popen(*popenargs, **kwargs) as process:
  File "/opt/miniconda3/envs/snakemake/lib/python3.10/subprocess.py", line 969, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/opt/miniconda3/envs/snakemake/lib/python3.10/subprocess.py", line 1845, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'eukdetect'

======================================================================
ERROR: test_class (__main__._02_RunRunall)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/shibataryohei/Git/EukDetect/tests/test_eukdetect.py", line 25, in test_class
    code, stdout, stderr = run(command)
  File "/Users/shibataryohei/Git/EukDetect/tests/test_eukdetect.py", line 11, in run
    process = subprocess.run(shlex.split(command), stdout=subprocess.PIPE, stderr=subprocess.PIPE)
  File "/opt/miniconda3/envs/snakemake/lib/python3.10/subprocess.py", line 501, in run
    with Popen(*popenargs, **kwargs) as process:
  File "/opt/miniconda3/envs/snakemake/lib/python3.10/subprocess.py", line 969, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/opt/miniconda3/envs/snakemake/lib/python3.10/subprocess.py", line 1845, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'eukdetect'

======================================================================
ERROR: test_class (__main__._03_RunAlnCmd)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/shibataryohei/Git/EukDetect/tests/test_eukdetect.py", line 32, in test_class
    code, stdout, stderr = run(command)
  File "/Users/shibataryohei/Git/EukDetect/tests/test_eukdetect.py", line 11, in run
    process = subprocess.run(shlex.split(command), stdout=subprocess.PIPE, stderr=subprocess.PIPE)
  File "/opt/miniconda3/envs/snakemake/lib/python3.10/subprocess.py", line 501, in run
    with Popen(*popenargs, **kwargs) as process:
  File "/opt/miniconda3/envs/snakemake/lib/python3.10/subprocess.py", line 969, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/opt/miniconda3/envs/snakemake/lib/python3.10/subprocess.py", line 1845, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'eukdetect'

======================================================================
ERROR: test_class (__main__._04_RunAln_and_filter)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/shibataryohei/Git/EukDetect/tests/test_eukdetect.py", line 40, in test_class
    alncode, alnstdout, alnstderr = run(command)
  File "/Users/shibataryohei/Git/EukDetect/tests/test_eukdetect.py", line 11, in run
    process = subprocess.run(shlex.split(command), stdout=subprocess.PIPE, stderr=subprocess.PIPE)
  File "/opt/miniconda3/envs/snakemake/lib/python3.10/subprocess.py", line 501, in run
    with Popen(*popenargs, **kwargs) as process:
  File "/opt/miniconda3/envs/snakemake/lib/python3.10/subprocess.py", line 969, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/opt/miniconda3/envs/snakemake/lib/python3.10/subprocess.py", line 1845, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'eukdetect'

----------------------------------------------------------------------
Ran 5 tests in 0.007s

FAILED (errors=4)

This must be the error in a path to eukdetect in .yml file attached to the my previous post. In eukdetect_dir:, full path should be placed?

eukdetect_dir: "/Users/shibataryohei/Git/EukDetect"

Look forward to your feedback.

Thanks!! Rio

allind commented 1 year ago

Hi Rio,

I just want to double check with you - have you followed all the setup instructions on the EukDetect installation portion of the readme? That includes everything in the section under "Create conda environment and install EukDetect".

Abigail

shibataryohei commented 1 year ago

Hi Abigail,

Thanks, I've checked again my codes and found some problems in Run of "Create conda environment and install EukDetect". Please let me confirm them.

conda env update --name eukdetect -f environment.yml
conda activate eukdetect
# install eukdetect
python setup.py install

First, which directory should I run these codes in? Following the former codes, the directory should be Git/EukDetect/eukdb but there are not eukdetect and environment.yml. Therefore, I ran conda env update --name eukdetect -f environment.yml in Git/EukDetect. Then I got the error message below.

Collecting package metadata (repodata.json): done
Solving environment: failed

ResolvePackageNotFound: 
  - pynacl==1.3.0=py36h516909a_1001

I did not aware these are the error messages, sorry. (I would appreciate it if you put some short warning comments in the final line.)

I'm not familiar with conda, sorry for these elementary questions.

Thanks! Rio

allind commented 1 year ago

Hi Rio,

Thanks for bringing to my attention that this instruction wasn't clear. I've added some clarification to the readme.

I tried in a few different settings to replicate your error with the conda eukdetect environment installation, but haven't been successful. I think there may be an issue with your conda installation. Is this the first time you've worked with conda? You may benefit from a fresh installation of miniconda (https://docs.conda.io/en/latest/miniconda.html). Please let me know how this works for you.

Abigail

shibataryohei commented 1 year ago

Hi Abigail,

Thank you very much. I had used conda (anaconda3 and miniconda3 were installed), so uninstalled them and re-install only miniconda3 following the instruction in the conda website. And I tried "conda env update --name eukdetect -f environment.ym" but failed after about a minute of run time. All of the error messages are below.

base) shibataryohei@ryoheis-mbp-2 EukDetect % conda env update --name eukdetect -f environment.yml
Collecting package metadata (repodata.json): done
Solving environment: failed

ResolvePackageNotFound: 
  - python==3.6.10=h8356626_1011_cpython
  - msgpack-python==1.0.0=py36hdb11119_1
  - bowtie2==2.4.1=py36h7f0b59b_2
  - libgcc-ng==9.2.0=h24d8f2e_2
  - pandas==0.24.2=py36hf484d3e_0
  - libxml2==2.9.10=hee79883_0
  - openssl==1.1.1g=h516909a_0
  - tk==8.6.10=hed695b0_0
  - pthread-stubs==0.4=h14c3975_1001
  - datrie==0.8.2=py36h8c4c3a4_0
  - numpy==1.12.1=py36_blas_openblash1522bff_1001
  - xorg-renderproto==0.11.1=h14c3975_1002
  - pyqt==5.12.3=py36haa643ae_3
  - libtiff==4.1.0=hc7e4089_6
  - libpng==1.6.37=hed695b0_1
  - krb5==1.17.1=hfafb76e_1
  - libxslt==1.1.33=h31b3aaa_0
  - xorg-xproto==7.0.31=h14c3975_1007
  - yaml==0.2.5=h516909a_0
  - graphviz==2.38.0=hf68f40c_1011
  - xorg-libsm==1.2.3=h84519dc_1000
  - xorg-xextproto==7.3.0=h14c3975_1002
  - freetype==2.10.2=he06d7ca_0
  - pango==1.40.14=he7ab937_1005
  - graphite2==1.3.13=he1b5a44_1001
  - perl==5.26.2=h516909a_1006
  - gstreamer==1.14.5=h36ae1b5_2
  - ld_impl_linux-64==2.34=h53a641e_7
  - xorg-libxrender==0.9.10=h516909a_1002
  - pillow==7.2.0=py36h8328e55_1
  - bzip2==1.0.8=h516909a_2
  - lz4-c==1.9.2=he1b5a44_1
  - gettext==0.19.8.1=hc5be6a0_1002
  - xorg-libice==1.0.10=h516909a_0
  - brotlipy==0.7.0=py36h8c4c3a4_1000
  - wrapt==1.12.1=py36h8c4c3a4_1
  - expat==2.2.9=he1b5a44_2
  - libprotobuf==3.12.3=h8b12597_1
  - fontconfig==2.13.1=h86ecdb6_1001
  - readline==8.0=h46ee950_1
  - markupsafe==1.1.1=py36h8c4c3a4_1
  - xorg-libxext==1.3.4=h516909a_0
  - libllvm9==9.0.1=he513fc3_1
  - libwebp-base==1.1.0=h516909a_3
  - ncurses==6.1=hf484d3e_1002
  - libcurl==7.71.1=hcdd3856_1
  - samtools==1.10=h9402c20_2
  - _libgcc_mutex==0.1=conda_forge
  - nspr==4.26=he1b5a44_0
  - tbb==2020.1=hc9558a2_0
  - libiconv==1.15=h516909a_1006
  - libgomp==9.2.0=h24d8f2e_2
  - xorg-libxau==1.0.9=h14c3975_0
  - cffi==1.14.0=py36hd463f26_0
  - cairo==1.16.0=hcf35c78_1003
  - pyrsistent==0.16.0=py36h8c4c3a4_0
  - pixman==0.38.0=h516909a_1003
  - xorg-libx11==1.6.9=h516909a_0
  - libedit==3.1.20191231=h46ee950_1
  - htslib==1.10.2=hd3b49d5_1
  - _openmp_mutex==4.5=0_gnu
  - jpeg==9d=h516909a_0
  - komplexity==0.3.6=musl
  - yarl==1.4.2=py36h516909a_0
  - libxkbcommon==0.10.0=he1b5a44_0
  - zstd==1.4.4=h6597ccf_3
  - xorg-libxpm==3.5.13=h516909a_0
  - libxcb==1.13=h14c3975_1002
  - pynacl==1.3.0=py36h516909a_1001
  - aiohttp==3.6.2=py36h516909a_0
  - cryptography==2.9.2=py36h45558ae_0
  - lxml==4.5.2=py36h17c4326_0
  - lcms2==2.11=hbd6801e_0
  - xz==5.2.5=h516909a_1
  - dbus==1.13.6=he372182_0
  - pygraphviz==1.5=py36h8c4c3a4_1002
  - xorg-libxdmcp==1.1.3=h516909a_0
  - sqlite==3.32.3=hcee41ef_1
  - pysam==0.16.0.1=py36h4c34d4e_1
  - xorg-libxt==1.1.5=h516909a_1003
  - libclang==9.0.1=default_hde54327_0
  - libdeflate==1.6=h516909a_0
  - scipy==1.2.1=py36_blas_openblash1522bff_0
  - icu==64.2=he1b5a44_1
  - openblas==0.3.3=h9ac9557_1001
  - pyyaml==5.3.1=py36h8c4c3a4_0
  - libuuid==2.32.1=h14c3975_1000
  - nss==3.47=he751ad9_0
  - protobuf==3.12.3=py36h831f99a_0
  - libstdcxx-ng==9.2.0=hdf63c60_2
  - harfbuzz==2.4.0=h9f30f68_3
  - multidict==4.7.5=py36h8c4c3a4_1
  - bcrypt==3.1.7=py36h8c4c3a4_1
  - gst-plugins-base==1.14.5=h0935bb2_2
  - bedtools==2.29.2=hc088bd4_0
  - pcre==8.44=he1b5a44_0
  - psutil==5.7.0=py36h8c4c3a4_1
  - reportlab==3.5.44=py36hcce1d1f_0
  - libssh2==1.9.0=hab1572f_3
  - libgcc==7.2.0=h69d50b8_2
  - libtool==2.4.6=h14c3975_1002
  - libgfortran-ng=7.5.0
  - xorg-kbproto==1.0.7=h14c3975_1002
  - libffi==3.2.1=he1b5a44_1007
  - qt==5.12.5=hd8c4c69_1
  - zlib==1.2.11=h516909a_1006
  - glib==2.65.0=h6f030ca_0

Is there anything else that might be a solution? Thank you very much for your patience!!!

Rio

allind commented 1 year ago

Hi Rio,

Unfortunately that looks like your entire conda installation is not working properly, because no packages are being detected from any channels. I'm not entirely sure how to debug that - maybe updating the conda environment, making sure you have up to date installations, or similar. Are you able to run any commands within conda - i.e. conda install mamba, for instance?

shibataryohei commented 1 year ago

Hi Abigail,

Sorry for the delay. Yes, conda install mamba worked in my environment.

(base) shibataryohei@ryoheis-mbp-2 EukDetect % conda install mamba
Collecting package metadata (current_repodata.json): done
Solving environment: done

## Package Plan ##

  environment location: /opt/miniconda3

  added / updated specs:
    - mamba

The following packages will be UPDATED:

  ca-certificates    conda-forge::ca-certificates-2022.9.2~ --> pkgs/main::ca-certificates-2022.10.11-hca03da5_0 None

The following packages will be SUPERSEDED by a higher-priority channel:

  certifi            conda-forge/noarch::certifi-2022.9.24~ --> pkgs/main/osx-arm64::certifi-2022.9.24-py39hca03da5_0 None
  conda              conda-forge::conda-22.9.0-py39h2804cb~ --> pkgs/main::conda-22.9.0-py39hca03da5_0 None

Proceed ([y]/n)? y

Preparing transaction: done
Verifying transaction: done
Executing transaction: done
Retrieving notices: ...working... done
allind commented 1 year ago

Hi Rio,

So I'm not exactly sure what's up with your conda environment but I have a suggestion. Can you try creating the conda environment with mamba? I believe the command is mamba env update --name eukdetect -f environment.yml

shibataryohei commented 1 year ago

Hi Abigail,

Thank you very much. But, mamba env update --name eukdetect -f environment.yml returned similar error messages. I'm using a Mac with M1 Apple silicon, can these errors be attributed to this?

I found a similar thread. https://forum.qiime2.org/t/problems-installing-qiime2-2021-11-on-m1-mac/21763

shibataryohei commented 1 year ago

Hi Abigail,

After my long journey, I found a post in stackoverflow.

According this post, I ran conda env export --no-builds > environment.yml, then conda env update --name eukdetect environment.yml and python setup.py install ran perhaps successfully, but with many messages.

Next, I tried python tests/test_eukdetect.py but failed again. Is there any possible solution?

(eukdetect) shibataryohei@ryoheis-mbp-2 EukDetect % python tests/test_eukdetect.py
FFFF.
======================================================================
FAIL: test_class (__main__._01_HelpText.test_class)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/shibataryohei/Git/EukDetect/tests/test_eukdetect.py", line 19, in test_class
    self.assertTrue(code == 0, msg=stdout)
AssertionError: False is not true : b''

======================================================================
FAIL: test_class (__main__._02_RunRunall.test_class)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/shibataryohei/Git/EukDetect/tests/test_eukdetect.py", line 26, in test_class
    self.assertTrue(code==0, msg=stderr)
AssertionError: False is not true : b'Traceback (most recent call last):\n  File "/opt/miniconda3/envs/eukdetect/bin/eukdetect", line 33, in <module>\n    sys.exit(load_entry_point(\'EukDetect==1.0.1\', \'console_scripts\', \'eukdetect\')())\n             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File "/opt/miniconda3/envs/eukdetect/bin/eukdetect", line 25, in importlib_load_entry_point\n    return next(matches).load()\n           ^^^^^^^^^^^^^^^^^^^^\n  File "/opt/miniconda3/envs/eukdetect/lib/python3.11/importlib/metadata/__init__.py", line 198, in load\n    module = import_module(match.group(\'module\'))\n             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File "/opt/miniconda3/envs/eukdetect/lib/python3.11/importlib/__init__.py", line 126, in import_module\n    return _bootstrap._gcd_import(name[level:], package, level)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File "<frozen importlib._bootstrap>", line 1206, in _gcd_import\n  File "<frozen importlib._bootstrap>", line 1178, in _find_and_load\n  File "<frozen importlib._bootstrap>", line 1149, in _find_and_load_unlocked\n  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked\n  File "<frozen importlib._bootstrap_external>", line 940, in exec_module\n  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed\n  File "/opt/miniconda3/envs/eukdetect/lib/python3.11/site-packages/EukDetect-1.0.1-py3.11.egg/eukdetect/runall.py", line 4, in <module>\nModuleNotFoundError: No module named \'Bio\'\n'

======================================================================
FAIL: test_class (__main__._03_RunAlnCmd.test_class)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/shibataryohei/Git/EukDetect/tests/test_eukdetect.py", line 33, in test_class
    self.assertTrue(code==0, msg=stderr)
AssertionError: False is not true : b'Traceback (most recent call last):\n  File "/opt/miniconda3/envs/eukdetect/bin/eukdetect", line 33, in <module>\n    sys.exit(load_entry_point(\'EukDetect==1.0.1\', \'console_scripts\', \'eukdetect\')())\n             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File "/opt/miniconda3/envs/eukdetect/bin/eukdetect", line 25, in importlib_load_entry_point\n    return next(matches).load()\n           ^^^^^^^^^^^^^^^^^^^^\n  File "/opt/miniconda3/envs/eukdetect/lib/python3.11/importlib/metadata/__init__.py", line 198, in load\n    module = import_module(match.group(\'module\'))\n             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File "/opt/miniconda3/envs/eukdetect/lib/python3.11/importlib/__init__.py", line 126, in import_module\n    return _bootstrap._gcd_import(name[level:], package, level)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File "<frozen importlib._bootstrap>", line 1206, in _gcd_import\n  File "<frozen importlib._bootstrap>", line 1178, in _find_and_load\n  File "<frozen importlib._bootstrap>", line 1149, in _find_and_load_unlocked\n  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked\n  File "<frozen importlib._bootstrap_external>", line 940, in exec_module\n  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed\n  File "/opt/miniconda3/envs/eukdetect/lib/python3.11/site-packages/EukDetect-1.0.1-py3.11.egg/eukdetect/runall.py", line 4, in <module>\nModuleNotFoundError: No module named \'Bio\'\n'

======================================================================
FAIL: test_class (__main__._04_RunAln_and_filter.test_class)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/shibataryohei/Git/EukDetect/tests/test_eukdetect.py", line 44, in test_class
    self.assertTrue(alncode==0 and filtercode == 0, msg=alnstderr + filterstderr)
AssertionError: False is not true : b'Traceback (most recent call last):\n  File "/opt/miniconda3/envs/eukdetect/bin/eukdetect", line 33, in <module>\n    sys.exit(load_entry_point(\'EukDetect==1.0.1\', \'console_scripts\', \'eukdetect\')())\n             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File "/opt/miniconda3/envs/eukdetect/bin/eukdetect", line 25, in importlib_load_entry_point\n    return next(matches).load()\n           ^^^^^^^^^^^^^^^^^^^^\n  File "/opt/miniconda3/envs/eukdetect/lib/python3.11/importlib/metadata/__init__.py", line 198, in load\n    module = import_module(match.group(\'module\'))\n             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File "/opt/miniconda3/envs/eukdetect/lib/python3.11/importlib/__init__.py", line 126, in import_module\n    return _bootstrap._gcd_import(name[level:], package, level)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File "<frozen importlib._bootstrap>", line 1206, in _gcd_import\n  File "<frozen importlib._bootstrap>", line 1178, in _find_and_load\n  File "<frozen importlib._bootstrap>", line 1149, in _find_and_load_unlocked\n  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked\n  File "<frozen importlib._bootstrap_external>", line 940, in exec_module\n  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed\n  File "/opt/miniconda3/envs/eukdetect/lib/python3.11/site-packages/EukDetect-1.0.1-py3.11.egg/eukdetect/runall.py", line 4, in <module>\nModuleNotFoundError: No module named \'Bio\'\nTraceback (most recent call last):\n  File "/opt/miniconda3/envs/eukdetect/bin/eukdetect", line 33, in <module>\n    sys.exit(load_entry_point(\'EukDetect==1.0.1\', \'console_scripts\', \'eukdetect\')())\n             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File "/opt/miniconda3/envs/eukdetect/bin/eukdetect", line 25, in importlib_load_entry_point\n    return next(matches).load()\n           ^^^^^^^^^^^^^^^^^^^^\n  File "/opt/miniconda3/envs/eukdetect/lib/python3.11/importlib/metadata/__init__.py", line 198, in load\n    module = import_module(match.group(\'module\'))\n             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File "/opt/miniconda3/envs/eukdetect/lib/python3.11/importlib/__init__.py", line 126, in import_module\n    return _bootstrap._gcd_import(name[level:], package, level)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File "<frozen importlib._bootstrap>", line 1206, in _gcd_import\n  File "<frozen importlib._bootstrap>", line 1178, in _find_and_load\n  File "<frozen importlib._bootstrap>", line 1149, in _find_and_load_unlocked\n  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked\n  File "<frozen importlib._bootstrap_external>", line 940, in exec_module\n  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed\n  File "/opt/miniconda3/envs/eukdetect/lib/python3.11/site-packages/EukDetect-1.0.1-py3.11.egg/eukdetect/runall.py", line 4, in <module>\nModuleNotFoundError: No module named \'Bio\'\n'

----------------------------------------------------------------------
Ran 5 tests in 0.232s

Thank you very much! Rio

allind commented 1 year ago

Hi Rio,

The error you're getting is definitely on the conda end, unfortunately - it's not finding the correct packages installed in the environment. This stackoverflow post you've mentioned is useful and seems like it's likely what's happening for you - have you tried installing x86 miniconda as recommended? I have been successful in getting eukdetect running on a Mac with the most recent x86 installation. Please make sure when you download miniconda you use the "Miniconda3 macOS Intel x86 64-bit pkg" link. Let me know how it goes.

Abigail

shibataryohei commented 1 year ago

Hi Abigail,

I tried my Intel MacBook Pro environment (macOS Monterey 12.6.1, MacBook Pro 16-inch 2019) and newly installed miniconda3.

Following your instruction, again, conda env update --name eukdetect environment.yml returned the following error messages.

(eukdetect) ryoheis-mbp:EukDetect shibataryohei$ conda env update --name eukdetect -f environment.yml
Collecting package metadata (repodata.json): done
Solving environment: failed

ResolvePackageNotFound: 
  - icu==64.2=he1b5a44_1
  - tbb==2020.1=hc9558a2_0
  - sqlite==3.32.3=hcee41ef_1
  - libtool==2.4.6=h14c3975_1002
  - perl==5.26.2=h516909a_1006
  - libclang==9.0.1=default_hde54327_0
  - libstdcxx-ng==9.2.0=hdf63c60_2
  - expat==2.2.9=he1b5a44_2
  - graphite2==1.3.13=he1b5a44_1001
  - reportlab==3.5.44=py36hcce1d1f_0
  - brotlipy==0.7.0=py36h8c4c3a4_1000
  - protobuf==3.12.3=py36h831f99a_0
  - libgcc==7.2.0=h69d50b8_2
  - wrapt==1.12.1=py36h8c4c3a4_1
  - pillow==7.2.0=py36h8328e55_1
  - htslib==1.10.2=hd3b49d5_1
  - nss==3.47=he751ad9_0
  - bcrypt==3.1.7=py36h8c4c3a4_1
  - xorg-xproto==7.0.31=h14c3975_1007
  - lz4-c==1.9.2=he1b5a44_1
  - libgfortran-ng=7.5.0
  - gstreamer==1.14.5=h36ae1b5_2
  - tk==8.6.10=hed695b0_0
  - pthread-stubs==0.4=h14c3975_1001
  - zlib==1.2.11=h516909a_1006
  - ld_impl_linux-64==2.34=h53a641e_7
  - openblas==0.3.3=h9ac9557_1001
  - ncurses==6.1=hf484d3e_1002
  - scipy==1.2.1=py36_blas_openblash1522bff_0
  - python==3.6.10=h8356626_1011_cpython
  - xorg-libxdmcp==1.1.3=h516909a_0
  - nspr==4.26=he1b5a44_0
  - libgcc-ng==9.2.0=h24d8f2e_2
  - qt==5.12.5=hd8c4c69_1
  - lcms2==2.11=hbd6801e_0
  - bzip2==1.0.8=h516909a_2
  - libgomp==9.2.0=h24d8f2e_2
  - libwebp-base==1.1.0=h516909a_3
  - xorg-libxt==1.1.5=h516909a_1003
  - msgpack-python==1.0.0=py36hdb11119_1
  - markupsafe==1.1.1=py36h8c4c3a4_1
  - xorg-libxext==1.3.4=h516909a_0
  - yaml==0.2.5=h516909a_0
  - multidict==4.7.5=py36h8c4c3a4_1
  - _libgcc_mutex==0.1=conda_forge
  - jpeg==9d=h516909a_0
  - xorg-libice==1.0.10=h516909a_0
  - cairo==1.16.0=hcf35c78_1003
  - libssh2==1.9.0=hab1572f_3
  - libdeflate==1.6=h516909a_0
  - libxcb==1.13=h14c3975_1002
  - aiohttp==3.6.2=py36h516909a_0
  - pynacl==1.3.0=py36h516909a_1001
  - xorg-libxpm==3.5.13=h516909a_0
  - libpng==1.6.37=hed695b0_1
  - libffi==3.2.1=he1b5a44_1007
  - glib==2.65.0=h6f030ca_0
  - readline==8.0=h46ee950_1
  - libiconv==1.15=h516909a_1006
  - xorg-kbproto==1.0.7=h14c3975_1002
  - dbus==1.13.6=he372182_0
  - freetype==2.10.2=he06d7ca_0
  - _openmp_mutex==4.5=0_gnu
  - xorg-libxrender==0.9.10=h516909a_1002
  - openssl==1.1.1g=h516909a_0
  - pyrsistent==0.16.0=py36h8c4c3a4_0
  - fontconfig==2.13.1=h86ecdb6_1001
  - yarl==1.4.2=py36h516909a_0
  - lxml==4.5.2=py36h17c4326_0
  - graphviz==2.38.0=hf68f40c_1011
  - pcre==8.44=he1b5a44_0
  - cffi==1.14.0=py36hd463f26_0
  - libcurl==7.71.1=hcdd3856_1
  - pygraphviz==1.5=py36h8c4c3a4_1002
  - xz==5.2.5=h516909a_1
  - komplexity==0.3.6=musl
  - datrie==0.8.2=py36h8c4c3a4_0
  - harfbuzz==2.4.0=h9f30f68_3
  - libxkbcommon==0.10.0=he1b5a44_0
  - pyqt==5.12.3=py36haa643ae_3
  - samtools==1.10=h9402c20_2
  - pango==1.40.14=he7ab937_1005
  - libllvm9==9.0.1=he513fc3_1
  - libxml2==2.9.10=hee79883_0
  - gst-plugins-base==1.14.5=h0935bb2_2
  - libprotobuf==3.12.3=h8b12597_1
  - krb5==1.17.1=hfafb76e_1
  - pyyaml==5.3.1=py36h8c4c3a4_0
  - xorg-libxau==1.0.9=h14c3975_0
  - psutil==5.7.0=py36h8c4c3a4_1
  - gettext==0.19.8.1=hc5be6a0_1002
  - numpy==1.12.1=py36_blas_openblash1522bff_1001
  - xorg-libx11==1.6.9=h516909a_0
  - libxslt==1.1.33=h31b3aaa_0
  - pandas==0.24.2=py36hf484d3e_0
  - bedtools==2.29.2=hc088bd4_0
  - libuuid==2.32.1=h14c3975_1000
  - cryptography==2.9.2=py36h45558ae_0
  - libtiff==4.1.0=hc7e4089_6
  - xorg-renderproto==0.11.1=h14c3975_1002
  - pysam==0.16.0.1=py36h4c34d4e_1
  - pixman==0.38.0=h516909a_1003
  - xorg-libsm==1.2.3=h84519dc_1000
  - zstd==1.4.4=h6597ccf_3
  - bowtie2==2.4.1=py36h7f0b59b_2
  - libedit==3.1.20191231=h46ee950_1
  - xorg-xextproto==7.3.0=h14c3975_1002

Therefore, I changed envionment.yml by running conda env export --no-builds > environment.yml. Then conda env update --name eukdetect environment.yml, conda activate eukdetect, and python setup.py install worked.

I also checked eukdetect was installed, by conda list.

(eukdetect) ryoheis-mbp:EukDetect shibataryohei$ conda list
# packages in environment at /opt/miniconda3/envs/eukdetect:

However, python tests/test_eukdetect.py failed with the following messages.

(eukdetect) ryoheis-mbp:EukDetect shibataryohei$ python tests/test_eukdetect.py
FFFF.
======================================================================
FAIL: test_class (__main__._01_HelpText)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/shibataryohei/Git/EukDetect/tests/test_eukdetect.py", line 19, in test_class
    self.assertTrue(code == 0, msg=stdout)
AssertionError: False is not true : b''

======================================================================
FAIL: test_class (__main__._02_RunRunall)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/shibataryohei/Git/EukDetect/tests/test_eukdetect.py", line 26, in test_class
    self.assertTrue(code==0, msg=stderr)
AssertionError: False is not true : b'Traceback (most recent call last):\n  File "/opt/miniconda3/envs/eukdetect/bin/eukdetect", line 33, in <module>\n    sys.exit(load_entry_point(\'EukDetect==1.0.1\', \'console_scripts\', \'eukdetect\')())\n  File "/opt/miniconda3/envs/eukdetect/bin/eukdetect", line 25, in importlib_load_entry_point\n    return next(matches).load()\n  File "/opt/miniconda3/envs/eukdetect/lib/python3.9/importlib/metadata.py", line 86, in load\n    module = import_module(match.group(\'module\'))\n  File "/opt/miniconda3/envs/eukdetect/lib/python3.9/importlib/__init__.py", line 127, in import_module\n    return _bootstrap._gcd_import(name[level:], package, level)\n  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import\n  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load\n  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked\n  File "<frozen importlib._bootstrap>", line 664, in _load_unlocked\n  File "<frozen importlib._bootstrap>", line 627, in _load_backward_compatible\n  File "<frozen zipimport>", line 259, in load_module\n  File "/opt/miniconda3/envs/eukdetect/lib/python3.9/site-packages/EukDetect-1.0.1-py3.9.egg/eukdetect/runall.py", line 4, in <module>\nModuleNotFoundError: No module named \'Bio\'\n'

======================================================================
FAIL: test_class (__main__._03_RunAlnCmd)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/shibataryohei/Git/EukDetect/tests/test_eukdetect.py", line 33, in test_class
    self.assertTrue(code==0, msg=stderr)
AssertionError: False is not true : b'Traceback (most recent call last):\n  File "/opt/miniconda3/envs/eukdetect/bin/eukdetect", line 33, in <module>\n    sys.exit(load_entry_point(\'EukDetect==1.0.1\', \'console_scripts\', \'eukdetect\')())\n  File "/opt/miniconda3/envs/eukdetect/bin/eukdetect", line 25, in importlib_load_entry_point\n    return next(matches).load()\n  File "/opt/miniconda3/envs/eukdetect/lib/python3.9/importlib/metadata.py", line 86, in load\n    module = import_module(match.group(\'module\'))\n  File "/opt/miniconda3/envs/eukdetect/lib/python3.9/importlib/__init__.py", line 127, in import_module\n    return _bootstrap._gcd_import(name[level:], package, level)\n  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import\n  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load\n  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked\n  File "<frozen importlib._bootstrap>", line 664, in _load_unlocked\n  File "<frozen importlib._bootstrap>", line 627, in _load_backward_compatible\n  File "<frozen zipimport>", line 259, in load_module\n  File "/opt/miniconda3/envs/eukdetect/lib/python3.9/site-packages/EukDetect-1.0.1-py3.9.egg/eukdetect/runall.py", line 4, in <module>\nModuleNotFoundError: No module named \'Bio\'\n'

======================================================================
FAIL: test_class (__main__._04_RunAln_and_filter)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/shibataryohei/Git/EukDetect/tests/test_eukdetect.py", line 44, in test_class
    self.assertTrue(alncode==0 and filtercode == 0, msg=alnstderr + filterstderr)
AssertionError: False is not true : b'Traceback (most recent call last):\n  File "/opt/miniconda3/envs/eukdetect/bin/eukdetect", line 33, in <module>\n    sys.exit(load_entry_point(\'EukDetect==1.0.1\', \'console_scripts\', \'eukdetect\')())\n  File "/opt/miniconda3/envs/eukdetect/bin/eukdetect", line 25, in importlib_load_entry_point\n    return next(matches).load()\n  File "/opt/miniconda3/envs/eukdetect/lib/python3.9/importlib/metadata.py", line 86, in load\n    module = import_module(match.group(\'module\'))\n  File "/opt/miniconda3/envs/eukdetect/lib/python3.9/importlib/__init__.py", line 127, in import_module\n    return _bootstrap._gcd_import(name[level:], package, level)\n  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import\n  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load\n  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked\n  File "<frozen importlib._bootstrap>", line 664, in _load_unlocked\n  File "<frozen importlib._bootstrap>", line 627, in _load_backward_compatible\n  File "<frozen zipimport>", line 259, in load_module\n  File "/opt/miniconda3/envs/eukdetect/lib/python3.9/site-packages/EukDetect-1.0.1-py3.9.egg/eukdetect/runall.py", line 4, in <module>\nModuleNotFoundError: No module named \'Bio\'\nTraceback (most recent call last):\n  File "/opt/miniconda3/envs/eukdetect/bin/eukdetect", line 33, in <module>\n    sys.exit(load_entry_point(\'EukDetect==1.0.1\', \'console_scripts\', \'eukdetect\')())\n  File "/opt/miniconda3/envs/eukdetect/bin/eukdetect", line 25, in importlib_load_entry_point\n    return next(matches).load()\n  File "/opt/miniconda3/envs/eukdetect/lib/python3.9/importlib/metadata.py", line 86, in load\n    module = import_module(match.group(\'module\'))\n  File "/opt/miniconda3/envs/eukdetect/lib/python3.9/importlib/__init__.py", line 127, in import_module\n    return _bootstrap._gcd_import(name[level:], package, level)\n  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import\n  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load\n  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked\n  File "<frozen importlib._bootstrap>", line 664, in _load_unlocked\n  File "<frozen importlib._bootstrap>", line 627, in _load_backward_compatible\n  File "<frozen zipimport>", line 259, in load_module\n  File "/opt/miniconda3/envs/eukdetect/lib/python3.9/site-packages/EukDetect-1.0.1-py3.9.egg/eukdetect/runall.py", line 4, in <module>\nModuleNotFoundError: No module named \'Bio\'\n'

----------------------------------------------------------------------
Ran 5 tests in 0.250s

FAILED (failures=4)

This is similar error messages in my M1-Mac environment. Is it truly problems in conda environment?

And for your reference, configfile_for_tests.yml has been attached.

#Config file for testing eukdetect. Edit your paths where specified

eukdetect_dir: "/Users/shibataryohei/Git/EukDetect"
output_dir: "tests" #directory where output should be written

paired_end: true #true or false

fwd_suffix: "_R1.fastq.gz" #filename excluding sample name. no need to edit if paired_end= false
rev_suffix: "_R2.fastq.gz" #filename excludign sample name. no need to edit if paired_end = false
se_suffix: ".fastq.gz" #file name excluding sample name. no need to edit if paired_end = true
readlen: 125 #targeted length of your reads. pre-trimming reads not recommended

fq_dir: "/Users/shibataryohei/Git/EukDetect/tests" #full path to directory with raw fastq files
database_dir: "/Users/shibataryohei/Git/EukDetect/eukdb" #full path to folder with all eukdetect_db files and taxa.sqlite files
database_prefix: "ncbi_eukprot_met_arch_markers.fna" #database prefix

samples: "test" #list sample names here. fastqs must correspond to {samplename}{se_suffix} for SE reads or {samplename}{fwd_suffix} and {samplename}{rev_suffix} for PE
  test:

Look forward to your feedback!

Best, Rio

allind commented 1 year ago

Hi Rio,

Thanks for bearing with this. Eukdetect hasn't been thoroughly tested on mac, so there are some sticky issues. If you have access to a linux environment that will be easier, but I can work through this with you and get it working. I have attached to this comment a new environment file. I also discovered an incompatibility with mac that's downstream, so I've updated the rules also a new eukdetect rules file because I've found some downstream incompatibilities with mac that will need to be fixed. Please re-download the EukDetect github repo to get this update.

I'm attaching a new environment file here that you can try: macos_env_yml.txt. Download the file into your eukdetect repo, run mv macos_env_yml.txt macos_env.yml. Then, install it with conda env update --name eukdetect_macos -f macos_env.yml. You'll then use eukdetect_macos as the conda environment. Hopefully this will work.

There's a sticking point - after trying this out myself, I have realized it may not be possible to install the dependency komplexity on a mac with conda, unfortunately. This will have to be installed manually with cargo. To do this, runconda activate eukdetect_macos to activate the environment and then run cargo install --git https://github.com/eclarke/komplexity. If you encounter errors in this process, there's a good chance you don't have the Apple development tools installed, which is necessary to run this. Installing the dev tools can take a while, but it can be run through xcode-select --install. There will be instructions on adding the installation folder to your path, which you should follow. After you successfully install komplexity, make sure the command which kz works.

After this, you should be able to run the eukdetect test and hopefully eukdetect itself. Let me know how it goes and if you run into any further problems. If this works for you I'll make an update to the main with instructions for mac install.

Abigail

shibataryohei commented 1 year ago

Hi Abigail,

Sorry for the delay and I appreciated your kindness. However, conda env update --name eukdetect_macos -f macos_env.yml has returned similar error messages.

(base) shibataryohei@ryoheis-mbp-2 EukDetect % conda env update --name eukdetect_macos -f macos_env.yml
Collecting package metadata (repodata.json): done
Solving environment: failed

ResolvePackageNotFound: 
  - libdeflate==1.6=h0b31af3_0
  - libcblas==3.9.0=16_osx64_openblas
  - tbb==2020.2=h940c156_4
  - libzlib==1.2.13=hfd90126_4
  - numpy==1.19.5=py36h08b5fde_2
  - biopython==1.70=py36_2
  - libarchive==3.5.2=h2b60450_1
  - libsolv==0.7.22=hd9580d2_0
  - snakemake-minimal==5.3.0=py36_1
  - ncurses==6.2=h2e338ed_4
  - c-ares==1.18.1=h0d85af4_0
  - pthread-stubs==0.4=hc929b4f_1001
  - xorg-libxext==1.3.4=h0d85af4_1
  - pysam==0.16.0.1=py36h623959b_1
  - libcurl==7.86.0=h57eb407_1
  - libffi==3.2.1=hb1e8313_1007
  - libsqlite==3.39.4=ha978bb4_0
  - libglib==2.66.3=h2575888_0
  - libev==4.33=haf1e3a3_1
  - xorg-libx11==1.7.2=h0d85af4_0
  - pyyaml==5.4.1=py36hfa26744_1
  - certifi==2021.5.30=py36hecd8cb5_0
  - dbus==1.13.6=h0c50699_1
  - libxml2==2.9.12=h7e28ab6_1
  - libopenblas==0.3.21=openmp_h429af6e_3
  - pyqt5-sip==4.19.18=py36h3ffa6ac_7
  - xorg-libxau==1.0.9=h35c211d_0
  - expat==2.5.0=hf0c8a7f_0
  - libblas==3.9.0=16_osx64_openblas
  - scipy==1.5.3=py36h4f136de_1
  - libiconv==1.17=hac89ed1_0
  - llvm-openmp==14.0.4=ha654fa7_0
  - nss==3.74=h31e2bf1_0
  - datrie==0.8.2=py36hfa26744_2
  - liblapack==3.9.0=16_osx64_openblas
  - libedit==3.1.20191231=h0678c8f_2
  - readline==8.1=h05e3726_0
  - xorg-libice==1.0.10=h0d85af4_0
  - yaml==0.2.5=h0d85af4_2
  - bowtie2==2.4.1=py36h0c56d2d_3
  - setuptools==58.0.4=py36h79c6626_2
  - xorg-libsm==1.2.3=h0d85af4_1000
  - pycosat==0.6.3=py36hfa26744_1006
  - perl==5.32.1=2_h0d85af4_perl5
  - icu==69.1=he49afe7_0
  - pyqtwebengine==5.12.1=py36hb40023b_7
  - lxml==4.6.3=py36habcf893_0
  - xorg-renderproto==0.11.1=h0d85af4_1002
  - zstd==1.5.2=hfa58983_4
  - conda==4.10.3=py36h79c6626_2
  - pyqt-impl==5.12.3=py36hb40023b_7
  - lz4-c==1.9.3=he49afe7_1
  - reproc==14.2.3=h0d85af4_0
  - ruamel_yaml==0.15.80=py36hfa26744_1004
  - jpeg==9e=hac89ed1_2
  - nspr==4.32=hcd9eead_1
  - pyqtchart==5.12=py36hb40023b_7
  - python==3.6.10=h4334963_1011_cpython
  - gettext==0.21.1=h8a4c099_0
  - psutil==5.8.0=py36hfa26744_1
  - ratelimiter==1.2.0=py36h9f0ad1d_1001
  - xorg-xproto==7.0.31=h35c211d_1007
  - xz==5.2.5=haf1e3a3_1
  - brotlipy==0.7.0=py36hfa26744_1001
  - samtools==1.10=hf7e01e7_3
  - glib==2.66.3=h519c658_0
  - libclang==13.0.1=default_he082bbe_0
  - xorg-xextproto==7.3.0=h35c211d_1002
  - cryptography==35.0.0=py36ha6a00b0_0
  - xorg-libxrender==0.9.10=h0d85af4_1003
  - rust==1.65.0=h7e1429e_0
  - pyrsistent==0.17.3=py36hfa26744_2
  - docutils==0.17.1=py36h79c6626_0
  - importlib-metadata==4.8.1=py36h79c6626_0
  - cffi==1.14.4=py36h1b827b8_0
  - conda-package-handling==1.7.3=py36hfa26744_0
  - pysocks==1.7.1=py36h79c6626_3
  - mysql-libs==8.0.31=hc37e033_0
  - reproc-cpp==14.2.3=he49afe7_0
  - mamba==0.17.0=py36h8976158_0
  - libnghttp2==1.47.0=h7cbc4dc_1
  - bedtools==2.30.0=h0e31d98_3
  - mysql-common==8.0.31=h7ebae80_0
  - htslib==1.10.2=h422799e_1
  - wrapt==1.13.1=py36hfa26744_0
  - libpq==14.3=hf6bb32a_0
  - krb5==1.19.3=hb49756b_0
  - libllvm13==13.0.1=h64f94b2_2
  - qt==5.12.9=h2a607e2_5
  - libxslt==1.1.33=h1acebb3_3
  - libxcb==1.13=h0d85af4_1004
  - pcre==8.45=he49afe7_0
  - sqlite==3.37.0=h23a322b_0
  - tk==8.6.12=h5dbffcc_0
  - xorg-kbproto==1.0.7=h35c211d_1002
  - lzo==2.10=haf1e3a3_1000
  - xorg-libxdmcp==1.1.3=h35c211d_0
  - libpng==1.6.38=ha978bb4_0
  - ca-certificates==2022.10.11=hecd8cb5_0
  - openssl==1.1.1s=hca72f7f_0
  - zlib==1.2.13=hfd90126_4
  - libssh2==1.10.0=h7535e13_3
  - pyqt==5.12.3=py36h79c6626_7
  - libgfortran5==11.3.0=h082f757_25
  - libgfortran==5.0.0=10_4_0_h97931a8_25
  - libcxx==14.0.6=hccf4f1f_0
  - bzip2==1.0.8=h0d85af4_4

Fortunately, I can access to linux environment and will try it there. I'm very happy if you continue to support the Mac environment!

Best Rio

shibataryohei commented 1 year ago

Hi Abigail,

In my linux environment (Ubuntu in WSL2), EukDetect has successfully installed. However, there is still problem in python tests/test_eukdetect.py. I got the error message below.

.FFF.
======================================================================
FAIL: test_class (__main__._02_RunRunall)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "tests/test_eukdetect.py", line 26, in test_class
    self.assertTrue(code==0, msg=stderr)
AssertionError: False is not true : b'11/08/2022 13:22:58:  Parsing config file ...\n11/08/2022 13:22:58:  Error: could not locate database directory.\n'

======================================================================
FAIL: test_class (__main__._03_RunAlnCmd)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "tests/test_eukdetect.py", line 33, in test_class
    self.assertTrue(code==0, msg=stderr)
AssertionError: False is not true : b'11/08/2022 13:22:59:  Parsing config file ...\n11/08/2022 13:22:59:  Error: could not locate database directory.\n'

======================================================================
FAIL: test_class (__main__._04_RunAln_and_filter)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "tests/test_eukdetect.py", line 44, in test_class
    self.assertTrue(alncode==0 and filtercode == 0, msg=alnstderr + filterstderr)
AssertionError: False is not true : b'11/08/2022 13:22:59:  Parsing config file ...\n11/08/2022 13:22:59:  Error: could not locate database directory.\n11/08/2022 13:23:00:  Parsing config file ...\n11/08/2022 13:23:00:  Error: could not locate database directory.\n'

----------------------------------------------------------------------
Ran 5 tests in 2.293s

FAILED (failures=3)

This is supposed to be the problem of path in tests/configfile_for_tests.yml.

#Config file for testing eukdetect. Edit your paths where specified

eukdetect_dir: "~/EukDetect"
output_dir: "~/EukDetect/tests" #directory where output should be written

paired_end: true #true or false

fwd_suffix: "_R1.fastq.gz" #filename excluding sample name. no need to edit if paired_end= falserev_suffix: "_R2.fastq.gz" #filename excludign sample name. no need to edit if paired_end = false
se_suffix: ".fastq.gz" #file name excluding sample name. no need to edit if paired_end = true
readlen: 125 #targeted length of your reads. pre-trimming reads not recommended

fq_dir: "~/EukDetect/tests" #full path to directory with raw fastq files
database_dir: "~/EukDetect/eukdb" #full path to folder with all eukdetect_db files and taxa.sqlite files
database_prefix: "ncbi_eukprot_met_arch_markers.fna" #database prefix

samples: "test" #list sample names here. fastqs must correspond to {samplename}{se_suffix} for SE reads or {samplename}{fwd_suffix} and {samplename}{rev_suffix} for PE
test:

Is there any problem? My EukDetect folder locates below home directory.

And could you clarify whether we should use an absolute or a relative path for eukdetect_dir and output_dir? By contrast, it is clarified in fq_dir and database_dir, so many readers may think a relative path should be used here.

allind commented 1 year ago

HI Rio,

You should use an absolute path for all the directories in the config file. Thanks for bringing this to my attention, I'll clarify this in the readme in future updates. I think the issue you're encountering may be coming from use of the "~" not being expanded correctly by snakemake - I would use your entire home directory path instead of the tilde. Try using the full path and let me know.

Abigail

shibataryohei commented 1 year ago

Hi Abigail,

Thanks for updating. I have changed paths in the yml file using absolute paths without ~, but I'm still in the error. Now I'm using Linux-based server environment. In error messages, PATH is used instead of home directory because it contains the ID.

.FFF.
======================================================================
FAIL: test_class (__main__._02_RunRunall)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "tests/test_eukdetect.py", line 26, in test_class
    self.assertTrue(code==0, msg=stderr)
AssertionError: False is not true : b'11/08/2022 17:53:19:  Parsing config file ...\nTraceback (most recent call last):\n  File "/PATH/.conda/envs/eukdetect/bin/eukdetect", line 33, in <module>\n    sys.exit(load_entry_point(\'EukDetect==1.0.1\', \'console_scripts\', \'eukdetect\')())\n  File "/PATH/.conda/envs/eukdetect/lib/python3.6/site-packages/EukDetect-1.0.1-py3.6.egg/eukdetect/runall.py", line 89, in main\n  File "/PATH/.conda/envs/eukdetect/lib/python3.6/site-packages/yaml/__init__.py", line 114, in load\n    return loader.get_single_data()\n  File "/PATH/.conda/envs/eukdetect/lib/python3.6/site-packages/yaml/constructor.py", line 49, in get_single_data\n    node = self.get_single_node()\n  File "/PATH/.conda/envs/eukdetect/lib/python3.6/site-packages/yaml/composer.py", line 36, in get_single_node\n    document = self.compose_document()\n  File "/PATH/.conda/envs/eukdetect/lib/python3.6/site-packages/yaml/composer.py", line 55, in compose_document\n    node = self.compose_node(None, None)\n  File "/PATH/.conda/envs/eukdetect/lib/python3.6/site-packages/yaml/composer.py", line 84, in compose_node\n    node = self.compose_mapping_node(anchor)\n  File "/PATH/.conda/envs/eukdetect/lib/python3.6/site-packages/yaml/composer.py", line 127, in compose_mapping_node\n    while not self.check_event(MappingEndEvent):\n  File "/PATH/.conda/envs/eukdetect/lib/python3.6/site-packages/yaml/parser.py", line 98, in check_event\n    self.current_event = self.state()\n  File "/PATH/.conda/envs/eukdetect/lib/python3.6/site-packages/yaml/parser.py", line 439, in parse_block_mapping_key\n    "expected <block end>, but found %r" % token.id, token.start_mark)\nyaml.parser.ParserError: while parsing a block mapping\n  in "tests/configfile_for_tests.yml", line 3, column 1\nexpected <block end>, but found \'<block mapping start>\'\n  in "tests/configfile_for_tests.yml", line 17, column 3\n'

======================================================================
FAIL: test_class (__main__._03_RunAlnCmd)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "tests/test_eukdetect.py", line 33, in test_class
    self.assertTrue(code==0, msg=stderr)
AssertionError: False is not true : b'11/08/2022 17:53:19:  Parsing config file ...\nTraceback (most recent call last):\n  File "/PATH/.conda/envs/eukdetect/bin/eukdetect", line 33, in <module>\n    sys.exit(load_entry_point(\'EukDetect==1.0.1\', \'console_scripts\', \'eukdetect\')())\n  File "/PATH/.conda/envs/eukdetect/lib/python3.6/site-packages/EukDetect-1.0.1-py3.6.egg/eukdetect/runall.py", line 89, in main\n  File "/PATH/.conda/envs/eukdetect/lib/python3.6/site-packages/yaml/__init__.py", line 114, in load\n    return loader.get_single_data()\n  File "/PATH/.conda/envs/eukdetect/lib/python3.6/site-packages/yaml/constructor.py", line 49, in get_single_data\n    node = self.get_single_node()\n  File "/PATH/.conda/envs/eukdetect/lib/python3.6/site-packages/yaml/composer.py", line 36, in get_single_node\n    document = self.compose_document()\n  File "/PATH/.conda/envs/eukdetect/lib/python3.6/site-packages/yaml/composer.py", line 55, in compose_document\n    node = self.compose_node(None, None)\n  File "/PATH/.conda/envs/eukdetect/lib/python3.6/site-packages/yaml/composer.py", line 84, in compose_node\n    node = self.compose_mapping_node(anchor)\n  File "/PATH/.conda/envs/eukdetect/lib/python3.6/site-packages/yaml/composer.py", line 127, in compose_mapping_node\n    while not self.check_event(MappingEndEvent):\n  File "/PATH/.conda/envs/eukdetect/lib/python3.6/site-packages/yaml/parser.py", line 98, in check_event\n    self.current_event = self.state()\n  File "/PATH/.conda/envs/eukdetect/lib/python3.6/site-packages/yaml/parser.py", line 439, in parse_block_mapping_key\n    "expected <block end>, but found %r" % token.id, token.start_mark)\nyaml.parser.ParserError: while parsing a block mapping\n  in "tests/configfile_for_tests.yml", line 3, column 1\nexpected <block end>, but found \'<block mapping start>\'\n  in "tests/configfile_for_tests.yml", line 17, column 3\n'

======================================================================
FAIL: test_class (__main__._04_RunAln_and_filter)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "tests/test_eukdetect.py", line 44, in test_class
    self.assertTrue(alncode==0 and filtercode == 0, msg=alnstderr + filterstderr)
AssertionError: False is not true : b'11/08/2022 17:53:19:  Parsing config file ...\nTraceback (most recent call last):\n  File "/PATH/.conda/envs/eukdetect/bin/eukdetect", line 33, in <module>\n    sys.exit(load_entry_point(\'EukDetect==1.0.1\', \'console_scripts\', \'eukdetect\')())\n  File "/PATH/.conda/envs/eukdetect/lib/python3.6/site-packages/EukDetect-1.0.1-py3.6.egg/eukdetect/runall.py", line 89, in main\n  File "/PATH/.conda/envs/eukdetect/lib/python3.6/site-packages/yaml/__init__.py", line 114, in load\n    return loader.get_single_data()\n  File "/PATH/.conda/envs/eukdetect/lib/python3.6/site-packages/yaml/constructor.py", line 49, in get_single_data\n    node = self.get_single_node()\n  File "/PATH/.conda/envs/eukdetect/lib/python3.6/site-packages/yaml/composer.py", line 36, in get_single_node\n    document = self.compose_document()\n  File "/PATH/.conda/envs/eukdetect/lib/python3.6/site-packages/yaml/composer.py", line 55, in compose_document\n    node = self.compose_node(None, None)\n  File "/PATH/.conda/envs/eukdetect/lib/python3.6/site-packages/yaml/composer.py", line 84, in compose_node\n    node = self.compose_mapping_node(anchor)\n  File "/PATH/.conda/envs/eukdetect/lib/python3.6/site-packages/yaml/composer.py", line 127, in compose_mapping_node\n    while not self.check_event(MappingEndEvent):\n  File "/PATH/.conda/envs/eukdetect/lib/python3.6/site-packages/yaml/parser.py", line 98, in check_event\n    self.current_event = self.state()\n  File "/PATH/.conda/envs/eukdetect/lib/python3.6/site-packages/yaml/parser.py", line 439, in parse_block_mapping_key\n    "expected <block end>, but found %r" % token.id, token.start_mark)\nyaml.parser.ParserError: while parsing a block mapping\n  in "tests/configfile_for_tests.yml", line 3, column 1\nexpected <block end>, but found \'<block mapping start>\'\n  in "tests/configfile_for_tests.yml", line 17, column 3\n11/08/2022 17:53:20:  Parsing config file ...\nTraceback (most recent call last):\n  File "/PATH/.conda/envs/eukdetect/bin/eukdetect", line 33, in <module>\n    sys.exit(load_entry_point(\'EukDetect==1.0.1\', \'console_scripts\', \'eukdetect\')())\n  File "/PATH/.conda/envs/eukdetect/lib/python3.6/site-packages/EukDetect-1.0.1-py3.6.egg/eukdetect/runall.py", line 89, in main\n  File "/PATH/.conda/envs/eukdetect/lib/python3.6/site-packages/yaml/__init__.py", line 114, in load\n    return loader.get_single_data()\n  File "/PATH/.conda/envs/eukdetect/lib/python3.6/site-packages/yaml/constructor.py", line 49, in get_single_data\n    node = self.get_single_node()\n  File "/PATH/.conda/envs/eukdetect/lib/python3.6/site-packages/yaml/composer.py", line 36, in get_single_node\n    document = self.compose_document()\n  File "/PATH/.conda/envs/eukdetect/lib/python3.6/site-packages/yaml/composer.py", line 55, in compose_document\n    node = self.compose_node(None, None)\n  File "/PATH/.conda/envs/eukdetect/lib/python3.6/site-packages/yaml/composer.py", line 84, in compose_node\n    node = self.compose_mapping_node(anchor)\n  File "/PATH/.conda/envs/eukdetect/lib/python3.6/site-packages/yaml/composer.py", line 127, in compose_mapping_node\n    while not self.check_event(MappingEndEvent):\n  File "/PATH/.conda/envs/eukdetect/lib/python3.6/site-packages/yaml/parser.py", line 98, in check_event\n    self.current_event = self.state()\n  File "/PATH/.conda/envs/eukdetect/lib/python3.6/site-packages/yaml/parser.py", line 439, in parse_block_mapping_key\n    "expected <block end>, but found %r" % token.id, token.start_mark)\nyaml.parser.ParserError: while parsing a block mapping\n  in "tests/configfile_for_tests.yml", line 3, column 1\nexpected <block end>, but found \'<block mapping start>\'\n  in "tests/configfile_for_tests.yml", line 17, column 3\n'

----------------------------------------------------------------------
Ran 5 tests in 1.034s

FAILED (failures=3)

Is there any solution?

And are spaces in lines 5 and 18 of configfile_for_tests.yml necessary?

allind commented 1 year ago

Could you also paste the configfile you used for these tests? Thanks.

shibataryohei commented 1 year ago

Thanks!!!

#Config file for testing eukdetect. Edit your paths where specified

eukdetect_dir: "/PATH/EukDetect"
output_dir: "/PATH/EukDetect/tests" #directory where output should be written 
paired_end: true #true or false

fwd_suffix: "_R1.fastq.gz" #filename excluding sample name. no need to edit if paired_end= false
rev_suffix: "_R2.fastq.gz" #filename excludign sample name. no need to edit if paired_end = false
se_suffix: ".fastq.gz" #file name excluding sample name. no need to edit if paired_end = true
readlen: 125 #targeted length of your reads. pre-trimming reads not recommended

fq_dir: "/PATH/EukDetect/tests" #full path to directory with raw fastq files
database_dir: "/PATH/EukDetect/eukdb" #full path to folder with all eukdetect_db files and taxa.sqlite files
database_prefix: "ncbi_eukprot_met_arch_markers.fna" #database prefix

samples: "test" #list sample names here. fastqs must correspond to {samplename}{se_suffix} for SE reads or {samplename}{fwd_suffix} and {samplename}{rev_suffix} for PE
  test:
allind commented 1 year ago

Okay, I assume your EukDetect installation is in something like /home/username/ - instead of putting PATH, put that full path. So for example, if I installed eukdetect in my home directory in /myserver/home/allind, my eukdetect_dir config line would look like this:

eukdetect_dir: "/myserver/home/allind/EukDetect"

Try replacing the instances of PATH in your configfile with this. If you don't know what the path is, type pwd in the installation directory and use that.

shibataryohei commented 1 year ago

Sorry, PATH includes server and my username, which I got using pwd or realpath. pwd at home directory returned

/SERVER/USERNAME

and EukDetect located

/SERVER/USERNAME/EukDetect

Then, more accurately, my yml is below.

eukdetect_dir: "/SERVER/USERNAME/EukDetect"
output_dir: "/SERVER/USERNAME/EukDetect/tests" #directory where output should be written 
paired_end: true #true or false

fwd_suffix: "_R1.fastq.gz" #filename excluding sample name. no need to edit if paired_end= false
rev_suffix: "_R2.fastq.gz" #filename excludign sample name. no need to edit if paired_end = false
se_suffix: ".fastq.gz" #file name excluding sample name. no need to edit if paired_end = true
readlen: 125 #targeted length of your reads. pre-trimming reads not recommended

fq_dir: "/SERVER/USERNAME/EukDetect/tests" #full path to directory with raw fastq files
database_dir: "/SERVER/USERNAME/EukDetect/eukdb" #full path to folder with all eukdetect_db files and taxa.sqlite files
database_prefix: "ncbi_eukprot_met_arch_markers.fna" #database prefix

samples: "test" #list sample names here. fastqs must correspond to {samplename}{se_suffix} for SE reads or {samplename}{fwd_suffix} and {samplename}{rev_suffix} for PE
  test:
allind commented 1 year ago

Hi Rio,

It looks like the error is coming from something strange with your config file that isn't present in the original - maybe there are some mixes of tabs and spaces, or similar, that occurred when you edited the file. I would recommend re downloading the blank eukdetect config file, editing it again, and trying to run the tests. On the plus side, it looks like you're not having issues with the conda environment anymore.

shibataryohei commented 1 year ago

Hi Abigail,

Thanks!!! I think it was the problem just when I copied and pasted here. But, I re-download configfile_for_tests.yml and edit the paths without ANY edits outside of double quotes.

#Config file for testing eukdetect. Edit your paths where specified

eukdetect_dir: "/SERVER/USERNAME/EukDetect"
output_dir: "/SERVER/USERNAME/EukDetect/tests" #directory where output should be written

paired_end: true #true or false

fwd_suffix: "_R1.fastq.gz" #filename excluding sample name. no need to edit if paired_end= false
rev_suffix: "_R2.fastq.gz" #filename excludign sample name. no need to edit if paired_end = false
se_suffix: ".fastq.gz" #file name excluding sample name. no need to edit if paired_end = true
readlen: 125 #targeted length of your reads. pre-trimming reads not recommended

fq_dir: "/SERVER/USERNAME/EukDetect/tests" #full path to directory with raw fastq files
database_dir: "/SERVER/USERNAME/EukDetect/eukdb" #full path to folder with all eukdetect_db files and taxa.sqlite files
database_prefix: "ncbi_eukprot_met_arch_markers.fna" #database prefix

samples: "test" #list sample names here. fastqs must correspond to {samplename}{se_suffix} for SE reads or {samplename}{fwd_suffix} and {samplename}{rev_suffix} for PE
  test:

However, it still returned error message.

.FFF.
======================================================================
FAIL: test_class (__main__._02_RunRunall)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "tests/test_eukdetect.py", line 26, in test_class
    self.assertTrue(code==0, msg=stderr)
AssertionError: False is not true : b'11/09/2022 10:18:15:  Parsing config file ...\nTraceback (most recent call last):\n  File "/SERVER/USERNAME/.conda/envs/eukdetect/bin/eukdetect", line 33, in <module>\n    sys.exit(load_entry_point(\'EukDetect==1.0.1\', \'console_scripts\', \'eukdetect\')())\n  File "/SERVER/USERNAME/.conda/envs/eukdetect/lib/python3.6/site-packages/EukDetect-1.0.1-py3.6.egg/eukdetect/runall.py", line 89, in main\n  File "/SERVER/USERNAME/.conda/envs/eukdetect/lib/python3.6/site-packages/yaml/__init__.py", line 114, in load\n    return loader.get_single_data()\n  File "/SERVER/USERNAME/.conda/envs/eukdetect/lib/python3.6/site-packages/yaml/constructor.py", line 49, in get_single_data\n    node = self.get_single_node()\n  File "/SERVER/USERNAME/.conda/envs/eukdetect/lib/python3.6/site-packages/yaml/composer.py", line 36, in get_single_node\n    document = self.compose_document()\n  File "/SERVER/USERNAME/.conda/envs/eukdetect/lib/python3.6/site-packages/yaml/composer.py", line 55, in compose_document\n    node = self.compose_node(None, None)\n  File "/SERVER/USERNAME/.conda/envs/eukdetect/lib/python3.6/site-packages/yaml/composer.py", line 84, in compose_node\n    node = self.compose_mapping_node(anchor)\n  File "/SERVER/USERNAME/.conda/envs/eukdetect/lib/python3.6/site-packages/yaml/composer.py", line 127, in compose_mapping_node\n    while not self.check_event(MappingEndEvent):\n  File "/SERVER/USERNAME/.conda/envs/eukdetect/lib/python3.6/site-packages/yaml/parser.py", line 98, in check_event\n    self.current_event = self.state()\n  File "/SERVER/USERNAME/.conda/envs/eukdetect/lib/python3.6/site-packages/yaml/parser.py", line 439, in parse_block_mapping_key\n    "expected <block end>, but found %r" % token.id, token.start_mark)\nyaml.parser.ParserError: while parsing a block mapping\n  in "tests/configfile_for_tests.yml", line 3, column 1\nexpected <block end>, but found \'<block mapping start>\'\n  in "tests/configfile_for_tests.yml", line 18, column 3\n'

======================================================================
FAIL: test_class (__main__._03_RunAlnCmd)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "tests/test_eukdetect.py", line 33, in test_class
    self.assertTrue(code==0, msg=stderr)
AssertionError: False is not true : b'11/09/2022 10:18:16:  Parsing config file ...\nTraceback (most recent call last):\n  File "/SERVER/USERNAME/.conda/envs/eukdetect/bin/eukdetect", line 33, in <module>\n    sys.exit(load_entry_point(\'EukDetect==1.0.1\', \'console_scripts\', \'eukdetect\')())\n  File "/SERVER/USERNAME/.conda/envs/eukdetect/lib/python3.6/site-packages/EukDetect-1.0.1-py3.6.egg/eukdetect/runall.py", line 89, in main\n  File "/SERVER/USERNAME/.conda/envs/eukdetect/lib/python3.6/site-packages/yaml/__init__.py", line 114, in load\n    return loader.get_single_data()\n  File "/SERVER/USERNAME/.conda/envs/eukdetect/lib/python3.6/site-packages/yaml/constructor.py", line 49, in get_single_data\n    node = self.get_single_node()\n  File "/SERVER/USERNAME/.conda/envs/eukdetect/lib/python3.6/site-packages/yaml/composer.py", line 36, in get_single_node\n    document = self.compose_document()\n  File "/SERVER/USERNAME/.conda/envs/eukdetect/lib/python3.6/site-packages/yaml/composer.py", line 55, in compose_document\n    node = self.compose_node(None, None)\n  File "/SERVER/USERNAME/.conda/envs/eukdetect/lib/python3.6/site-packages/yaml/composer.py", line 84, in compose_node\n    node = self.compose_mapping_node(anchor)\n  File "/SERVER/USERNAME/.conda/envs/eukdetect/lib/python3.6/site-packages/yaml/composer.py", line 127, in compose_mapping_node\n    while not self.check_event(MappingEndEvent):\n  File "/SERVER/USERNAME/.conda/envs/eukdetect/lib/python3.6/site-packages/yaml/parser.py", line 98, in check_event\n    self.current_event = self.state()\n  File "/SERVER/USERNAME/.conda/envs/eukdetect/lib/python3.6/site-packages/yaml/parser.py", line 439, in parse_block_mapping_key\n    "expected <block end>, but found %r" % token.id, token.start_mark)\nyaml.parser.ParserError: while parsing a block mapping\n  in "tests/configfile_for_tests.yml", line 3, column 1\nexpected <block end>, but found \'<block mapping start>\'\n  in "tests/configfile_for_tests.yml", line 18, column 3\n'

======================================================================
FAIL: test_class (__main__._04_RunAln_and_filter)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "tests/test_eukdetect.py", line 44, in test_class
    self.assertTrue(alncode==0 and filtercode == 0, msg=alnstderr + filterstderr)
AssertionError: False is not true : b'11/09/2022 10:18:16:  Parsing config file ...\nTraceback (most recent call last):\n  File "/SERVER/USERNAME/.conda/envs/eukdetect/bin/eukdetect", line 33, in <module>\n    sys.exit(load_entry_point(\'EukDetect==1.0.1\', \'console_scripts\', \'eukdetect\')())\n  File "/SERVER/USERNAME/.conda/envs/eukdetect/lib/python3.6/site-packages/EukDetect-1.0.1-py3.6.egg/eukdetect/runall.py", line 89, in main\n  File "/SERVER/USERNAME/.conda/envs/eukdetect/lib/python3.6/site-packages/yaml/__init__.py", line 114, in load\n    return loader.get_single_data()\n  File "/SERVER/USERNAME/.conda/envs/eukdetect/lib/python3.6/site-packages/yaml/constructor.py", line 49, in get_single_data\n    node = self.get_single_node()\n  File "/SERVER/USERNAME/.conda/envs/eukdetect/lib/python3.6/site-packages/yaml/composer.py", line 36, in get_single_node\n    document = self.compose_document()\n  File "/SERVER/USERNAME/.conda/envs/eukdetect/lib/python3.6/site-packages/yaml/composer.py", line 55, in compose_document\n    node = self.compose_node(None, None)\n  File "/SERVER/USERNAME/.conda/envs/eukdetect/lib/python3.6/site-packages/yaml/composer.py", line 84, in compose_node\n    node = self.compose_mapping_node(anchor)\n  File "/SERVER/USERNAME/.conda/envs/eukdetect/lib/python3.6/site-packages/yaml/composer.py", line 127, in compose_mapping_node\n    while not self.check_event(MappingEndEvent):\n  File "/SERVER/USERNAME/.conda/envs/eukdetect/lib/python3.6/site-packages/yaml/parser.py", line 98, in check_event\n    self.current_event = self.state()\n  File "/SERVER/USERNAME/.conda/envs/eukdetect/lib/python3.6/site-packages/yaml/parser.py", line 439, in parse_block_mapping_key\n    "expected <block end>, but found %r" % token.id, token.start_mark)\nyaml.parser.ParserError: while parsing a block mapping\n  in "tests/configfile_for_tests.yml", line 3, column 1\nexpected <block end>, but found \'<block mapping start>\'\n  in "tests/configfile_for_tests.yml", line 18, column 3\n11/09/2022 10:18:16:  Parsing config file ...\nTraceback (most recent call last):\n  File "/SERVER/USERNAME/.conda/envs/eukdetect/bin/eukdetect", line 33, in <module>\n    sys.exit(load_entry_point(\'EukDetect==1.0.1\', \'console_scripts\', \'eukdetect\')())\n  File "/SERVER/USERNAME/.conda/envs/eukdetect/lib/python3.6/site-packages/EukDetect-1.0.1-py3.6.egg/eukdetect/runall.py", line 89, in main\n  File "/SERVER/USERNAME/.conda/envs/eukdetect/lib/python3.6/site-packages/yaml/__init__.py", line 114, in load\n    return loader.get_single_data()\n  File "/SERVER/USERNAME/.conda/envs/eukdetect/lib/python3.6/site-packages/yaml/constructor.py", line 49, in get_single_data\n    node = self.get_single_node()\n  File "/SERVER/USERNAME/.conda/envs/eukdetect/lib/python3.6/site-packages/yaml/composer.py", line 36, in get_single_node\n    document = self.compose_document()\n  File "/SERVER/USERNAME/.conda/envs/eukdetect/lib/python3.6/site-packages/yaml/composer.py", line 55, in compose_document\n    node = self.compose_node(None, None)\n  File "/SERVER/USERNAME/.conda/envs/eukdetect/lib/python3.6/site-packages/yaml/composer.py", line 84, in compose_node\n    node = self.compose_mapping_node(anchor)\n  File "/SERVER/USERNAME/.conda/envs/eukdetect/lib/python3.6/site-packages/yaml/composer.py", line 127, in compose_mapping_node\n    while not self.check_event(MappingEndEvent):\n  File "/SERVER/USERNAME/.conda/envs/eukdetect/lib/python3.6/site-packages/yaml/parser.py", line 98, in check_event\n    self.current_event = self.state()\n  File "/SERVER/USERNAME/.conda/envs/eukdetect/lib/python3.6/site-packages/yaml/parser.py", line 439, in parse_block_mapping_key\n    "expected <block end>, but found %r" % token.id, token.start_mark)\nyaml.parser.ParserError: while parsing a block mapping\n  in "tests/configfile_for_tests.yml", line 3, column 1\nexpected <block end>, but found \'<block mapping start>\'\n  in "tests/configfile_for_tests.yml", line 18, column 3\n'

----------------------------------------------------------------------
Ran 5 tests in 1.469s

FAILED (failures=3)

Thanks for your patience!

shibataryohei commented 1 year ago

Hi Abigail,

Finally, python tests/test_eukdetect.py worked!!! I put "test" as a value of key sample:, which is because of my lack of understanding YAML file, and delete it. I really appreciate your kindness and patience.

Rio

allind commented 1 year ago

Great so glad to hear it's working for you! I'll investigate Mac issues in the future, but since you've got the tests working in a linux environment I'll close the issue.