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
156dad59
Commit
156dad59
authored
May 10, 2016
by
Peter van 't Hof
Browse files
Style fixes
parent
613788fd
Changes
6
Hide whitespace changes
Inline
Side-by-side
bam2wig/src/test/scala/nl/lumc/sasc/biopet/pipelines/bamtobigwig/BamToChromSizesTest.scala
View file @
156dad59
...
...
@@ -9,10 +9,9 @@ import org.testng.annotations.Test
import
scala.io.Source
/**
* Created by pjvanthof on 09/05/16.
*/
* Created by pjvanthof on 09/05/16.
*/
class
BamToChromSizesTest
extends
TestNGSuite
with
Matchers
{
private
def
resourcePath
(
p
:
String
)
:
String
=
{
Paths
.
get
(
getClass
.
getResource
(
p
).
toURI
).
toString
...
...
biopet-core/src/test/scala/nl/lumc/sasc/biopet/core/WriteDependenciesTest.scala
View file @
156dad59
...
...
@@ -12,8 +12,8 @@ import org.testng.annotations.Test
import
scala.io.Source
/**
* Created by pjvanthof on 09/05/16.
*/
* Created by pjvanthof on 09/05/16.
*/
class
WriteDependenciesTest
extends
TestNGSuite
with
Matchers
{
import
WriteDependenciesTest._
...
...
biopet-utils/src/test/scala/nl/lumc/sasc/biopet/utils/IoUtilsTest.scala
View file @
156dad59
package
nl.lumc.sasc.biopet.utils
import
java.io.
{
File
,
FileNotFoundException
,
PrintWriter
}
import
java.io.
{
File
,
FileNotFoundException
,
PrintWriter
}
import
java.nio.file.Files
import
org.scalatest.Matchers
...
...
@@ -10,8 +10,8 @@ import org.testng.annotations.Test
import
scala.io.Source
/**
* Created by pjvanthof on 05/05/16.
*/
* Created by pjvanthof on 05/05/16.
*/
class
IoUtilsTest
extends
TestNGSuite
with
Matchers
{
def
createTempTestFile
(
file
:
File
)
:
Unit
=
{
...
...
@@ -40,7 +40,7 @@ class IoUtilsTest extends TestNGSuite with Matchers {
val
temp1
=
File
.
createTempFile
(
"test."
,
".txt"
)
val
tempDir
=
new
File
(
Files
.
createTempDirectory
(
"test"
).
toFile
,
"non-exist"
)
tempDir
.
deleteOnExit
()
tempDir
shouldNot
exist
tempDir
shouldNot
exist
val
temp2
=
new
File
(
tempDir
,
"test.txt"
)
createTempTestFile
(
temp1
)
intercept
[
FileNotFoundException
]
{
...
...
@@ -65,12 +65,12 @@ class IoUtilsTest extends TestNGSuite with Matchers {
"dir1"
+
File
.
separator
+
"test2.txt"
,
"dir2"
+
File
.
separator
+
"test1.txt"
,
"dir2"
+
File
.
separator
+
"test2.txt"
)
relativePaths
.
foreach
{
x
=>
relativePaths
.
foreach
{
x
=>
createTempTestFile
(
new
File
(
tempDir1
,
x
))
new
File
(
tempDir2
,
x
)
shouldNot
exist
}
IoUtils
.
copyDir
(
tempDir1
,
tempDir2
)
relativePaths
.
foreach
{
x
=>
relativePaths
.
foreach
{
x
=>
val
file
=
new
File
(
tempDir2
,
x
)
file
should
exist
val
reader
=
Source
.
fromFile
(
file
)
...
...
biopet-utils/src/test/scala/nl/lumc/sasc/biopet/utils/summary/SummaryTest.scala
View file @
156dad59
package
nl.lumc.sasc.biopet.utils.summary
import
java.io.
{
File
,
PrintWriter
}
import
java.io.
{
File
,
PrintWriter
}
import
nl.lumc.sasc.biopet.utils.ConfigUtils
import
org.scalatest.Matchers
...
...
@@ -8,8 +8,8 @@ import org.scalatest.testng.TestNGSuite
import
org.testng.annotations.Test
/**
* Created by pjvanthof on 06/05/16.
*/
* Created by pjvanthof on 06/05/16.
*/
class
SummaryTest
extends
TestNGSuite
with
Matchers
{
@Test
def
testSamples
:
Unit
=
{
...
...
@@ -28,15 +28,15 @@ class SummaryTest extends TestNGSuite with Matchers {
val
summary
=
new
Summary
(
SummaryTest
.
testSummaryFile
)
summary
.
getValue
(
"key_1"
)
shouldBe
Some
(
"test_1"
)
summary
.
getValue
(
"key_x"
)
shouldBe
None
summary
.
getValue
(
"samples"
,
"sample1"
,
"key_2"
)
shouldBe
Some
(
"test_2"
)
summary
.
getValue
(
"samples"
,
"sample1"
,
"libraries"
,
"lib1"
,
"key_3"
)
shouldBe
Some
(
"test_3"
)
summary
.
getValue
(
"samples"
,
"sample1"
,
"key_2"
)
shouldBe
Some
(
"test_2"
)
summary
.
getValue
(
"samples"
,
"sample1"
,
"libraries"
,
"lib1"
,
"key_3"
)
shouldBe
Some
(
"test_3"
)
summary
.
getValue
(
Some
(
"sample1"
),
None
,
"key_2"
)
shouldBe
Some
(
"test_2"
)
summary
.
getValue
(
Some
(
"sample1"
),
None
,
"key_x"
)
shouldBe
None
summary
.
getValue
(
Some
(
"sample1"
),
Some
(
"lib1"
),
"key_3"
)
shouldBe
Some
(
"test_3"
)
summary
.
getValue
(
Some
(
"sample1"
),
Some
(
"lib1"
),
"key_x"
)
shouldBe
None
summary
.
getValue
(
None
,
None
,
"key_1"
)
shouldBe
Some
(
"test_1"
)
summary
.
getValue
(
None
,
None
,
"key_x"
)
shouldBe
None
summary
.
getValue
(
Some
(
"sample1"
),
None
,
"key_2"
)
shouldBe
Some
(
"test_2"
)
summary
.
getValue
(
Some
(
"sample1"
),
None
,
"key_x"
)
shouldBe
None
summary
.
getValue
(
Some
(
"sample1"
),
Some
(
"lib1"
),
"key_3"
)
shouldBe
Some
(
"test_3"
)
summary
.
getValue
(
Some
(
"sample1"
),
Some
(
"lib1"
),
"key_x"
)
shouldBe
None
summary
.
getValue
(
None
,
None
,
"key_1"
)
shouldBe
Some
(
"test_1"
)
summary
.
getValue
(
None
,
None
,
"key_x"
)
shouldBe
None
}
@Test
...
...
biopet-utils/src/test/scala/nl/lumc/sasc/biopet/utils/summary/SummaryValueTest.scala
View file @
156dad59
package
nl.lumc.sasc.biopet.utils.summary
import
java.io.
{
File
,
PrintWriter
}
import
java.io.
{
File
,
PrintWriter
}
import
nl.lumc.sasc.biopet.utils.ConfigUtils
import
org.scalatest.Matchers
...
...
@@ -8,8 +8,8 @@ import org.scalatest.testng.TestNGSuite
import
org.testng.annotations.Test
/**
* Created by pjvanthof on 06/05/16.
*/
* Created by pjvanthof on 06/05/16.
*/
class
SummaryValueTest
extends
TestNGSuite
with
Matchers
{
@Test
def
testConstructor
:
Unit
=
{
...
...
shiva/src/test/scala/nl/lumc/sasc/biopet/pipelines/shiva/ShivaTest.scala
View file @
156dad59
...
...
@@ -103,14 +103,16 @@ trait ShivaTestTrait extends TestNGSuite with Matchers {
pipeline
.
summarySettings
.
get
(
"annotation"
)
shouldBe
Some
(
annotation
)
pipeline
.
summarySettings
.
get
(
"sv_calling"
)
shouldBe
Some
(
svCalling
)
pipeline
.
samples
foreach
{
case
(
sampleId
,
sample
)
=>
sample
.
summarySettings
.
get
(
"single_sample_variantcalling"
)
shouldBe
Some
(
sampleCalling
)
sample
.
summarySettings
.
get
(
"use_indel_realigner"
)
shouldBe
Some
(
realign
)
sample
.
libraries
.
foreach
{
case
(
libId
,
lib
)
=>
lib
.
summarySettings
.
get
(
"library_variantcalling"
)
shouldBe
Some
(
libraryCalling
)
lib
.
summarySettings
.
get
(
"use_indel_realigner"
)
shouldBe
Some
(
realign
)
lib
.
summarySettings
.
get
(
"use_base_recalibration"
)
shouldBe
Some
(
baseRecalibration
&&
dbsnp
)
}
pipeline
.
samples
foreach
{
case
(
sampleId
,
sample
)
=>
sample
.
summarySettings
.
get
(
"single_sample_variantcalling"
)
shouldBe
Some
(
sampleCalling
)
sample
.
summarySettings
.
get
(
"use_indel_realigner"
)
shouldBe
Some
(
realign
)
sample
.
libraries
.
foreach
{
case
(
libId
,
lib
)
=>
lib
.
summarySettings
.
get
(
"library_variantcalling"
)
shouldBe
Some
(
libraryCalling
)
lib
.
summarySettings
.
get
(
"use_indel_realigner"
)
shouldBe
Some
(
realign
)
lib
.
summarySettings
.
get
(
"use_base_recalibration"
)
shouldBe
Some
(
baseRecalibration
&&
dbsnp
)
}
}
pipeline
.
functions
.
count
(
_
.
isInstanceOf
[
VcfStats
])
shouldBe
(
...
...
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