Skip to content
Snippets Groups Projects
Verified Commit 1c0e4099 authored by Laurent Modolo's avatar Laurent Modolo
Browse files

fix kmer_merge to kmer_plot connection

parent 73cfaf21
No related branches found
No related tags found
No related merge requests found
......@@ -3,10 +3,11 @@ library(kmerclust)
args <- commandArgs(trailingOnly = TRUE)
print(args)
res_files <- list.files(pattern = "Rdata$")
print(res_files)
res_total <- NULL
for (res_file in res_files) {
load(res_file)
res_total <- rbind(res_total, res)
}
res <- res_total
save(res, file = paste0(args[1], "_boot", ".Rdata"))
save(res, file = paste0(args[1], "_boot.Rdata"))
......@@ -6,17 +6,18 @@ print(args)
load(file = paste0(args[1], ".Rdata"))
load(file = paste0(args[1], "_boot.Rdata"))
print(res)
res %>%
ggplot(aes(x = name, y = BIC)) +
geom_violin() %>%
geom_violin() +
theme_bw()
ggsave(paste0(args[1], "_BIC.pdf"))
res %>%
ggplot(aes(x = name, y = WSS_f / BSS)) +
geom_violin() %>%
geom_violin() +
theme_bw()
ggsave(paste0(args[1], "_WSS_BSS.pdf"))
count %>%
ggplot(aes(x = count_m, y = count_f)) %>%
ggplot(aes(x = count_m, y = count_f)) +
theme_bw()
ggsave(paste0(args[1], "_scatter.pdf"))
......@@ -33,6 +33,6 @@ workflow {
COLLATEKMER(MERGEKMER.out.csv.map{it -> [it[0].specie, it[1]] }.groupTuple())
KMERCLUST_LOAD(COLLATEKMER.out.csv, params_csv.collect())
KMERCLUST(Channel.of(1..params.bootstrap).combine(KMERCLUST_LOAD.out.rdata))
KMERCLUST_MERGE(KMERCLUST.out.rdata.map{it -> [it[1], it[2]]}.groupTuple())
KMERCLUST_PLOT(KMERCLUST_MERGE.out.rdata)
KMERCLUST_MERGE(KMERCLUST.out.rdata.groupTuple())
KMERCLUST_PLOT(KMERCLUST_MERGE.out.rdata.mix(KMERCLUST_LOAD.out.rdata).groupTuple())
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment