Skip to content
GitLab
Menu
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
280f922d
Commit
280f922d
authored
Feb 16, 2015
by
bow
Browse files
Use unique and transient temp directory for each pipeline test
parent
bec375ba
Changes
3
Hide whitespace changes
Inline
Side-by-side
public/carp/src/test/scala/nl/lumc/sasc/biopet/pipelines/carp/CarpTest.scala
View file @
280f922d
...
...
@@ -2,15 +2,18 @@ package nl.lumc.sasc.biopet.pipelines.carp
import
java.io.File
import
com.google.common.io.Files
import
org.apache.commons.io.FileUtils
import
org.broadinstitute.gatk.queue.QSettings
import
org.testng.annotations.
{
AfterClass
,
Test
,
DataProvider
}
import
org.scalatest.Matchers
import
org.scalatest.testng.TestNGSuite
import
nl.lumc.sasc.biopet.core.config.Config
import
nl.lumc.sasc.biopet.extensions.bwa.BwaMem
import
nl.lumc.sasc.biopet.extensions.macs2.Macs2CallPeak
import
nl.lumc.sasc.biopet.extensions.picard.
{
MergeSamFiles
,
SortSam
}
import
nl.lumc.sasc.biopet.utils.ConfigUtils
import
org.broadinstitute.gatk.queue.QSettings
import
org.testng.annotations.
{
Test
,
DataProvider
}
import
org.scalatest.Matchers
import
org.scalatest.testng.TestNGSuite
/**
* Created by pjvan_thof on 2/13/15.
...
...
@@ -69,10 +72,15 @@ class CarpTest extends TestNGSuite with Matchers {
carp
.
functions
.
count
(
_
.
isInstanceOf
[
Macs2CallPeak
])
shouldBe
(
numberSamples
+
(
if
(
threatment
)
1
else
0
))
}
}
// remove temporary run directory all tests in the class have been run
@AfterClass
def
removeTempOutputDir
()
=
{
FileUtils
.
deleteDirectory
(
CarpTest
.
outputDir
)
}
}
object
CarpTest
{
val
outputDir
=
System
.
getProperty
(
"java.io.tmpdir"
)
+
File
.
separator
+
"flexiprep"
val
outputDir
=
Files
.
createTempDir
()
val
excutables
=
Map
(
"reference"
->
"test"
,
...
...
public/flexiprep/src/test/scala/nl/lumc/sasc/biopet/pipelines/flexiprep/FlexiprepTest.scala
View file @
280f922d
...
...
@@ -2,15 +2,17 @@ package nl.lumc.sasc.biopet.pipelines.flexiprep
import
java.io.File
import
com.google.common.io.Files
import
org.apache.commons.io.FileUtils
import
org.broadinstitute.gatk.queue.QSettings
import
org.scalatest.Matchers
import
org.scalatest.testng.TestNGSuite
import
org.testng.annotations.
{
AfterClass
,
DataProvider
,
Test
}
import
nl.lumc.sasc.biopet.core.config.Config
import
nl.lumc.sasc.biopet.extensions.
{
Gzip
,
Zcat
}
import
nl.lumc.sasc.biopet.tools.FastqSync
import
nl.lumc.sasc.biopet.utils.ConfigUtils
import
org.broadinstitute.gatk.queue.QSettings
import
org.broadinstitute.gatk.queue.function.QFunction
import
org.scalatest.Matchers
import
org.scalatest.testng.TestNGSuite
import
org.testng.annotations.
{
DataProvider
,
Test
}
/**
* Created by pjvan_thof on 2/11/15.
...
...
@@ -67,9 +69,15 @@ class FlexiprepTest extends TestNGSuite with Matchers {
flexiprep
.
functions
.
count
(
_
.
isInstanceOf
[
Sickle
])
shouldBe
(
if
(
skipTrim
)
0
else
1
)
flexiprep
.
functions
.
count
(
_
.
isInstanceOf
[
Gzip
])
shouldBe
(
if
(
paired
)
2
else
1
)
}
// remove temporary run directory all tests in the class have been run
@AfterClass
def
removeTempOutputDir
()
=
{
FileUtils
.
deleteDirectory
(
FlexiprepTest
.
outputDir
)
}
}
object
FlexiprepTest
{
val
outputDir
=
System
.
getProperty
(
"java.io.tmpdir"
)
+
File
.
separator
+
"flexiprep"
val
outputDir
=
Files
.
createTempDir
()
val
excutables
=
Map
(
"seqstat"
->
Map
(
"exe"
->
"test"
),
...
...
public/mapping/src/test/scala/nl/lumc/sasc/biopet/pipelines/mapping/MappingTest.scala
View file @
280f922d
...
...
@@ -2,6 +2,13 @@ package nl.lumc.sasc.biopet.pipelines.mapping
import
java.io.File
import
com.google.common.io.Files
import
org.apache.commons.io.FileUtils
import
org.broadinstitute.gatk.queue.QSettings
import
org.scalatest.Matchers
import
org.scalatest.testng.TestNGSuite
import
org.testng.annotations.
{
AfterClass
,
DataProvider
,
Test
}
import
nl.lumc.sasc.biopet.core.config.Config
import
nl.lumc.sasc.biopet.extensions.bwa.
{
BwaSamse
,
BwaSampe
,
BwaAln
,
BwaMem
}
import
nl.lumc.sasc.biopet.extensions.picard.
{
MergeSamFiles
,
AddOrReplaceReadGroups
,
MarkDuplicates
,
SortSam
}
...
...
@@ -12,10 +19,6 @@ import nl.lumc.sasc.biopet.pipelines.flexiprep.Sickle
import
nl.lumc.sasc.biopet.pipelines.flexiprep._
import
nl.lumc.sasc.biopet.tools.FastqSync
import
nl.lumc.sasc.biopet.utils.ConfigUtils
import
org.broadinstitute.gatk.queue.QSettings
import
org.scalatest.Matchers
import
org.scalatest.testng.TestNGSuite
import
org.testng.annotations.
{
DataProvider
,
Test
}
/**
* Created by pjvan_thof on 2/12/15.
...
...
@@ -94,10 +97,15 @@ class MappingTest extends TestNGSuite with Matchers {
mapping
.
functions
.
count
(
_
.
isInstanceOf
[
MergeSamFiles
])
shouldBe
(
if
(
skipMarkDuplicate
&&
chunks
>
1
)
1
else
0
)
mapping
.
functions
.
count
(
_
.
isInstanceOf
[
MarkDuplicates
])
shouldBe
(
if
(
skipMarkDuplicate
)
0
else
1
)
}
// remove temporary run directory all tests in the class have been run
@AfterClass
def
removeTempOutputDir
()
=
{
FileUtils
.
deleteDirectory
(
MappingTest
.
outputDir
)
}
}
object
MappingTest
{
val
outputDir
=
System
.
getProperty
(
"java.io.tmpdir"
)
+
File
.
separator
+
"flexiprep"
val
outputDir
=
Files
.
createTempDir
()
val
excutables
=
Map
(
"reference"
->
"test"
,
...
...
Write
Preview
Supports
Markdown
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