---
# System prepended metadata

title: PEP-Seq Explorer Installation

---

# PEP-Seq Explorer Installation  



## Installing dependecies  


### Use your system package manager for the following:



*For Debian/Ubuntu systems, use:*
```
sudo apt install -y build-essential wget perl git cpanminus curl bioperl libseqan2-dev libterm-progressbar-perl liblog-log4perl-perl libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev llvm libncurses5-dev libncursesw5-dev xz-utils tk-dev libffi-dev liblzma-dev python-openssl dos2unix gettext libcurl4-openssl-dev libxml2-dev clang xorg-dev
```



*For CentOS/Fedora/RHEL systems, use:*
```

sudo dnf install -y wget perl git gcc gcc-c++ make autoconf automake gperf libtool ncurses-devel kernel-devel automake perl-App-cpanminus curl seqan2-headers perl-Term-ProgressBar perl-Log-Log4perl perl-XML-DOM-XPath zlib-devel bzip2 bzip2-devel readline-devel sqlite sqlite-devel openssl-devel xz xz-devel libffi-devel findutils dos2unix llvm gettext tk-devel tcl-devel blt-devel gdbm-devel libxml2-devel libcurl-devel clang libX11 libX11-devel libXt libXt-devel libjpeg-turbo-devel xorg-x11-apps xorg-x11-fonts-75dpi xorg-x11-fonts-100dpi
```


### The following perl modules can be installed through cpanminus:
```
cpanm --sudo Test::More FileHandle Getopt::Long File::Basename File::Temp FindBin XSLoader
```
If opting for installing perl modules on ~/perl over /usr/local/bin, remove "--sudo".

**In RPM based systems, BioPerl is best installed through CPAN, as the package version is unavailable:**
```
cpanm --sudo Bio::Root::Version
```



---


### [diamond](https://github.com/bbuchfink/diamond)
```
wget http://github.com/bbuchfink/diamond/releases/download/v2.0.7/diamond-linux64.tar.gz
tar xzf diamond-linux64.tar.gz
```
Diamond should be added to $PATH. An easy way to do it is to create a symbolic link to a directory present in the $PATH variable by default, for instance, /usr/local/bin/:
```
ln -s '/path/to/diamond' /usr/local/bin/
```

### [vsearch](https://github.com/torognes/vsearch)
```
git clone https://github.com/torognes/vsearch.git
cd vsearch
./autogen.sh
./configure
make
sudo make install
```

### [pyenv](https://github.com/pyenv/pyenv)

> [Refer to [prerequisites](https://github.com/pyenv/pyenv/wiki/Common-build-problems ? other os


```
curl https://pyenv.run | bash
```

*Add pyenv to your $PATH by appending ~/.bashrc or your corresponding shell file with a text editor (like vim or nano):*
```
export PATH="/home/'user'/.pyenv/bin:$PATH"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
```
Then, restart your shell:
```
exec $SHELL
```




#### Set [atropos](https://https://pypi.org/project/atropos/) environment with pyenv
>Recommended python 3.6+

```
pyenv install 3.9.0  
pyenv virtualenv 3.9.0 atropos
pyenv shell atropos
pip3 install cython atropos numpy matplotlib 
pyenv shell --unset
```


### [bedtools](https://github.com/arq5x/bedtools2) (RHEL/Fedora/CentOS systems only)


```
wget https://github.com/arq5x/bedtools2/releases/download/v2.30.0/bedtools-2.30.0.tar.gz
tar -xvf bedtools-2.30.0.tar.gz 
cd bedtools2
make 
sudo cp bin/* /usr/local/bin 
```


### [R](https://www.r-project.org/) setup (3.6.3)
*For Debian/Ubuntu systems, use:*
```
sudo apt install r-base r-base-dev

```
*For CentOS/Fedora/RHEL systems, use:*
```
wget https://cloud.r-project.org/src/base/R-3/R-3.6.3.tar.gz
tar -xvf R-3.6.3.tar.gz
cd R-3.6.3
./configure
make 
sudo make install
make check
```

 
On R prompt (Use *$ sudo R* to install packages to the default system-wide location, otherwise R will prompt for a personal library), input: 

```
install.packages("RColorBrewer")

if (!requireNamespace("BiocManager", quietly = TRUE))
    install.packages("BiocManager") 

BiocManager::install(c("rtracklayer", "Gviz"))
```

## PEPE setup  


```
git clone https://github.com/bioinfo-fcav/PEPE.git
cd PEPE
perl Makefile.PL
make
make test
sudo make install
```    

### A. thaliana reference files
First log in to [phytozome](https://phytozome.jgi.doe.gov/pz/portal.html) (register if you haven't) to enable downloads.

The files can be found here:
https://genome.jgi.doe.gov/portal/pages/dynamicOrganismDownload.jsf?organism=Athaliana
Download the following under Araport11 -> annotation:

    Athaliana_447_Araport11.protein.fa
	Athaliana_447_Araport11.geneName.txt
	Athaliana_447_Araport11.defline.txt
	Athaliana_447_Araport11.annotation_info.txt	


Then, use diamond to format the protein fasta file:
```
diamond makedb --in Athaliana_447_Araport11.protein.fa -d Athaliana_447_Araport11  
```    

### .cfg changes

Adjust this settings to your systems available memory and cores:
```
demux_reads_merger_memory="512M"
num_threads=2
```
Choose your availabe demux reads merger, in this case, vsearch.

Input the path to each necessary files.

Change other settings as you see fit.  


### Running

Make sure your output directory is empty, then, on PEPE/scripts:

```
./PEPE.sh ./PEPE.cfg
```







