Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
biopet.biopet
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Mirrors
biopet.biopet
Commits
0062bfa8
Commit
0062bfa8
authored
Apr 30, 2015
by
Peter van 't Hof
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added extension for stacked bar plot
parent
d3ca07ab
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
2 deletions
+39
-2
public/biopet-framework/src/main/resources/nl/lumc/sasc/biopet/extensions/rscript/stackedBar.R
...urces/nl/lumc/sasc/biopet/extensions/rscript/stackedBar.R
+4
-2
public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/rscript/StackedBarPlot.scala
.../lumc/sasc/biopet/extensions/rscript/StackedBarPlot.scala
+35
-0
No files found.
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
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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