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
ng6
Commits
65ee4b86
Commit
65ee4b86
authored
Apr 05, 2019
by
Celine Noirot
Browse files
Handle project spaces in pi1/project/run/analysis, add type check (projectid, ng6space)
parent
0eb5c7fe
Changes
14
Hide whitespace changes
Inline
Side-by-side
.gitignore
0 → 100644
View file @
65ee4b86
__pycache__
ui/nG6/res/smarty/*
src/ng6/analysis.py
View file @
65ee4b86
...
...
@@ -105,7 +105,7 @@ class Analysis (Component):
"""
# The directories structure into ng6
DIRECTORIES_STRUCTURE
=
"
data/
analyze/"
DIRECTORIES_STRUCTURE
=
"analyze/"
ANALYSIS_CONFIG_FILE_NAME
=
"analysis.cfg"
def
__init__
(
self
,
name
=
""
,
description
=
""
,
software
=
""
,
...
...
@@ -149,23 +149,14 @@ class Analysis (Component):
logging
.
getLogger
(
"Analysis.__init__"
).
debug
(
"Connexion effectuée"
)
self
.
run
=
Run
.
get_from_id
(
self
.
__get_run_id
())
from
ng6.project
import
Project
self
.
project
=
Project
.
get_from_id
(
self
.
__get_project_id
())
self
.
project
=
Project
.
get_from_run_id
(
self
.
__get_run_id
())
self
.
space_id
=
self
.
project
.
space_id
self
.
directory
=
t3mysql
.
select_analysis_directory
(
id
)
logging
.
getLogger
(
"Analysis.__init__"
).
debug
(
"Building analysis with id="
+
str
(
id
)
+
" ["
+
str
(
self
)
+
"]"
)
else
:
self
.
version
=
self
.
get_version
()
if
isinstance
(
self
.
version
,
bytes
):
self
.
version
=
self
.
version
.
decode
()
directory_name
=
uuid
.
uuid4
().
hex
[:
9
]
while
True
:
save_dir
=
os
.
path
.
join
(
ng6conf
.
get_save_directory
(),
ng6conf
.
get_space_directory
(
self
.
space_id
),
self
.
DIRECTORIES_STRUCTURE
,
directory_name
)
logging
.
getLogger
(
"Analysis.__init__"
).
debug
(
"Building analysis save_dir="
+
save_dir
)
work_dir
=
os
.
path
.
join
(
ng6conf
.
get_work_directory
(),
ng6conf
.
get_space_directory
(
self
.
space_id
),
self
.
DIRECTORIES_STRUCTURE
,
directory_name
)
logging
.
getLogger
(
"Analysis.__init__"
).
debug
(
"Building analysis work_dir="
+
save_dir
)
if
not
os
.
path
.
isdir
(
save_dir
)
and
not
os
.
path
.
isdir
(
work_dir
):
break
directory_name
=
uuid
.
uuid4
().
hex
[:
9
]
self
.
directory
=
os
.
path
.
join
(
ng6conf
.
get_space_directory
(
self
.
space_id
),
self
.
DIRECTORIES_STRUCTURE
,
directory_name
)
logging
.
getLogger
(
"Analysis.__init__"
).
debug
(
"Building brand new analysis ["
+
str
(
self
)
+
"]"
)
def
define_analysis
(
self
):
...
...
@@ -181,6 +172,19 @@ class Analysis (Component):
raise
NotImplementedError
def
execute
(
self
):
ng6conf
=
NG6ConfigReader
()
directory_name
=
uuid
.
uuid4
().
hex
[:
9
]
while
True
:
save_dir
=
os
.
path
.
join
(
ng6conf
.
get_save_directory
(),
ng6conf
.
get_space_directory
(
self
.
space_id
),
self
.
DIRECTORIES_STRUCTURE
,
directory_name
)
logging
.
getLogger
(
"Analysis.__init__"
).
debug
(
"Building analysis save_dir="
+
save_dir
)
work_dir
=
os
.
path
.
join
(
ng6conf
.
get_work_directory
(),
ng6conf
.
get_space_directory
(
self
.
space_id
),
self
.
DIRECTORIES_STRUCTURE
,
directory_name
)
logging
.
getLogger
(
"Analysis.__init__"
).
debug
(
"Building analysis work_dir="
+
save_dir
)
if
not
os
.
path
.
isdir
(
save_dir
)
and
not
os
.
path
.
isdir
(
work_dir
):
break
directory_name
=
uuid
.
uuid4
().
hex
[:
9
]
self
.
directory
=
os
.
path
.
join
(
ng6conf
.
get_space_directory
(
self
.
space_id
),
self
.
DIRECTORIES_STRUCTURE
,
directory_name
)
# first create the output directory
if
not
os
.
path
.
isdir
(
self
.
output_directory
):
os
.
makedirs
(
self
.
output_directory
,
0o751
)
...
...
@@ -215,7 +219,6 @@ class Analysis (Component):
inputs
.
append
(
self
.
parent
.
get_config_file_path
())
# then run the component
self
.
process
()
print
(
self
)
# add the add_analysis command lines to the make
add
=
PythonFunction
(
add_analysis
,
cmd_format
=
"{EXE} {ARG} {OUT} {IN}"
)
add
(
includes
=
wait_for_files
,
outputs
=
self
.
get_config_file_path
(),
inputs
=
inputs
,
arguments
=
parent_id
)
...
...
@@ -224,8 +227,9 @@ class Analysis (Component):
"""
Return a full description of the analysis
"""
return
"name="
+
str
(
self
.
name
)
+
";description="
+
str
(
self
.
description
)
+
";software="
+
\
str
(
self
.
software
)
+
";version="
+
str
(
self
.
version
)
+
";options="
+
str
(
self
.
options
)
return
"id="
+
str
(
self
.
id
)
+
";name="
+
str
(
self
.
name
)
+
";description="
+
str
(
self
.
description
)
+
";software="
+
\
str
(
self
.
software
)
+
";version="
+
str
(
self
.
version
)
+
";options="
+
str
(
self
.
options
)
+
\
";space_id="
+
str
(
self
.
space_id
)
+
";project="
+
str
(
self
.
project
)
+
";run="
+
str
(
self
.
run
)
def
sync
(
self
):
"""
...
...
@@ -544,6 +548,7 @@ class Analysis (Component):
@param archive_name: the archive name if tar is requested
@param delete: delete files
"""
# First handle if only one file
if
len
(
files
)
==
1
and
mode
==
"tar.gz"
:
mode
=
"gz"
...
...
src/ng6/run.py
View file @
65ee4b86
...
...
@@ -41,7 +41,7 @@ class Run(object):
"""
# The directories structure into ng6
DIRECTORIES_STRUCTURE
=
"
data/
run/"
DIRECTORIES_STRUCTURE
=
"run/"
SEQUENCERS
=
[
"454"
,
"454 GS FLX Titanium"
,
"454 GS FLX+"
,
"454 GS FLX XL+"
,
"HiSeq 2000"
,
"MiSeq"
]
def
__init__
(
self
,
name
,
date
,
species
,
data_nature
,
type
,
description
,
sequencer
,
space_id
=
"default"
,
id
=
None
):
...
...
@@ -88,10 +88,7 @@ class Run(object):
break
directory_name
=
uuid
.
uuid4
().
hex
[:
9
]
# Then make directories
print
(
ng6conf
.
get_work_directory
())
work_dir
=
os
.
path
.
join
(
ng6conf
.
get_work_directory
(),
ng6conf
.
get_space_directory
(
self
.
space_id
),
self
.
DIRECTORIES_STRUCTURE
,
directory_name
)
print
(
ng6conf
.
get_space_directory
(
self
.
space_id
))
os
.
makedirs
(
work_dir
,
0o751
)
self
.
directory
=
os
.
path
.
join
(
ng6conf
.
get_space_directory
(
self
.
space_id
),
self
.
DIRECTORIES_STRUCTURE
,
directory_name
)
...
...
@@ -395,20 +392,21 @@ class Run(object):
Return a run object specified by its id
@param id : the run id
"""
my_run
=
None
try
:
t3mysql
=
t3MySQLdb
()
[
name
,
date
,
species
,
data_nature
,
type
,
description
,
sequencer
]
=
t3mysql
.
select_run
(
id
)
my_run
=
Run
(
name
,
date
,
species
,
data_nature
,
type
,
description
,
sequencer
,
id
)
my_run
=
Run
(
name
,
date
,
species
,
data_nature
,
type
,
description
,
sequencer
,
id
=
id
)
# reload samples
try
:
my_run
.
__samples
=
None
my_run
.
__samples
=
my_run
.
get_samples
()
except
:
logging
.
getLogger
(
"Run.get_from_id"
).
debug
(
"Impossible to get samples for run id="
+
str
(
id
))
return
my_run
except
:
logging
.
getLogger
(
"Run.get_from_id"
).
debug
(
"Impossible to build run id="
+
str
(
id
))
return
None
try
:
my_run
.
__samples
=
None
my_run
.
__samples
=
my_run
.
get_samples
()
except
:
logging
.
getLogger
(
"Run.get_from_id"
).
debug
(
"Impossible to get samples for run id="
+
str
(
id
))
return
my_run
@
staticmethod
def
get_from_config
(
config_file
):
...
...
src/ng6/t3MySQLdb.py
View file @
65ee4b86
...
...
@@ -202,7 +202,6 @@ class t3MySQLdb(object):
VALUES ('%s','%s','%s','%s','%s','%s','%s','%s')"
%
(
self
.
cfg_reader
.
get_pid
(),
crdate
,
crdate
,
admin_id
,
self
.
esc_q
(
pdescription
),
self
.
esc_q
(
name
),
hidden
,
space_id
)
qresult
=
self
.
execute
(
sql
,
commit
=
True
)
#print ("t3MySQLdb.add_project QL "+sql)
project_id
=
qresult
.
lastrowid
self
.
execute
(
"INSERT INTO fe_rights (fe_user_id, project_id, right_id) VALUES ('%s','%s','%s')"
%
(
admin_id
,
project_id
,
right_level_id
),
commit
=
True
)
...
...
@@ -938,7 +937,6 @@ class t3MySQLdb(object):
]
sql
=
" "
.
join
(
parts
)
print
(
"select_purge_demand_directories"
,
sql
)
qresult
=
self
.
execute
(
sql
,
dictc
=
True
)
# analysis directories
if
qresult
.
rowcount
>=
1
:
...
...
@@ -956,7 +954,6 @@ class t3MySQLdb(object):
'tx_nG6_analyze.uid IN ('
+
','
.
join
(
analysis_ids
)
+
')'
]
sql
=
" "
.
join
(
parts
)
print
(
"select_purge_demand_directories"
,
sql
)
qresult
=
self
.
execute
(
sql
,
dictc
=
True
)
for
result
in
qresult
.
rows
:
...
...
@@ -972,7 +969,6 @@ class t3MySQLdb(object):
'WHERE'
,
'tx_nG6_run.uid IN ('
+
','
.
join
(
run_ids
)
+
')'
]
print
(
"select_purge_demand_directories"
,
sql
)
sql
=
" "
.
join
(
parts
)
qresult
=
self
.
execute
(
sql
,
dictc
=
True
)
...
...
@@ -1001,7 +997,6 @@ class t3MySQLdb(object):
'WHERE'
,
table
+
'.uid IN ('
+
uids
+
')'
]
)
sql
=
" "
.
join
(
parts
)
print
(
'### '
,
sql
)
qresult
=
self
.
execute
(
sql
,
dictc
=
True
)
return
(
qresult
)
...
...
@@ -1017,7 +1012,6 @@ class t3MySQLdb(object):
'WHERE'
,
'tx_nG6_purge_demand.uid IN ('
+
str
(
demand_ids
)
+
')'
]
sql
=
" "
.
join
(
parts
)
print
(
"set_purge_demand_deleted"
,
sql
)
qresult
=
self
.
execute
(
sql
,
dictc
=
True
)
if
qresult
.
rowcount
>=
1
:
analysis_ids
=
[]
...
...
ui/nG6/pi1/analyzes/Adaptorcleaner.tpl
View file @
65ee4b86
{*
Copyright (C) 2009 INRA
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
...
...
@@ -43,9 +43,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
</li>
{
else
}
{
assign
var
=
"index"
value
=
$params
|@
array_keys
:
"--adaptor"
}
<li
class=
"parameter"
>
Adaptor used:
<br
/>
<div
class=
"file-display"
>
{
$analyse_results
[
"all"
][
"default"
][
"adaptor_file"
]
}
</div>
<li
class=
"parameter"
>
Adaptor used:
<br
/>
<div
class=
"file-display"
>
{
$analyse_results
[
"all"
][
"default"
][
"adaptor_file"
]
}
</div>
</li>
{/
if
}
</ul>
...
...
@@ -89,7 +89,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
</tbody>
</table>
</div>
<div
class=
"tab-pane fade"
id=
"adaptor"
>
{* First find out all adaptors used *}
{
assign
var
=
"adaptors"
value
=
array
()
}
...
...
@@ -123,7 +123,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
</tbody>
</table>
</div>
<div
class=
"tab-pane fade"
id=
"parameters"
>
{
block
name
=
params
}
{
block
name
=
params_content
}
...
...
@@ -133,28 +133,28 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
{/
block
}
{/
block
}
</div>
<div
class=
"tab-pane fade"
id=
"downloads"
>
{
block
name
=
download
}
{
if
$nb_files
!=
0
}
{
if
$nb_files
!=
0
}
<p><ul>
{
$dir
=
$data_folder
|
cat
:
$analyse.directory
}
{
$dir
=
$data_folder
|
cat
:
'/'
|
cat
:
$analyse.directory
}
{
assign
var
=
"nb_files"
value
=
0
}
{
foreach
$dir
|
scandir
as
$file
}
{
if
$file
!=
"."
and
$file
!=
""
and
$file
!=
".."
and
(
$file
|
substr
:-
strlen
(
".png"
))
!=
".png"
}
{
$link
=((
'fileadmin'
|
cat
:
$analyse.directory
)|
cat
:
'/'
)|
cat
:
$file
}
{
$link
=((
'fileadmin'
|
cat
:
'/'
|
cat
:
$analyse.directory
)|
cat
:
'/'
)|
cat
:
$file
}
<li
class=
"filelist"
><a
href=
"
{
$link
}
"
>
{
$file
}
</a>
</li>
{
$nb_files
=
$nb_files
+
1
}
{/
if
}
{/
foreach
}
</ul></p>
{
else
}
{
else
}
<div
class=
"alert alert-info"
>
Results folder not synchronized yet...
</div>
{/
if
}
{/
block
}
</div>
</div>
{/
block
}
ui/nG6/pi1/analyzes/AnalysisTemplate.tpl
View file @
65ee4b86
{*
Copyright (C) 2009 INRA
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
...
...
@@ -40,38 +40,38 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<div
class=
"sub-content sc-bottom"
>
{
block
name
=
content
}
<ul
id=
"myTab"
class=
"nav nav-tabs"
>
{
block
name
=
nav_menu_results
}
<li
class=
"active"
><a
href=
"#results"
data-toggle=
"tab"
>
{
block
name
=
results_title
}
Results
{/
block
}
</a></li>
{/
block
}
{
block
name
=
nav_menu_params
}
{
if
$analyse.params
!=
""
}
<li><a
href=
"#parameters"
data-toggle=
"tab"
>
{
block
name
=
params_title
}
Parameters
{/
block
}
</a></li>
{/
if
}
{/
block
}
{
block
name
=
nav_menu_downloads
}
<li><a
href=
"#downloads"
data-toggle=
"tab"
>
{
block
name
=
downloads_title
}
Downloads
{/
block
}
</a></li>
{/
block
}
{
assign
var
=
"comment_tab"
value
=
"analysis_comments"
}
<li><a
href=
"#
{
$comment_tab
}
"
data-toggle=
"tab"
>
Comments
</a></li>
{
block
name
=
nav_menu_update
}{/
block
}
</ul>
<div
id=
"myTabContent"
class=
"tab-content"
>
{
block
name
=
tab_content_results
}
<div
class=
"tab-pane fade in active"
id=
"results"
>
{
block
name
=
results
}{/
block
}
</div>
{/
block
}
{
block
name
=
tab_content_params
}
{
if
$analyse.params
!=
""
}
<div
class=
"tab-pane fade"
id=
"parameters"
>
...
...
@@ -84,7 +84,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
{/
foreach
}
</ul>
{/
block
}
{
block
name
=
command_line_content
}
{
if
$is_project_admin
&&
$analyse.is_editable
}
<br/>
...
...
@@ -92,8 +92,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<div
class=
"editable-block"
>
<span
class=
"editable-block-head label label-info"
>
Command
</span>
<i>
{
$analyse.software
}
</i>
<span
class=
"editable editable-block-content"
id=
"editable-command-line"
data-pk=
"
{
$analyze_id
}
"
<span
class=
"editable editable-block-content"
id=
"editable-command-line"
data-pk=
"
{
$analyze_id
}
"
data-url=
"index.php?eID=tx_nG6&type=update_db_field&table=tx_nG6_analyze&field=params"
data-type=
"textarea"
>
{
$analyse.params
}
</span>
...
...
@@ -104,26 +104,26 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
</div>
{/
if
}
{/
block
}
{
block
name
=
tab_content_downloads
}
<div
class=
"tab-pane fade"
id=
"downloads"
>
{
block
name
=
download
}
{
assign
var
=
"nb_files"
value
=
0
}
{
$dir
=
$data_folder
|
cat
:
$analyse.directory
}
{
$dir
=
$data_folder
|
cat
:
'/'
|
cat
:
$analyse.directory
}
{
foreach
$dir
|
scandir
as
$file
}
{
assign
var
=
"link"
value
=((
'fileadmin'
|
cat
:
$analyse.directory
)|
cat
:
'/'
)|
cat
:
$file
}
{
assign
var
=
"link"
value
=((
'fileadmin'
|
cat
:
'/'
|
cat
:
$analyse.directory
)|
cat
:
'/'
)|
cat
:
$file
}
{
if
$file
!=
"."
and
$file
!=
""
and
$file
!=
".."
and
(
$file
|
substr
:-
strlen
(
".png"
))
!=
".png"
and
!
is_dir
(
$link
)
}
{
$nb_files
=
$nb_files
+
1
}
{/
if
}
{/
foreach
}
{
if
$nb_files
==
0
}
{
if
$nb_files
==
0
}
<div
class=
"alert alert-info"
>
Results folder not synchronized yet...
</div>
{
else
}
<ul>
{
foreach
$dir
|
scandir
as
$file
}
{
assign
var
=
"link"
value
=((
'fileadmin'
|
cat
:
$analyse.directory
)|
cat
:
'/'
)|
cat
:
$file
}
{
assign
var
=
"link"
value
=((
'fileadmin'
|
cat
:
'/'
|
cat
:
$analyse.directory
)|
cat
:
'/'
)|
cat
:
$file
}
{
if
$file
!=
"."
and
$file
!=
""
and
$file
!=
".."
and
(
$file
|
substr
:-
strlen
(
".png"
))
!=
".png"
and
!
is_dir
(
$link
)
}
<li
class=
"filelist"
><a
href=
"
{
$link
}
"
>
{
$file
}
</a>
</li>
{/
if
}
...
...
@@ -133,9 +133,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
{/
block
}
</div>
{/
block
}
{
include
file
=
'../comments.tpl'
comments
=
$comments
tab_id
=
$comment_tab
add_new_comment
=
$is_project_admin
user_id
=
$user_id
}
{
block
name
=
tab_content_update
}{/
block
}
</div>
{/
block
}
...
...
ui/nG6/pi1/analyzes/MothurOTU.tpl
View file @
65ee4b86
{*
Copyright (C) 2009 INRA
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
...
...
@@ -55,7 +55,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
{/
foreach
}
{/
foreach
}
{
assign
var
=
"beta_done"
value
=
false
}
{* Init tre values *}
{
if
$tree_avail
}
{
foreach
$levels
as
$group
}
...
...
@@ -73,7 +73,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<li><a
href=
"#parameters"
data-toggle=
"tab"
>
Parameters
</a></li>
<li><a
href=
"#downloads"
data-toggle=
"tab"
>
{
block
name
=
downloads_title
}
Downloads
{/
block
}
</a></li>
</ul>
<div
id=
"myTabContent"
class=
"tab-content"
>
<div
class=
"tab-pane fade in active"
id=
"alpha"
>
<table
class=
"table table-striped table-bordered dataTable analysis-result-table"
>
...
...
@@ -115,7 +115,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<input
type=
"hidden"
id=
"otus_
{
$i
}
_
{
$group
|
replace
:
"."
:
"_"
}
"
value=
"
{
$sample_results
[
$group
].
otus
}
"
/>
{/
if
}
{/
foreach
}
</center></td>
</center></td>
{
if
$analyse_results
|@
count
>
1
}
<td
id=
"sample_id_
{
$i
}
"
>
{
$sample
|
get_description
:
$descriptions
}
</td>
{/
if
}
...
...
@@ -153,13 +153,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
</tfoot>
</table>
</div>
{
if
$tree_avail
}
<div
class=
"tab-pane fade"
id=
"beta"
>
<div
id=
"svgCanvas"
></div>
</div>
{/
if
}
<div
class=
"tab-pane fade"
id=
"parameters"
>
{
block
name
=
params
}
{
block
name
=
params_content
}
...
...
@@ -171,19 +171,19 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
</div>
<div
class=
"tab-pane fade"
id=
"downloads"
>
{
block
name
=
download
}
{
if
$nb_files
!=
0
}
{
if
$nb_files
!=
0
}
<p><ul>
{
$dir
=
$data_folder
|
cat
:
$analyse.directory
}
{
$dir
=
$data_folder
|
cat
:
'/'
|
cat
:
$analyse.directory
}
{
assign
var
=
"nb_files"
value
=
0
}
{
foreach
$dir
|
scandir
as
$file
}
{
if
$file
!=
"."
and
$file
!=
""
and
$file
!=
".."
and
(
$file
|
substr
:-
strlen
(
".png"
))
!=
".png"
}
{
$link
=((
'fileadmin'
|
cat
:
$analyse.directory
)|
cat
:
'/'
)|
cat
:
$file
}
{
$link
=((
'fileadmin'
|
cat
:
'/'
|
cat
:
$analyse.directory
)|
cat
:
'/'
)|
cat
:
$file
}
<li
class=
"filelist"
><a
href=
"
{
$link
}
"
>
{
$file
}
</a>
</li>
{
$nb_files
=
$nb_files
+
1
}
{/
if
}
{/
foreach
}
</ul></p>
{
else
}
{
else
}
<div
class=
"alert alert-info"
>
Results folder not synchronized yet...
</div>
...
...
ui/nG6/pi1/analyzes/MothurOTUAnalysis.tpl
View file @
65ee4b86
{*
Copyright (C) 2009 INRA
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
...
...
@@ -26,7 +26,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<ul>
{
foreach
from
=
$params
item
=
param
}
{
assign
var
=
"args_cmd"
value
=
","
|
explode
:
$param
}
{
if
in_array
(
"#make.shared(list=FILE.an.list"
,
$args_cmd
)
}
{
foreach
from
=
$args_cmd
item
=
arg_cmd
}
{
assign
var
=
"params_cmd"
value
=
"="
|
explode
:
$arg_cmd
}
...
...
@@ -39,7 +39,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<li
class=
"parameter"
>
{
$param
}
</li>
</ul>
{/
if
}
{
if
in_array
(
"#summary.single(shared=FILE.shared"
,
$args_cmd
)
}
{
foreach
from
=
$args_cmd
item
=
arg_cmd
}
{
assign
var
=
"params_cmd"
value
=
"="
|
explode
:
$arg_cmd
}
...
...
@@ -58,7 +58,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<li
class=
"parameter"
>
{
$param
}
</li>
</ul>
{/
if
}
{
if
in_array
(
"#rarefaction.single(shared=FILE.shared"
,
$args_cmd
)
}
{
foreach
from
=
$args_cmd
item
=
arg_cmd
}
{
assign
var
=
"params_cmd"
value
=
"="
|
explode
:
$arg_cmd
}
...
...
@@ -71,15 +71,15 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<li
class=
"parameter"
>
{
$param
}
</li>
</ul>
{/
if
}
{
if
in_array
(
"#tree.shared(shared=FILE.shared"
,
$args_cmd
)
}
<li
class=
"parameter"
>
{
$param
}
</li>
{/
if
}
{
if
in_array
(
"#sub.sample(fasta=FILE.fasta"
,
$args_cmd
)
}
<li
class=
"parameter"
>
{
$param
}
</li>
{/
if
}
{
if
in_array
(
"#classify.otu(list=FILE.list"
,
$args_cmd
)
}
{
foreach
from
=
$args_cmd
item
=
arg_cmd
}
{
assign
var
=
"params_cmd"
value
=
"="
|
explode
:
$arg_cmd
}
...
...
@@ -124,7 +124,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
{/
foreach
}
{/
foreach
}
{
assign
var
=
"beta_done"
value
=
false
}
{* Init tre values *}
{
if
$tree_avail
}
{
foreach
$levels
as
$group
}
...
...
@@ -142,7 +142,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<li><a
href=
"#parameters"
data-toggle=
"tab"
>
Parameters
</a></li>
<li><a
href=
"#downloads"
data-toggle=
"tab"
>
{
block
name
=
downloads_title
}
Downloads
{/
block
}
</a></li>
</ul>
<div
id=
"myTabContent"
class=
"tab-content"
>
<div
class=
"tab-pane fade in active"
id=
"alpha"
>
<table
class=
"table table-striped table-bordered dataTable analysis-result-table"
>
...
...
@@ -189,7 +189,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<input
type=
"hidden"
id=
"otus_
{
$i
}
_
{
$group
|
replace
:
"."
:
"_"
}
"
value=
"
{
$sample_results
[
$group
].
otus
}
"
/>
{/
if
}
{/
foreach
}
</center></td>
</center></td>
{
if
$analyse_results
|@
count
>
1
}
<td
id=
"sample_id_
{
$i
}
"
>
{
$sample
|
get_description
:
$descriptions
}
</td>
{/
if
}
...
...
@@ -230,13 +230,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
</tfoot>
</table>
</div>
{
if
$tree_avail
}
<div
class=
"tab-pane fade"
id=
"beta"
>
<div
id=
"svgCanvas"
></div>
</div>
{/
if
}
<div
class=
"tab-pane fade"
id=
"parameters"
>
{
block
name
=
params
}
{
block
name
=
params_content
}
...
...
@@ -249,21 +249,21 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<div
class=
"tab-pane fade"
id=
"downloads"
>
{
block
name
=
download
}
{
assign
var
=
"nb_files"
value
=
0
}
{
$dir
=
$data_folder
|
cat
:
$analyse.directory
}
{
$dir
=
$data_folder
|
cat
:
'/'
|
cat
:
$analyse.directory
}
{
foreach
$dir
|
scandir
as
$file
}
{
assign
var
=
"link"
value
=((
'fileadmin'
|
cat
:
$analyse.directory
)|
cat
:
'/'
)|
cat
:
$file
}
{
assign
var
=
"link"
value
=((
'fileadmin'
|
cat
:
'/'
|
cat
:
$analyse.directory
)|
cat
:
'/'
)|
cat
:
$file
}
{
if
$file
!=
"."
and
$file
!=
""
and
$file
!=
".."
and
(
$file
|
substr
:-
strlen
(
".png"
))
!=
".png"
and
!
is_dir
(
$link
)
}
{
$nb_files
=
$nb_files
+
1
}
{/
if
}
{/
foreach
}
{
if
$nb_files
==
0
}
{
if
$nb_files
==
0
}
<div
class=
"alert alert-info"
>
Results folder not synchronized yet...
</div>
{
else
}
<ul>
{
foreach
$dir
|
scandir
as
$file
}
{
assign
var
=
"link"
value
=((
'fileadmin'
|
cat
:
$analyse.directory
)|
cat
:
'/'
)|
cat
:
$file
}
{
assign
var
=
"link"
value
=((
'fileadmin'
|
cat
:
'/'
|
cat
:
$analyse.directory
)|
cat
:
'/'
)|
cat
:
$file
}
{
if
$file
!=
"."
and
$file
!=
""
and
$file
!=
".."
and
(
$file
|
substr
:-
strlen
(
".png"
))
!=
".png"
and
!
is_dir
(
$link
)
}
<li
class=
"filelist"
><a
href=
"
{
$link
}
"
>
{
$file
}
</a>
</li>
{/
if
}
...
...
@@ -274,4 +274,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
</div>
</div>
{/
block
}
\ No newline at end of file
{/
block
}
ui/nG6/pi1/analyzes/RunAssembly.tpl
View file @
65ee4b86
{*
Copyright (C) 2009 INRA
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
...
...
@@ -33,10 +33,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<li><a
href=
"#parameters"
data-toggle=
"tab"
>
{
block
name
=
params_title
}
Parameters
{/
block
}
</a></li>
<li><a
href=
"#downloads"
data-toggle=
"tab"
>
{
block
name
=
downloads_title
}
Downloads
{/
block
}
</a></li>
</ul>
{
assign
var
=
"analyse_results_sorted"
value
=
$analyse_results
|@
ksort
}
<div
id=
"myTabContent"
class=
"tab-content"
>
<div
class=
"tab-pane fade in active"
id=
"general"
>
{
assign
var
=
"reads"
value
=
0
}
{
assign
var
=
"bases"
value
=
0
}
...
...
@@ -120,8 +120,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
{/
if
}
</table>
</div>
{* If not a cdna assembly, display contigs info *}
{
if
!
in_array
(
"-cdna"
,
$params
)
}
<div
class=
"tab-pane fade"
id=
"contigs"
>
...
...
@@ -207,7 +207,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
{* If it's a cdna assembly display isotigs and isogroups information *}
{
else
}