Commit ebd76709 authored by Peter van 't Hof's avatar Peter van 't Hof
Browse files

Add title to some plots

parent b48a1b0d
......@@ -84,6 +84,7 @@ object BammetricsReport extends ReportBuilder {
plot.output = pngFile
plot.ylabel = Some("Reads")
plot.width = Some(750)
plot.title = Some("Aligned reads")
plot.runLocal()
}
......
......@@ -10,6 +10,7 @@ parser$add_argument('--height', dest='height', type='integer', default = 500)
parser$add_argument('--xlabel', dest='xlabel', type='character')
parser$add_argument('--ylabel', dest='ylabel', type='character', required=TRUE)
parser$add_argument('--llabel', dest='llabel', type='character')
parser$add_argument('--title', dest='title', type='character')
arguments <- parser$parse_args()
......@@ -28,6 +29,7 @@ ggplot(DF1, aes(x = Rank, y = value, fill = variable)) +
ylab(arguments$ylabel) +
guides(fill=guide_legend(title=arguments$llabel)) +
theme(axis.text.x = element_text(angle = 90, hjust = 1, size = 8)) +
geom_bar(stat = "identity", width=1)
geom_bar(stat = "identity", width=1) +
ggtitle(arguments$title)
dev.off()
......@@ -23,6 +23,7 @@ class StackedBarPlot(val root: Configurable) extends RscriptCommandLineFunction
var xlabel: Option[String] = config("xlabel")
var ylabel: Option[String] = config("ylabel")
var llabel: Option[String] = config("llabel")
var title: Option[String] = config("title")
override def cmdLine: String = super.cmdLine +
required("--input", input) +
......@@ -31,5 +32,6 @@ class StackedBarPlot(val root: Configurable) extends RscriptCommandLineFunction
optional("--height", height) +
optional("--xlabel", xlabel) +
required("--ylabel", ylabel) +
optional("--llabel", llabel)
optional("--llabel", llabel) +
optional("--title", title)
}
......@@ -88,6 +88,7 @@ object FlexiprepReport extends ReportBuilder {
plot.output = pngFile
plot.ylabel = Some("Reads")
plot.width = Some(750)
plot.title = Some("QC summary on " + read + " reads")
plot.runLocal()
}
......@@ -128,6 +129,7 @@ object FlexiprepReport extends ReportBuilder {
plot.output = pngFile
plot.ylabel = Some("Bases")
plot.width = Some(750)
plot.title = Some("QC summary on " + read + " bases")
plot.runLocal()
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment