Install SPAdes assembler using miniconda
Install Ubuntu
Steps:
- Download and install Ubuntu 22.04.3 LTS (Desktop)
- Install Ubuntu, create
bioinfoman
user. Set new password and keep it private. - After installation finished, create a new user, set
bioinfo123
password.sudo adduser fcqb2023
- Logout (GUI) session and login using the new user account.
Install and setup miniconda
Steps:
- Download and install miniconda in home folder:
mkdir -p ~/miniconda3
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda3/miniconda.sh
bash ~/miniconda3/miniconda.sh -b -u -p ~/miniconda3
rm -rf ~/miniconda3/miniconda.sh
~/miniconda3/bin/conda init bash
-
Close and reopen the Terminal (bash)
-
Disable auto activate base environment
conda config --set auto_activate_base False
-
Close and reopen the Terminal (bash)
- Multi-user conda installation
#switch to root/admin user su bioinfoman myuser=fcqb2023 mypath=/home/$myuser/miniconda3/condabin/conda mygroup=bioinformatica-fcqb #Create a new group sudo groupadd $mygroup # Change the group ownership to "mygroup" on the entire directory where Anaconda is installed. Replace /PATH/TO/ANACONDA/INSTALL with the actual path to your installed Anaconda file. sudo chgrp -R $mygroup $mypath # Set read and write permission for the owner, root, and the mygroup only. Replace /PATH/TO/ANACONDA/INSTALL with the actual path to your installed Anaconda file. sudo chmod 770 -R $mypath # Add users to a group. Replace USERNAME with the username of the user you are adding. sudo adduser $myuser $mygroup # switch to normal user (fcqb2023 user) exit
- Create a new conda environment
conda create --name bioinformatica
- install SPADES in the new environment
conda activate bioinformatica
conda install -c bioconda spades
- Execute test
spades.py --test
- If you got this error:
AttributeError: module 'collections' has no attribute 'Hashable'
, then execute:
sed -i '126 s/isinstance(key, collections\.Hashable)/isinstance(key, collections\.abc\.Hashable)/' ~/miniconda3/envs/bioinformatica/share/spades-3.13.1-0/share/spades/pyyaml3/constructor.py
- Execute test again
spades.py --test
you should get:
========= TEST PASSED CORRECTLY.
THE END!