Commit 2ff64d88 authored by jedlickap's avatar jedlickap
Browse files

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

parents 9bf4d429 57855df4
Loading
Loading
Loading
Loading

Docker/Dockerfile

0 → 100644
+73 −0
Original line number Diff line number Diff line
# Dockerfile for TE-greedy-nester

# Download LTR_Finder and TRF and compile them, download TE-greedy-nester 

FROM debian:bullseye-backports AS builder

WORKDIR /tools

RUN apt-get update \
    && apt-get install -y -qq \
        git \
        build-essential \
        automake

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

RUN git clone https://github.com/xzhub/LTR_Finder.git

RUN git clone https://github.com/Benson-Genomics-Lab/TRF.git

RUN cd LTR_Finder/source \
    && make
    
RUN cd /tools/TRF \
    && mkdir build \
    && cd build \
    && ../configure \
    && make

# copy preconfigured "config.yml" and modified "setup.py", to avoid compile issues with newer Python 3 versions
COPY /nested /tools/nested


# Install TE-greedy-nester and its requirements

FROM debian:bullseye-backports AS nester

COPY --from=builder /tools ./

RUN apt-get update \
    && apt-get install -y -qq --no-install-recommends --purge \
        build-essential \
        genometools \
        libgenometools0 \
        libgenometools0-dev \
        libyaml-dev \
        ncbi-blast+-legacy \
        procps \
        python3 \
        python3-dev \
        python3-pip \
    && cd TRF/build \
        && make install \
    && pip3 install --no-cache-dir \
        "PyYAML>=3.13,<6.0" \
        bcbio-gff \
        click \
        decorator \
        networkx \
        numpy \
        six \
    && cd /nested \
        && chmod +x setup.sh \
        && ./setup.sh \
    && apt-get purge -y \
        build-essential \
        libgenometools0-dev \
        libyaml-dev \
        python3-dev \
        && apt-get -y autoremove \
        && apt-get autoclean \
        && rm -rf /var/lib/apt/lists/* \
        && rm -rf /tmp/*
+61 −0
Original line number Diff line number Diff line
ltr:
  path: '/LTR_Finder/source/ltr_finder'
  prosite_path: &prosite_path /nested/dbs/prosite
  tRNAdb_path: &tRNAdb_path /LTR_Finder/source/tRNA/Athal-tRNAs.fa
  args:
    l: 32
    S: 3
    M: 0.2
    o: 2
    p: 15
    g: 80
    G: 5
    T: 2
    w: 2 #don't change, parsing format required!
    a: *prosite_path
    s: *tRNAdb_path
    
gt:
  path: 'gt'
  command: 'sketch'
  style_path: &style_path /nested/nested/config/gt.style
  args: 
    width: 1400
    style: *style_path

blastx:
  db_path: &db_path /nested/dbs/gydb_arh_chdcr/gydb_arh_chdcr.fa
  args:
    db: *db_path
    outfmt: 5 #don't change, parsing format required!
    num_threads: 3
    dbsize: 90000
    word_size: 2
    evalue: 1

gff_format:
  genome_browser:
    te_base: nested_repeat
    domain: polypeptide_conserved_region
    te: repeat_fragment
    pbs: primer_binding_site
    ppt: RR_tract
    ltr: long_terminal_repeat
    tsr: target_site_duplication

igv_colors:
  tsr_left: '#333333'
  tsr_right: '#333333'
  ltr_left: '#f032e6'
  ltr_right: '#f032e6'
  pbs: '#c7e9c0'
  ppt: '#41ab5d'
  GAG: '#225ea8'
  AP: '#ffeda0'
  RT: '#feb24c'
  RNaseH: '#fc4e2a'
  INT: '#b10026'
  default: '#a9a9a9'
  CHR: '#6a51a3'

logdir: /tmp/nested/logs

Docker/nested/setup.py

0 → 100644
+24 −0
Original line number Diff line number Diff line
from setuptools import setup, find_packages

import nested

setup(
    name='nested',
    version=nested.__version__,
    description='Nested description',
    author=nested.__author__,
    packages=find_packages(),
    install_requires=[
        'bcbio-gff>=0.6.4',
        'biopython>=1.70',
        'click>=6.7',
        'networkx>=2.1',
        'PyYAML>=3.13,<6.0'
    ],
    entry_points={
        'console_scripts': [
            'nested-generator=nested.cli.generator:main',
            'nested-nester=nested.cli.nester:main'
        ]
    }
)
+19 −4
Original line number Diff line number Diff line
@@ -25,20 +25,35 @@ https://github.com/genometools/genometools
An Ubuntu virtual machine with the latest version of TE-greedy-nester installed is available at http://hedron.fi.muni.cz/TEgnester

## Docker container
[Docker container](https://hub.docker.com/repository/docker/tegreedy/nested) is available from docker hub.
Example how to run:

Folder "Docker" contains necessary files to build Docker Image.  
Example how to build or rebuild:

```bash
# building image
# get in folder with "Dockerfile"
cd Docker
docker build --progress=plain -t nester .

# to rebuild use "--no-cache"
docker build --no-cache --progress=plain -t nester .
```

Prebuild [Docker image](https://hub.docker.com/r/tegreedy/nested) is available from docker hub.  
Example how to run:

```bash
# help
docker run tegreedy/nested:2.0.0 nested-nester --help
```
```

```bash
# create woking and output directories
mkdir -p data/nester_out && cd data
# get test data
wget https://gitlab.fi.muni.cz/lexa/nested/-/raw/master/test_data/151kb_adh1_bothPrimes.fasta
# run nester
docker run -v ${PWD}:/data tegreedy/nested:2.0.0 nested-nester -d /data/nester_out -n 4 /data/151kb_adh1_bothPrimes.fasta

```

## Installation - a step-by-step guide
+2 −2
Original line number Diff line number Diff line
@@ -5,7 +5,7 @@
#remove unnecessary dirs
rm -rf build dist nested.egg-info

if [ "$1" == "--user" ]
if [ $1 = "--user" ]
  then
    python3 setup.py install --user
    # move config file after local installation with 'pip3 install --user'