diff --git a/src/.docker_modules/pycoqc/2.5.2/Dockerfile b/src/.docker_modules/pycoqc/2.5.2/Dockerfile index dbaab0335748d65b4d3b389ffb5ea8ac3cda3b03..ff7b8d61c1cdce97274db0442b9abd8a5ca9e60a 100644 --- a/src/.docker_modules/pycoqc/2.5.2/Dockerfile +++ b/src/.docker_modules/pycoqc/2.5.2/Dockerfile @@ -1 +1,14 @@ -FROM quay.io/biocontainers/pycoqc:2.5.2--py_0 \ No newline at end of file +FROM python:3.10 + +# copy the dependencies file to the working directory +COPY requirements.txt . + +# install dependencies +RUN pip install --upgrade pip setuptools wheel +RUN pip install -r requirements.txt + +# install pycoQC from pypi +RUN pip install pycoQC + +# command to run on container start +CMD [ "bash" ] \ No newline at end of file diff --git a/src/.docker_modules/pycoqc/2.5.2/requirements.txt b/src/.docker_modules/pycoqc/2.5.2/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..a7a0057ffb9fa5687e280902ca6a42b2e4a53a83 --- /dev/null +++ b/src/.docker_modules/pycoqc/2.5.2/requirements.txt @@ -0,0 +1,7 @@ +numpy>=1.13 +scipy>=1.1 +pandas>=0.23 +plotly>=3.4 +jinja2>=2.10 +h5py>=2.8.0 +tqdm>=4.23 diff --git a/src/bolero.nf b/src/bolero.nf index aef31c37958b5e40509e55fb59e22c665872cf95..55fda62e412af1547ce173001489dfddb66e15ab 100755 --- a/src/bolero.nf +++ b/src/bolero.nf @@ -45,6 +45,10 @@ def helpMessage() { --gpu_mode [boolean] Guppy basecaller configuration. Default: false. "gpu" mode is dedicated to NVIDIA Cuda compatible system according to Guppy specifications. + Nanopore barcoding: + --kit_barcoding Nanopore barcoding kit. + --config_file Nanopore configuration file. + GPU basecalling parameters: --min_qscore [float] Minimum quality score threshold, default = 7.0. --gpu_runners_per_device [int] Number of runner per device, default = 32 (refer to guppy manual). @@ -93,7 +97,6 @@ params.chunks_per_runner = 512 params.chunk_size = 1900 params.config_file = "" params.kit_barcoding = "" -//"EXP-PBC001" /* Params out */ @@ -133,18 +136,6 @@ Channel .ifEmpty { error "No fast5/q folder defined." } .set { input } -/* -Channel - .fromPath( params.adapt ) - .ifEmpty { error "No adapter sequence defined." } - .set { adapt } - -Channel - .fromPath( params.gsp ) - .ifEmpty { error "No adapter sequence defined." } - .set { gsp } -*/ - Channel .fromPath( params.genome ) .ifEmpty { error "No genome defined, a fasta file containing the full length preC RNA from HBV genome." } @@ -161,13 +152,6 @@ Channel .set{barcodes} -// Test pour barcoding process -Channel - .fromPath('/home/alia/pipelines/bolero/results/01_Basecalling/pass/', type: 'dir') - .set{pass} -Channel - .fromPath('/home/alia/pipelines/bolero/results/01_Basecalling/sequencing_summary.txt') - .set{ss} /* **************************************************************** Imports @@ -209,18 +193,11 @@ include { rna_count } from "./nf_modules/rna_count/main.nf" */ workflow { - /* - pass.view() - barcoding_cpu(pass) - */ - //######################## BASECALLING ######################## - if(params.skipBC) { // we take fastq files as input and skip basecalling concatenate(barcodes) } - //il reste à adapter ça else { // we take fast5 files as input and proceed to basecalling with guppy if(params.gpu_mode) { basecall_fast5_gpu(input) @@ -238,13 +215,12 @@ workflow { .set{tuple_sample} concatenate(tuple_sample) } - control_basecalling(basecall_fast5_gpu.out.sequencing_summary) } else { - //basecall_fast5_cpu(input) + basecall_fast5_cpu(input) if(params.kit_barcoding != ""){ - barcoding_cpu(pass) + barcoding_cpu(basecall_fast5_cpu.out.pass) barcoding_cpu.out.barcodes .flatten() .map{it -> [it.name, it]} @@ -252,12 +228,11 @@ workflow { concatenate(tuples_barcode) } else{ - pass + basecall_fast5_cpu.out.pass .map{it -> ["Sample", it]} .set{tuple_sample} concatenate(tuple_sample) } - control_basecalling(ss) } } @@ -275,23 +250,37 @@ workflow { //########################## MAPPING ########################## hbv_genome(cut_5pRACE.out.fastq_cutadapt, genome.collect()) - sort_index_bam(hbv_genome.out.bam) - //il faut ajouter une boucle if pour le mode cpu/gpu - control_bam(basecall_fast5_gpu.out.sequencing_summary.collect(), sort_index_bam.out.indexed_bam) + //Index + sort_index_bam(hbv_genome.out.bam) + + //Quality control + if(params.skipBC == False) { + if(params.gpu_mode) { + control_bam(basecall_fast5_gpu.out.sequencing_summary.collect(), sort_index_bam.out.indexed_bam) + } + else { + control_bam(basecall_fast5_cpu.out.sequencing_summary.collect(), sort_index_bam.out.indexed_bam) + } + } //###################### START POSITIONS ####################### + //Identification of start positions start_position_counts(sort_index_bam.out.indexed_bam) + + //Identification of RNA start_position_individuals(start_position_counts.out.count) //#################### VARIANTS D'EPISSAGE #################### + //Identification of splicing junction sites jwr_checker(sort_index_bam.out.indexed_bam) start_position_individuals.out.classification_of_reads .combine(jwr_checker.out.nanosplicer_jwr, by: 0) .set{files_for_nanosplicer} + //Identification of variants junctions_nanosplicer(files_for_nanosplicer) //#################### VARIANTS D'EPISSAGE #################### @@ -300,6 +289,7 @@ workflow { .combine(start_position_individuals.out.classification_of_reads, by: 0) .set{files_for_rna_count} + //Variants count rna_count(files_for_rna_count) } diff --git a/src/nf_modules/ont-guppy/main.nf b/src/nf_modules/ont-guppy/main.nf index 63ab494aeb9b00eee18caaae19141619551b6625..d4002f18b85ceb9fc81b47c25c56d86e0f66d8bb 100644 --- a/src/nf_modules/ont-guppy/main.nf +++ b/src/nf_modules/ont-guppy/main.nf @@ -60,8 +60,7 @@ guppy_basecaller --compress_fastq \ --gpu_runners_per_device ${params.gpu_runners_per_device} \ --num_callers ${params.num_callers} \ --chunks_per_runner ${params.chunks_per_runner} \ - --flowcell ${params.flowcell} \ - --kit ${params.kit} + ${options} """ } @@ -129,6 +128,13 @@ process barcoding_gpu { publishDir "results/${params.barcoding_out}", mode: 'copy' } + if (params.config_file != "") { + options = "-c /opt/ont/guppy/data/${params.config_file} \ " + } + else { + options = "" + } + input: path(pass_path) @@ -142,6 +148,7 @@ guppy_barcoder \ --save_path . \ -t ${params.gpu_threads_per_caller} \ --barcode_kits ${params.kit_barcoding} \ + ${options} --progress_stats_frequency 60 \ --enable_trim_barcodes \ --trim_adapters \ @@ -157,6 +164,13 @@ process barcoding_cpu { publishDir "results/${params.barcoding_out}", mode: 'copy' } + if (params.config_file != "") { + options = "-c /opt/ont/guppy/data/${params.config_file} \ " + } + else { + options = "" + } + input: path(pass_path) @@ -171,6 +185,7 @@ guppy_barcoder \ --save_path . \ -t ${task.cpus} \ --barcode_kits ${params.kit_barcoding} \ + ${options} --progress_stats_frequency 60 \ --enable_trim_barcodes \ --trim_adapters \