diff --git a/src/RNAseq.config b/src/RNAseq.config index 5d949d41d9de0ca5d7d1fac2b0da77af36c5970b..a9ea266c533e360fa3f607f194690d5c31f1b0bc 100644 --- a/src/RNAseq.config +++ b/src/RNAseq.config @@ -161,3 +161,59 @@ profiles { } } } + +profiles { + docker { + docker.temp = 'auto' + docker.enabled = true + process { + withNamek index_fasta { + container = "lbmc/kallisto:0.44.0" + cpus = 4 + } + } + } + singularity { + singularity.enabled = true + singularity.cacheDir = "./bin/" + process { + withName: index_fasta { + container = "lbmc/kallisto:0.44.0" + cpus = 4 + } + } + } + psmn{ + process{ + withName: index_fasta { + beforeScript = "source $baseDir/.conda_psmn.sh" + conda = "$baseDir/.conda_envs/kallisto_0.44.0" + executor = "sge" + clusterOptions = "-cwd -V" + cpus = 16 + memory = "30GB" + time = "24h" + queue = 'E5-2670deb128A,E5-2670deb128B,E5-2670deb128C,E5-2670deb128D,E5-2670deb128E,E5-2670deb128F' + penv = 'openmp16' + } + } + } + ccin2p3 { + singularity.enabled = true + singularity.cacheDir = "$baseDir/.singularity_in2p3/" + singularity.runOptions = "--bind /pbs,/sps,/scratch" + process{ + withName: index_fasta { + container = "lbmc/kallisto:0.44.0" + scratch = true + stageInMode = "copy" + stageOutMode = "rsync" + executor = "sge" + clusterOptions = "-P P_lbmc -l os=cl7 -l sps=1 -r n\ + " + cpus = 1 + queue = 'huge' + } + } + } +} diff --git a/src/RNAseq.nf b/src/RNAseq.nf index e9c859d7ac798005a919ec2e9d4345cb88fdff6e..f6633f07662d1cff9224046581bda4e0942a3589 100644 --- a/src/RNAseq.nf +++ b/src/RNAseq.nf @@ -86,3 +86,21 @@ bedtools getfasta -name \ -fi ${fasta} -bed ${bed} -fo ${bed.baseName}_extracted.fasta """ } + +process index_fasta { + tag "$fasta.baseName" + publishDir "results/mapping/index/", mode: 'copy' + + input: + file fasta from fasta_files_extracted + + output: + file "*.index*" into index_files + file "*_kallisto_report.txt" into index_files_report + + script: +""" +kallisto index -k 31 --make-unique -i ${fasta.baseName}.index ${fasta} \ +2> ${fasta.baseName}_kallisto_report.txt +""" +}