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

Merge branch 'Alia' into 'master'

Alia

See merge request testoni-lab/bolero!7
parents 26048b5c 45201693
No related branches found
No related tags found
No related merge requests found
......@@ -92,7 +92,8 @@ params.num_callers = 16
params.chunks_per_runner = 512
params.chunk_size = 1900
params.config_file = ""
params.kit_barcoding = "EXP-PBC001"
params.kit_barcoding = ""
//"EXP-PBC001"
/* Params out */
......@@ -106,6 +107,7 @@ params.minimap2_genome_out = "05_minimap2/"
params.start_position_counts_out = "06_start_positions/"
params.nanosplicer_out = "07_nanosplicer/"
params.rna_count_out = "08_RNA_count/"
params.rna_qc_out = "09_quality_control/"
/*
****************************************************************
......@@ -115,6 +117,7 @@ params.rna_count_out = "08_RNA_count/"
log.info "fast5/q folder : ${params.input}"
log.info "5'RACE adapter sequence : ${params.adapt}"
log.info "Gene specific primer : ${params.gsp}"
if(!params.skipBC) log.info "Guppy basecalling calculation using GPU mode : ${params.gpu_mode}."
log.info "Genome file : ${params.genome}"
log.info "Genome annotation file : ${params.gtf}"
......@@ -201,7 +204,6 @@ include { jwr_checker } from "./nf_modules/nanosplicer/main.nf"
include { junctions_nanosplicer } from "./nf_modules/junction_nanosplicer/main.nf"
include { rna_count } from "./nf_modules/rna_count/main.nf"
/*
****************************************************************
Workflow
......@@ -233,12 +235,16 @@ workflow {
concatenate(tuples_barcode)
}
else{
concatenate(basecall_fast5_gpu.out.pass)
basecall_fast5_gpu.out.pass
.map{it -> ["Sample", it]}
.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.out.barcodes
......@@ -248,16 +254,19 @@ workflow {
concatenate(tuples_barcode)
}
else{
concatenate(pass)
pass
.map{it -> ["Sample", it]}
.set{tuple_sample}
concatenate(tuple_sample)
}
//control_basecalling(basecall_fast5_cpu.out.sequencing_summary)
control_basecalling(ss)
}
}
//####################### PREPROCESSING #######################
//Filtration (seqkit_grep looks for the 5'RACE and the gsp patterns in the reads to keep only mature ARNs)
seqkit_grep(concatenate.out.merged_fastq, params.adapt, params.gsp)
......@@ -269,14 +278,8 @@ workflow {
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)
//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)
//###################### START POSITIONS #######################
......
......@@ -146,7 +146,7 @@ profiles {
singularity.runOptions = "--bind /data,/home"
process {
errorStrategy = 'finish'
memory = '256GB'
memory = '32GB'
withLabel: big_mem_mono_cpus {
cpus = 1
}
......
......@@ -85,7 +85,7 @@ process hbv_transcriptome {
"""
}
params.mapping_hbv_genome = "-ax splice --secondary=no -G 1650 -u n --eqx"
params.mapping_hbv_genome = "-ax splice --secondary=no -u n --splice-flank=no --eqx"
process hbv_genome {
container = "${container_url}"
label "big_mem_multi_cpus"
......
......@@ -119,8 +119,6 @@ guppy_basecaller --compress_fastq \
${options}
"""
}
<<<<<<< HEAD
=======
params.kit_barcoding = "EXP-PBC001"
process barcoding_gpu {
......@@ -178,9 +176,4 @@ guppy_barcoder \
--trim_adapters \
--compress_fastq
"""
}
<<<<<<< HEAD
>>>>>>> 622494c (Ajout du process barcoding)
=======
>>>>>>> bd1fefe (Transformation des fichiers de sortie de barcoding en tuple pour concatenate)
}
\ No newline at end of file
version = "2.5.2"
container_url = "xgrand/pycoqc:${version}"
params.rna_qc_out = ""
process control_basecalling {
container = "${container_url}"
label "small_mem_mono_cpus"
if (params.basecalling_out != "") {
publishDir "results/${params.basecalling_out}", mode: 'copy'
if (params.rna_qc_out != "") {
publishDir "results/${params.rna_qc_out}QC_basecalling/", mode: 'copy'
}
input:
......@@ -16,7 +17,7 @@ process control_basecalling {
path("*.html")
"""
pycoQC -f ${txt} -o Control_basecalling.html
pycoQC -f ${txt} -o QC_basecalling.html
"""
}
......@@ -24,20 +25,18 @@ process control_bam {
container = "${container_url}"
label "small_mem_mono_cpus"
if (params.basecalling_out != "") {
publishDir "results/${params.basecalling_out}", mode: 'copy'
if (params.rna_qc_out != "") {
publishDir "results/${params.rna_qc_out}QC_mapping/", mode: 'copy'
}
input:
path(txt)
path(path_bam)
tuple val(barcode), path(bam), path(bai)
output:
path("*.txt")
path("*.html")
"""
mkdir bam/
mv ${path_bam} bam/
pycoQC -f ${txt} -a bam/ -o Control_mapping.html
pycoQC -f ${txt} -a ${bam} -o ${barcode}_QC_mapping.html
"""
}
\ No newline at end of file
......@@ -24,6 +24,7 @@ samtools sort -@ ${task.cpus} ${bam} -O BAM -o ${bam.simpleName}_sorted.bam
params.start_position_counts_out = ""
process start_position_counts {
container = "${container_url}"
tag "${barcode}"
label "big_mem_multi_cpus"
publishDir "results/${params.start_position_counts_out}", mode: 'copy'
......@@ -37,10 +38,9 @@ process start_position_counts {
script:
"""
mkdir ${barcode}
cd ${barcode}/
samtools view -F 260 ../${bam} |
samtools view -F 260 ${bam} |
cut -f 1,4 |
sort > ${barcode}_start_positions_counts.txt
sort > ${barcode}/${barcode}_start_positions_counts.txt
"""
}
......
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