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
81108a2a
Commit
81108a2a
authored
Mar 01, 2017
by
Peter van 't Hof
Browse files
Adding separated outputDirs for tests for MultisampleMapping
parent
2cc410f4
Changes
2
Hide whitespace changes
Inline
Side-by-side
mapping/src/test/scala/nl/lumc/sasc/biopet/pipelines/mapping/MappingTest.scala
View file @
81108a2a
...
...
@@ -104,10 +104,10 @@ abstract class AbstractTestMapping(val aligner: String) extends TestNGSuite with
val
inputDir
=
Files
.
createTempDir
()
val
r1
=
new
File
(
inputDir
,
"input"
+
File
.
separator
+
"R1.fq"
)
val
r2
=
new
File
(
inputDir
,
"input"
+
File
.
separator
+
"R2.fq"
)
val
r1Zipped
=
new
File
(
inputDir
,
"input"
+
File
.
separator
+
"R1.fq.gz"
)
val
r2Zipped
=
new
File
(
inputDir
,
"input"
+
File
.
separator
+
"R2.fq.gz"
)
val
r1
=
new
File
(
inputDir
,
"R1.fq"
)
val
r2
=
new
File
(
inputDir
,
"R2.fq"
)
val
r1Zipped
=
new
File
(
inputDir
,
"R1.fq.gz"
)
val
r2Zipped
=
new
File
(
inputDir
,
"R2.fq.gz"
)
val
hisat2Index
=
new
File
(
inputDir
,
"ref.1.ht2"
)
@BeforeClass
...
...
@@ -128,7 +128,7 @@ abstract class AbstractTestMapping(val aligner: String) extends TestNGSuite with
private
def
copyFile
(
name
:
String
)
:
Unit
=
{
val
is
=
getClass
.
getResourceAsStream
(
"/"
+
name
)
val
os
=
new
FileOutputStream
(
new
File
(
out
putDir
,
name
))
val
os
=
new
FileOutputStream
(
new
File
(
in
putDir
,
name
))
org
.
apache
.
commons
.
io
.
IOUtils
.
copy
(
is
,
os
)
os
.
close
()
}
...
...
mapping/src/test/scala/nl/lumc/sasc/biopet/pipelines/mapping/MultisampleMappingTest.scala
View file @
81108a2a
...
...
@@ -162,18 +162,24 @@ class MultisampleMappingBamToFastqTest extends MultisampleMappingTestTrait {
}
object
MultisampleMappingTestTrait
{
val
outputDir
=
Files
.
createTempDir
()
outputDir
.
deleteOnExit
()
new
File
(
outputDir
,
"input"
).
mkdirs
()
private
var
dirs
:
List
[
File
]
=
Nil
def
outputDir
=
{
val
dir
=
Files
.
createTempDir
()
dirs
:+=
dir
dir
}
val
inputDir
=
Files
.
createTempDir
()
def
inputTouch
(
name
:
String
)
:
File
=
{
val
file
=
new
File
(
outputDir
,
"input"
+
File
.
separator
+
name
).
getAbsoluteFile
val
file
=
new
File
(
inputDir
,
name
).
getAbsoluteFile
Files
.
touch
(
file
)
file
}
private
def
copyFile
(
name
:
String
)
:
Unit
=
{
val
is
=
getClass
.
getResourceAsStream
(
"/"
+
name
)
val
os
=
new
FileOutputStream
(
new
File
(
out
putDir
,
name
))
val
os
=
new
FileOutputStream
(
new
File
(
in
putDir
,
name
))
org
.
apache
.
commons
.
io
.
IOUtils
.
copy
(
is
,
os
)
os
.
close
()
}
...
...
@@ -183,14 +189,14 @@ object MultisampleMappingTestTrait {
copyFile
(
"ref.fa.fai"
)
copyFile
(
"empty.sam"
)
val
config
=
Map
(
def
config
=
Map
(
"skip_write_dependencies"
->
true
,
"name_prefix"
->
"test"
,
"cache"
->
true
,
"dir"
->
"test"
,
"vep_script"
->
"test"
,
"output_dir"
->
outputDir
,
"reference_fasta"
->
(
out
putDir
+
File
.
separator
+
"ref.fa"
),
"reference_fasta"
->
(
in
putDir
+
File
.
separator
+
"ref.fa"
),
"fastqc"
->
Map
(
"exe"
->
"test"
),
"input_alleles"
->
"test"
,
"fastqc"
->
Map
(
"exe"
->
"test"
),
...
...
@@ -234,7 +240,7 @@ object MultisampleMappingTestTrait {
val
sample3
=
Map
(
"samples"
->
Map
(
"sample3"
->
Map
(
"libraries"
->
Map
(
"lib1"
->
Map
(
"bam"
->
(
out
putDir
+
File
.
separator
+
"empty.sam"
)
"bam"
->
(
in
putDir
+
File
.
separator
+
"empty.sam"
)
)
)
)))
...
...
@@ -242,7 +248,7 @@ object MultisampleMappingTestTrait {
val
sample4
=
Map
(
"samples"
->
Map
(
"sample4"
->
Map
(
"libraries"
->
Map
(
"lib1"
->
Map
(
"bam"
->
(
out
putDir
+
File
.
separator
+
"empty.sam"
)
"bam"
->
(
in
putDir
+
File
.
separator
+
"empty.sam"
)
)
)
)))
...
...
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