Commit ce9cefe6 authored by Valentina Galata's avatar Valentina Galata
Browse files

figures: minor change in rgi figures - letters for subplots

parent 91194587
......@@ -33,7 +33,10 @@ ASM_TOOL_SHAPES <- ASM_TOOL_SHAPES[ASM_NAMES_CONFIG]; names(ASM_TOOL_SHAPES) <-
TABS <- list()
for(sname in names(snakemake@config$samples)){
testit::assert(sname %in% names(snakemake@input))
TABS[[sname]] <- read_rgi(snakemake@input[[sname]])
tmp_tab <- read_rgi(snakemake@input[[sname]])
if(nrow(tmp_tab) > 0){
TABS[[sname]] <- tmp_tab
}
}
############################## PLOT
......@@ -41,21 +44,19 @@ for(sname in names(snakemake@config$samples)){
# individual plots
FIGS_c <- list()
FIGS_o <- list()
for(sname in names(snakemake@config$samples)){
if(nrow(TABS[[sname]]) > 0){
FIGS_c[[sname]] <-
plot_rgi_counts_total(proc_rgi(TABS[[sname]])$aggr) +
labs(
title=LETTERS[which(names(TABS) == sname)],
subtitle=SAMPLE_NAMES[sname]
)
FIGS_o[[sname]] <-
as.ggplot(plot_rgi_overlap(TABS[[sname]], "strict", "ARO")) +
labs(
title=LETTERS[which(names(TABS) == sname)],
subtitle=SAMPLE_NAMES[sname]
)
}
for(sname in names(TABS)){
FIGS_c[[sname]] <-
plot_rgi_counts_total(proc_rgi(TABS[[sname]])$aggr) +
labs(
title=LETTERS[which(names(TABS) == sname)],
subtitle=SAMPLE_NAMES[sname]
)
FIGS_o[[sname]] <-
as.ggplot(plot_rgi_overlap(TABS[[sname]], "strict", "ARO")) +
labs(
title=LETTERS[which(names(TABS) == sname)],
subtitle=SAMPLE_NAMES[sname]
)
}
# combine plots
......
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