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
613788fd
Commit
613788fd
authored
May 09, 2016
by
Peter van 't Hof
Browse files
Added test
parent
68f99a4f
Changes
3
Hide whitespace changes
Inline
Side-by-side
bam2wig/pom.xml
View file @
613788fd
...
...
@@ -45,6 +45,18 @@
<artifactId>
BiopetExtensions
</artifactId>
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
org.scalatest
</groupId>
<artifactId>
scalatest_2.10
</artifactId>
<version>
2.2.1
</version>
<scope>
test
</scope>
</dependency>
<dependency>
<groupId>
org.testng
</groupId>
<artifactId>
testng
</artifactId>
<version>
6.8
</version>
<scope>
test
</scope>
</dependency>
</dependencies>
</project>
\ No newline at end of file
bam2wig/src/test/resources/empty.bam
0 → 100644
View file @
613788fd
File added
bam2wig/src/test/scala/nl/lumc/sasc/biopet/pipelines/bamtobigwig/BamToChromSizesTest.scala
0 → 100644
View file @
613788fd
package
nl.lumc.sasc.biopet.pipelines.bamtobigwig
import
java.io.File
import
java.nio.file.Paths
import
org.scalatest.Matchers
import
org.scalatest.testng.TestNGSuite
import
org.testng.annotations.Test
import
scala.io.Source
/**
* 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
}
@Test
def
testChromSizes
:
Unit
=
{
val
bamFile
=
new
File
(
resourcePath
(
"/empty.bam"
))
val
bamToChromSizes
=
new
BamToChromSizes
(
null
)
bamToChromSizes
.
bamFile
=
bamFile
bamToChromSizes
.
chromSizesFile
=
File
.
createTempFile
(
"chrom."
,
".sizes"
)
bamToChromSizes
.
chromSizesFile
.
deleteOnExit
()
bamToChromSizes
.
run
()
Source
.
fromFile
(
bamToChromSizes
.
chromSizesFile
).
getLines
().
toList
shouldBe
List
(
"chrQ\t10000"
,
"chrR\t10000"
)
}
}
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