diff --git a/src/.docker_modules/pychopper/2.5.0/Dockerfile b/src/.docker_modules/pychopper/2.5.0/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..16b78a041ba388ab4a36a77445a0eeb1ffc0e121 --- /dev/null +++ b/src/.docker_modules/pychopper/2.5.0/Dockerfile @@ -0,0 +1,21 @@ +# SPDX-FileCopyrightText: 2023 Xavier Grand <xavier.grand@inserm.fr> +# +# SPDX-License-Identifier: AGPL-3.0-or-later + +FROM continuumio/miniconda3 +MAINTAINER Xavier Grand + +RUN apt-get update && apt-get install -y procps + +ENV PYCHOPPER_VERSION="2.5.0" +RUN conda init \ +&& conda config --add channels r \ +&& conda config --add channels defaults \ +&& conda config --add channels conda-forge \ +&& conda config --add channels bioconda \ +&& conda create -y -n pychopper +SHELL ["conda", "run", "-n", "pychopper", "/bin/bash", "-c"] +RUN conda install -c nanoporetech -c conda-forge -c bioconda "nanoporetech::pychopper" \ +&& echo "conda activate pychopper" >> /root/.bashrc + +ENV PATH /usr/local/envs/pychopper/bin:/usr/local/condabin:$PATH \ No newline at end of file diff --git a/src/.docker_modules/pychopper/2.5.0/docker_init.sh b/src/.docker_modules/pychopper/2.5.0/docker_init.sh new file mode 100755 index 0000000000000000000000000000000000000000..b4adae18c2ba61fc81e5831c05e2c0be47f9ca5b --- /dev/null +++ b/src/.docker_modules/pychopper/2.5.0/docker_init.sh @@ -0,0 +1,10 @@ +#!/bin/sh +# docker pull lbmc/pychopper:2.5.0 +# docker build src/.docker_modules/pychopper/2.5.0 -t 'lbmc/pychopper:2.5.0' +# docker push lbmc/pychopper:2.5.0 +# docker buildx build --platform linux/amd64,linux/arm64 -t "lbmc/pychopper:2.5.0" --push src/.docker_modules/pychopper/2.5.0 + +# docker pull xgrand/pychopper:2.5.0 +docker build src/.docker_modules/pychopper/2.5.0 -t 'xgrand/pychopper:2.5.0' +docker push xgrand/pychopper:2.5.0 +# docker buildx build --platform linux/amd64,linux/arm64 -t "xgrand/pychopper:2.5.0" --push src/.docker_modules/pychopper/2.5.0 \ No newline at end of file diff --git a/src/bolero.nf b/src/bolero.nf index 2bb2162bfcb6ff1f5f774abb040830a9f87d3324..15a06d07db45adb1bed05d2da751347327b9fd83 100755 --- a/src/bolero.nf +++ b/src/bolero.nf @@ -84,9 +84,9 @@ params.skipBC = true params.gpu_mode = false params.adapt = "CGACTGGAGCACGAGGACACTGA" // "CGACTGGAGCACGAGGACACTGACATGGACTGAAGGAGTAGAAA" // params.gsp = "TTAGGCAGAGGTGAAAAAGTTG" -params.transcriptome = "./data/202201_Full-length_HBV_GTFv3/20220112_preCore_FL_HBV_XGR_transcripts.fasta" -params.genome = "./data/202201_Full-length_HBV_GTFv3/preCore_XGR.fasta" -params.gtf = "./data/202201_Full-length_HBV_GTFv3/20220112_GTF_preCore_FL_HBV_XGR.gtf" +// params.transcriptome = "./data/202201_Full-length_HBV_GTFv3/20220112_preCore_FL_HBV_XGR_transcripts.fasta" +params.genome = "/home/xavier/Data/Genome/202201_Full-length_HBV_GTFv3/20230516_HBV_FL_preCore_reference.fasta" +params.gtf = "/home/xavier/Data/Genome/202201_Full-length_HBV_GTFv3/20230516_GTF_preCore_FL_HBV_XGR.gtf" params.flowcell = "FLO-MIN106" params.kit = "SQK-PBK004" @@ -188,7 +188,9 @@ include { start_position_individuals } from "./nf_modules/start_positions/main.n 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" + include { porechop } from "./nf_modules/porechop/main.nf" +include { trimmming_pychopper } from "./nf_modules/pychopper/main.nf" /* **************************************************************** @@ -250,9 +252,13 @@ workflow { //Trimming with porechop porechop(seqkit_grep.out.filtered_fastq) + + //Trimming with pychopper + //trimmming_pychopper(seqkit_grep.out.filtered_fastq) //Cut of the 5'RACE sequence cut_5pRACE(porechop.out.porechoped_fastq, params.adapt) + //cut_5pRACE(trimmming_pychopper.out.pychoped_fastq, params.adapt) //cut_5pRACE(seqkit_grep.out.filtered_fastq, params.adapt) //########################## MAPPING ########################## @@ -304,3 +310,22 @@ workflow { rna_count(files_for_rna_count) } + +// End message: + +workflow.onComplete { + + println ( workflow.success ? """ + DUPFinder tools execution summary + --------------------------- + Completed at : ${workflow.complete} + Duration : ${workflow.duration} + Success : ${workflow.success} + workDir : ${workflow.workDir} + exit status : ${workflow.exitStatus} + """ : """ + Failed: ${workflow.errorReport} + exit status : ${workflow.exitStatus} + """ + ) +} diff --git a/src/nf_modules/pychopper/main.nf b/src/nf_modules/pychopper/main.nf new file mode 100644 index 0000000000000000000000000000000000000000..1102b6164e00c2e92b6d6f4eef95965ea245bc90 --- /dev/null +++ b/src/nf_modules/pychopper/main.nf @@ -0,0 +1,25 @@ +version = "2.5.0" +container_url = "xgrand/pychopper:${version}" + +params.pychopper_out ="" +process trimmming_pychopper { + container = "${container_url}" + label "big_mem_multi_cpus" + tag "${barcode}" + if (params.pychopper_out != "") { + publishDir "results/${params.pychopper_out}", mode: 'copy' + } + + input: + tuple val(barcode), path(fastq) + + output: + tuple val(barcode), path("${barcode}/${barcode}_merged_pychoped.fastq.gz"), emit: pychoped_fastq + + script: +""" +mkdir ${barcode} +cd ${barcode}/ +pychopper -k ${params.kit} -r ${barcode}_pychopper_report.pdf -S ${barcode}_statistics.tsv -t ${task.cpus} ../${fastq} ${barcode}_merged_pychoped.fastq.gz +""" +} \ No newline at end of file