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
9c0409f6
Commit
9c0409f6
authored
Feb 04, 2015
by
Peter van 't Hof
Browse files
Change name
parent
11a6c2db
Changes
1
Hide whitespace changes
Inline
Side-by-side
public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/tools/VcfStats.scala
View file @
9c0409f6
...
...
@@ -211,6 +211,7 @@ object VcfStats extends ToolCommand {
val
usedAlleles
=
(
for
(
allele
<-
genotype
.
getAlleles
)
yield
record
.
getAlleleIndex
(
allele
)).
toList
addToBuffer
(
"general"
,
"Total"
)
if
(
genotype
.
isHet
)
addToBuffer
(
"general"
,
"Het"
)
if
(
genotype
.
isHetNonRef
)
addToBuffer
(
"general"
,
"HetNonRef"
)
if
(
genotype
.
isHom
)
addToBuffer
(
"general"
,
"Hom"
)
...
...
@@ -243,7 +244,7 @@ object VcfStats extends ToolCommand {
val
file
=
new
File
(
prefix
+
field
+
".tsv"
)
file
.
getParentFile
.
mkdirs
()
val
writer
=
new
PrintWriter
(
file
)
writer
.
println
(
samples
.
mkString
(
"\t"
,
"\t"
,
""
))
writer
.
println
(
samples
.
mkString
(
field
+
"\t"
,
"\t"
,
""
))
val
keySet
=
(
for
(
sample
<-
samples
)
yield
stats
.
samplesStats
(
sample
).
genotypeStats
.
getOrElse
(
field
,
Map
[
Any
,
Int
]()).
keySet
).
fold
(
Set
[
Any
]())(
_
++
_
)
for
(
key
<-
keySet
.
toList
.
sortWith
(
sortAnyAny
(
_
,
_
)))
{
val
values
=
for
(
sample
<-
samples
)
yield
stats
.
samplesStats
(
sample
).
genotypeStats
.
getOrElse
(
field
,
Map
[
Any
,
Int
]()).
getOrElse
(
key
,
0
)
...
...
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