bdaisley / isolateR

Automated processing of Sanger sequencing data, taxonomic profiling, and generation of microbial strain libraries
Other
9 stars 1 forks source link

Which version of R is recommended to install the isolateR? #10

Closed xmeng closed 1 month ago

xmeng commented 1 month ago

Hello,

Thanks for developing the library. I got the following error messages

I was wondering which version of R is recommended to install the isolateR.

Thanks, xmeng

bdaisley commented 1 month ago

Hi @xmeng, we recommend using R (>= 4.0) for installing isolateR. Clarification has now been added to the DESCRIPTION file, thanks for pointing out the missing details!

Additionally, if you are installing to a conda environment, you can use the following commands:

To install to a new environment named 'isolateR'

conda create --name isolateR bdaisley::r-isolater

To install to an exisiting environment

#conda activate EXISTING-ENVIRONMENT
conda install bdaisley::r-isolater

I hope this helps answer your question.

xmeng commented 1 month ago

Hello,

Thanks for your reply. I tried the both conda installation methods. I am able to run the above conda commands correctly. Unfortunately, none of the work.

The isolateR package is not in the R environment, and cannot be found anywhere.

system.file(package='isolateR') [1] "" vs. system.file(package="ggplot2") [1] "/home/ec2-user/miniconda3/envs/isolateR/lib/R/library/ggplot2"

$conda install bdaisley::r-isolater Collecting package metadata (current_repodata.json): done Solving environment: done

Package Plan

environment location: /home/ec2-user/miniconda3/envs/R4.3

added / updated specs:

The following NEW packages will be INSTALLED:

libnsl conda-forge/linux-64::libnsl-2.0.1-hd590300_0 libsqlite conda-forge/linux-64::libsqlite-3.46.0-hde9e2c9_0 libxcrypt conda-forge/linux-64::libxcrypt-4.4.36-hd590300_1 numpy conda-forge/linux-64::numpy-2.0.0-py312h22e1c76_0 pip conda-forge/noarch::pip-24.0-pyhd8ed1ab_0 python conda-forge/linux-64::python-3.12.4-h194c7f8_0_cpython python_abi conda-forge/linux-64::python_abi-3.12-4_cp312 r-isolater bdaisley/noarch::r-isolater-0.0.0.9004-py_0 setuptools conda-forge/noarch::setuptools-71.0.4-pyhd8ed1ab_0 wheel conda-forge/noarch::wheel-0.43.0-pyhd8ed1ab_1

Proceed ([y]/n)? y

Preparing transaction: done Verifying transaction: done Executing transaction: done

bdaisley commented 1 month ago

@xmeng It looks like a pre-release version (r-isolater-0.0.0.9004-py_0) containing only the skeleton environment was installed instead of the latest version (r-isolater-1.0.0-0). Try the following:

Update conda and install latest version of isolateR

# Update to latest conda version to address any compatibility issues
conda update -n base conda

# Install the latest version of isolateR by explicitly stating the version number
conda create --name isolateR r-isolater=1.0.0-0 -c bdaisley -c conda-forge -c bioconda

Hopefully this solves your issue.

xmeng commented 1 month ago

Thank you @bdaisley for the updated conda installation commands. I am able to run the example command with a single input folder, however, I got some new errors.

Thanks.

Export directory: /data/16S/Sanger/QB_RAW_DATA_by_group/20240629_M002-69_16S-Sanger/all_ab1_files/isolateR_output

HTML results exported: /data/16S/Sanger/QB_RAW_DATA_by_group/20240629_M002-69_16S-Sanger/all_ab1_files/isolateR_output/01_isoQC_results.html

CSV results exported: /data/16S/Sanger/QB_RAW_DATA_by_group/20240629_M002-69_16S-Sanger/all_ab1_files/isolateR_output/01_isoQC_trimmed_sequences_PASS.csv <--- Required in Step 2: 'isoTAX' CSV results exported: /data/16S/Sanger/QB_RAW_DATA_by_group/20240629_M002-69_16S-Sanger/all_ab1_files/isolateR_output/01_isoQC_trimmed_sequences_FAIL.csv longjmp causes uninitialized stack frame : /usr/bin/chromium-browser terminated [0724/154350.880852:ERROR:file_io_posix.cc(145)] open /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq: No such file or directory (2) [0724/154350.880907:ERROR:file_io_posix.cc(145)] open /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq: No such file or directory (2) FASTA file with [PASS] sequences exported:
/data/16S/Sanger/QB_RAW_DATA_by_group/20240629_M002-69_16S-Sanger/all_ab1_files/isolateR_output/01_isoQC_trimmed_sequences_PASS.fasta FASTA file with [FAIL] sequences exported:
/data/16S/Sanger/QB_RAW_DATA_by_group/20240629_M002-69_16S-Sanger/all_ab1_files/isolateR_output/01_isoQC_trimmed_sequences_FAIL.fasta

Staging files Note: Use of db="16S" defaults to the Targeted Loci Bacteria 16S rRNA database (db="16S_bac"). Please use db="16_arc" for Archaea. Detecting operating system... VSEARCH already downloaded. Searching query sequences against NCBI database This may take several minutes... /home/ec2-user/miniconda3/envs/isolateR/lib/R/library/isolateR/vsearch/vsearch-2.23.0: /lib64/libm.so.6: version `GLIBC_2.29' not found (required by /home/ec2-user/miniconda3/envs/isolateR/lib/R/library/isolateR/vsearch/vsearch-2.23.0) Determining closest species match Error in file(file, "rt") : cannot open the connection Calls: isoALL ... tbl_vars_dispatch -> mutate -> read.csv -> read.table -> file In addition: Warning message: In file(file, "rt") : cannot open file 'temp_vsearch/02_isoTAX_output.uc': No such file or directory Execution halted

bdaisley commented 1 month ago

@xmeng This issue looks to be caused by an old version of glibc installed on your system. The version of vsearch (v-2.23.0) being called by isolateR requires glibc version >=2.29.

If you're running Ubuntu 18.04 distribution (which has glibc 2.27), this could cause the issue. Ubuntu 20.04 distribution (which has glibc 2.31) should satisfy the issue if it's possible for you to upgrade the system you're working on.

Check what version of glibc you have installed:

ldd --version

Example output:

ldd (Ubuntu GLIBC 2.31-0ubuntu9.16) 2.31 Copyright (C) 2020 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Written by Roland McGrath and Ulrich Drepper.

xmeng commented 1 month ago

@bdaisley Thank you again for your detailed instructions.

After upgrading the OS, I reinstalled isolateR and it works now.

Thanks.