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
a2966774
Commit
a2966774
authored
Nov 27, 2020
by
Celine Noirot
Browse files
#190
to be tested
parent
a3e8ceac
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/ng6/analysis.py
View file @
a2966774
...
...
@@ -752,25 +752,19 @@ class Analysis (Component):
return
[
retcode
,
str_cmd
]
def
get_directory
(
self
):
"""
Returns a analysis's directory
"""
if
self
.
id
!=
None
:
t3mysql
=
t3MySQLdb
()
return
t3mysql
.
select_analysis_directory
(
self
.
id
)
else
:
raise
UnsavedAnalysisError
()
def
get_web_filepath
(
self
,
file_name
,
base_filepath
=
'fileadmin'
):
def
get_web_filepath
(
self
,
file_name
,
base_filepath
=
'fileadmin'
):
"""
returns the full web filepath from a given filename
@param file_name : the path to the file to link
@param base_filepath : the first directory in the path (depends on the server's directory structure)
@return : the full web filepath
"""
logging
.
getLogger
(
"Analysis.get_web_filepath"
).
debug
(
"IN analysis.get_web_filepath()"
)
return
base_filepath
+
os
.
path
.
join
(
self
.
get_directory
(),
file_name
)
curr_dir
=
self
.
directory
if
self
.
id
!=
None
:
t3mysql
=
t3MySQLdb
()
curr_dir
=
t3mysql
.
select_analysis_directory
(
self
.
id
)
return
base_filepath
+
os
.
path
.
join
(
self
.
directory
,
file_name
)
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