Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
biopet.biopet
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Mirrors
biopet.biopet
Commits
b3adee75
Commit
b3adee75
authored
Mar 02, 2017
by
Peter van 't Hof
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed Kopisu unit tests
parent
9b7654c7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
7 deletions
+14
-7
biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/extensions/PythonCommandLineFunction.scala
...sc/biopet/core/extensions/PythonCommandLineFunction.scala
+7
-4
kopisu/src/test/scala/nl/lumc/sasc/biopet/pipelines/kopisu/KopisuTest.scala
...ala/nl/lumc/sasc/biopet/pipelines/kopisu/KopisuTest.scala
+7
-3
No files found.
biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/extensions/PythonCommandLineFunction.scala
View file @
b3adee75
...
...
@@ -14,9 +14,10 @@
*/
package
nl.lumc.sasc.biopet.core.extensions
import
java.io.
{
File
,
FileOutputStream
}
import
java.io.
{
File
,
FileOutputStream
}
import
nl.lumc.sasc.biopet.core.BiopetCommandLineFunction
import
nl.lumc.sasc.biopet.utils.Logging
import
org.broadinstitute.gatk.utils.commandline.Input
trait
PythonCommandLineFunction
extends
BiopetCommandLineFunction
{
...
...
@@ -50,9 +51,11 @@ trait PythonCommandLineFunction extends BiopetCommandLineFunction {
pythonScript
=
new
File
(
".queue/tmp/"
+
subpackage
+
pythonScriptName
)
if
(!
pythonScript
.
getParentFile
.
exists
)
pythonScript
.
getParentFile
.
mkdirs
val
is
=
getClass
.
getResourceAsStream
(
subpackage
+
pythonScriptName
)
val
os
=
new
FileOutputStream
(
pythonScript
)
org
.
apache
.
commons
.
io
.
IOUtils
.
copy
(
is
,
os
)
os
.
close
()
if
(
is
!=
null
)
{
val
os
=
new
FileOutputStream
(
pythonScript
)
org
.
apache
.
commons
.
io
.
IOUtils
.
copy
(
is
,
os
)
os
.
close
()
}
else
Logging
.
addError
(
s
"Python script not found: $pythonScriptName"
)
}
/** return basic command to prefix the complete command with */
...
...
kopisu/src/test/scala/nl/lumc/sasc/biopet/pipelines/kopisu/KopisuTest.scala
View file @
b3adee75
...
...
@@ -34,10 +34,11 @@ import scala.collection.mutable.ListBuffer
* Created by pjvan_thof on 3/2/15.
*/
class
KopisuTest
extends
TestNGSuite
with
Matchers
{
def
initPipeline
(
map
:
Map
[
String
,
Any
],
outputD
ir
:
File
)
:
Kopisu
=
{
def
initPipeline
(
map
:
Map
[
String
,
Any
],
d
ir
:
File
)
:
Kopisu
=
{
new
Kopisu
()
{
override
def
configNamespace
=
"kopisu"
override
def
globalConfig
=
new
Config
(
ConfigUtils
.
mergeMaps
(
map
,
KopisuTest
.
config
(
outputDir
)))
override
def
globalConfig
=
new
Config
(
ConfigUtils
.
mergeMaps
(
map
,
KopisuTest
.
config
(
dir
)))
outputDir
=
dir
qSettings
=
new
QSettings
qSettings
.
runName
=
"test"
}
...
...
@@ -121,6 +122,9 @@ object KopisuTest {
val
controlDir
=
Files
.
createTempDir
()
Files
.
touch
(
new
File
(
controlDir
,
"test.txt"
))
val
coniferScript
=
File
.
createTempFile
(
"conifer."
,
".py"
)
coniferScript
.
deleteOnExit
()
def
config
(
outputDir
:
File
)
=
Map
(
"skip_write_dependencies"
->
true
,
"name_prefix"
->
"test"
,
...
...
@@ -133,7 +137,7 @@ object KopisuTest {
"tabix"
->
Map
(
"exe"
->
"test"
),
"freec"
->
Map
(
"exe"
->
"test"
,
"chrFiles"
->
"test"
,
"chrLenFile"
->
"test"
),
"controls_dir"
->
controlDir
.
getAbsolutePath
,
"conifer"
->
Map
(
"script"
->
"/usr/bin/test"
),
"conifer"
->
Map
(
"script"
->
coniferScript
.
getAbsolutePath
),
"probe_file"
->
"test"
,
"rscript"
->
Map
(
"exe"
->
"test"
)
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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