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
b0f1be5a
Commit
b0f1be5a
authored
Mar 07, 2016
by
Peter van 't Hof
Browse files
Fixed style
parent
76b770a7
Changes
1
Show whitespace changes
Inline
Side-by-side
public/biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/ValidateFastqTest.scala
View file @
b0f1be5a
package
nl.lumc.sasc.biopet.tools
import
java.io.
{
OutputStream
,
PrintStream
,
ByteArrayOutputStream
}
import
java.nio.file.Paths
import
htsjdk.samtools.fastq.FastqRecord
import
nl.lumc.sasc.biopet.utils.Logging
import
org.apache.log4j.
{
FileAppender
,
Appender
}
import
org.scalatest.Matchers
import
org.scalatest.testng.TestNGSuite
import
org.testng.annotations.
{
DataProvider
,
Test
}
import
scala.collection.JavaConversions._
/**
* This class test ValidateFatq
*
* Created by pjvan_thof on 2/17/16.
*/
class
ValidateFastqTest
extends
TestNGSuite
with
Matchers
{
@Test
def
testCheckMate
:
Unit
=
{
def
testCheckMate
()
:
Unit
=
{
ValidateFastq
.
checkMate
(
new
FastqRecord
(
"read_1"
,
"ATCG"
,
""
,
"AAAA"
),
new
FastqRecord
(
"read_1"
,
"ATCG"
,
""
,
"AAAA"
))
intercept
[
IllegalStateException
]
{
...
...
@@ -27,7 +24,7 @@ class ValidateFastqTest extends TestNGSuite with Matchers {
}
@Test
def
testDuplicateCheck
:
Unit
=
{
def
testDuplicateCheck
()
:
Unit
=
{
ValidateFastq
.
duplicateCheck
(
new
FastqRecord
(
"read_1"
,
"ATCG"
,
""
,
"AAAA"
),
None
)
ValidateFastq
.
duplicateCheck
(
new
FastqRecord
(
"read_1"
,
"ATCG"
,
""
,
"AAAA"
),
Some
(
new
FastqRecord
(
"read_2"
,
"ATCG"
,
""
,
"AAAA"
)))
...
...
@@ -58,14 +55,14 @@ class ValidateFastqTest extends TestNGSuite with Matchers {
}
@Test
def
testGetPossibleEncodingsFail
:
Unit
=
{
def
testGetPossibleEncodingsFail
()
:
Unit
=
{
ValidateFastq
.
minQual
=
Some
(
'!'
)
ValidateFastq
.
maxQual
=
Some
(
'h'
)
ValidateFastq
.
getPossibleEncodings
shouldBe
Nil
}
@Test
def
testCheckQualEncoding
:
Unit
=
{
def
testCheckQualEncoding
()
:
Unit
=
{
ValidateFastq
.
minQual
=
None
ValidateFastq
.
maxQual
=
None
ValidateFastq
.
checkQualEncoding
(
new
FastqRecord
(
"read_1"
,
"ATCG"
,
""
,
"AAAA"
))
...
...
@@ -92,7 +89,7 @@ class ValidateFastqTest extends TestNGSuite with Matchers {
}
@Test
def
testValidFastqRecord
:
Unit
=
{
def
testValidFastqRecord
()
:
Unit
=
{
ValidateFastq
.
minQual
=
None
ValidateFastq
.
maxQual
=
None
ValidateFastq
.
validFastqRecord
(
new
FastqRecord
(
"read_1"
,
"ATCG"
,
""
,
"AAAA"
))
...
...
@@ -110,7 +107,7 @@ class ValidateFastqTest extends TestNGSuite with Matchers {
Paths
.
get
(
getClass
.
getResource
(
p
).
toURI
).
toString
@Test
def
testMain
:
Unit
=
{
def
testMain
()
:
Unit
=
{
ValidateFastq
.
minQual
=
None
ValidateFastq
.
maxQual
=
None
val
r1
=
resourcePath
(
"/paired01a.fq"
)
...
...
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