Skip to content
Snippets Groups Projects
Commit 75233da6 authored by Xavier Grand's avatar Xavier Grand
Browse files

Merge branch 'Alia' into 'master'

Alia

See merge request testoni-lab/bolero!8
parents 1c9e68e0 1e4d6e43
No related branches found
No related tags found
No related merge requests found
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
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() {
--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
......@@ -211,18 +195,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)
......@@ -240,13 +217,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]}
......@@ -254,12 +230,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)
}
}
......@@ -277,23 +252,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 ####################
......@@ -302,6 +291,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)
}
......@@ -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 \
......
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