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

add kmermerclust_clust process and switch to v0.1.0 of kmerclust

parent 901eeea3
No related branches found
No related tags found
No related merge requests found
library(kmerclust)
library(tidyverse)
args <- commandArgs(trailingOnly = TRUE)
print(args)
load(file = paste0(args[1], ".Rdata"))
res <- count %>%
dplyr::select(count_m, count_f) %>%
mutate(
count_m = round(count_m),
count_f = round(count_f)
) %>%
dplyr::filter(count_m + count_f > 0) %>%
as.matrix() %>%
poiss_compare_models(count, nboot = as.numeric(args[2]) * 2, frac = 1e-3, bootsize = 1, core = as.numeric(args[2]))
poiss_compare_models(count, nboot = as.numeric(args[2]) * 2, nbatch = 100, max_iter = 1e4, bootsize = 1, core = as.numeric(args[2]))
save(res, file = paste0(args[1], "_boot_", args[3], ".Rdata"))
......@@ -35,6 +35,7 @@ workflow {
COLLATEKMER(MERGEKMER.out.csv.map{it -> [it[0].specie, it[1]] }.groupTuple())
KMERCLUST_LOAD(COLLATEKMER.out.csv, params_csv.collect())
KMERCLUST_BOOT(Channel.of(1..params.bootstrap).combine(KMERCLUST_LOAD.out.rdata))
KMERCLUST_CLUST(Channel.of(["XY", "XO", "OO"]).combine(KMERCLUST_LOAD.out.rdata))
KMERCLUST_MERGE(KMERCLUST_BOOT.out.rdata.groupTuple())
KMERCLUST_PLOT(KMERCLUST_MERGE.out.rdata.mix(KMERCLUST_LOAD.out.rdata).groupTuple())
}
......@@ -2,7 +2,7 @@ process KMERCLUST_LOAD {
tag "$specie"
label 'big_mem_mono_cpus'
container "lbmc/kmerclust:0.0.7"
container "lbmc/kmerclust:0.1.0"
publishDir "results/${params.kmer_size}/${specie}/", mode: 'copy'
input:
......@@ -20,7 +20,7 @@ process KMERCLUST_LOAD {
cat <<-END_VERSIONS > versions.yml
"${task.process}":
Rkmerclust: 0.0.7
Rkmerclust: 0.1.0
END_VERSIONS
"""
}
......@@ -29,7 +29,7 @@ process KMERCLUST_BOOT {
tag "$specie"
label 'big_mem_multi_cpus'
container "lbmc/kmerclust:0.0.7"
container "lbmc/kmerclust:0.1.0"
publishDir "results/${params.kmer_size}/${specie}/", mode: 'copy'
input:
......@@ -46,16 +46,16 @@ process KMERCLUST_BOOT {
cat <<-END_VERSIONS > versions.yml
"${task.process}":
Rkmerclust: 0.0.7
Rkmerclust: 0.1.0
END_VERSIONS
"""
}
process KMERCLUST {
process KMERCLUST_CLUST {
tag "$specie"
label 'big_mem_multi_cpus'
label 'small_mem_mono_cpus'
container "lbmc/kmerclust:0.0.7"
container "lbmc/kmerclust:0.1.0"
publishDir "results/${params.kmer_size}/${specie}/", mode: 'copy'
input:
......@@ -68,11 +68,11 @@ process KMERCLUST {
script:
def args = task.ext.args ?: ''
"""
Rscript ${projectDir}/bin/kmerclust.R ${specie} ${task.cpus}
Rscript ${projectDir}/bin/kmerclust_clust.R ${specie} ${task.cpus} ${id}
cat <<-END_VERSIONS > versions.yml
"${task.process}":
Rkmerclust: 0.0.7
Rkmerclust: 0.1.0
END_VERSIONS
"""
}
......@@ -81,7 +81,7 @@ process KMERCLUST_MERGE {
tag "$specie"
label 'big_mem_mono_cpus'
container "lbmc/kmerclust:0.0.7"
container "lbmc/kmerclust:0.1.0"
publishDir "results/${params.kmer_size}/${specie}/", mode: 'copy'
input:
......@@ -98,7 +98,7 @@ process KMERCLUST_MERGE {
cat <<-END_VERSIONS > versions.yml
"${task.process}":
Rkmerclust: 0.0.7
Rkmerclust: 0.1.0
END_VERSIONS
"""
}
......@@ -107,7 +107,7 @@ process KMERCLUST_PLOT {
tag "$specie"
label 'big_mem_mono_cpus'
container "lbmc/kmerclust:0.0.7"
container "lbmc/kmerclust:0.1.0"
publishDir "results/${params.kmer_size}/${specie}/", mode: 'copy'
input:
......@@ -124,7 +124,7 @@ process KMERCLUST_PLOT {
cat <<-END_VERSIONS > versions.yml
"${task.process}":
Rkmerclust: 0.0.7
Rkmerclust: 0.1.0
END_VERSIONS
"""
}
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