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
eb9dd0cb
Commit
eb9dd0cb
authored
Jun 03, 2020
by
Romain Therville
☕
Browse files
Refactoring for the analysis.py code.
Only useless parts have been removed. Issue
#129
parent
9887acd3
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/ng6/analysis.py
View file @
eb9dd0cb
...
...
@@ -622,7 +622,7 @@ class Analysis (Component):
file_name
=
os
.
path
.
basename
(
file
)
else
:
copyfile
(
file
,
os
.
path
.
join
(
self
.
__get_work_directory
(),
file_name
))
return
self
.
get_
full
_filepath
(
file_name
,
'fileadmin'
)
return
self
.
get_
web
_filepath
(
file_name
,
'fileadmin'
)
def
_save_files
(
self
,
files
,
gzip
=
False
):
"""
...
...
@@ -752,18 +752,15 @@ class Analysis (Component):
t3mysql
=
t3MySQLdb
()
t3mysql
.
update_fields
(
'tx_nG6_analyze'
,
str
(
self
.
id
),
[
'directory'
,
'retention_date'
],
[
str
(
"/"
+
new_relative_path
),
new_retention
]
)
old_dir_name
=
self
.
__get_save_directory
()
new_dir_name
=
ng6conf
.
get_space_directory
(
space_id
)
result_files
=
t3mysql
.
get_analysis_result_files
(
str
(
self
.
id
),
'fileadmin'
)
for
result_file
in
result_files
:
filename
=
os
.
path
.
basename
(
result_file
[
'rvalue'
])
new_filepath
=
self
.
get_
full
_filepath
(
filename
)
new_filepath
=
self
.
get_
web
_filepath
(
filename
)
t3mysql
.
update_fields
(
'tx_nG6_result'
,
str
(
result_file
[
'uid'
]),
[
'rvalue'
],
[
str
(
new_filepath
)]
)
return
[
retcode
,
str_cmd
]
def
get_
full
_filepath
(
self
,
file_name
,
base_filepath
=
'fileadmin'
):
def
get_
web
_filepath
(
self
,
file_name
,
base_filepath
=
'fileadmin'
):
return
base_filepath
+
os
.
path
.
join
(
self
.
directory
,
file_name
)
\ No newline at end of file
Romain Therville
☕
@rtherville
mentioned in issue
#187
·
Jul 09, 2020
mentioned in issue
#187
mentioned in issue #187
Toggle commit list
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