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
986ffe92
Commit
986ffe92
authored
Apr 09, 2015
by
Sander Bollen
Browse files
testing different output modes
parent
4fbe0d0d
Changes
4
Hide whitespace changes
Inline
Side-by-side
public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/tools/VcfFilter.scala
View file @
986ffe92
...
...
@@ -147,10 +147,12 @@ object VcfFilter extends ToolCommand {
build
)
writer
.
writeHeader
(
header
)
val
invertedWriter
=
commandArgs
.
invertedOutputVcf
.
collect
{
case
x
=>
new
VariantContextWriterBuilder
().
setOutputFile
(
x
).
setReferenceDictionary
(
header
.
getSequenceDictionary
).
build
}
val
invertedWriter
=
commandArgs
.
invertedOutputVcf
.
collect
{
case
x
=>
new
VariantContextWriterBuilder
().
setOutputFile
(
x
).
setReferenceDictionary
(
header
.
getSequenceDictionary
).
build
}
invertedWriter
.
foreach
(
_
.
writeHeader
(
header
))
var
counterTotal
=
0
...
...
public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/tools/VcfWithVcf.scala
View file @
986ffe92
...
...
@@ -70,7 +70,6 @@ object VcfWithVcf extends ToolCommand {
header
.
addMetaDataLine
(
newHeaderLine
)
}
var
idx
=
0
for
(
record
<-
reader
)
{
...
...
public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/tools/VepNormalizer.scala
View file @
986ffe92
...
...
@@ -90,10 +90,9 @@ object VepNormalizer extends ToolCommand {
logger
.
debug
(
"Parsing header"
)
val
new_infos
=
parseCsq
(
header
)
header
.
setWriteCommandLine
(
true
)
val
writer
=
new
AsyncVariantContextWriter
(
new
VariantContextWriterBuilder
().
setOutputFile
(
output
).
setReferenceDictionary
(
header
.
getSequenceDictionary
)
build
())
build
())
for
(
info
<-
new_infos
)
{
val
tmpheaderline
=
new
VCFInfoHeaderLine
(
info
,
VCFHeaderLineCount
.
UNBOUNDED
,
VCFHeaderLineType
.
String
,
"A VEP annotation"
)
...
...
public/biopet-framework/src/test/scala/nl/lumc/sasc/biopet/tools/VepNormalizerTest.scala
View file @
986ffe92
...
...
@@ -15,6 +15,7 @@
*/
package
nl.lumc.sasc.biopet.tools
import
scala.util.Random
import
org.scalatest.testng.TestNGSuite
import
org.scalatest.mock.MockitoSugar
import
org.scalatest.Matchers
...
...
@@ -41,6 +42,46 @@ class VepNormalizerTest extends TestNGSuite with MockitoSugar with Matchers {
val
vepped
=
new
File
(
resourcePath
(
"/VEP_oneline.vcf"
))
val
unvepped
=
new
File
(
resourcePath
(
"/unvepped.vcf"
))
val
vepped_path
=
resourcePath
(
"/VEP_oneline.vcf"
)
val
rand
=
new
Random
()
@Test
def
testGzOutputExplode
()
:
Unit
=
{
val
tmp_path
=
"/tmp/VepNorm_"
+
rand
.
nextString
(
10
)
+
".vcf.gz"
val
arguments
:
Array
[
String
]
=
Array
(
"-I"
,
vepped_path
,
"-O"
,
tmp_path
,
"-m"
,
"explode"
)
main
(
arguments
)
}
@Test
def
testVcfOutputExplode
()
:
Unit
=
{
val
tmp_path
=
"/tmp/VepNorm_"
+
rand
.
nextString
(
10
)
+
".vcf"
val
arguments
:
Array
[
String
]
=
Array
(
"-I"
,
vepped_path
,
"-O"
,
tmp_path
,
"-m"
,
"explode"
)
main
(
arguments
)
}
@Test
def
testBcfOutputExplode
()
:
Unit
=
{
val
tmp_path
=
"/tmp/VepNorm_"
+
rand
.
nextString
(
10
)
+
".bcf"
val
arguments
:
Array
[
String
]
=
Array
(
"-I"
,
vepped_path
,
"-O"
,
tmp_path
,
"-m"
,
"explode"
)
main
(
arguments
)
}
@Test
def
testGzOutputStandard
()
:
Unit
=
{
val
tmp_path
=
"/tmp/VepNorm_"
+
rand
.
nextString
(
10
)
+
".vcf.gz"
val
arguments
:
Array
[
String
]
=
Array
(
"-I"
,
vepped_path
,
"-O"
,
tmp_path
,
"-m"
,
"standard"
)
main
(
arguments
)
}
@Test
def
testVcfOutputStandard
()
:
Unit
=
{
val
tmp_path
=
"/tmp/VepNorm_"
+
rand
.
nextString
(
10
)
+
".vcf"
val
arguments
:
Array
[
String
]
=
Array
(
"-I"
,
vepped_path
,
"-O"
,
tmp_path
,
"-m"
,
"standard"
)
main
(
arguments
)
}
@Test
def
testBcfOutputStandard
()
:
Unit
=
{
val
tmp_path
=
"/tmp/VepNorm_"
+
rand
.
nextString
(
10
)
+
".bcf"
val
arguments
:
Array
[
String
]
=
Array
(
"-I"
,
vepped_path
,
"-O"
,
tmp_path
,
"-m"
,
"standard"
)
main
(
arguments
)
}
@Test
def
testVEPHeaderLength
()
=
{
val
reader
=
new
VCFFileReader
(
vepped
,
false
)
val
header
=
reader
.
getFileHeader
...
...
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