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
0062bfa8
Commit
0062bfa8
authored
Apr 30, 2015
by
Peter van 't Hof
Browse files
Added extension for stacked bar plot
parent
d3ca07ab
Changes
2
Hide whitespace changes
Inline
Side-by-side
public/biopet-framework/src/main/resources/nl/lumc/sasc/biopet/
tools
/stackedBar.R
→
public/biopet-framework/src/main/resources/nl/lumc/sasc/biopet/
extensions/rscript
/stackedBar.R
View file @
0062bfa8
...
...
@@ -25,7 +25,9 @@ DF1 <- melt(DF, id.var="Rank")
ggplot
(
DF1
,
aes
(
x
=
Rank
,
y
=
value
,
fill
=
variable
))
+
xlab
(
xlab
)
+
ylab
(
arguments
$
ylabel
)
+
guides
(
fill
=
guide_legend
(
title
=
arguments
$
llabel
))
+
geom_bar
(
stat
=
"identity"
)
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
=
0.75
)
dev.off
()
public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/rscript/StackedBarPlot.scala
0 → 100644
View file @
0062bfa8
package
nl.lumc.sasc.biopet.extensions.rscript
import
java.io.File
import
nl.lumc.sasc.biopet.core.config.Configurable
import
nl.lumc.sasc.biopet.extensions.RscriptCommandLineFunction
import
org.broadinstitute.gatk.utils.commandline.
{
Output
,
Input
}
/**
* Created by pjvan_thof on 4/29/15.
*/
class
StackedBarPlot
(
val
root
:
Configurable
)
extends
RscriptCommandLineFunction
{
protected
var
script
:
File
=
config
(
"script"
,
default
=
"stackedBar.R"
)
@Input
var
input
:
File
=
_
@Output
var
output
:
File
=
_
var
width
:
Option
[
Int
]
=
config
(
"width"
)
var
height
:
Option
[
Int
]
=
config
(
"height"
)
var
xlabel
:
Option
[
String
]
=
config
(
"xlabel"
)
var
ylabel
:
Option
[
String
]
=
config
(
"ylabel"
)
var
llabel
:
Option
[
String
]
=
config
(
"llabel"
)
override
def
cmdLine
:
String
=
super
.
cmdLine
+
required
(
"--input"
,
input
)
+
required
(
"--output"
,
output
)
+
optional
(
"--width"
,
width
)
+
optional
(
"--height"
,
height
)
+
optional
(
"--xlabel"
,
xlabel
)
+
required
(
"--ylabel"
,
ylabel
)
+
optional
(
"--llabel"
,
llabel
)
}
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