From 09c25a561a3aed25a27320869bb3c37ef75550b9 Mon Sep 17 00:00:00 2001 From: Houry Rana <rhoury@pxe.cbp.ens-lyon.fr> Date: Fri, 15 Feb 2019 16:31:08 +0100 Subject: [PATCH] :mapping --- src/RNASeq.config | 27 +++++++++++++++++++++++++++ src/RNASeq.nf | 42 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 69 insertions(+) diff --git a/src/RNASeq.config b/src/RNASeq.config index 0e9552e..6cc351f 100644 --- a/src/RNASeq.config +++ b/src/RNASeq.config @@ -12,6 +12,13 @@ profiles { withName: fasta_from_bed { container = "bedtools:2.25.0" } + withName: index_fasta { + container = "kallisto:0.44.0" + } + withName: mapping_fastq { + container = "kallisto:0.44.0" + } + } } psmn { @@ -44,6 +51,26 @@ profiles { time = "12h" queue = 'monointeldeb128' } + withName: index_fasta { + beforeScript = "source /usr/share/lmod/lmod/init/bash; module use ~/privatemodules" + module = "Kallisto/0.44.0" + executor = "sge" + clusterOptions = "-m e -cwd -V" + memory = "30GB" + time = "24h" + queue = 'E5-2670deb128A,E5-2670deb128B,E5-2670deb128C,E5-2670deb128D,E5-2670deb128E,E5-2670deb128F' + penv = 'openmp16' + } + withName: mapping_fastq { + beforeScript = "source /usr/share/lmod/lmod/init/bash; module use ~/privatemodules" + module = "Kallisto/0.44.0" + executor = "sge" + clusterOptions = "-m e -cwd -V" + memory = "30GB" + time = "24h" + queue = 'E5-2670deb128A,E5-2670deb128B,E5-2670deb128C,E5-2670deb128D,E5-2670deb128E,E5-2670deb128F' + penv = 'openmp16' + } } } } . diff --git a/src/RNASeq.nf b/src/RNASeq.nf index c38f050..fe35e21 100644 --- a/src/RNASeq.nf +++ b/src/RNASeq.nf @@ -88,3 +88,45 @@ bedtools getfasta -name \ } +process index_fasta { + tag "$fasta.baseName" + cpus 4 + publishDir "results/mapping/index/", mode: 'copy' + + input: + file fasta from fasta_file_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 +""" +} + +process mapping_fastq { + tag "$reads" + cpus 4 + publishDir "results/mapping/quantification/", mode: 'copy' + + input: + set pair_id, file(reads) from fastq_files_trim + file index from index_files.collect() + + output: + file "*" into counts_files + + script: +""" +mkdir ${pair_id} +kallisto quant -i ${index} -t ${task.cpus} \ +--bias --bootstrap-samples 100 -o ${pair_id} \ +${reads[0]} ${reads[1]} &> ${pair_id}/kallisto_report.txt +""" +} + + + -- GitLab