Skip to content
Snippets Groups Projects
Commit 8e9aa886 authored by aliarifki's avatar aliarifki Committed by Xavier Grand
Browse files

Correction de bugs

Author:    aliarifki <aliarifki@outlook.fr>

interactive rebase in progress; onto 82915ae6
Last commands done (14 commands done):
   pick deae9a4b Correction des erreurs du script R
   pick 6f3ae8d6 Correction de bugs
Next commands to do (2 remaining commands):
   pick 329af6e1 Suppression du paramètre  options
   pick 2c3f0561 Suppression du channel pass en mode gpu
You are currently rebasing branch 'Alia' on '82915ae6'.

Changes to be committed:
	modified:   src/bolero.nf
	modified:   src/nf_modules/junction_nanosplicer/main.nf
	modified:   src/nf_modules/ont-guppy/main.nf
	modified:   src/nf_modules/pycoqc/main.nf
	modified:   src/nf_modules/rna_count/main.nf
	modified:   src/nf_modules/seqkit/main.nf
parent 30390b7e
No related branches found
No related tags found
No related merge requests found
...@@ -160,9 +160,11 @@ Channel ...@@ -160,9 +160,11 @@ Channel
// Test pour barcoding process // Test pour barcoding process
Channel Channel
.fromPath(params.pass) .fromPath('/home/alia/pipelines/bolero/results/01_Basecalling/pass/', type: 'dir')
.set{pass} .set{pass}
Channel
.fromPath('/home/alia/pipelines/bolero/results/01_Basecalling/sequencing_summary.txt')
.set{ss}
/* /*
**************************************************************** ****************************************************************
Imports Imports
...@@ -196,7 +198,11 @@ include { barcoding_cpu } from "./nf_modules/ont-guppy/main.nf" ...@@ -196,7 +198,11 @@ include { barcoding_cpu } from "./nf_modules/ont-guppy/main.nf"
======= =======
>>>>>>> bd1fefe (Transformation des fichiers de sortie de barcoding en tuple pour concatenate) >>>>>>> bd1fefe (Transformation des fichiers de sortie de barcoding en tuple pour concatenate)
include { control_basecalling } from "./nf_modules/pycoqc/main.nf" include { control_basecalling } from "./nf_modules/pycoqc/main.nf"
<<<<<<< HEAD
>>>>>>> 8667704 (Ajout ded l'option barcode aux scripts R) >>>>>>> 8667704 (Ajout ded l'option barcode aux scripts R)
=======
include { control_bam } from "./nf_modules/pycoqc/main.nf"
>>>>>>> 6f3ae8d (Correction de bugs)
include { concatenate } from "./nf_modules/seqkit/main.nf" include { concatenate } from "./nf_modules/seqkit/main.nf"
include { cut_5pRACE } from "./nf_modules/cutadapt/main.nf" include { cut_5pRACE } from "./nf_modules/cutadapt/main.nf"
include { hbv_genome } from "./nf_modules/minimap2/main.nf" include { hbv_genome } from "./nf_modules/minimap2/main.nf"
...@@ -232,23 +238,33 @@ workflow { ...@@ -232,23 +238,33 @@ workflow {
//il reste à adapter ça //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)
barcoding_gpu(pass) if(params.kit_barcoding != ""){
barcoding_gpu.out.barcodes barcoding_gpu(pass)
.flatten() barcoding_gpu.out.barcodes
.map{it -> [it.name, it]} .flatten()
.set{tuples_barcode} .map{it -> [it.name, it]}
concatenate(tuples_barcode) .set{tuples_barcode}
concatenate(tuples_barcode)
}
else{
concatenate(pass)
}
//control_basecalling(basecall_fast5_gpu.out.sequencing_summary) //control_basecalling(basecall_fast5_gpu.out.sequencing_summary)
} }
else { else {
//basecall_fast5_cpu(input) basecall_fast5_cpu(input)
barcoding_cpu(pass) if(params.kit_barcoding != ""){
barcoding_cpu.out.barcodes barcoding_cpu(pass)
.flatten() barcoding_cpu.out.barcodes
.map{it -> [it.name, it]} .flatten()
.set{tuples_barcode} .map{it -> [it.name, it]}
concatenate(tuples_barcode) .set{tuples_barcode}
concatenate(tuples_barcode)
}
else{
concatenate(pass)
}
//control_basecalling(basecall_fast5_cpu.out.sequencing_summary) //control_basecalling(basecall_fast5_cpu.out.sequencing_summary)
} }
} }
...@@ -267,9 +283,16 @@ workflow { ...@@ -267,9 +283,16 @@ 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) sort_index_bam(hbv_genome.out.bam)
sort_index_bam.out.indexed_bam
.flatten()
.filter(~/.*bam$/)
.collect()
.set{bam_path}
//control_bam(ss, bam_path)
//###################### START POSITIONS ####################### //###################### START POSITIONS #######################
start_position_counts(sort_index_bam.out.indexed_bam) start_position_counts(sort_index_bam.out.indexed_bam)
......
...@@ -11,8 +11,7 @@ process junctions_nanosplicer{ ...@@ -11,8 +11,7 @@ process junctions_nanosplicer{
} }
input: input:
tuple val(barcode), path(txt) tuple val(barcode), path(txt), path(csv)
tuple val(barcode), path(csv)
output: output:
path("${barcode}/${barcode}_JWR_check_parsed.csv") path("${barcode}/${barcode}_JWR_check_parsed.csv")
......
...@@ -27,7 +27,7 @@ process basecall_fast5_gpu { ...@@ -27,7 +27,7 @@ process basecall_fast5_gpu {
errorKit "WARNING ! No kit type given..." errorKit "WARNING ! No kit type given..."
errorKit.view() errorKit.view()
} }
/*
if (params.config_file != "") { if (params.config_file != "") {
options = "-c /opt/ont/guppy/data/${params.config_file}" options = "-c /opt/ont/guppy/data/${params.config_file}"
} }
...@@ -35,7 +35,7 @@ process basecall_fast5_gpu { ...@@ -35,7 +35,7 @@ process basecall_fast5_gpu {
options = "--flowcell ${params.flowcell} \ options = "--flowcell ${params.flowcell} \
--kit ${params.kit} " --kit ${params.kit} "
} }
*/
input: input:
path(fast5_folder) path(fast5_folder)
...@@ -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}
""" """
} }
...@@ -84,6 +83,14 @@ process basecall_fast5_cpu { ...@@ -84,6 +83,14 @@ process basecall_fast5_cpu {
errorKit.view() errorKit.view()
} }
if (params.config_file != "") {
options = "-c /opt/ont/guppy/data/${params.config_file}"
}
else {
options = "--flowcell ${params.flowcell} \
--kit ${params.kit} "
}
input: input:
val(fast5_folder) val(fast5_folder)
...@@ -95,16 +102,20 @@ process basecall_fast5_cpu { ...@@ -95,16 +102,20 @@ process basecall_fast5_cpu {
script: script:
""" """
echo "Start basecalling using CPUs." echo "Start basecalling using G=CPUs."
find ${fast5_folder} -type f -name "*.fast5" > allfast5files.txt # guppy_basecaller --print_workflows
path=\$(readlink -f ${fast5_folder})
find \${path} -type f -name "*.fast5" > allfast5files.txt
guppy_basecaller --compress_fastq \ guppy_basecaller --compress_fastq \
-i / \ -i / \
--input_file_list allfast5files.txt \ --input_file_list allfast5files.txt \
-s . \ -s . \
--cpu_threads_per_caller ${params.cpu_threads_per_caller} \ -x "cuda:all" \
--min_qscore ${params.min_qscore} \
--cpu_runners_per_device ${params.cpu_runners_per_device} \
--num_callers ${params.num_callers} \ --num_callers ${params.num_callers} \
--flowcell ${params.flowcell} \ --chunks_per_runner ${params.chunks_per_runner} \
--kit ${params.kit} ${options}
""" """
} }
<<<<<<< HEAD <<<<<<< HEAD
...@@ -114,7 +125,7 @@ params.kit_barcoding = "EXP-PBC001" ...@@ -114,7 +125,7 @@ params.kit_barcoding = "EXP-PBC001"
process barcoding_gpu { process barcoding_gpu {
container = "${container_url}" container = "${container_url}"
label "gpus" label "gpus"
tag "$fast5_folder" tag "$pass_path"
if (params.barcoding_out != "") { if (params.barcoding_out != "") {
publishDir "results/${params.barcoding_out}", mode: 'copy' publishDir "results/${params.barcoding_out}", mode: 'copy'
} }
...@@ -142,7 +153,7 @@ guppy_barcoder \ ...@@ -142,7 +153,7 @@ guppy_barcoder \
process barcoding_cpu { process barcoding_cpu {
container = "${container_url}" container = "${container_url}"
label "big_mem_multi_cpus" label "big_mem_multi_cpus"
tag "$fast5_folder" tag "$pass_path"
if (params.barcoding_out != "") { if (params.barcoding_out != "") {
publishDir "results/${params.barcoding_out}", mode: 'copy' publishDir "results/${params.barcoding_out}", mode: 'copy'
} }
......
...@@ -36,7 +36,8 @@ process control_bam { ...@@ -36,7 +36,8 @@ process control_bam {
path("*.txt") path("*.txt")
""" """
find results/${params.minimap2_genome_out} -type f -name "*sorted.bam" > allbamfiles.txt mkdir bam/
#pycoQC -f ${txt} -a ${path_bam} -o Control_mapping.html mv ${path_bam} bam/
pycoQC -f ${txt} -a bam/ -o Control_mapping.html
""" """
} }
\ No newline at end of file
...@@ -11,8 +11,7 @@ process rna_count{ ...@@ -11,8 +11,7 @@ process rna_count{
} }
input: input:
tuple val(barcode), path(spvariants) tuple val(barcode), path(spvariants), path(classification)
tuple val(barcode), path(classification)
output: output:
path("${barcode}/*.csv") path("${barcode}/*.csv")
......
...@@ -87,4 +87,24 @@ process concatenate { ...@@ -87,4 +87,24 @@ process concatenate {
seqkit scat -j ${task.cpus} -f \${path} --gz-only > ${barcode}_merged.fastq seqkit scat -j ${task.cpus} -f \${path} --gz-only > ${barcode}_merged.fastq
gzip ${barcode}_merged.fastq gzip ${barcode}_merged.fastq
""" """
}
process concatenate_BC {
container = "${container_url}"
label "big_mem_multi_cpus"
tag "${barcode}"
if (params.fastq_out != "") {
publishDir "results/${params.fastq_out}", mode: 'copy'
}
input:
path(path)
output:
path("test.txt")
script:
"""
echo ${path} \$(readlink -f ${path}) > test.txt
"""
} }
\ No newline at end of file
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