Skip to content
Snippets Groups Projects
Commit ec9840f9 authored by aliarifki's avatar aliarifki
Browse files

Nettoyage du code

parent b62bc3f0
No related branches found
No related tags found
No related merge requests found
FROM quay.io/biocontainers/pycoqc:2.5.2--py_0 FROM python:3.10
\ No newline at end of file
# 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
numpy>=1.13
scipy>=1.1
pandas>=0.23
plotly>=3.4
jinja2>=2.10
h5py>=2.8.0
tqdm>=4.23
...@@ -45,6 +45,10 @@ def helpMessage() { ...@@ -45,6 +45,10 @@ def helpMessage() {
--gpu_mode [boolean] Guppy basecaller configuration. Default: false. --gpu_mode [boolean] Guppy basecaller configuration. Default: false.
"gpu" mode is dedicated to NVIDIA Cuda compatible system according to Guppy specifications. "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: GPU basecalling parameters:
--min_qscore [float] Minimum quality score threshold, default = 7.0. --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). --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 ...@@ -93,7 +97,6 @@ params.chunks_per_runner = 512
params.chunk_size = 1900 params.chunk_size = 1900
params.config_file = "" params.config_file = ""
params.kit_barcoding = "" params.kit_barcoding = ""
//"EXP-PBC001"
/* Params out */ /* Params out */
...@@ -133,18 +136,6 @@ Channel ...@@ -133,18 +136,6 @@ Channel
.ifEmpty { error "No fast5/q folder defined." } .ifEmpty { error "No fast5/q folder defined." }
.set { input } .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 Channel
.fromPath( params.genome ) .fromPath( params.genome )
.ifEmpty { error "No genome defined, a fasta file containing the full length preC RNA from HBV genome." } .ifEmpty { error "No genome defined, a fasta file containing the full length preC RNA from HBV genome." }
...@@ -161,13 +152,6 @@ Channel ...@@ -161,13 +152,6 @@ Channel
.set{barcodes} .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 Imports
...@@ -209,18 +193,11 @@ include { rna_count } from "./nf_modules/rna_count/main.nf" ...@@ -209,18 +193,11 @@ include { rna_count } from "./nf_modules/rna_count/main.nf"
*/ */
workflow { workflow {
/*
pass.view()
barcoding_cpu(pass)
*/
//######################## BASECALLING ########################
if(params.skipBC) { // we take fastq files as input and skip basecalling if(params.skipBC) { // we take fastq files as input and skip basecalling
concatenate(barcodes) concatenate(barcodes)
} }
//il reste à adapter ça
else { // we take fast5 files as input and proceed to basecalling with guppy else { // we take fast5 files as input and proceed to basecalling with guppy
if(params.gpu_mode) { if(params.gpu_mode) {
basecall_fast5_gpu(input) basecall_fast5_gpu(input)
...@@ -238,13 +215,12 @@ workflow { ...@@ -238,13 +215,12 @@ workflow {
.set{tuple_sample} .set{tuple_sample}
concatenate(tuple_sample) concatenate(tuple_sample)
} }
control_basecalling(basecall_fast5_gpu.out.sequencing_summary)
} }
else { else {
//basecall_fast5_cpu(input) basecall_fast5_cpu(input)
if(params.kit_barcoding != ""){ if(params.kit_barcoding != ""){
barcoding_cpu(pass) barcoding_cpu(basecall_fast5_cpu.out.pass)
barcoding_cpu.out.barcodes barcoding_cpu.out.barcodes
.flatten() .flatten()
.map{it -> [it.name, it]} .map{it -> [it.name, it]}
...@@ -252,12 +228,11 @@ workflow { ...@@ -252,12 +228,11 @@ workflow {
concatenate(tuples_barcode) concatenate(tuples_barcode)
} }
else{ else{
pass basecall_fast5_cpu.out.pass
.map{it -> ["Sample", it]} .map{it -> ["Sample", it]}
.set{tuple_sample} .set{tuple_sample}
concatenate(tuple_sample) concatenate(tuple_sample)
} }
control_basecalling(ss)
} }
} }
...@@ -275,23 +250,37 @@ workflow { ...@@ -275,23 +250,37 @@ workflow {
//########################## MAPPING ########################## //########################## MAPPING ##########################
hbv_genome(cut_5pRACE.out.fastq_cutadapt, genome.collect()) 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 ####################### //###################### START POSITIONS #######################
//Identification of start positions
start_position_counts(sort_index_bam.out.indexed_bam) start_position_counts(sort_index_bam.out.indexed_bam)
//Identification of RNA
start_position_individuals(start_position_counts.out.count) start_position_individuals(start_position_counts.out.count)
//#################### VARIANTS D'EPISSAGE #################### //#################### VARIANTS D'EPISSAGE ####################
//Identification of splicing junction sites
jwr_checker(sort_index_bam.out.indexed_bam) jwr_checker(sort_index_bam.out.indexed_bam)
start_position_individuals.out.classification_of_reads start_position_individuals.out.classification_of_reads
.combine(jwr_checker.out.nanosplicer_jwr, by: 0) .combine(jwr_checker.out.nanosplicer_jwr, by: 0)
.set{files_for_nanosplicer} .set{files_for_nanosplicer}
//Identification of variants
junctions_nanosplicer(files_for_nanosplicer) junctions_nanosplicer(files_for_nanosplicer)
//#################### VARIANTS D'EPISSAGE #################### //#################### VARIANTS D'EPISSAGE ####################
...@@ -300,6 +289,7 @@ workflow { ...@@ -300,6 +289,7 @@ workflow {
.combine(start_position_individuals.out.classification_of_reads, by: 0) .combine(start_position_individuals.out.classification_of_reads, by: 0)
.set{files_for_rna_count} .set{files_for_rna_count}
//Variants count
rna_count(files_for_rna_count) rna_count(files_for_rna_count)
} }
...@@ -60,8 +60,7 @@ guppy_basecaller --compress_fastq \ ...@@ -60,8 +60,7 @@ guppy_basecaller --compress_fastq \
--gpu_runners_per_device ${params.gpu_runners_per_device} \ --gpu_runners_per_device ${params.gpu_runners_per_device} \
--num_callers ${params.num_callers} \ --num_callers ${params.num_callers} \
--chunks_per_runner ${params.chunks_per_runner} \ --chunks_per_runner ${params.chunks_per_runner} \
--flowcell ${params.flowcell} \ ${options}
--kit ${params.kit}
""" """
} }
...@@ -129,6 +128,13 @@ process barcoding_gpu { ...@@ -129,6 +128,13 @@ process barcoding_gpu {
publishDir "results/${params.barcoding_out}", mode: 'copy' publishDir "results/${params.barcoding_out}", mode: 'copy'
} }
if (params.config_file != "") {
options = "-c /opt/ont/guppy/data/${params.config_file} \ "
}
else {
options = ""
}
input: input:
path(pass_path) path(pass_path)
...@@ -142,6 +148,7 @@ guppy_barcoder \ ...@@ -142,6 +148,7 @@ guppy_barcoder \
--save_path . \ --save_path . \
-t ${params.gpu_threads_per_caller} \ -t ${params.gpu_threads_per_caller} \
--barcode_kits ${params.kit_barcoding} \ --barcode_kits ${params.kit_barcoding} \
${options}
--progress_stats_frequency 60 \ --progress_stats_frequency 60 \
--enable_trim_barcodes \ --enable_trim_barcodes \
--trim_adapters \ --trim_adapters \
...@@ -157,6 +164,13 @@ process barcoding_cpu { ...@@ -157,6 +164,13 @@ process barcoding_cpu {
publishDir "results/${params.barcoding_out}", mode: 'copy' publishDir "results/${params.barcoding_out}", mode: 'copy'
} }
if (params.config_file != "") {
options = "-c /opt/ont/guppy/data/${params.config_file} \ "
}
else {
options = ""
}
input: input:
path(pass_path) path(pass_path)
...@@ -171,6 +185,7 @@ guppy_barcoder \ ...@@ -171,6 +185,7 @@ guppy_barcoder \
--save_path . \ --save_path . \
-t ${task.cpus} \ -t ${task.cpus} \
--barcode_kits ${params.kit_barcoding} \ --barcode_kits ${params.kit_barcoding} \
${options}
--progress_stats_frequency 60 \ --progress_stats_frequency 60 \
--enable_trim_barcodes \ --enable_trim_barcodes \
--trim_adapters \ --trim_adapters \
......
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