# Metagenomics 2: If Hyb-Piper does not work
Note DO NOT get your hopes up....
Many many people on github make note that hyb-piper does not work for them. I did not work for me on anonther computer running ubuntu but it worked on this computer, maybe because we used Conda!
I am no longer using the computer used in the first Metagenomics scripts, and we will blast past alot of the installation stuff.
```
reed@reed-steppe:~$ uname -a
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
Address sizes: 39 bits physical, 48 bits virtual
CPU(s): 16
On-line CPU(s) list: 0-15
Thread(s) per core: 2
Core(s) per socket: 8
Socket(s): 1
NUMA node(s): 1
Vendor ID: GenuineIntel
CPU family: 6
Model: 167
Model name: 11th Gen Intel(R) Core(TM) i7-11700K @ 3.60GHz
Stepping: 1
CPU MHz: 3600.000
CPU max MHz: 5100.0000
CPU min MHz: 800.0000
BogoMIPS: 7200.00
Virtualization: VT-x
reed@reed-steppe:~$ nproc --all
16
reed@reed-steppe:~$ uname -a
Linux reed-steppe 5.13.0-39-generic #44~20.04.1-Ubuntu SMP Thu Mar 24 16:43:35 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
```
What I will focus on instead is giving Conda a chance. We will download Conda as a package manager and Anaconda
# Download Anaconda
You can go to the [Anaconda downloads](https://www.anaconda.com/products/distribution?gclid=Cj0KCQjw_4-SBhCgARIsAAlegrXAjXe0A4iqM2IqbZZkJigwqBOai13UOABusXpOAwnzPrNec4mJgdcaAtuCEALw_wcB) page and find the version relevant to you and copy the link. It is easier to install from command line then clicking and dragging IMO.
```
sudo apt-get update -y
sudo apt-get upgrade -y
cd /tmp
wget https://repo.anaconda.com/archive/Anaconda3-2021.11-Linux-x86_64.sh
bash Anaconda3-2021.11-Linux-x86_64.sh
```
Now you will need to respond to some prompts in the tmerinal. I let my conda install directly within my user profile. You should now have conda installed.
Check the version, and check for updates and install them. You will now also have (base) yourname@yourname-computer~$ starting each terminal line
```
conda --version
conda update conda
```
## Set up a conda environment
We will now create an environment to store all of our metagenomics materials in. These environments serve to isolate the contents of projects.
```
conda create --name metagenomics
conda activate metagenomics
conda info --envs
# this should show base and metagenomics, which will have an asterisk next to it.
```
Now we will turn to installing biopython - make sure you are in the right project ('metagenomics' !)
```
conda install biopython
```
From now on pretty much everything we are going to do should be occuring in this 'environment', to illustrate the point
```
$PATH
bash: /home/reed/anaconda3/envs/metagenomics/bin:/home/reed/anaconda3/condabin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin: No such file or directory
```
Notice that each of the above paths are within the anaconda3/envs.
```
# ensure you are still in metagenomics folder
sudo apt install curl
git clone https://github.com/mossmatters/HybPiper.git
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
echo 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"' >> /home/reed/.profile
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
sudo apt update -y
brew install blast bwa gcc parallel spades samtools
parallel --bibtex
sudo apt-get update -y
sudo apt-get upgrade -y
sudo apt-get install -y exonerate
```
In case you forgot to save the citation for parallel it is below as a bibtex entry.
Ensure the file is in a suitable location such as...
```
cd /home/reed/HybPiper
python3 reads_first.py --check-depend
```
this should hopefully say all packages can be found!
```
cd /test_dataset
bash run_tests.sh
```
if you run this and all kinds of stuff happens that is good.
References:
@software{tange_2022_6377950,
author = {Tange, Ole},
title = {GNU Parallel 20220322 ('Маріу́поль')},
month = Mar,
year = 2021,
note = {{GNU Parallel is a general parallelizer to run
multiple serial command line programs in parallel
without changing them.}},
publisher = {Zenodo},
doi = {10.5281/zenodo.6377950},
url = {https://doi.org/10.5281/zenodo.6377950}
}
1.