Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Maintenance - Mise à jour mensuelle Lundi 6 Février entre 7h00 et 9h00
Open sidebar
genotoul-bioinfo
ng6
Commits
ac7c5ff7
Commit
ac7c5ff7
authored
Aug 23, 2019
by
Romain Therville
☕
Browse files
Fix for issue#86
parent
00b365f2
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/ng6/utils.py
View file @
ac7c5ff7
...
...
@@ -377,9 +377,9 @@ class Utils(object):
if
prefix
==
"data"
or
prefix
==
"run"
:
run
=
t3mysql
.
select_run_informations
(
id
)
source_dir
=
data_folder
+
'/'
+
run
[
'directory'
]
project_name
=
"Project_%s.%s"
%
(
re
.
sub
(
r
"[\s\/]"
,
"_"
,
run
[
'project_name'
]),
run
[
'project_id'
]
)
run_name
=
"Run_%s.%s"
%
(
run
[
'name'
].
replace
(
' '
,
'_'
).
replace
(
'/'
,
'_'
),
id
)
run_name
=
"Run_%s.%s"
%
(
run
[
'name'
].
replace
(
' '
,
'_'
).
replace
(
'/'
,
'_'
).
replace
(
'
\\
'
,
'_'
).
replace
(
'('
,
'_'
).
replace
(
')'
,
'_'
),
id
)
raw_data_dir
=
os
.
path
.
join
(
output_folder
,
project_name
,
run_name
,
"RawData"
)
if
source_dir
not
in
src_directories
:
...
...
@@ -392,6 +392,7 @@ class Utils(object):
analysis_dir
=
data_folder
+
'/'
+
analyse_values
[
"directory"
]
analysis_name
=
"Analyse_%s.%s"
%
(
re
.
sub
(
r
"[\s\/]"
,
"_"
,
analyse_values
[
'name'
]),
analyse_id
)
dest_analysis_dir
=
os
.
path
.
join
(
output_folder
,
project_name
,
run_name
,
analysis_name
)
if
analysis_dir
not
in
src_directories
:
src_directories
.
append
(
analysis_dir
)
if
dest_analysis_dir
not
in
dest_directories
:
...
...
@@ -429,7 +430,6 @@ class Utils(object):
if
os
.
path
.
isdir
(
e
)
:
sources
.
append
(
e
)
destinations
.
append
(
dest_directories
[
i
])
return
sources
,
destinations
...
...
ui/nG6/res/js/tx_nG6_pi5.js
View file @
ac7c5ff7
...
...
@@ -83,6 +83,7 @@ $(function () {
};
var
_retrieve_data
=
function
(
workflow_id
,
callback
,
error_callback
){
console
.
log
(
"
IN _retrieve_data, workflow_id=
"
+
workflow_id
);
$
.
ajax
({
url
:
$
(
"
#server_url
"
).
val
()
+
'
/get_workflow_outputs?workflow_id=
'
+
workflow_id
,
dataType
:
'
jsonp
'
,
...
...
@@ -159,15 +160,20 @@ $(function () {
button
=
this
;
button
.
disabled
=
true
;
console
.
log
(
"
IN _retrieve_url_list, before _retrieve_data, step 1
"
);
_get_workflow_status
(
running_wf
.
id
,
// successcb
function
(
statusdata
){
if
(
statusdata
.
status
==
"
completed
"
){
console
.
log
(
"
IN _retrieve_url_list, before _retrieve_data, running_wf.id=
"
+
running_wf
.
id
);
_retrieve_data
(
running_wf
.
id
,
function
(
data
){
$
(
button
).
hide
();
$
.
each
(
data
,
function
(
i
,
component
)
{
$
.
each
(
component
,
function
(
filename
,
file
)
{
if
(
filename
==
ufilename
){
console
.
log
(
"
IN _retrieve_url_list, before _display_file_content, step 2
"
);
console
.
log
(
"
IN _retrieve_url_list, file.url=
"
+
file
.
url
);
console
.
log
(
"
IN _retrieve_url_list, process_data=
"
+
process_data
);
_display_file_content
(
file
.
url
,
modal
.
$body
,
process_data
);
}
});
...
...
@@ -286,6 +292,7 @@ $(function () {
modal
.
$modal
.
modal
();
modal
.
$modal
.
find
(
'
#wfform
'
).
wfform
(
form_options
);
modal
.
$modal
.
find
(
'
#wfform
'
).
on
(
'
run.wfform
'
,
function
(
event
,
running_wf
)
{
console
.
log
(
"
IN download_options, before _retrieve_url_list
"
);
_retrieve_url_list
(
modal
,
running_wf
,
'
output_list.txt
'
);
});
},
...
...
workflows/download_symlink/components/createsymlink.py
View file @
ac7c5ff7
...
...
@@ -17,6 +17,7 @@
import
os
import
pickle
import
logging
from
jflow.component
import
Component
from
ng6.utils
import
Utils
...
...
@@ -27,6 +28,7 @@ def create_symbolik_link (ids_dump_path, output_list, user_script, username, pas
import
os
import
pickle
import
subprocess
import
logging
from
ng6.config_reader
import
NG6ConfigReader
from
ng6.utils
import
Utils
,
SSH
...
...
@@ -43,8 +45,10 @@ def create_symbolik_link (ids_dump_path, output_list, user_script, username, pas
prefixed_ids
=
pickle
.
load
(
fh
)
fh
.
close
()
prefixed_ids
=
";"
.
join
(
prefixed_ids
)
logging
.
getLogger
(
"createsymlink"
).
debug
(
"Before Utils.get_directories_structure_and_content()"
)
src_directories
,
dest_directories
=
Utils
.
get_directories_structure_and_content
(
ng6_username
,
data_folder
,
output_folder
,
prefixed_ids
)
logging
.
getLogger
(
"createsymlink"
).
debug
(
"src_directories = "
+
","
.
join
(
src_directories
))
logging
.
getLogger
(
"createsymlink"
).
debug
(
"dest_directories = "
+
","
.
join
(
dest_directories
))
destinations
=
[]
with
open
(
user_script
,
"w"
)
as
us
:
...
...
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