Commit 0ec9ff23 authored by Floreal Cabanettes's avatar Floreal Cabanettes
Browse files

Merge master to exportsip

parents a88ebe18 94fcf64a
......@@ -4,15 +4,19 @@ import argparse
import wget
import os
VERSION = "1.0.1"
parser = argparse.ArgumentParser(description="Split huge contigs")
parser.add_argument('-d', '--dir', type=str, required=False, help="Folder into store files", default=".")
args = parser.parse_args()
for file_dl in ["https://forgemia.inra.fr/genotoul-bioinfo/dgenies/raw/master/src/dgenies/bin/all_prepare.py",
"https://forgemia.inra.fr/genotoul-bioinfo/dgenies/raw/master/src/dgenies/bin/filter_contigs.py",
"https://forgemia.inra.fr/genotoul-bioinfo/dgenies/raw/master/src/dgenies/bin/index.py",
"https://forgemia.inra.fr/genotoul-bioinfo/dgenies/raw/master/src/dgenies/bin/split_fa.py"]:
for file_dl in [
"https://raw.githubusercontent.com/genotoul-bioinfo/dgenies/v%s/src/dgenies/bin/all_prepare.py" % VERSION,
"https://raw.githubusercontent.com/genotoul-bioinfo/dgenies/v%s/src/dgenies/bin/filter_contigs.py" % VERSION,
"https://raw.githubusercontent.com/genotoul-bioinfo/dgenies/v%s/src/dgenies/bin/index.py" % VERSION,
"https://raw.githubusercontent.com/genotoul-bioinfo/dgenies/v%s/src/dgenies/binsplit_fa.py" % VERSION
]:
d_file = os.path.join(args.dir, file_dl.rsplit("/", 1)[1])
print("Downloading %s..." % d_file)
wget.download(file_dl, args.dir, None)
......
#!/usr/bin/env python3
import os
import sys
from flask import Flask
from .config_reader import AppConfigReader
from .lib.crons import Crons
VERSION = "1.0.1"
app = None
app_title = None
APP_DATA = None
......
......@@ -160,7 +160,7 @@ Also, scripts for preparing data must be moved in a location accessible by all n
To get these scripts, follow the commands below:
curl https://forgemia.inra.fr/genotoul-bioinfo/dgenies/raw/master/get_cluster_scripts.py > get_cluster_scripts.py
curl https://raw.githubusercontent.com/genotoul-bioinfo/dgenies/v{{version}}/get_cluster_scripts.py > get_cluster_scripts.py
python get_cluster_scripts.py -d <dir>
With `<dir>`: the folder into save the scripts (must be accessible by cluster nodes).
......
......@@ -280,7 +280,7 @@
{% set fnote_tab = fnote %}
<p class="afterworlff"><sup id="fn{{ fnote_tab }}"><a href="#fn{{ fnote_tab }}" id="ref{{ fnote_tab }}">{{ fnote_tab }}</a></sup> In PAF or MAF format.</p>
{% set fnote_tab = fnote_tab + 1 %}
<p class="afterworlff"><sup id="fn{{ fnote_tab }}"><a href="#fn{{ fnote_tab }}" id="ref{{ fnote_tab }}">{{ fnote_tab }}</a></sup> Fasta file or index built by <a href="#">our tool</a>.</p>
<p class="afterworlff"><sup id="fn{{ fnote_tab }}"><a href="#fn{{ fnote_tab }}" id="ref{{ fnote_tab }}">{{ fnote_tab }}</a></sup> Fasta file or index built by <a href="https://raw.githubusercontent.com/genotoul-bioinfo/dgenies/v{{version}}/src/dgenies/bin/index.py" download="index.py">our tool</a>.</p>
{% set fnote_tab = fnote_tab + 1 %}
<p class="afterworlff"><sup id="fn{{ fnote_tab }}"><a href="#fn{{ fnote_tab }}" id="ref{{ fnote_tab }}">{{ fnote_tab }}</a></sup> From a previous run.</p>
{% set fnote_tab = fnote_tab + 1 %}
......
from dgenies import app, app_title, app_folder, config_reader, mailer, APP_DATA, MODE, DEBUG
from dgenies import app, app_title, app_folder, config_reader, mailer, APP_DATA, MODE, DEBUG, VERSION
import os
import time
......@@ -18,6 +18,7 @@ from dgenies.tools import Tools
from markdown import Markdown
from markdown.extensions.toc import TocExtension
import tarfile
from jinja2 import Environment
if MODE == "webserver":
from dgenies.database import Session, Gallery
from peewee import DoesNotExist
......@@ -77,7 +78,7 @@ def run():
example=config_reader.example_target != "",
target=os.path.basename(config_reader.example_target),
query=os.path.basename(config_reader.example_query), tools_names=tools_names, tools=tools,
tools_ava=tools_ava)
tools_ava=tools_ava, version=VERSION)
@app.route("/run-test", methods=['GET'])
......@@ -320,7 +321,7 @@ def get_file(file, gzip=False): # pragma: no cover
@app.route("/documentation/run", methods=['GET'])
def documentation_run():
with open(os.path.join(app_folder, "doc_run.md" if MODE == "webserver" else "doc_run_standalone.md"), "r",
with open(os.path.join(app_folder, "md", "doc_run.md" if MODE == "webserver" else "doc_run_standalone.md"), "r",
encoding='utf-8') as install_instr:
content = install_instr.read()
md = Markdown(extensions=[TocExtension(baselevel=1)])
......@@ -348,7 +349,7 @@ def documentation_run():
@app.route("/documentation/result", methods=['GET'])
def documentation_result():
with open(os.path.join(app_folder, "user_manual.md"), "r",
with open(os.path.join(app_folder, "md", "user_manual.md"), "r",
encoding='utf-8') as install_instr:
content = install_instr.read()
md = Markdown(extensions=[TocExtension(baselevel=1)])
......@@ -359,8 +360,11 @@ def documentation_result():
@app.route("/install", methods=['GET'])
def install():
with open(os.path.join(app_folder, "INSTALL.md"), "r", encoding='utf-8') as install_instr:
with open(os.path.join(app_folder, "md", "INSTALL.md"), "r", encoding='utf-8') as install_instr:
content = install_instr.read()
env = Environment()
template = env.from_string(content)
content = template.render(version=VERSION)
md = Markdown(extensions=[TocExtension(baselevel=1)])
content = Markup(md.convert(content))
toc = Markup(md.toc)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment