MaestSi / MetONTIIME

A Meta-barcoding pipeline for analysing ONT data in QIIME2 framework
GNU General Public License v3.0
78 stars 17 forks source link

Creation of env during mac installation #52

Closed imanamoeba closed 2 years ago

imanamoeba commented 2 years ago

Hello Simone,

I'm having difficulty getting started with MetONTTIIME on my mac os- it seems to stem from the fact that no environment is created for it within miniconda3. I used the following commands and did change the MINICONDA_DIR in the config file.

git clone https://github.com/MaestSi/MetONTIIME.git                                
cd MetONTIIME
chmod 755 *
./install.sh

output for the above (when i tried it a second time) is listed at the end of this post, in case it is informative. Note that I have tried to edit the R script to also change PIPELINE_DIR but it seems to ignore that? Next, I try:

source activate MetONTIIME_env

EnvironmentNameNotFound: Could not find conda environment: MetONTIIME_env
You can list all discoverable environments with `conda info --envs`.

And MetONTIIME is indeed missing from the environments when listed. I have not had this issue with qiime, and made sure I had the latest version of qiime.

If you have any thoughts on this issue, I would be grateful to hear them.

Many thanks, Bonnie

fatal: destination path 'MetONTIIME' already exists and is not an empty directory.
./install.sh: line 21: realpath: command not found
Warning: 'bioconda' already in 'channels' list, moving to the top
Warning: 'conda-forge' already in 'channels' list, moving to the top
Warning: 'r' already in 'channels' list, moving to the top
Warning: 'anaconda' already in 'channels' list, moving to the top
--2022-09-15 22:30:03--  https://data.qiime2.org/distro/core/qiime2-2022.8-py38-linux-conda.yml
Resolving data.qiime2.org (data.qiime2.org)... 54.200.1.12
Connecting to data.qiime2.org (data.qiime2.org)|54.200.1.12|:443... connected.
HTTP request sent, awaiting response... 302 FOUND
Location: https://raw.githubusercontent.com/qiime2/environment-files/master/2022.8/release/qiime2-2022.8-py38-linux-conda.yml [following]
--2022-09-15 22:30:04--  https://raw.githubusercontent.com/qiime2/environment-files/master/2022.8/release/qiime2-2022.8-py38-linux-conda.yml
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 185.199.110.133, 185.199.108.133, 185.199.109.133, ...
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|185.199.110.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 9729 (9.5K) [text/plain]
Saving to: 'qiime2-2022.8-py38-linux-conda.yml'

qiime2-2022.8-py38- 100%[===================>]   9.50K  --.-KB/s    in 0s      

2022-09-15 22:30:04 (20.0 MB/s) - 'qiime2-2022.8-py38-linux-conda.yml' saved [9729/9729]

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

ResolvePackageNotFound: 
  - xcb-util-image=0.4.0
  - libudev1=249
  - gfortran_impl_linux-64=12.1.0
  - xcb-util=0.4.0
  - gxx_impl_linux-64=12.1.0
  - xcb-util-renderutil=0.3.9
  - libgcc-devel_linux-64=12.1.0
  - xcb-util-keysyms=0.4.0
  - libstdcxx-devel_linux-64=12.1.0
  - alsa-lib=1.2.6.1
  - attr=2.5.1
  - libsanitizer=12.1.0
  - xcb-util-wm=0.4.1
  - gcc_impl_linux-64=12.1.0
  - libgomp=12.1.0
  - blast=2.13.0
  - libstdcxx-ng=12.1.0
  - libcups=2.3.3
  - libgfortran5=12.1.0
  - libxkbcommon=1.0.3
  - pulseaudio=14.0
  - libnsl=2.0.0
  - libgcc-ng=12.1.0
  - libgfortran-ng=12.1.0
  - _openmp_mutex=4.5
  - jack=1.9.18
  - libcap=2.64
  - keyutils=1.6.1

EnvironmentNameNotFound: Could not find conda environment: MetONTIIME_env
You can list all discoverable environments with `conda info --envs`.

Collecting package metadata (current_repodata.json): done
Solving environment: done

# All requested packages already installed.

