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
9247a599
Commit
9247a599
authored
Mar 19, 2015
by
Peter van 't Hof
Browse files
Fix variable and add more docs
parent
a79f7d0f
Changes
1
Hide whitespace changes
Inline
Side-by-side
public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/tools/VcfStats.scala
View file @
9247a599
...
...
@@ -423,11 +423,11 @@ object VcfStats extends ToolCommand {
}
protected
def
writeWiggle
(
intervals
:
List
[
Interval
],
row
:
String
,
column
:
String
,
outputFile
:
File
,
genotype
:
Boolean
)
:
Unit
=
{
val
bla
=
intervals
.
groupBy
(
_
.
getSequence
).
map
{
case
(
k
,
v
)
=>
k
->
v
.
sortBy
(
_
.
getStart
)
}
val
groupedIntervals
=
intervals
.
groupBy
(
_
.
getSequence
).
map
{
case
(
k
,
v
)
=>
k
->
v
.
sortBy
(
_
.
getStart
)
}
outputFile
.
getParentFile
.
mkdirs
()
val
writer
=
new
PrintWriter
(
outputFile
)
writer
.
println
(
"track type=wiggle_0"
)
for
((
chr
,
intervals
)
<-
bla
)
yield
{
for
((
chr
,
intervals
)
<-
groupedIntervals
)
yield
{
val
length
=
intervals
.
head
.
length
()
writer
.
println
(
s
"fixedStep chrom=$chr start=1 step=$length span=$length"
)
for
(
interval
<-
intervals
)
{
...
...
@@ -441,6 +441,13 @@ object VcfStats extends ToolCommand {
writer
.
close
()
}
/**
* Gets single value from a tsv file
* @param file Input tsv file
* @param row Row id
* @param column column id
* @return value
*/
def
valueFromTsv
(
file
:
File
,
row
:
String
,
column
:
String
)
:
Option
[
String
]
=
{
val
reader
=
Source
.
fromFile
(
file
)
val
it
=
reader
.
getLines
()
...
...
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