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
d11105a2
Commit
d11105a2
authored
Mar 05, 2016
by
Peter van 't Hof
Browse files
Auto style changes
parent
094de5f1
Changes
1
Hide whitespace changes
Inline
Side-by-side
public/biopet-utils/src/test/scala/nl/lumc/sasc/biopet/utils/BamUtilsTest.scala
View file @
d11105a2
...
...
@@ -3,11 +3,11 @@ package nl.lumc.sasc.biopet.utils
import
java.io.File
import
htsjdk.samtools._
import
org.mockito.Mockito.
{
inOrder
=>
inOrd
}
import
org.mockito.Mockito.
{
inOrder
=>
inOrd
}
import
org.scalatest.Matchers
import
org.scalatest.mock.MockitoSugar
import
org.scalatest.testng.TestNGSuite
import
org.testng.annotations.
{
BeforeClass
,
Test
}
import
org.testng.annotations.
{
BeforeClass
,
Test
}
/**
* Created by wyleung on 22-2-16.
...
...
@@ -45,7 +45,6 @@ class BamUtilsTest extends TestNGSuite with MockitoSugar with Matchers {
new
SAMLineParser
(
samh
)
}
private
val
samHeaderTemplateErrornousNoReadgroup
:
SAMLineParser
=
{
val
samh
=
new
SAMFileHeader
samh
.
setSortOrder
(
SAMFileHeader
.
SortOrder
.
coordinate
)
...
...
@@ -178,29 +177,28 @@ class BamUtilsTest extends TestNGSuite with MockitoSugar with Matchers {
val
thrown
=
intercept
[
IllegalArgumentException
]
{
sampleBamMap
(
List
(
BamUtilsTest
.
singleEndBam01WithDoubleSamples
))
}
thrown
.
getMessage
should
===(
"Bam contains multiple sample IDs: "
+
BamUtilsTest
.
singleEndBam01WithDoubleSamples
)
thrown
.
getMessage
should
===(
"Bam contains multiple sample IDs: "
+
BamUtilsTest
.
singleEndBam01WithDoubleSamples
)
}
@Test
def
testSampleBamNamesMultipleSamplesPE
=
{
val
thrown
=
intercept
[
IllegalArgumentException
]
{
sampleBamMap
(
List
(
BamUtilsTest
.
pairedEndBam01WithDoubleSamples
))
}
thrown
.
getMessage
should
===(
"Bam contains multiple sample IDs: "
+
BamUtilsTest
.
pairedEndBam01WithDoubleSamples
)
thrown
.
getMessage
should
===(
"Bam contains multiple sample IDs: "
+
BamUtilsTest
.
pairedEndBam01WithDoubleSamples
)
}
@Test
def
testSampleBamNamesNoRGSE
=
{
val
thrown
=
intercept
[
IllegalArgumentException
]
{
sampleBamMap
(
List
(
BamUtilsTest
.
singleEndBam01NoRG
))
}
thrown
.
getMessage
should
===(
"Bam does not contain sample ID or have no readgroups defined: "
+
BamUtilsTest
.
singleEndBam01NoRG
)
thrown
.
getMessage
should
===(
"Bam does not contain sample ID or have no readgroups defined: "
+
BamUtilsTest
.
singleEndBam01NoRG
)
}
@Test
def
testSampleBamNamesNoRGPE
=
{
val
thrown
=
intercept
[
IllegalArgumentException
]
{
sampleBamMap
(
List
(
BamUtilsTest
.
pairedEndBam01NoRG
))
}
thrown
.
getMessage
should
===(
"Bam does not contain sample ID or have no readgroups defined: "
+
BamUtilsTest
.
pairedEndBam01NoRG
)
thrown
.
getMessage
should
===(
"Bam does not contain sample ID or have no readgroups defined: "
+
BamUtilsTest
.
pairedEndBam01NoRG
)
}
@Test
def
testSampleFoundTwice
=
{
...
...
@@ -219,7 +217,6 @@ object BamUtilsTest {
var
pairedEndBam02
:
File
=
File
.
createTempFile
(
"bamutils"
,
"paired02.bam"
)
singleEndBam01
.
deleteOnExit
()
var
singleEndBam01WithDoubleSamples
:
File
=
File
.
createTempFile
(
"bamutils"
,
"single01ds.bam"
)
singleEndBam01WithDoubleSamples
.
deleteOnExit
()
var
pairedEndBam01WithDoubleSamples
:
File
=
File
.
createTempFile
(
"bamutils"
,
"paired01ds.bam"
)
...
...
@@ -229,6 +226,4 @@ object BamUtilsTest {
singleEndBam01NoRG
.
deleteOnExit
()
var
pairedEndBam01NoRG
:
File
=
File
.
createTempFile
(
"bamutils"
,
"paired01norg.bam"
)
singleEndBam01NoRG
.
deleteOnExit
()
}
\ No newline at end of file
}
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