Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
biopet.biopet
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Analyze
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Mirrors
biopet.biopet
Commits
4faa97b2
Commit
4faa97b2
authored
9 years ago
by
Sander Bollen
Browse files
Options
Downloads
Patches
Plain Diff
FindRepeatsPacBioTest
parent
41e0a2ac
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
public/biopet-framework/src/test/scala/nl/lumc/sasc/biopet/tools/FindRepeatsPacBioTest.scala
+64
-0
64 additions, 0 deletions
...ala/nl/lumc/sasc/biopet/tools/FindRepeatsPacBioTest.scala
with
64 additions
and
0 deletions
public/biopet-framework/src/test/scala/nl/lumc/sasc/biopet/tools/FindRepeatsPacBioTest.scala
0 → 100644
+
64
−
0
View file @
4faa97b2
package
nl.lumc.sasc.biopet.tools
import
java.io.File
import
java.nio.file.Paths
import
htsjdk.samtools.
{
SamReaderFactory
,
QueryInterval
}
import
nl.lumc.sasc.biopet.tools.FastqSplitter._
import
org.scalatest.Matchers
import
org.scalatest.mock.MockitoSugar
import
org.scalatest.testng.TestNGSuite
import
org.testng.annotations.Test
import
scala.collection.immutable.Nil
/**
* Created by ahbbollen on 27-8-15.
*/
class
FindRepeatsPacBioTest
extends
TestNGSuite
with
MockitoSugar
with
Matchers
{
import
FindRepeatsPacBio._
private
def
resourcePath
(
p
:
String
)
:
String
=
{
Paths
.
get
(
getClass
.
getResource
(
p
).
toURI
).
toString
}
val
bed
=
resourcePath
(
"/rrna01.bed"
)
val
bam
=
resourcePath
(
"/paired01.bam"
)
@Test
def
testMain
()
=
{
val
args
=
Array
(
"-I"
,
bam
,
"-b"
,
bed
)
main
(
args
)
}
@Test
def
testResult
()
=
{
val
samReader
=
SamReaderFactory
.
makeDefault
().
open
(
new
File
(
bam
))
val
header
=
samReader
.
getFileHeader
val
record
=
samReader
.
iterator
().
next
()
val
interval
=
new
QueryInterval
(
header
.
getSequenceIndex
(
"chrQ"
),
50
,
55
)
val
result
=
procesSamrecord
(
record
,
interval
)
result
.
isEmpty
shouldBe
false
result
.
get
.
samRecord
shouldEqual
record
result
.
get
.
beginDel
should
be
>=
0
result
.
get
.
endDel
should
be
>=
0
}
@Test
def
testResultObject
=
{
val
record
=
SamReaderFactory
.
makeDefault
().
open
(
new
File
(
bam
)).
iterator
().
next
()
val
result
=
new
Result
result
.
samRecord
=
record
result
.
samRecord
shouldEqual
record
result
.
beginDel
shouldBe
0
result
.
endDel
shouldBe
0
result
.
dels
shouldEqual
Nil
result
.
ins
shouldEqual
Nil
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment