From 36c3cb4533227b6a127a4cad2a49f202b4588c4b Mon Sep 17 00:00:00 2001 From: gbenoit <gerard.benoit11@ens-lyon.fr> Date: Wed, 6 Jun 2018 15:06:25 +0000 Subject: [PATCH] add Kallisto --- src/RNAseq.nf | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/src/RNAseq.nf b/src/RNAseq.nf index e73dc64..f1fb802 100644 --- a/src/RNAseq.nf +++ b/src/RNAseq.nf @@ -79,3 +79,43 @@ 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 + + script: +""" +kallisto index -k 31 --make-unique -i ${fasta.baseName}.index ${fasta} \ +> ${fasta.baseName}_kallisto_report.txt +""" +} + +process mapping_fastq { + tag "$reads" + cpus 4 + publishDir "results/mapping/quantification/", mode: 'copy' + + input: + file reads from fastq_files_trim + file index from index_files.toList() + + output: + file "*" into counts_files + + script: +""" +mkdir ${reads[0].baseName} +kallisto quant -i ${index} -t ${task.cpus} \ +--bias --bootstrap-samples 100 -o ${reads[0].baseName} \ +${reads[0]} ${reads[1]} &> ${reads[0].baseName}_kallisto_report.txt +""" +} + + -- GitLab