Commit 5a8784f3 authored by Ivan Vanát's avatar Ivan Vanát
Browse files

Merge branch 'master' of https://gitlab.fi.muni.cz/lexa/nested

parents 582e0068 87057a68
Loading
Loading
Loading
Loading

LICENSE

0 → 100644
+674 −0

File added.

Preview size limit exceeded, changes collapsed.

+113 −12
Original line number Diff line number Diff line
# nested

#### External tools
## Introduction

*nested* (now also called *TE-greedy*) is software to analyze nested LTR transposable elements 
in DNA sequences, such as reference genomes. It is made of two components: *nested-generator* 
for generating simulated sequences of nested retrotransposons, and *nested-nester* (now called 
*TE-greedy-nester*) that looks for nested, as well as non-nested and solo-LTR repeat sequences 
in the input. Unlike other similar software, *TE-greedy-nester* is structure-based by using 
de-novo retrotransposon identification software *LTR Finder*, relying on sequence information 
only secondarily.
A virtual machine with TE-greedy-nester installed is available at http://hedron.fi.muni.cz/TE-nester_Mint.zip

## External tools
Program is using other external tools. Before usage make sure you have the following tools installed:

- LTR finder (v 1.05+) -
@@ -10,26 +21,116 @@ https://blast.ncbi.nlm.nih.gov/Blast.cgi?CMD=Web&PAGE_TYPE=BlastDocs&DOC_TYPE=Do
- genometools (v 1.5.8) with gt sketch -
https://github.com/genometools/genometools

#### Install
## Installation - a step-by-step guide
The following is an installation procedure that works on our recent Linux Ubuntu based machines.

### Prerequisites

#### ncbi blast+

```
sudo apt install blast2
```
For user-space installation from source, please, follow https://www.ncbi.nlm.nih.gov/books/NBK279671/ with version 2.2.31+

#### LTR_finder

```
git clone https://github.com/xzhub/LTR_Finder.git
cd LTR_Finder/source
make
```

#### genome tools

```
sudo apt-get install genometools
sudo apt-get install libgenometools0 libgenometools0-dev
```
For user-space installation use:

```
git clone https://github.com/genometools/genometools.git
cd genometools
make -j4
make -j4 install prefix=~/gt
```
See GenomeTools repository for modifications and trouble-shooting of the installation procedure

#### python requirements using pip3

```
sudo pip3 install bcbio-gff==0.6.4 click==6.7 decorator==4.2.1 networkx==2.1 numpy==1.14.2
PyYAML==3.12 six==1.11. --no-cache-dir
```
For user-space installation use:

```
pip3 install bcbio-gff==0.6.4 click==6.7 decorator==4.2.1 networkx==2.1 numpy==1.14.2
PyYAML==3.12 six==1.11. --no-cache-dir --user
```
Note1: the version numbers are minimal recommended versions, on many systems you can leave those out.

Note2: With user-space installation of Python software you may need to set PYTONPATH accordingly.

First check its value, not to overwrite something needed by your system:

```
echo $PYTHONPATH
```
Setting can be done with
```
export PYTHONPATH="~/.local/bin"
```
Separate multiple directory entries with a colon.

### TE-greedy-nester

#### clone whole directory from gitlab:

```
git clone https://gitlab.fi.muni.cz/lexa/nested.git
cd nested
```

#### modify respective paths in 'config_template.yml':

```
cp config_template.yml config.yml
vi config.yml
```
Note: we're looking into ways to automate this step

#### after 'config.yml' is created call:

```
chmod +x setup.sh
sudo ./setup.sh
sudo bash ./setup.sh
```

#### Setting up the config
#### For user-space installation of TE-greedy-nester call:

```
bash ./setup.sh --user
```


#### that’s all!

## Setting up the config
Before usage, **config.yml** needs to be set up:

- ltr paths - executable, prosite and tRNAdb
- ltr arguments 
- gt sketch path
- gt sketch arguments
- blastx protein database (our database available at ... )
- ltr finder paths - executable, prosite and tRNAdb
- ltr finder arguments 
- genome tools sketch path
- genome tools sketch arguments
- blastx protein database (installed together with TE-greedy-nester)
- blastx arguments

**Note**: `config.yml` is located by default in directory `/etc/nested/.`
**Note**: `config.yml` is located by default in directory `/etc/nested/.` after 
normal installation or `~/.local/etc/nested/.` after user space installation 
using the --user switch with setup.sh or setup.py 

#### Usage
## Usage
```
Usage: nested-nester [OPTIONS] INPUT_FASTA

+177 KiB

File added.

No diff preview for this file type.

+1 −1
Original line number Diff line number Diff line
__version__ = '1.0.0'
__author__ = 'Radovan Lapár'
__author__ = 'Radovan Lapar, Ivan Vanat, Pavel Jedlicka, Matej Lexa <lexa@fi.muni.cz>'
+11 −1
Original line number Diff line number Diff line
import yaml
import os.path
from os import path
from os.path import expanduser

with open('/etc/nested/config.yml') as stream:
# depending on whether nester was installed with the --user argument locally or not
home = os.path.expanduser("~")
if path.exists(home + '/.local/etc/nested/config.yml'):
    config_path = home + '/.local/etc/nested/config.yml'
else:
    config_path = '/etc/nested/config.yml'
    
with open(config_path) as stream:
    config = yaml.load(stream)


Loading