Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
genotoul-bioinfo
D-GENIES
Commits
03d6f0af
Commit
03d6f0af
authored
Mar 02, 2018
by
Floreal Cabanettes
Browse files
Add config files for dev
parent
9f5d7412
Changes
5
Hide whitespace changes
Inline
Side-by-side
src/dgenies/.gitignore
0 → 100644
View file @
03d6f0af
application-dev.properties.local
tools-dev.yaml.local
src/dgenies/application-dev.properties
0 → 100644
View file @
03d6f0af
[global]
config_dir
=
###USER###/.dgenies
upload_folder = /tmp/dgenies
data_folder
=
###CONFIG###/data
# batch system type: local, sge, slurm
batch_system_type
=
local
web_url
=
http://localhost:5000
# Max size of uploaded files (also for files from URL, size uncompressed):
# Please set the unit: M for Megabyte or G for Gigabyte (-1 without unit to don't set a limit)
max_upload_size
=
3G
# Max upload file size for all-vs-all (only target):
# Please set the unit: M for Megabyte or G for Gigabyte (-1 without unit to don't set a limit)
max_upload_size_ava
=
1G
# Max upload file size (compressed or not, only for uploaded files, not from URL):
# Please set the unit: M for Megabyte or G for Gigabyte (-1 without unit to don't set a limit)
max_upload_file_size
=
1G
[softwares]
minimap2
=
###DEFAULT###
minimap2_cluster = ###DEFAULT###
[debug]
# Debug (enable only for tests)
enable
=
False
log_dir
=
###CONFIG###/logs
# List of allowed IPs for tests, comma separated:
allowed_ip_tests =
[cluster]
drmaa_lib_path
=
###SET_IT###
#Native specs: options passed to the scheduler
### Slurm: --mem-per-cpu={0} --ntasks={1} --time={2}
### SGE: -l mem={0},h_vmem={0} -pe parallel_smp {1}
### Note: copy&paste specifications for your scheduler. You can customize it.
### Always use {0} for memory, {1} for number of CPUs ({2} for duration time if slurm). All are required.
### If you don't want to change anything, don't edit anything.
native_specs = ###DEFAULT###
# If batch_system_type is not local, small jobs can be still run locally.
# Set to 0 to run all jobs on the cluster
max_run_local
=
10
max_wait_local
=
5
# To run only big jobs on the cluster, set the min query and target size (if max_run_local is reached, these parameters are ignores):
# Default parameters is for jobs that runs in approx. more than 3-4 minutes and consume approx. more than 9 GO of RAM
# Please set the unit: M for Megabyte or G for Gigabyte
min_query_size
=
500M
min_target_size
=
700M
prepare_script
=
###PROGRAM###/bin/all_prepare.py
python3_exec = python3
# Max memory:
memory
=
32
# Max memory for all-vs-all mode:
memory_ava
=
32
[database]
type
=
sqlite
url
=
###USER###/.dgenies/database.sqlite
# Not used for sqlite:
port = 3306
db
=
user
=
password
=
[mail]
status
=
mail@dgenies
reply
=
mail@dgenies
org
=
"Dgenies team"
send_mail_status
=
True
[cron]
### Menage
# Time to launch the cron:
clean_time
=
1h00
# Frequency (days):
clean_freq
=
1
[jobs]
# Number of parallel runs for local jobs:
run_local
=
1
data_prepare
=
2
max_concurrent_dl
=
5
[example]
query
=
target
=
src/dgenies/config_reader.py
View file @
03d6f0af
...
...
@@ -32,6 +32,10 @@ class AppConfigReader:
for
my_config_file
in
config_file_search
:
if
os
.
path
.
exists
(
my_config_file
):
config_file
.
append
(
my_config_file
)
config_file
.
append
(
os
.
path
.
join
(
self
.
app_dir
,
"application-dev.properties"
))
config_file
.
append
(
os
.
path
.
join
(
self
.
app_dir
,
"application-dev.properties.local"
))
if
len
(
config_file
)
==
0
:
raise
FileNotFoundError
(
"ERROR: application.properties not found."
)
self
.
reader
=
RawConfigParser
()
...
...
src/dgenies/tools-dev.yaml
0 → 100644
View file @
03d6f0af
minimap2
:
exec
:
default
command_line
:
"
{exe}
-t
{threads}
{target}
{query}
>
{out}"
all_vs_all
:
"
{exe}
-t
{threads}
-X
{target}
{target}
>
{out}"
max_memory
:
40
threads
:
8
parser
:
!!null
split_before
:
True
help
:
"
Better
for
low
similar
fasta
files"
order
:
0
mashmap
:
exec
:
default
command_line
:
"
{exe}
-t
{threads}
-r
{target}
-q
{query}
-o
{out}"
all_vs_all
:
!!null
max_memory
:
20
threads
:
8
parser
:
mashmap2paf
split_before
:
False
help
:
"
Faster
for
high
similar
fasta
files"
order
:
1
src/dgenies/tools.py
View file @
03d6f0af
...
...
@@ -102,27 +102,31 @@ class Tools:
self
.
load_yaml
()
def
load_yaml
(
self
):
config
_file
=
[]
yaml
_file
=
None
config_file_search
=
[
os
.
path
.
join
(
os
.
path
.
abspath
(
os
.
sep
),
"dgenies"
,
"tools.yaml"
),
"/etc/dgenies/tools.yaml"
,
"/etc/dgenies/tools.yaml.local"
,
os
.
path
.
join
(
str
(
Path
.
home
()),
".dgenies"
,
"tools.yaml.local"
)]
if
os
.
name
==
"nt"
:
config_file
.
insert
(
1
,
os
.
path
.
join
(
sys
.
executable
,
'..'
,
"tools.yaml"
))
config_file
.
insert
(
1
,
os
.
path
.
join
(
sys
.
executable
,
'..'
,
"tools.yaml.local"
))
config_file
_search
.
insert
(
1
,
os
.
path
.
join
(
sys
.
executable
,
'..'
,
"tools.yaml"
))
config_file
_search
.
insert
(
1
,
os
.
path
.
join
(
sys
.
executable
,
'..'
,
"tools.yaml.local"
))
for
my_config_file
in
config_file_search
:
app_dir
=
os
.
path
.
dirname
(
inspect
.
getfile
(
self
.
__class__
))
config_file_search
.
append
(
os
.
path
.
join
(
app_dir
,
"tools-dev.yaml"
))
config_file_search
.
append
(
os
.
path
.
join
(
app_dir
,
"tools-dev.yaml.local"
))
for
my_config_file
in
reversed
(
config_file_search
):
if
os
.
path
.
exists
(
my_config_file
):
config_file
.
append
(
my_config_file
)
if
len
(
config_file
)
==
0
:
yaml_file
=
my_config_file
break
if
yaml_file
is
None
:
raise
FileNotFoundError
(
"ERROR: tools.yaml not found."
)
for
yaml_file
in
config_file
:
with
open
(
yaml_file
,
"r"
)
as
yml_f
:
tools_dict
=
yaml
.
load
(
yml_f
)
tools
=
{}
for
name
,
props
in
tools_dict
.
items
():
tools
[
name
]
=
Tool
(
name
=
name
,
**
props
)
print
(
tools
)
self
.
tools
.
update
(
tools
)
with
open
(
yaml_file
,
"r"
)
as
yml_f
:
tools_dict
=
yaml
.
load
(
yml_f
)
tools
=
{}
for
name
,
props
in
tools_dict
.
items
():
tools
[
name
]
=
Tool
(
name
=
name
,
**
props
)
print
(
tools
)
self
.
tools
.
update
(
tools
)
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment