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
Mirrors
biopet.biopet
Commits
8ca1fd0f
Commit
8ca1fd0f
authored
Apr 07, 2017
by
Peter van 't Hof
Browse files
Make python script absolute paths
parent
2c9c7c06
Changes
1
Hide whitespace changes
Inline
Side-by-side
biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/extensions/PythonCommandLineFunction.scala
View file @
8ca1fd0f
...
@@ -33,7 +33,7 @@ trait PythonCommandLineFunction extends BiopetCommandLineFunction {
...
@@ -33,7 +33,7 @@ trait PythonCommandLineFunction extends BiopetCommandLineFunction {
* @param script name / location of script
* @param script name / location of script
*/
*/
def
setPythonScript
(
script
:
String
)
{
def
setPythonScript
(
script
:
String
)
{
pythonScript
=
new
File
(
script
)
pythonScript
=
new
File
(
script
)
.
getAbsoluteFile
if
(!
pythonScript
.
exists
())
{
if
(!
pythonScript
.
exists
())
{
setPythonScript
(
script
,
""
)
setPythonScript
(
script
,
""
)
}
else
{
}
else
{
...
@@ -48,7 +48,7 @@ trait PythonCommandLineFunction extends BiopetCommandLineFunction {
...
@@ -48,7 +48,7 @@ trait PythonCommandLineFunction extends BiopetCommandLineFunction {
*/
*/
def
setPythonScript
(
script
:
String
,
subpackage
:
String
)
{
def
setPythonScript
(
script
:
String
,
subpackage
:
String
)
{
pythonScriptName
=
script
pythonScriptName
=
script
pythonScript
=
new
File
(
".queue/tmp/"
+
subpackage
+
pythonScriptName
)
pythonScript
=
new
File
(
".queue/tmp/"
+
subpackage
+
pythonScriptName
)
.
getAbsoluteFile
if
(!
pythonScript
.
getParentFile
.
exists
)
pythonScript
.
getParentFile
.
mkdirs
if
(!
pythonScript
.
getParentFile
.
exists
)
pythonScript
.
getParentFile
.
mkdirs
val
is
=
getClass
.
getResourceAsStream
(
subpackage
+
pythonScriptName
)
val
is
=
getClass
.
getResourceAsStream
(
subpackage
+
pythonScriptName
)
if
(
is
!=
null
)
{
if
(
is
!=
null
)
{
...
...
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