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
d4b734b1
Commit
d4b734b1
authored
Mar 30, 2017
by
akaljuvee
Browse files
possibility to specify axis ticks and the labels used there
parent
0a868bd9
Changes
2
Hide whitespace changes
Inline
Side-by-side
biopet-utils/src/main/scala/nl/lumc/sasc/biopet/utils/rscript/LinePlot.scala
View file @
d4b734b1
...
...
@@ -42,6 +42,9 @@ class LinePlot(val root: Configurable) extends Rscript {
var
xLog10
:
Boolean
=
false
var
yLog10
:
Boolean
=
false
var
xLog10AxisTicks
:
Seq
[
String
]
=
Seq
.
empty
var
xLog10AxisLabels
:
Seq
[
String
]
=
Seq
.
empty
override
def
cmd
=
super
.
cmd
++
Seq
(
"--input"
,
input
.
getAbsolutePath
)
++
Seq
(
"--output"
,
output
.
getAbsolutePath
)
++
...
...
@@ -53,7 +56,9 @@ class LinePlot(val root: Configurable) extends Rscript {
title
.
map
(
Seq
(
"--title"
,
_
)).
getOrElse
(
Seq
())
++
(
if
(
removeZero
)
Seq
(
"--removeZero"
,
"true"
)
else
Seq
())
++
(
if
(
xLog10
)
Seq
(
"--xLog10"
,
"true"
)
else
Seq
())
++
(
if
(
yLog10
)
Seq
(
"--yLog10"
,
"true"
)
else
Seq
())
(
if
(
yLog10
)
Seq
(
"--yLog10"
,
"true"
)
else
Seq
())
++
(
if
(
xLog10AxisTicks
.
nonEmpty
)
xLog10AxisTicks
.+:(
"--xLog10Breaks"
)
else
Seq
())
++
(
if
(
xLog10AxisTicks
.
nonEmpty
)
xLog10AxisLabels
.+:(
"--xLog10Labels"
)
else
Seq
())
}
...
...
shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/ShivaSvCallingReport.scala
View file @
d4b734b1
...
...
@@ -8,6 +8,7 @@ import nl.lumc.sasc.biopet.utils.summary.Summary
object
ShivaSvCallingReport
{
val
histogramBinBoundaries
:
Array
[
Int
]
=
Array
(
100
,
1000
,
10000
,
100000
,
1000000
,
10000000
)
val
histogramPlotTicks
:
Array
[
Int
]
=
Array
(
100
,
1000
,
10000
,
100000
,
1000000
,
10000000
,
100000000
)
val
histogramText
:
List
[
String
]
=
List
(
"<=100bp"
,
"0.1-1kb"
,
"1-10kb"
,
"10-100kb"
,
"0.1-1Mb"
,
"1-10Mb"
,
">10Mb"
)
def
parseSummaryForSvCounts
(
summary
:
Summary
)
:
Map
[
String
,
Map
[
String
,
Array
[
Any
]]]
=
{
...
...
@@ -60,15 +61,11 @@ object ShivaSvCallingReport {
sampleNames
.
foreach
(
sampleName
=>
tsvWriter
.
print
(
"\t"
+
sampleName
))
tsvWriter
.
println
()
for
(
i
<-
histogram
BinBoundarie
s
.
indices
)
{
tsvWriter
.
print
(
histogram
BinBoundarie
s
(
i
))
for
(
i
<-
histogram
PlotTick
s
.
indices
)
{
tsvWriter
.
print
(
histogram
PlotTick
s
(
i
))
sampleNames
.
foreach
(
sampleName
=>
tsvWriter
.
print
(
"\t"
+
counts
.
get
(
sampleName
).
get
(
i
)))
tsvWriter
.
println
()
}
val
i
=
histogramBinBoundaries
.
length
tsvWriter
.
print
(
histogramBinBoundaries
(
i
-
1
)
*
10
)
sampleNames
.
foreach
(
sampleName
=>
tsvWriter
.
print
(
"\t"
+
counts
.
get
(
sampleName
).
get
(
i
)))
tsvWriter
.
println
()
tsvWriter
.
close
()
}
...
...
@@ -87,6 +84,8 @@ object ShivaSvCallingReport {
plot
.
llabel
=
Some
(
"Sample"
)
plot
.
xLog10
=
true
plot
.
yLog10
=
true
plot
.
xLog10AxisTicks
=
histogramPlotTicks
.
collect
({
case
x
=>
x
.
toString
()
})
plot
.
xLog10AxisLabels
=
histogramText
plot
.
runLocal
()
}
...
...
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