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
// Test pour barcoding process
Channel
.fromPath(params.pass)
.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
......@@ -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)
include { control_basecalling } from "./nf_modules/pycoqc/main.nf"
<<<<<<< HEAD
>>>>>>> 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 { cut_5pRACE } from "./nf_modules/cutadapt/main.nf"
include { hbv_genome } from "./nf_modules/minimap2/main.nf"
......@@ -232,23 +238,33 @@ workflow {
//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)
barcoding_gpu(pass)
barcoding_gpu.out.barcodes
.flatten()
.map{it -> [it.name, it]}
.set{tuples_barcode}
concatenate(tuples_barcode)
basecall_fast5_gpu(input)
if(params.kit_barcoding != ""){
barcoding_gpu(pass)
barcoding_gpu.out.barcodes
.flatten()
.map{it -> [it.name, it]}
.set{tuples_barcode}
concatenate(tuples_barcode)
}
else{
concatenate(pass)
}
//control_basecalling(basecall_fast5_gpu.out.sequencing_summary)
}
else {
//basecall_fast5_cpu(input)
barcoding_cpu(pass)
barcoding_cpu.out.barcodes
.flatten()
.map{it -> [it.name, it]}
.set{tuples_barcode}
concatenate(tuples_barcode)
basecall_fast5_cpu(input)
if(params.kit_barcoding != ""){
barcoding_cpu(pass)
barcoding_cpu.out.barcodes
.flatten()
.map{it -> [it.name, it]}
.set{tuples_barcode}
concatenate(tuples_barcode)
}
else{
concatenate(pass)
}
//control_basecalling(basecall_fast5_cpu.out.sequencing_summary)
}
}
......@@ -267,9 +283,16 @@ workflow {
//########################## MAPPING ##########################
hbv_genome(cut_5pRACE.out.fastq_cutadapt, genome.collect())
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_position_counts(sort_index_bam.out.indexed_bam)
......
......@@ -11,8 +11,7 @@ process junctions_nanosplicer{
}
input:
tuple val(barcode), path(txt)
tuple val(barcode), path(csv)
tuple val(barcode), path(txt), path(csv)
output:
path("${barcode}/${barcode}_JWR_check_parsed.csv")
......
......@@ -27,7 +27,7 @@ process basecall_fast5_gpu {
errorKit "WARNING ! No kit type given..."
errorKit.view()
}
/*
if (params.config_file != "") {
options = "-c /opt/ont/guppy/data/${params.config_file}"
}
......@@ -35,7 +35,7 @@ process basecall_fast5_gpu {
options = "--flowcell ${params.flowcell} \
--kit ${params.kit} "
}
*/
input:
path(fast5_folder)
......@@ -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}
"""
}
......@@ -84,6 +83,14 @@ process basecall_fast5_cpu {
errorKit.view()
}
if (params.config_file != "") {
options = "-c /opt/ont/guppy/data/${params.config_file}"
}
else {
options = "--flowcell ${params.flowcell} \
--kit ${params.kit} "
}
input:
val(fast5_folder)
......@@ -95,16 +102,20 @@ process basecall_fast5_cpu {
script:
"""
echo "Start basecalling using CPUs."
find ${fast5_folder} -type f -name "*.fast5" > allfast5files.txt
echo "Start basecalling using G=CPUs."
# guppy_basecaller --print_workflows
path=\$(readlink -f ${fast5_folder})
find \${path} -type f -name "*.fast5" > allfast5files.txt
guppy_basecaller --compress_fastq \
-i / \
--input_file_list allfast5files.txt \
-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} \
--flowcell ${params.flowcell} \
--kit ${params.kit}
--chunks_per_runner ${params.chunks_per_runner} \
${options}
"""
}
<<<<<<< HEAD
......@@ -114,7 +125,7 @@ params.kit_barcoding = "EXP-PBC001"
process barcoding_gpu {
container = "${container_url}"
label "gpus"
tag "$fast5_folder"
tag "$pass_path"
if (params.barcoding_out != "") {
publishDir "results/${params.barcoding_out}", mode: 'copy'
}
......@@ -142,7 +153,7 @@ guppy_barcoder \
process barcoding_cpu {
container = "${container_url}"
label "big_mem_multi_cpus"
tag "$fast5_folder"
tag "$pass_path"
if (params.barcoding_out != "") {
publishDir "results/${params.barcoding_out}", mode: 'copy'
}
......
......@@ -36,7 +36,8 @@ process control_bam {
path("*.txt")
"""
find results/${params.minimap2_genome_out} -type f -name "*sorted.bam" > allbamfiles.txt
#pycoQC -f ${txt} -a ${path_bam} -o Control_mapping.html
mkdir bam/
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{
}
input:
tuple val(barcode), path(spvariants)
tuple val(barcode), path(classification)
tuple val(barcode), path(spvariants), path(classification)
output:
path("${barcode}/*.csv")
......
......@@ -87,4 +87,24 @@ process concatenate {
seqkit scat -j ${task.cpus} -f \${path} --gz-only > ${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