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
b9173a70
Commit
b9173a70
authored
Apr 21, 2017
by
akaljuvee
Browse files
one log line
parent
3d2cbc8a
Changes
3
Hide whitespace changes
Inline
Side-by-side
biopet-tools-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/tools/VcfStatsForSv.scala
View file @
b9173a70
...
...
@@ -37,13 +37,15 @@ class VcfStatsForSv(val parent: Configurable) extends ToolCommandFunction with S
var
outputFile
:
File
=
_
override
def
defaultCoreMemory
=
1.0
override
def
defaultResidentFactor
=
2.0
override
def
defaultVmemFactor
=
3.0
override
def
cmdLine
=
super
.
cmdLine
+
required
(
"-i"
,
inputFile
)
+
required
(
"-o"
,
outputFile
)
+
repeat
(
"--histBinBoundaries"
,
histogramBinBoundaries
)
def
summaryStats
:
Map
[
String
,
Any
]
=
ConfigUtils
.
yamlTo
Map
(
outputFile
)
def
summaryStats
:
Map
[
String
,
Any
]
=
ConfigUtils
.
fileToConfig
Map
(
outputFile
)
def
summaryFiles
:
Map
[
String
,
File
]
=
Map
.
empty
...
...
biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/vcfstats/VcfStatsForSv.scala
View file @
b9173a70
...
...
@@ -38,8 +38,7 @@ object VcfStatsForSv extends ToolCommand {
val
stats
:
Map
[
String
,
Any
]
=
getVariantCounts
(
cmdArgs
.
inputFile
,
cmdArgs
.
histBinBoundaries
)
ConfigUtils
.
mapToYamlFile
(
stats
,
cmdArgs
.
outputFile
)
ConfigUtils
.
mapToJsonFile
(
stats
,
cmdArgs
.
outputFile
)
}
/** Parses a vcf-file and counts sv-s by type and size. Sv-s are divided to different size classes, the parameter histogramBinBoundaries gives the boundaries between these classes. */
...
...
biopet-utils/src/main/scala/nl/lumc/sasc/biopet/utils/ConfigUtils.scala
View file @
b9173a70
...
...
@@ -168,6 +168,12 @@ object ConfigUtils extends Logging {
writer
.
close
()
}
def
mapToJsonFile
(
map
:
Map
[
String
,
Any
],
outputFile
:
File
)
=
{
val
writer
=
new
PrintWriter
(
outputFile
)
writer
.
println
(
anyToJson
(
map
).
toString
())
writer
.
close
()
}
/** Convert json to native scala map/values */
def
jsonToMap
(
json
:
Json
)
:
Map
[
String
,
Any
]
=
{
var
output
:
Map
[
String
,
Any
]
=
Map
()
...
...
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