Requirement already satisfied: pycoQC in /Users/../opt/miniconda3/lib/python3.9/site-packages (2.5.2)
Requirement already satisfied: tqdm>=4.54 in /Users/.../opt/miniconda3/lib/python3.9/site-packages (from pycoQC) (4.64.0)
Requirement already satisfied: h5py>=3.1 in /Users/.../opt/miniconda3/lib/python3.9/site-packages (from pycoQC) (3.7.0)
Requirement already satisfied: pysam>=0.16 in /.../bonniederne/opt/miniconda3/lib/python3.9/site-packages (from pycoQC) (0.19.0)
Requirement already satisfied: numpy>=1.19 in /Users/.../opt/miniconda3/lib/python3.9/site-packages (from pycoQC) (1.22.3)
Requirement already satisfied: plotly==4.1.0 in /Users/.../opt/miniconda3/lib/python3.9/site-packages (from pycoQC) (4.1.0)
Requirement already satisfied: jinja2>=2.10 in /Users/.../opt/miniconda3/lib/python3.9/site-packages (from pycoQC) (3.1.2)
Requirement already satisfied: pandas>=1.1 in /Users/.../opt/miniconda3/lib/python3.9/site-packages (from pycoQC) (1.4.2)
Requirement already satisfied: scipy>=1.5 in /Users/.../opt/miniconda3/lib/python3.9/site-packages (from pycoQC) (1.9.1)
Requirement already satisfied: retrying>=1.3.3 in /Users/.../opt/miniconda3/lib/python3.9/site-packages (from plotly==4.1.0->pycoQC) (1.3.3)
Requirement already satisfied: six in /Users/.../opt/miniconda3/lib/python3.9/site-packages (from plotly==4.1.0->pycoQC) (1.16.0)
Requirement already satisfied: MarkupSafe>=2.0 in /Users/.../opt/miniconda3/lib/python3.9/site-packages (from jinja2>=2.10->pycoQC) (2.1.1)
Requirement already satisfied: python-dateutil>=2.8.1 in /Users/.../opt/miniconda3/lib/python3.9/site-packages (from pandas>=1.1->pycoQC) (2.8.2)
Requirement already satisfied: pytz>=2020.1 in /Users/.../opt/miniconda3/lib/python3.9/site-packages (from pandas>=1.1->pycoQC) (2022.1)

Modify variables PIPELINE_DIR and MINICONDA_DIR in config_MinION_mobile_lab.R
PIPELINE_DIR <- ""
MINICONDA_DIR <- "/Users/.../opt/miniconda3"
MaestSi commented 2 years ago

Hi, I think the problem is due to the fact that, as you already said, you are working with MacOS instead of Linux. First, in the install.sh file, you should replace lines:

wget https://data.qiime2.org/distro/core/qiime2-2022.8-py38-linux-conda.yml
conda env create -n MetONTIIME_env --file qiime2-2022.8-py38-linux-conda.yml
rm qiime2-2022.8-py38-linux-conda.yml

with:

wget https://data.qiime2.org/distro/core/qiime2-2022.8-py38-osx-conda.yml
conda env create -n MetONTIIME_env --file qiime2-2022.8-py38-osx-conda.yml
rm qiime2-2022.8-py38-osx-conda.yml

Second, you should probably install realpath and other tools with:

brew install coreutils Then, try repeating the installation process. Let me know if this fixes the issue! Best, SImone

imanamoeba commented 2 years ago

Hi Simone, Thanks for the speedy response. Ah, I should have spotted the 'linux' part. It did solve my problem, I can now use the MetONTIIME.sh script on my mac, hurray! I am having trouble getting my command to work as I want it, but that is user error and I can post to the qiime forum or here as a separate issue if some troubleshooting doesn't help me. Cheers, Bonnie. One other very minor, unrelated thing I noticed, was that in the 'read me' section on importing reference sequences and taxonomy, would it be better to include 'quotes' for the text specifiying type? i.e.:

qiime tools import \
--type 'FeatureData[Sequence]' \
--input-path SILVA_132_QIIME_release/rep_set/rep_set_16S_only/99/silva_132_99_16S.fna \
--output-path silva_132_99_16S_sequence.qza

Rather than

--type FeatureData[Sequence] \

Not sure if this was an oversight or just a mac thing (or a me thing!)

MaestSi commented 2 years ago

Hi @imanamoeba , glad it solved the main issue. I will update the readme accordingly. In Linux I never had issues with that command, but it is worth editing it. Best, Simone