Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ESB
ONT_pilot_gitlab
Commits
f39cae88
Commit
f39cae88
authored
Jan 27, 2021
by
Valentina Galata
Browse files
report: mmseqs2: highlight only combis included in top N shown (issue
#119
)
parent
bda364f2
Changes
1
Hide whitespace changes
Inline
Side-by-side
workflow_report/scripts/utils.R
View file @
f39cae88
...
...
@@ -621,15 +621,18 @@ plot_diamondDB_density2d <- function(df){
return
(
pp
)
}
plot_mmseqs2_overlap
<-
function
(
df
){
plot_mmseqs2_overlap
<-
function
(
df
,
topN
=
20
){
# cluster summary: number of proteins in clusters grouped by represented tools
upsetr_input
<-
UpSetR
::
fromExpression
(
t
(
df
%>%
select
(
members
))[
1
,,
drop
=
TRUE
])
testit
::
assert
(
all
(
colnames
(
upsetr_input
)
%in%
ASM_TOOL_NAMES
))
upsetr_input
<-
upsetr_input
[,
ASM_TOOL_NAMES
,
drop
=
FALSE
]
topN_combis
<-
rownames
(
df
[
with
(
df
,
order
(
-
members
)),
])[
1
:
topN
]
UpSetR
::
upset
(
upsetr_input
,
keep.order
=
TRUE
,
nsets
=
ncol
(
upsetr_input
),
nintersects
=
20
,
sets
=
ASM_TOOL_NAMES
,
nintersects
=
topN
,
order.by
=
"freq"
,
decreasing
=
TRUE
,
# titles
...
...
@@ -641,7 +644,7 @@ plot_mmseqs2_overlap <- function(df){
queries
=
c
(
# unique proteins
lapply
(
colnames
(
upsetr_input
),
intersect
(
colnames
(
upsetr_input
),
topN_combis
),
function
(
x
){
list
(
query
=
intersects
,
params
=
list
(
x
),
active
=
TRUE
,
color
=
MMSEQS2_UPSETR_HIGHLIGHTS
[
"unique"
])
}
),
# all tools
...
...
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