Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
ONT_pilot_gitlab
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ESB
ONT_pilot_gitlab
Merge requests
!68
Figures valentina
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Figures valentina
figures_valentina
into
master
Overview
0
Commits
27
Pipelines
0
Changes
1
Merged
Susheel Busi
requested to merge
figures_valentina
into
master
4 years ago
Overview
0
Commits
27
Pipelines
0
Changes
1
Expand
0
0
Merge request reports
Viewing commit
b2f09e02
Prev
Next
Show latest version
1 file
+
8
−
0
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
b2f09e02
updated fig: partial gene counts (issue
#17
)
· b2f09e02
Valentina Galata
authored
4 years ago
figures/src/fig_partial_genes.R
+
8
−
0
Options
@@ -26,12 +26,17 @@ counts$tool <- GENE_TOOL_NAMES[counts$tool]
colnames
(
counts
)
<-
sapply
(
colnames
(
counts
),
function
(
x
){
ifelse
(
x
%in%
names
(
ASM_TOOL_NAMES
),
ASM_TOOL_NAMES
[
x
],
x
)
})
# reshape
counts_melted
<-
reshape2
::
melt
(
counts
,
id.vars
=
"tool"
)
# Gene tool name - as ordered factor
counts_melted
$
tool
<-
factor
(
counts_melted
$
tool
,
levels
=
GENE_TOOL_NAMES
,
ordered
=
TRUE
)
# Gene tool name - short version
counts_melted
$
tool_name
<-
sapply
(
as.character
(
counts_melted
$
tool
),
function
(
x
){
unlist
(
strsplit
(
x
,
" "
))[
1
]
})
## PLOT
counts_p
<-
ggplot
(
data
=
counts_melted
,
aes
(
x
=
tool
,
y
=
value
,
fill
=
variable
))
+
geom_col
(
position
=
"dodge"
)
+
scale_fill_manual
(
values
=
ASM_TOOL_COLORS
$
notmeth
,
guide
=
"legend"
)
+
facet_wrap
(
vars
(
tool_name
),
nrow
=
1
,
scales
=
"free_x"
)
+
labs
(
# title="",
# subtitle="",
@@ -44,6 +49,9 @@ counts_p <-
legend.title
=
element_blank
(),
# grid
panel.grid
=
element_blank
(),
# strip
strip.background
=
element_rect
(
fill
=
"white"
),
strip.text
=
element_text
(
size
=
12
,
color
=
"black"
),
# axes
axis.title
=
element_text
(
size
=
12
,
color
=
"black"
),
axis.text.y
=
element_text
(
size
=
9
,
color
=
"black"
),
Loading