From cc2d49f6d0ec1e4a95b4acf6d91f231d03494aae Mon Sep 17 00:00:00 2001 From: Laurent Modolo <laurent.modolo@ens-lyon.fr> Date: Fri, 4 Jun 2021 09:24:00 +0200 Subject: [PATCH] switcth to nextflow DSL2 --- src/nf_modules/bedtools/fasta_from_bed.config | 55 --------- src/nf_modules/bedtools/fasta_from_bed.nf | 41 ------- src/nf_modules/bowtie/indexing.config | 56 ---------- src/nf_modules/bowtie/indexing.nf | 33 ------ src/nf_modules/bowtie/mapping_paired.config | 56 ---------- src/nf_modules/bowtie/mapping_paired.nf | 55 --------- src/nf_modules/bowtie/mapping_single.config | 56 ---------- src/nf_modules/bowtie/mapping_single.nf | 51 --------- src/nf_modules/bowtie2/indexing.config | 56 ---------- src/nf_modules/bowtie2/indexing.nf | 32 ------ src/nf_modules/bowtie2/mapping_paired.config | 56 ---------- src/nf_modules/bowtie2/mapping_paired.nf | 48 -------- src/nf_modules/bowtie2/mapping_single.config | 56 ---------- src/nf_modules/bowtie2/mapping_single.nf | 47 -------- src/nf_modules/bwa/indexing.config | 56 ---------- src/nf_modules/bwa/indexing.nf | 28 ----- src/nf_modules/bwa/mapping_paired.config | 56 ---------- src/nf_modules/bwa/mapping_paired.nf | 37 ------- .../cutadapt/adaptor_removal_paired.config | 55 --------- .../cutadapt/adaptor_removal_paired.nf | 25 ----- .../cutadapt/adaptor_removal_single.config | 55 --------- .../cutadapt/adaptor_removal_single.nf | 26 ----- .../cutadapt/trimming_paired.config | 55 --------- src/nf_modules/cutadapt/trimming_paired.nf | 25 ----- .../cutadapt/trimming_single.config | 55 --------- src/nf_modules/cutadapt/trimming_single.nf | 26 ----- src/nf_modules/deeptools/bam_to_bigwig.config | 76 ------------- src/nf_modules/deeptools/bam_to_bigwig.nf | 49 --------- .../deeptools/compute_matrix.config | 57 ---------- src/nf_modules/deeptools/compute_matrix.nf | 38 ------- src/nf_modules/deeptools/plot_profile.config | 57 ---------- src/nf_modules/deeptools/plot_profile.nf | 36 ------ src/nf_modules/fastp/fastp_paired.config | 56 ---------- src/nf_modules/fastp/fastp_paired.nf | 34 ------ src/nf_modules/fastp/fastp_single.config | 56 ---------- src/nf_modules/fastp/fastp_single.nf | 32 ------ src/nf_modules/fastqc/fastqc_paired.config | 56 ---------- src/nf_modules/fastqc/fastqc_paired.nf | 26 ----- src/nf_modules/fastqc/fastqc_single.config | 56 ---------- src/nf_modules/fastqc/fastqc_single.nf | 26 ----- src/nf_modules/hisat2/indexing.config | 57 ---------- src/nf_modules/hisat2/indexing.nf | 32 ------ src/nf_modules/hisat2/mapping_paired.config | 55 --------- src/nf_modules/hisat2/mapping_paired.nf | 48 -------- src/nf_modules/hisat2/mapping_single.config | 55 --------- src/nf_modules/hisat2/mapping_single.nf | 53 --------- src/nf_modules/htseq/htseq.config | 75 ------------- src/nf_modules/htseq/htseq.nf | 52 --------- src/nf_modules/kallisto/indexing.config | 57 ---------- src/nf_modules/kallisto/indexing.nf | 28 ----- src/nf_modules/kallisto/mapping_paired.config | 59 ---------- src/nf_modules/kallisto/mapping_paired.nf | 36 ------ src/nf_modules/kallisto/mapping_single.config | 59 ---------- src/nf_modules/kallisto/mapping_single.nf | 42 ------- src/nf_modules/macs2/peak_calling.config | 57 ---------- src/nf_modules/macs2/peak_calling.nf | 52 --------- src/nf_modules/multiqc/multiqc_paired.config | 84 -------------- src/nf_modules/multiqc/multiqc_paired.nf | 43 -------- src/nf_modules/multiqc/multiqc_single.config | 82 -------------- src/nf_modules/multiqc/multiqc_single.nf | 44 -------- .../music/peak_calling_single.config | 94 ---------------- src/nf_modules/music/peak_calling_single.nf | 104 ------------------ src/nf_modules/rsem/indexing.config | 57 ---------- src/nf_modules/rsem/indexing.nf | 39 ------- .../rsem/quantification_paired.config | 57 ---------- src/nf_modules/rsem/quantification_paired.nf | 48 -------- .../rsem/quantification_single.config | 57 ---------- src/nf_modules/rsem/quantification_single.nf | 53 --------- src/nf_modules/sambamba/index_bams.config | 57 ---------- src/nf_modules/sambamba/index_bams.nf | 25 ----- src/nf_modules/sambamba/sort_bams.config | 58 ---------- src/nf_modules/sambamba/sort_bams.nf | 26 ----- src/nf_modules/sambamba/split_bams.config | 57 ---------- src/nf_modules/sambamba/split_bams.nf | 27 ----- src/nf_modules/samblaster/dedup_sams.config | 57 ---------- src/nf_modules/samblaster/dedup_sams.nf | 27 ----- src/nf_modules/samtools/filter_bams.config | 57 ---------- src/nf_modules/samtools/filter_bams.nf | 32 ------ src/nf_modules/samtools/index_bams.config | 56 ---------- src/nf_modules/samtools/index_bams.nf | 25 ----- src/nf_modules/samtools/sort_bams.config | 57 ---------- src/nf_modules/samtools/sort_bams.nf | 25 ----- src/nf_modules/samtools/split_bams.config | 56 ---------- src/nf_modules/samtools/split_bams.nf | 26 ----- src/nf_modules/sratoolkit/fastqdump.config | 56 ---------- src/nf_modules/sratoolkit/fastqdump.nf | 48 -------- src/nf_modules/star/indexing.config | 56 ---------- src/nf_modules/star/indexing.nf | 36 ------ src/nf_modules/star/mapping_paired.config | 56 ---------- src/nf_modules/star/mapping_paired.nf | 40 ------- src/nf_modules/star/mapping_single.config | 56 ---------- src/nf_modules/star/mapping_single.nf | 39 ------- src/nf_modules/subread/subread.config | 75 ------------- src/nf_modules/subread/subread.nf | 52 --------- src/nf_modules/urqt/trimming_paired.config | 58 ---------- src/nf_modules/urqt/trimming_paired.nf | 27 ----- src/nf_modules/urqt/trimming_single.config | 58 ---------- src/nf_modules/urqt/trimming_single.nf | 30 ----- 98 files changed, 4786 deletions(-) delete mode 100644 src/nf_modules/bedtools/fasta_from_bed.config delete mode 100644 src/nf_modules/bedtools/fasta_from_bed.nf delete mode 100644 src/nf_modules/bowtie/indexing.config delete mode 100644 src/nf_modules/bowtie/indexing.nf delete mode 100644 src/nf_modules/bowtie/mapping_paired.config delete mode 100644 src/nf_modules/bowtie/mapping_paired.nf delete mode 100644 src/nf_modules/bowtie/mapping_single.config delete mode 100644 src/nf_modules/bowtie/mapping_single.nf delete mode 100644 src/nf_modules/bowtie2/indexing.config delete mode 100644 src/nf_modules/bowtie2/indexing.nf delete mode 100644 src/nf_modules/bowtie2/mapping_paired.config delete mode 100644 src/nf_modules/bowtie2/mapping_paired.nf delete mode 100644 src/nf_modules/bowtie2/mapping_single.config delete mode 100644 src/nf_modules/bowtie2/mapping_single.nf delete mode 100644 src/nf_modules/bwa/indexing.config delete mode 100644 src/nf_modules/bwa/indexing.nf delete mode 100644 src/nf_modules/bwa/mapping_paired.config delete mode 100644 src/nf_modules/bwa/mapping_paired.nf delete mode 100644 src/nf_modules/cutadapt/adaptor_removal_paired.config delete mode 100644 src/nf_modules/cutadapt/adaptor_removal_paired.nf delete mode 100644 src/nf_modules/cutadapt/adaptor_removal_single.config delete mode 100644 src/nf_modules/cutadapt/adaptor_removal_single.nf delete mode 100644 src/nf_modules/cutadapt/trimming_paired.config delete mode 100644 src/nf_modules/cutadapt/trimming_paired.nf delete mode 100644 src/nf_modules/cutadapt/trimming_single.config delete mode 100644 src/nf_modules/cutadapt/trimming_single.nf delete mode 100644 src/nf_modules/deeptools/bam_to_bigwig.config delete mode 100644 src/nf_modules/deeptools/bam_to_bigwig.nf delete mode 100644 src/nf_modules/deeptools/compute_matrix.config delete mode 100644 src/nf_modules/deeptools/compute_matrix.nf delete mode 100644 src/nf_modules/deeptools/plot_profile.config delete mode 100644 src/nf_modules/deeptools/plot_profile.nf delete mode 100644 src/nf_modules/fastp/fastp_paired.config delete mode 100644 src/nf_modules/fastp/fastp_paired.nf delete mode 100644 src/nf_modules/fastp/fastp_single.config delete mode 100644 src/nf_modules/fastp/fastp_single.nf delete mode 100644 src/nf_modules/fastqc/fastqc_paired.config delete mode 100644 src/nf_modules/fastqc/fastqc_paired.nf delete mode 100644 src/nf_modules/fastqc/fastqc_single.config delete mode 100644 src/nf_modules/fastqc/fastqc_single.nf delete mode 100644 src/nf_modules/hisat2/indexing.config delete mode 100644 src/nf_modules/hisat2/indexing.nf delete mode 100644 src/nf_modules/hisat2/mapping_paired.config delete mode 100644 src/nf_modules/hisat2/mapping_paired.nf delete mode 100644 src/nf_modules/hisat2/mapping_single.config delete mode 100644 src/nf_modules/hisat2/mapping_single.nf delete mode 100644 src/nf_modules/htseq/htseq.config delete mode 100644 src/nf_modules/htseq/htseq.nf delete mode 100644 src/nf_modules/kallisto/indexing.config delete mode 100644 src/nf_modules/kallisto/indexing.nf delete mode 100644 src/nf_modules/kallisto/mapping_paired.config delete mode 100644 src/nf_modules/kallisto/mapping_paired.nf delete mode 100644 src/nf_modules/kallisto/mapping_single.config delete mode 100644 src/nf_modules/kallisto/mapping_single.nf delete mode 100644 src/nf_modules/macs2/peak_calling.config delete mode 100644 src/nf_modules/macs2/peak_calling.nf delete mode 100644 src/nf_modules/multiqc/multiqc_paired.config delete mode 100644 src/nf_modules/multiqc/multiqc_paired.nf delete mode 100644 src/nf_modules/multiqc/multiqc_single.config delete mode 100644 src/nf_modules/multiqc/multiqc_single.nf delete mode 100644 src/nf_modules/music/peak_calling_single.config delete mode 100644 src/nf_modules/music/peak_calling_single.nf delete mode 100644 src/nf_modules/rsem/indexing.config delete mode 100644 src/nf_modules/rsem/indexing.nf delete mode 100644 src/nf_modules/rsem/quantification_paired.config delete mode 100644 src/nf_modules/rsem/quantification_paired.nf delete mode 100644 src/nf_modules/rsem/quantification_single.config delete mode 100644 src/nf_modules/rsem/quantification_single.nf delete mode 100644 src/nf_modules/sambamba/index_bams.config delete mode 100644 src/nf_modules/sambamba/index_bams.nf delete mode 100644 src/nf_modules/sambamba/sort_bams.config delete mode 100644 src/nf_modules/sambamba/sort_bams.nf delete mode 100644 src/nf_modules/sambamba/split_bams.config delete mode 100644 src/nf_modules/sambamba/split_bams.nf delete mode 100644 src/nf_modules/samblaster/dedup_sams.config delete mode 100644 src/nf_modules/samblaster/dedup_sams.nf delete mode 100644 src/nf_modules/samtools/filter_bams.config delete mode 100644 src/nf_modules/samtools/filter_bams.nf delete mode 100644 src/nf_modules/samtools/index_bams.config delete mode 100644 src/nf_modules/samtools/index_bams.nf delete mode 100644 src/nf_modules/samtools/sort_bams.config delete mode 100644 src/nf_modules/samtools/sort_bams.nf delete mode 100644 src/nf_modules/samtools/split_bams.config delete mode 100644 src/nf_modules/samtools/split_bams.nf delete mode 100644 src/nf_modules/sratoolkit/fastqdump.config delete mode 100644 src/nf_modules/sratoolkit/fastqdump.nf delete mode 100644 src/nf_modules/star/indexing.config delete mode 100644 src/nf_modules/star/indexing.nf delete mode 100644 src/nf_modules/star/mapping_paired.config delete mode 100644 src/nf_modules/star/mapping_paired.nf delete mode 100644 src/nf_modules/star/mapping_single.config delete mode 100644 src/nf_modules/star/mapping_single.nf delete mode 100644 src/nf_modules/subread/subread.config delete mode 100644 src/nf_modules/subread/subread.nf delete mode 100644 src/nf_modules/urqt/trimming_paired.config delete mode 100644 src/nf_modules/urqt/trimming_paired.nf delete mode 100644 src/nf_modules/urqt/trimming_single.config delete mode 100644 src/nf_modules/urqt/trimming_single.nf diff --git a/src/nf_modules/bedtools/fasta_from_bed.config b/src/nf_modules/bedtools/fasta_from_bed.config deleted file mode 100644 index 077270d7..00000000 --- a/src/nf_modules/bedtools/fasta_from_bed.config +++ /dev/null @@ -1,55 +0,0 @@ -profiles { - docker { - docker.temp = "auto" - docker.enabled = true - process { - withLabel: bedtools { - container = "lbmc/bedtools:2.25.0" - cpus = 1 - } - } - } - singularity { - singularity.enabled = true - singularity.cacheDir = "./bin/" - process { - withLabel: bedtools { - container = "lbmc/bedtools:2.25.0" - cpus = 1 - } - } - } - psmn{ - singularity.enabled = true - singularity.cacheDir = "/.singularity_psmn/" - singularity.runOptions = "--bind /Xnfs,/scratch" - process{ - withLabel: bedtools { - container = "lbmc/bedtools:2.25.0" - executor = "sge" - clusterOptions = "-cwd -V" - cpus = 1 - memory = "20GB" - time = "12h" - queue = "monointeldeb128" - } - } - } - ccin2p3 { - singularity.enabled = true - singularity.cacheDir = "$baseDir/.singularity_in2p3/" - singularity.runOptions = "--bind /pbs,/sps,/scratch" - process{ - withLabel: bedtools { - container = "lbmc/bedtools:2.25.0" - scratch = true - stageInMode = "copy" - stageOutMode = "rsync" - executor = "sge" - clusterOptions = "-P P_lbmc -l os=cl7 -l sps=1 -r n" - cpus = 1 - queue = "huge" - } - } - } -} diff --git a/src/nf_modules/bedtools/fasta_from_bed.nf b/src/nf_modules/bedtools/fasta_from_bed.nf deleted file mode 100644 index 85dce555..00000000 --- a/src/nf_modules/bedtools/fasta_from_bed.nf +++ /dev/null @@ -1,41 +0,0 @@ -/* -* bedtools : -* Imputs : fasta files -* Imputs : bed files -* Output : fasta files -*/ -/* fasta extraction */ - -params.fasta = "$baseDir/data/fasta/*.fasta" -params.bed = "$baseDir/data/annot/*.bed" - -log.info "fasta file : ${params.fasta}" -log.info "bed file : ${params.bed}" - -Channel - .fromPath( params.fasta ) - .ifEmpty { error "Cannot find any fasta files matching: ${params.fasta}" } - .set { fasta_files } -Channel - .fromPath( params.bed ) - .ifEmpty { error "Cannot find any bed files matching: ${params.bed}" } - .set { bed_files } - -process fasta_from_bed { - tag "${bed.baseName}" - publishDir "results/fasta/", mode: 'copy' - label "bedtools" - - input: - file fasta from fasta_files - file bed from bed_files - - output: - file "*_extracted.fasta" into fasta_files_extracted - - script: -""" -bedtools getfasta -name \ --fi ${fasta} -bed ${bed} -fo ${bed.baseName}_extracted.fasta -""" -} diff --git a/src/nf_modules/bowtie/indexing.config b/src/nf_modules/bowtie/indexing.config deleted file mode 100644 index 50dff965..00000000 --- a/src/nf_modules/bowtie/indexing.config +++ /dev/null @@ -1,56 +0,0 @@ -profiles { - docker { - docker.temp = "auto" - docker.enabled = true - process { - withLabel: bowtie { - cpus = 4 - container = "lbmc/bowtie:1.2.2" - } - } - } - singularity { - singularity.enabled = true - singularity.cacheDir = "./bin/" - process { - withLabel: bowtie { - cpus = 4 - container = "lbmc/bowtie:1.2.2" - } - } - } - psmn{ - singularity.enabled = true - singularity.cacheDir = "/.singularity_psmn/" - singularity.runOptions = "--bind /Xnfs,/scratch" - process{ - withLabel: bowtie { - container = "lbmc/bowtie:1.2.2" - executor = "sge" - clusterOptions = "-cwd -V" - memory = "20GB" - cpus = 32 - time = "12h" - queue = "CLG6242deb384A,CLG6242deb384C,CLG5218deb192A,CLG5218deb192B,CLG5218deb192C,CLG5218deb192D,SLG5118deb96,SLG6142deb384A,SLG6142deb384B,SLG6142deb384C,SLG6142deb384D" - penv = "openmp32" - } - } - } - ccin2p3 { - singularity.enabled = true - singularity.cacheDir = "$baseDir/.singularity_in2p3/" - singularity.runOptions = "--bind /pbs,/sps,/scratch" - process{ - withLabel: bowtie { - container = "lbmc/bowtie:1.2.2" - scratch = true - stageInMode = "copy" - stageOutMode = "rsync" - executor = "sge" - clusterOptions = "-P P_lbmc -l os=cl7 -l sps=1 -r n" - cpus = 1 - queue = "huge" - } - } - } -} diff --git a/src/nf_modules/bowtie/indexing.nf b/src/nf_modules/bowtie/indexing.nf deleted file mode 100644 index d09a5de8..00000000 --- a/src/nf_modules/bowtie/indexing.nf +++ /dev/null @@ -1,33 +0,0 @@ -/* fasta indexing */ - -params.fasta = "$baseDir/data/bam/*.fasta" - -log.info "fasta files : ${params.fasta}" - -Channel - .fromPath( params.fasta ) - .ifEmpty { error "Cannot find any bam files matching: ${params.fasta}" } - .set { fasta_file } - -process index_fasta { - tag "$fasta.baseName" - publishDir "results/mapping/index/", mode: 'copy' - label "bowtie" - - input: - file fasta from fasta_file - - output: - file "*.index*" into index_files - file "*_report.txt" into indexing_report - - script: -""" -bowtie-build --threads ${task.cpus} -f ${fasta} ${fasta.baseName}.index &> ${fasta.baseName}_bowtie_report.txt - -if grep -q "Error" ${fasta.baseName}_bowtie_report.txt; then - exit 1 -fi -""" -} - diff --git a/src/nf_modules/bowtie/mapping_paired.config b/src/nf_modules/bowtie/mapping_paired.config deleted file mode 100644 index 1d924e9b..00000000 --- a/src/nf_modules/bowtie/mapping_paired.config +++ /dev/null @@ -1,56 +0,0 @@ -profiles { - docker { - docker.temp = "auto" - docker.enabled = true - process { - withLabel: bowtie { - container = "lbmc/bowtie:1.2.2" - cpus = 4 - } - } - } - singularity { - singularity.enabled = true - singularity.cacheDir = "./bin/" - process { - withLabel: bowtie { - cpus = 4 - container = "lbmc/bowtie:1.2.2" - } - } - } - psmn{ - singularity.enabled = true - singularity.cacheDir = "/.singularity_psmn/" - singularity.runOptions = "--bind /Xnfs,/scratch" - process{ - withLabel: bowtie { - container = "lbmc/bowtie:1.2.2" - executor = "sge" - clusterOptions = "-cwd -V" - cpus = 32 - memory = "30GB" - time = "24h" - queue = "CLG6242deb384A,CLG6242deb384C,CLG5218deb192A,CLG5218deb192B,CLG5218deb192C,CLG5218deb192D,SLG5118deb96,SLG6142deb384A,SLG6142deb384B,SLG6142deb384C,SLG6142deb384D" - penv = "openmp32" - } - } - } - ccin2p3 { - singularity.enabled = true - singularity.cacheDir = "$baseDir/.singularity_in2p3/" - singularity.runOptions = "--bind /pbs,/sps,/scratch" - process{ - withLabel: bowtie { - container = "lbmc/bowtie:1.2.2" - scratch = true - stageInMode = "copy" - stageOutMode = "rsync" - executor = "sge" - clusterOptions = "-P P_lbmc -l os=cl7 -l sps=1 -r n" - cpus = 1 - queue = "huge" - } - } - } -} diff --git a/src/nf_modules/bowtie/mapping_paired.nf b/src/nf_modules/bowtie/mapping_paired.nf deleted file mode 100644 index 6357a8b6..00000000 --- a/src/nf_modules/bowtie/mapping_paired.nf +++ /dev/null @@ -1,55 +0,0 @@ -/* -* mapping paired fastq -*/ - -params.fastq = "$baseDir/data/fastq/*_{1,2}.fastq" -params.index = "$baseDir/data/index/*.index.*" - -log.info "fastq files : ${params.fastq}" -log.info "index files : ${params.index}" - -Channel - .fromFilePairs( params.fastq ) - .ifEmpty { error "Cannot find any fastq files matching: ${params.fastq}" } - .set { fastq_files } -Channel - .fromPath( params.index ) - .ifEmpty { error "Cannot find any index files matching: ${params.index}" } - .set { index_files } - -process mapping_fastq { - tag "$pair_id" - publishDir "results/mapping/bams/", mode: 'copy' - label "bowtie" - - input: - set pair_id, file(reads) from fastq_files - file index from index_files.collect() - - output: - file "*.bam" into bam_files - file "*_report.txt" into mapping_report - - script: - index_id = index[0] - for (index_file in index) { - if (index_file =~ /.*\.1\.ebwt/ && !(index_file =~ /.*\.rev\.1\.ebwt/)) { - index_id = ( index_file =~ /(.*)\.1\.ebwt/)[0][1] - } - } -""" -# -v specify the max number of missmatch, -k the number of match reported per -# reads -bowtie --best -v 3 -k 1 --sam -p ${task.cpus} ${index_id} \ --1 ${reads[0]} -2 ${reads[1]} 2> \ -${pair_id}_bowtie_report_tmp.txt | \ -samtools view -Sb - > ${pair_id}.bam - -if grep -q "Error" ${pair_id}_bowtie_report_tmp.txt; then - exit 1 -fi -tail -n 19 ${pair_id}_bowtie_report_tmp.txt > ${pair_id}_bowtie_report.txt -""" -} - - diff --git a/src/nf_modules/bowtie/mapping_single.config b/src/nf_modules/bowtie/mapping_single.config deleted file mode 100644 index 1d924e9b..00000000 --- a/src/nf_modules/bowtie/mapping_single.config +++ /dev/null @@ -1,56 +0,0 @@ -profiles { - docker { - docker.temp = "auto" - docker.enabled = true - process { - withLabel: bowtie { - container = "lbmc/bowtie:1.2.2" - cpus = 4 - } - } - } - singularity { - singularity.enabled = true - singularity.cacheDir = "./bin/" - process { - withLabel: bowtie { - cpus = 4 - container = "lbmc/bowtie:1.2.2" - } - } - } - psmn{ - singularity.enabled = true - singularity.cacheDir = "/.singularity_psmn/" - singularity.runOptions = "--bind /Xnfs,/scratch" - process{ - withLabel: bowtie { - container = "lbmc/bowtie:1.2.2" - executor = "sge" - clusterOptions = "-cwd -V" - cpus = 32 - memory = "30GB" - time = "24h" - queue = "CLG6242deb384A,CLG6242deb384C,CLG5218deb192A,CLG5218deb192B,CLG5218deb192C,CLG5218deb192D,SLG5118deb96,SLG6142deb384A,SLG6142deb384B,SLG6142deb384C,SLG6142deb384D" - penv = "openmp32" - } - } - } - ccin2p3 { - singularity.enabled = true - singularity.cacheDir = "$baseDir/.singularity_in2p3/" - singularity.runOptions = "--bind /pbs,/sps,/scratch" - process{ - withLabel: bowtie { - container = "lbmc/bowtie:1.2.2" - scratch = true - stageInMode = "copy" - stageOutMode = "rsync" - executor = "sge" - clusterOptions = "-P P_lbmc -l os=cl7 -l sps=1 -r n" - cpus = 1 - queue = "huge" - } - } - } -} diff --git a/src/nf_modules/bowtie/mapping_single.nf b/src/nf_modules/bowtie/mapping_single.nf deleted file mode 100644 index ac287193..00000000 --- a/src/nf_modules/bowtie/mapping_single.nf +++ /dev/null @@ -1,51 +0,0 @@ -/* -* mapping single end fastq -*/ - -params.fastq = "$baseDir/data/fastq/*.fastq" - -log.info "fastq files : ${params.fastq}" -log.info "index files : ${params.index}" - -Channel - .fromPath( params.fastq ) - .ifEmpty { error "Cannot find any fastq files matching: ${params.fastq}" } - .map { it -> [(it.baseName =~ /([^\.]*)/)[0][1], it]} - .set { fastq_files } -Channel - .fromPath( params.index ) - .ifEmpty { error "Cannot find any index files matching: ${params.index}" } - .set { index_files } - -process mapping_fastq { - tag "$file_id" - publishDir "results/mapping/bams/", mode: 'copy' - label "bowtie" - - input: - set file_id, file(reads) from fastq_files - file index from index_files.collect() - - output: - set file_id, "*.bam" into bam_files - file "*_report.txt" into mapping_report - - script: -index_id = index[0] -for (index_file in index) { - if (index_file =~ /.*\.1\.ebwt/ && !(index_file =~ /.*\.rev\.1\.ebwt/)) { - index_id = ( index_file =~ /(.*)\.1\.ebwt/)[0][1] - } -} -""" -bowtie --best -v 3 -k 1 --sam -p ${task.cpus} ${index_id} \ --q ${reads} 2> \ -${file_id}_bowtie_report_tmp.txt | \ -samtools view -Sb - > ${file_id}.bam - -if grep -q "Error" ${file_id}_bowtie_report_tmp.txt; then - exit 1 -fi -tail -n 19 ${file_id}_bowtie_report_tmp.txt > ${file_id}_bowtie_report.txt -""" -} diff --git a/src/nf_modules/bowtie2/indexing.config b/src/nf_modules/bowtie2/indexing.config deleted file mode 100644 index 5a487f8e..00000000 --- a/src/nf_modules/bowtie2/indexing.config +++ /dev/null @@ -1,56 +0,0 @@ -profiles { - docker { - docker.temp = "auto" - docker.enabled = true - process { - withLabel: bowtie2 { - container = "lbmc/bowtie2:2.3.4.1" - cpus = 4 - } - } - } - singularity { - singularity.enabled = true - singularity.cacheDir = "./bin/" - process { - withLabel: bowtie2 { - container = "lbmc/bowtie2:2.3.4.1" - cpus = 4 - } - } - } - psmn{ - singularity.enabled = true - singularity.cacheDir = "/.singularity_psmn/" - singularity.runOptions = "--bind /Xnfs,/scratch" - process{ - withLabel: bowtie2 { - container = "lbmc/bowtie2:2.3.4.1" - executor = "sge" - clusterOptions = "-cwd -V" - cpus = 32 - memory = "20GB" - time = "12h" - queue = "CLG6242deb384A,CLG6242deb384C,CLG5218deb192A,CLG5218deb192B,CLG5218deb192C,CLG5218deb192D,SLG5118deb96,SLG6142deb384A,SLG6142deb384B,SLG6142deb384C,SLG6142deb384D" - penv = "openmp32" - } - } - } - ccin2p3 { - singularity.enabled = true - singularity.cacheDir = "$baseDir/.singularity_in2p3/" - singularity.runOptions = "--bind /pbs,/sps,/scratch" - process{ - withLabel: bowtie2 { - container = "lbmc/bowtie2:2.3.4.1" - scratch = true - stageInMode = "copy" - stageOutMode = "rsync" - executor = "sge" - clusterOptions = "-P P_lbmc -l os=cl7 -l sps=1 -r n" - cpus = 1 - queue = "huge" - } - } - } -} diff --git a/src/nf_modules/bowtie2/indexing.nf b/src/nf_modules/bowtie2/indexing.nf deleted file mode 100644 index e1ec9ae9..00000000 --- a/src/nf_modules/bowtie2/indexing.nf +++ /dev/null @@ -1,32 +0,0 @@ -params.fasta = "$baseDir/data/bam/*.fasta" - -log.info "fasta files : ${params.fasta}" - -Channel - .fromPath( params.fasta ) - .ifEmpty { error "Cannot find any bam files matching: ${params.fasta}" } - .set { fasta_file } - -process index_fasta { - tag "$fasta.baseName" - publishDir "results/mapping/index/", mode: 'copy' - label "bowtie2" - - input: - file fasta from fasta_file - - output: - file "*.index*" into index_files - file "*_report.txt" into indexing_report - - script: -""" -bowtie2-build --threads ${task.cpus} ${fasta} ${fasta.baseName}.index &> ${fasta.baseName}_bowtie2_report.txt - -if grep -q "Error" ${fasta.baseName}_bowtie2_report.txt; then - exit 1 -fi -""" -} - - diff --git a/src/nf_modules/bowtie2/mapping_paired.config b/src/nf_modules/bowtie2/mapping_paired.config deleted file mode 100644 index addc6b2e..00000000 --- a/src/nf_modules/bowtie2/mapping_paired.config +++ /dev/null @@ -1,56 +0,0 @@ -profiles { - docker { - docker.temp = "auto" - docker.enabled = true - process { - withLabel: bowtie2 { - container = "lbmc/bowtie2:2.3.4.1" - cpus = 4 - } - } - } - singularity { - singularity.enabled = true - singularity.cacheDir = "./bin/" - process { - withLabel: bowtie2 { - container = "lbmc/bowtie2:2.3.4.1" - cpus = 4 - } - } - } - psmn{ - singularity.enabled = true - singularity.cacheDir = "/.singularity_psmn/" - singularity.runOptions = "--bind /Xnfs,/scratch" - process{ - withLabel: bowtie2 { - container = "lbmc/bowtie2:2.3.4.1" - executor = "sge" - clusterOptions = "-cwd -V" - cpus = 32 - memory = "30GB" - time = "24h" - queue = "CLG6242deb384A,CLG6242deb384C,CLG5218deb192A,CLG5218deb192B,CLG5218deb192C,CLG5218deb192D,SLG5118deb96,SLG6142deb384A,SLG6142deb384B,SLG6142deb384C,SLG6142deb384D" - penv = "openmp32" - } - } - } - ccin2p3 { - singularity.enabled = true - singularity.cacheDir = "$baseDir/.singularity_in2p3/" - singularity.runOptions = "--bind /pbs,/sps,/scratch" - process{ - withLabel: bowtie2 { - container = "lbmc/bowtie2:2.3.4.1" - scratch = true - stageInMode = "copy" - stageOutMode = "rsync" - executor = "sge" - clusterOptions = "-P P_lbmc -l os=cl7 -l sps=1 -r n" - cpus = 1 - queue = "huge" - } - } - } -} diff --git a/src/nf_modules/bowtie2/mapping_paired.nf b/src/nf_modules/bowtie2/mapping_paired.nf deleted file mode 100644 index 96c209fd..00000000 --- a/src/nf_modules/bowtie2/mapping_paired.nf +++ /dev/null @@ -1,48 +0,0 @@ -params.fastq = "$baseDir/data/fastq/*_{1,2}.fastq" -params.index = "$baseDir/data/index/*.index.*" - -log.info "fastq files : ${params.fastq}" -log.info "index files : ${params.index}" - -Channel - .fromFilePairs( params.fastq ) - .ifEmpty { error "Cannot find any fastq files matching: ${params.fastq}" } - .set { fastq_files } -Channel - .fromPath( params.index ) - .ifEmpty { error "Cannot find any index files matching: ${params.index}" } - .set { index_files } - -process mapping_fastq { - tag "$pair_id" - publishDir "results/mapping/bams/", mode: 'copy' - label "bowtie2" - - input: - set pair_id, file(reads) from fastq_files - file index from index_files.collect() - - output: - set pair_id, "*.bam" into bam_files - file "*_report.txt" into mapping_report - - script: - index_id = index[0] - for (index_file in index) { - if (index_file =~ /.*\.1\.bt2/ && !(index_file =~ /.*\.rev\.1\.bt2/)) { - index_id = ( index_file =~ /(.*)\.1\.bt2/)[0][1] - } - } -""" -bowtie2 --very-sensitive -p ${task.cpus} -x ${index_id} \ --1 ${reads[0]} -2 ${reads[1]} 2> \ -${pair_id}_bowtie2_report_tmp.txt | \ -samtools view -Sb - > ${pair_id}.bam - -if grep -q "Error" ${pair_id}_bowtie2_report_tmp.txt; then - exit 1 -fi -tail -n 19 ${pair_id}_bowtie2_report_tmp.txt > ${pair_id}_bowtie2_report.txt -""" -} - diff --git a/src/nf_modules/bowtie2/mapping_single.config b/src/nf_modules/bowtie2/mapping_single.config deleted file mode 100644 index addc6b2e..00000000 --- a/src/nf_modules/bowtie2/mapping_single.config +++ /dev/null @@ -1,56 +0,0 @@ -profiles { - docker { - docker.temp = "auto" - docker.enabled = true - process { - withLabel: bowtie2 { - container = "lbmc/bowtie2:2.3.4.1" - cpus = 4 - } - } - } - singularity { - singularity.enabled = true - singularity.cacheDir = "./bin/" - process { - withLabel: bowtie2 { - container = "lbmc/bowtie2:2.3.4.1" - cpus = 4 - } - } - } - psmn{ - singularity.enabled = true - singularity.cacheDir = "/.singularity_psmn/" - singularity.runOptions = "--bind /Xnfs,/scratch" - process{ - withLabel: bowtie2 { - container = "lbmc/bowtie2:2.3.4.1" - executor = "sge" - clusterOptions = "-cwd -V" - cpus = 32 - memory = "30GB" - time = "24h" - queue = "CLG6242deb384A,CLG6242deb384C,CLG5218deb192A,CLG5218deb192B,CLG5218deb192C,CLG5218deb192D,SLG5118deb96,SLG6142deb384A,SLG6142deb384B,SLG6142deb384C,SLG6142deb384D" - penv = "openmp32" - } - } - } - ccin2p3 { - singularity.enabled = true - singularity.cacheDir = "$baseDir/.singularity_in2p3/" - singularity.runOptions = "--bind /pbs,/sps,/scratch" - process{ - withLabel: bowtie2 { - container = "lbmc/bowtie2:2.3.4.1" - scratch = true - stageInMode = "copy" - stageOutMode = "rsync" - executor = "sge" - clusterOptions = "-P P_lbmc -l os=cl7 -l sps=1 -r n" - cpus = 1 - queue = "huge" - } - } - } -} diff --git a/src/nf_modules/bowtie2/mapping_single.nf b/src/nf_modules/bowtie2/mapping_single.nf deleted file mode 100644 index 69db77e2..00000000 --- a/src/nf_modules/bowtie2/mapping_single.nf +++ /dev/null @@ -1,47 +0,0 @@ -params.fastq = "$baseDir/data/fastq/*.fastq" - -log.info "fastq files : ${params.fastq}" -log.info "index files : ${params.index}" - -Channel - .fromPath( params.fastq ) - .ifEmpty { error "Cannot find any fastq files matching: ${params.fastq}" } - .map { it -> [(it.baseName =~ /([^\.]*)/)[0][1], it]} - .set { fastq_files } -Channel - .fromPath( params.index ) - .ifEmpty { error "Cannot find any index files matching: ${params.index}" } - .set { index_files } - -process mapping_fastq { - tag "$file_id" - publishDir "results/mapping/bams/", mode: 'copy' - label "bowtie2" - - input: - set file_id, file(reads) from fastq_files - file index from index_files.collect() - - output: - set file_id, "*.bam" into bam_files - file "*_report.txt" into mapping_report - - script: - index_id = index[0] - for (index_file in index) { - if (index_file =~ /.*\.1\.bt2/ && !(index_file =~ /.*\.rev\.1\.bt2/)) { - index_id = ( index_file =~ /(.*)\.1\.bt2/)[0][1] - } - } -""" -bowtie2 --very-sensitive -p ${task.cpus} -x ${index_id} \ --U ${reads} 2> \ -${file_id}_bowtie2_report_tmp.txt | \ -samtools view -Sb - > ${file_id}.bam - -if grep -q "Error" ${file_id}_bowtie2_report_tmp.txt; then - exit 1 -fi -tail -n 19 ${file_id}_bowtie2_report_tmp.txt > ${file_id}_bowtie2_report.txt -""" -} diff --git a/src/nf_modules/bwa/indexing.config b/src/nf_modules/bwa/indexing.config deleted file mode 100644 index b3b90059..00000000 --- a/src/nf_modules/bwa/indexing.config +++ /dev/null @@ -1,56 +0,0 @@ -profiles { - docker { - docker.temp = "auto" - docker.enabled = true - process { - withName: index_fasta { - container = "lbmc/bwa:0.7.17" - cpus = 4 - } - } - } - singularity { - singularity.enabled = true - singularity.cacheDir = "./bin/" - process { - withName: index_fasta { - container = "lbmc/bwa:0.7.17" - cpus = 4 - } - } - } - psmn{ - singularity.enabled = true - singularity.cacheDir = "/.singularity_psmn/" - singularity.runOptions = "--bind /Xnfs,/scratch" - process{ - withName: index_fasta { - container = "lbmc/bwa:0.7.17" - executor = "sge" - clusterOptions = "-cwd -V" - cpus = 32 - memory = "30GB" - time = "24h" - queue = "CLG6242deb384A,CLG6242deb384C,CLG5218deb192A,CLG5218deb192B,CLG5218deb192C,CLG5218deb192D,SLG5118deb96,SLG6142deb384A,SLG6142deb384B,SLG6142deb384C,SLG6142deb384D" - penv = "openmp32" - } - } - } - ccin2p3 { - singularity.enabled = true - singularity.cacheDir = "$baseDir/.singularity_in2p3/" - singularity.runOptions = "--bind /pbs,/sps,/scratch" - process{ - withName: index_fasta { - container = "lbmc/bwa:0.7.17" - scratch = true - stageInMode = "copy" - stageOutMode = "rsync" - executor = "sge" - clusterOptions = "-P P_lbmc -l os=cl7 -l sps=1 -r n" - cpus = 1 - queue = "huge" - } - } - } -} diff --git a/src/nf_modules/bwa/indexing.nf b/src/nf_modules/bwa/indexing.nf deleted file mode 100644 index 09096eea..00000000 --- a/src/nf_modules/bwa/indexing.nf +++ /dev/null @@ -1,28 +0,0 @@ -params.fasta = "$baseDir/data/bam/*.fasta" - -log.info "fasta files : ${params.fasta}" - -Channel - .fromPath( params.fasta ) - .ifEmpty { error "Cannot find any bam files matching: ${params.fasta}" } - .map { it -> [(it.baseName =~ /([^\.]*)/)[0][1], it]} - .set { fasta_file } - -process index_fasta { - tag "$fasta_id" - publishDir "results/mapping/index/", mode: 'copy' - - input: - set fasta_id, file(fasta) from fasta_file - - output: - set fasta_id, "${fasta.baseName}.*" into index_files - file "*_bwa_report.txt" into index_files_report - - script: -""" -bwa index -p ${fasta.baseName} ${fasta} \ -&> ${fasta.baseName}_bwa_report.txt -""" -} - diff --git a/src/nf_modules/bwa/mapping_paired.config b/src/nf_modules/bwa/mapping_paired.config deleted file mode 100644 index b28e5b9c..00000000 --- a/src/nf_modules/bwa/mapping_paired.config +++ /dev/null @@ -1,56 +0,0 @@ -profiles { - docker { - docker.temp = "auto" - docker.enabled = true - process { - withName: mapping_fastq { - container = "lbmc/bwa:0.7.17" - cpus = 4 - } - } - } - singularity { - singularity.enabled = true - singularity.cacheDir = "./bin/" - process { - withName: mapping_fastq { - container = "lbmc/bwa:0.7.17" - cpus = 4 - } - } - } - psmn{ - singularity.enabled = true - singularity.cacheDir = "/.singularity_psmn/" - singularity.runOptions = "--bind /Xnfs,/scratch" - process{ - withName: mapping_fastq { - container = "lbmc/bwa:0.7.17" - executor = "sge" - clusterOptions = "-cwd -V" - cpus = 32 - memory = "30GB" - time = "24h" - queue = "CLG6242deb384A,CLG6242deb384C,CLG5218deb192A,CLG5218deb192B,CLG5218deb192C,CLG5218deb192D,SLG5118deb96,SLG6142deb384A,SLG6142deb384B,SLG6142deb384C,SLG6142deb384D" - penv = "openmp32" - } - } - } - ccin2p3 { - singularity.enabled = true - singularity.cacheDir = "$baseDir/.singularity_in2p3/" - singularity.runOptions = "--bind /pbs,/sps,/scratch" - process{ - withName: mapping_fastq { - container = "lbmc/bwa:0.7.17" - scratch = true - stageInMode = "copy" - stageOutMode = "rsync" - executor = "sge" - clusterOptions = "-P P_lbmc -l os=cl7 -l sps=1 -r n" - cpus = 1 - queue = "huge" - } - } - } -} diff --git a/src/nf_modules/bwa/mapping_paired.nf b/src/nf_modules/bwa/mapping_paired.nf deleted file mode 100644 index 7309c605..00000000 --- a/src/nf_modules/bwa/mapping_paired.nf +++ /dev/null @@ -1,37 +0,0 @@ -params.fastq = "$baseDir/data/fastq/*_{1,2}.fastq" -params.index = "$baseDir/data/index/*.index.*" - -log.info "fastq files : ${params.fastq}" -log.info "index files : ${params.index}" - -Channel - .fromFilePairs( params.fastq ) - .ifEmpty { error "Cannot find any fastq files matching: ${params.fastq}" } - .set { fastq_files } -Channel - .fromPath( params.index ) - .ifEmpty { error "Cannot find any index files matching: ${params.index}" } - .map { it -> [(it.baseName =~ /([^\.]*)/)[0][1], it]} - .groupTuple() - .set { index_files } - -process mapping_fastq { - tag "$reads" - publishDir "results/mapping/sam/", mode: 'copy' - - input: - set pair_id, file(reads) from fastq_files - set index_id, file(index) from index_files.collect() - - output: - file "${pair_id}.sam" into sam_files - file "${pair_id}_bwa_report.txt" into mapping_repport_files - - script: -""" -bwa mem -t ${task.cpus} \ -${index_id} ${reads[0]} ${reads[1]} \ --o ${pair_id}.sam &> ${pair_id}_bwa_report.txt -""" -} - diff --git a/src/nf_modules/cutadapt/adaptor_removal_paired.config b/src/nf_modules/cutadapt/adaptor_removal_paired.config deleted file mode 100644 index 33b2179f..00000000 --- a/src/nf_modules/cutadapt/adaptor_removal_paired.config +++ /dev/null @@ -1,55 +0,0 @@ -profiles { - docker { - docker.temp = "auto" - docker.enabled = true - process { - withLabel: cutadapt { - container = "lbmc/cutadapt:2.1" - cpus = 1 - } - } - } - singularity { - singularity.enabled = true - singularity.cacheDir = "./bin/" - process { - withLabel: cutadapt { - container = "lbmc/cutadapt:2.1" - cpus = 1 - } - } - } - psmn{ - singularity.enabled = true - singularity.cacheDir = "/.singularity_psmn/" - singularity.runOptions = "--bind /Xnfs,/scratch" - process{ - withLabel: cutadapt { - container = "lbmc/cutadapt:2.1" - executor = "sge" - clusterOptions = "-cwd -V" - cpus = 1 - memory = "20GB" - time = "12h" - queue = "monointeldeb128" - } - } - } - ccin2p3 { - singularity.enabled = true - singularity.cacheDir = "$baseDir/.singularity_in2p3/" - singularity.runOptions = "--bind /pbs,/sps,/scratch" - process{ - withLabel: cutadapt { - container = "lbmc/cutadapt:2.1" - scratch = true - stageInMode = "copy" - stageOutMode = "rsync" - executor = "sge" - clusterOptions = "-P P_lbmc -l os=cl7 -l sps=1 -r n" - cpus = 1 - queue = "huge" - } - } - } -} diff --git a/src/nf_modules/cutadapt/adaptor_removal_paired.nf b/src/nf_modules/cutadapt/adaptor_removal_paired.nf deleted file mode 100644 index 0d203733..00000000 --- a/src/nf_modules/cutadapt/adaptor_removal_paired.nf +++ /dev/null @@ -1,25 +0,0 @@ -log.info "fastq files : ${params.fastq}" - -Channel - .fromFilePairs( params.fastq ) - .ifEmpty { error "Cannot find any fastq files matching: ${params.fastq}" } - .set { fastq_files } - -process adaptor_removal { - tag "$pair_id" - publishDir "results/fastq/adaptor_removal/", mode: 'copy' - label "cutadapt" - - input: - set pair_id, file(reads) from fastq_files - - output: - set pair_id, "*_cut_R{1,2}.fastq.gz" into fastq_files_cut - - script: - """ - cutadapt -a AGATCGGAAGAG -g CTCTTCCGATCT -A AGATCGGAAGAG -G CTCTTCCGATCT \ - -o ${pair_id}_cut_R1.fastq.gz -p ${pair_id}_cut_R2.fastq.gz \ - ${reads[0]} ${reads[1]} > ${pair_id}_report.txt - """ -} diff --git a/src/nf_modules/cutadapt/adaptor_removal_single.config b/src/nf_modules/cutadapt/adaptor_removal_single.config deleted file mode 100644 index 33b2179f..00000000 --- a/src/nf_modules/cutadapt/adaptor_removal_single.config +++ /dev/null @@ -1,55 +0,0 @@ -profiles { - docker { - docker.temp = "auto" - docker.enabled = true - process { - withLabel: cutadapt { - container = "lbmc/cutadapt:2.1" - cpus = 1 - } - } - } - singularity { - singularity.enabled = true - singularity.cacheDir = "./bin/" - process { - withLabel: cutadapt { - container = "lbmc/cutadapt:2.1" - cpus = 1 - } - } - } - psmn{ - singularity.enabled = true - singularity.cacheDir = "/.singularity_psmn/" - singularity.runOptions = "--bind /Xnfs,/scratch" - process{ - withLabel: cutadapt { - container = "lbmc/cutadapt:2.1" - executor = "sge" - clusterOptions = "-cwd -V" - cpus = 1 - memory = "20GB" - time = "12h" - queue = "monointeldeb128" - } - } - } - ccin2p3 { - singularity.enabled = true - singularity.cacheDir = "$baseDir/.singularity_in2p3/" - singularity.runOptions = "--bind /pbs,/sps,/scratch" - process{ - withLabel: cutadapt { - container = "lbmc/cutadapt:2.1" - scratch = true - stageInMode = "copy" - stageOutMode = "rsync" - executor = "sge" - clusterOptions = "-P P_lbmc -l os=cl7 -l sps=1 -r n" - cpus = 1 - queue = "huge" - } - } - } -} diff --git a/src/nf_modules/cutadapt/adaptor_removal_single.nf b/src/nf_modules/cutadapt/adaptor_removal_single.nf deleted file mode 100644 index ac2b631e..00000000 --- a/src/nf_modules/cutadapt/adaptor_removal_single.nf +++ /dev/null @@ -1,26 +0,0 @@ -log.info "fastq files : ${params.fastq}" - -Channel - .fromPath( params.fastq ) - .ifEmpty { error "Cannot find any fastq files matching: ${params.fastq}" } - .map { it -> [(it.baseName =~ /([^\.]*)/)[0][1], it]} - .set { fastq_files } - -process adaptor_removal { - tag "$file_id" - label "cutadapt" - - input: - set file_id, file(reads) from fastq_files - - output: - set file_id, "*_cut.fastq.gz" into fastq_files_cut - - script: - """ - cutadapt -a AGATCGGAAGAG -g CTCTTCCGATCT\ - -o ${file_id}_cut.fastq.gz \ - ${reads} > ${file_id}_report.txt - """ -} - diff --git a/src/nf_modules/cutadapt/trimming_paired.config b/src/nf_modules/cutadapt/trimming_paired.config deleted file mode 100644 index 33b2179f..00000000 --- a/src/nf_modules/cutadapt/trimming_paired.config +++ /dev/null @@ -1,55 +0,0 @@ -profiles { - docker { - docker.temp = "auto" - docker.enabled = true - process { - withLabel: cutadapt { - container = "lbmc/cutadapt:2.1" - cpus = 1 - } - } - } - singularity { - singularity.enabled = true - singularity.cacheDir = "./bin/" - process { - withLabel: cutadapt { - container = "lbmc/cutadapt:2.1" - cpus = 1 - } - } - } - psmn{ - singularity.enabled = true - singularity.cacheDir = "/.singularity_psmn/" - singularity.runOptions = "--bind /Xnfs,/scratch" - process{ - withLabel: cutadapt { - container = "lbmc/cutadapt:2.1" - executor = "sge" - clusterOptions = "-cwd -V" - cpus = 1 - memory = "20GB" - time = "12h" - queue = "monointeldeb128" - } - } - } - ccin2p3 { - singularity.enabled = true - singularity.cacheDir = "$baseDir/.singularity_in2p3/" - singularity.runOptions = "--bind /pbs,/sps,/scratch" - process{ - withLabel: cutadapt { - container = "lbmc/cutadapt:2.1" - scratch = true - stageInMode = "copy" - stageOutMode = "rsync" - executor = "sge" - clusterOptions = "-P P_lbmc -l os=cl7 -l sps=1 -r n" - cpus = 1 - queue = "huge" - } - } - } -} diff --git a/src/nf_modules/cutadapt/trimming_paired.nf b/src/nf_modules/cutadapt/trimming_paired.nf deleted file mode 100644 index 9fb317ff..00000000 --- a/src/nf_modules/cutadapt/trimming_paired.nf +++ /dev/null @@ -1,25 +0,0 @@ -log.info "fastq files : ${params.fastq}" - -Channel - .fromFilePairs( params.fastq ) - .ifEmpty { error "Cannot find any fastq files matching: ${params.fastq}" } - .set { fastq_files } - -process trimming { - tag "$pair_id" - publishDir "results/fastq/trimming/", mode: 'copy' - label "cutadapt" - - input: - set pair_id, file(reads) from fastq_files - - output: - set pair_id, "*_trim_R{1,2}.fastq.gz" into fastq_files_trim - - script: - """ - cutadapt -q 20,20 \ - -o ${pair_id}_trim_R1.fastq.gz -p ${pair_id}_trim_R2.fastq.gz \ - ${reads[0]} ${reads[1]} > ${pair_id}_report.txt - """ -} diff --git a/src/nf_modules/cutadapt/trimming_single.config b/src/nf_modules/cutadapt/trimming_single.config deleted file mode 100644 index 33b2179f..00000000 --- a/src/nf_modules/cutadapt/trimming_single.config +++ /dev/null @@ -1,55 +0,0 @@ -profiles { - docker { - docker.temp = "auto" - docker.enabled = true - process { - withLabel: cutadapt { - container = "lbmc/cutadapt:2.1" - cpus = 1 - } - } - } - singularity { - singularity.enabled = true - singularity.cacheDir = "./bin/" - process { - withLabel: cutadapt { - container = "lbmc/cutadapt:2.1" - cpus = 1 - } - } - } - psmn{ - singularity.enabled = true - singularity.cacheDir = "/.singularity_psmn/" - singularity.runOptions = "--bind /Xnfs,/scratch" - process{ - withLabel: cutadapt { - container = "lbmc/cutadapt:2.1" - executor = "sge" - clusterOptions = "-cwd -V" - cpus = 1 - memory = "20GB" - time = "12h" - queue = "monointeldeb128" - } - } - } - ccin2p3 { - singularity.enabled = true - singularity.cacheDir = "$baseDir/.singularity_in2p3/" - singularity.runOptions = "--bind /pbs,/sps,/scratch" - process{ - withLabel: cutadapt { - container = "lbmc/cutadapt:2.1" - scratch = true - stageInMode = "copy" - stageOutMode = "rsync" - executor = "sge" - clusterOptions = "-P P_lbmc -l os=cl7 -l sps=1 -r n" - cpus = 1 - queue = "huge" - } - } - } -} diff --git a/src/nf_modules/cutadapt/trimming_single.nf b/src/nf_modules/cutadapt/trimming_single.nf deleted file mode 100644 index 0d125e7e..00000000 --- a/src/nf_modules/cutadapt/trimming_single.nf +++ /dev/null @@ -1,26 +0,0 @@ -log.info "fastq files : ${params.fastq}" - -Channel - .fromPath( params.fastq ) - .ifEmpty { error "Cannot find any fastq files matching: ${params.fastq}" } - .map { it -> [(it.baseName =~ /([^\.]*)/)[0][1], it]} - .set { fastq_files } - -process trimming { - tag "$file_id" - label "cutadapt" - - input: - set file_id, file(reads) from fastq_files - - output: - set file_id, "*_trim.fastq.gz" into fastq_files_cut - - script: - """ - cutadapt -q 20,20 \ - -o ${file_id}_trim.fastq.gz \ - ${reads} > ${file_id}_report.txt - """ -} - diff --git a/src/nf_modules/deeptools/bam_to_bigwig.config b/src/nf_modules/deeptools/bam_to_bigwig.config deleted file mode 100644 index 9dd57e69..00000000 --- a/src/nf_modules/deeptools/bam_to_bigwig.config +++ /dev/null @@ -1,76 +0,0 @@ -profiles { - docker { - docker.temp = "auto" - docker.enabled = true - process { - withName: index_bam { - container = "lbmc/sambamba:0.6.7" - cpus = 4 - } - withName: bam_to_bigwig { - container = "lbmc/deeptools:3.0.2" - cpus = 4 - } - } - } - singularity { - singularity.enabled = true - singularity.cacheDir = "./bin/" - process { - withName: index_bam { - container = "lbmc/sambamba:0.6.7" - cpus = 4 - } - withName: bam_to_bigwig { - container = "lbmc/deeptools:3.0.2" - cpus = 4 - } - } - } - psmn{ - singularity.enabled = true - singularity.cacheDir = "/.singularity_psmn/" - singularity.runOptions = "--bind /Xnfs,/scratch" - process{ - withName: index_bam { - container = "lbmc/deeptools:3.0.2" - executor = "sge" - clusterOptions = "-cwd -V" - cpus = 32 - memory = "30GB" - time = "24h" - queue = "CLG6242deb384A,CLG6242deb384C,CLG5218deb192A,CLG5218deb192B,CLG5218deb192C,CLG5218deb192D,SLG5118deb96,SLG6142deb384A,SLG6142deb384B,SLG6142deb384C,SLG6142deb384D" - penv = "openmp32" - } - } - } - ccin2p3 { - singularity.enabled = true - singularity.cacheDir = "$baseDir/.singularity_in2p3/" - singularity.runOptions = "--bind /pbs,/sps,/scratch" - process{ - withName: index_bam { - container = "lbmc/sambamba:0.6.7" - scratch = true - stageInMode = "copy" - stageOutMode = "rsync" - executor = "sge" - clusterOptions = "-P P_lbmc -l os=cl7 -l sps=1 -r n\ - " - cpus = 1 - queue = "huge" - } - withName: bam_to_bigwig { - container = "lbmc/deeptools:3.0.2" - scratch = true - stageInMode = "copy" - stageOutMode = "rsync" - executor = "sge" - clusterOptions = "-P P_lbmc -l os=cl7 -l sps=1 -r n\ - " - cpus = 1 - queue = "huge" - } - } - } -} diff --git a/src/nf_modules/deeptools/bam_to_bigwig.nf b/src/nf_modules/deeptools/bam_to_bigwig.nf deleted file mode 100644 index 4c30ee0e..00000000 --- a/src/nf_modules/deeptools/bam_to_bigwig.nf +++ /dev/null @@ -1,49 +0,0 @@ -params.bam = "$baseDir/data/bam/*.bam" - -log.info "bams files : ${params.bam}" - -Channel - .fromPath( params.bam ) - .ifEmpty { error "Cannot find any bam files matching: ${params.bam}" } - .map { it -> [(it.baseName =~ /([^\.]*)/)[0][1], it]} - .set { bam_files } - -bam_files.into{ - bam_files_index; - bam_files_bigwig - } - -process index_bam { - tag "$file_id" - - input: - set file_id, file(bam) from bam_files_index - - output: - set file_id, "*.bam*" into indexed_bam_file - - script: -""" -sambamba index -t ${task.cpus} ${bam} -""" -} - -bam_files_indexed = bam_files_bigwig.join(indexed_bam_file, by: 0) - -process bam_to_bigwig { - tag "$file_id" - - publishDir "results/mapping/bigwig/", mode: 'copy' - - input: - set file_id, file(bam), file(idx) from bam_files_indexed - - output: - set file_id, "*.bw" into bw_files - - script: -""" -bamCoverage -p ${task.cpus} --ignoreDuplicates -b ${bam} -o ${file_id}.bw -""" -} - diff --git a/src/nf_modules/deeptools/compute_matrix.config b/src/nf_modules/deeptools/compute_matrix.config deleted file mode 100644 index 8c9c1b7a..00000000 --- a/src/nf_modules/deeptools/compute_matrix.config +++ /dev/null @@ -1,57 +0,0 @@ -profiles { - docker { - docker.temp = "auto" - docker.enabled = true - process { - withName: compute_matrix { - container = "lbmc/deeptools:3.0.2" - cpus = 4 - } - } - } - singularity { - singularity.enabled = true - singularity.cacheDir = "./bin/" - process { - withName: compute_matrix { - container = "lbmc/deeptools:3.0.2" - cpus = 4 - } - } - } - psmn{ - singularity.enabled = true - singularity.cacheDir = "/.singularity_psmn/" - singularity.runOptions = "--bind /Xnfs,/scratch" - process{ - withName: compute_matrix { - container = "lbmc/deeptools:3.0.2" - executor = "sge" - clusterOptions = "-cwd -V" - cpus = 32 - memory = "30GB" - time = "24h" - queue = "CLG6242deb384A,CLG6242deb384C,CLG5218deb192A,CLG5218deb192B,CLG5218deb192C,CLG5218deb192D,SLG5118deb96,SLG6142deb384A,SLG6142deb384B,SLG6142deb384C,SLG6142deb384D" - penv = "openmp32" - } - } - } - ccin2p3 { - singularity.enabled = true - singularity.cacheDir = "$baseDir/.singularity_in2p3/" - singularity.runOptions = "--bind /pbs,/sps,/scratch" - process{ - withName: compute_matrix { - container = "lbmc/deeptools:3.0.2" - scratch = true - stageInMode = "copy" - stageOutMode = "rsync" - executor = "sge" - clusterOptions = "-P P_lbmc -l os=cl7 -l sps=1 -r n\ - " - cpus = 1 - queue = "huge" - } - } - } -} diff --git a/src/nf_modules/deeptools/compute_matrix.nf b/src/nf_modules/deeptools/compute_matrix.nf deleted file mode 100644 index 2b6e0e91..00000000 --- a/src/nf_modules/deeptools/compute_matrix.nf +++ /dev/null @@ -1,38 +0,0 @@ -params.bw = "$baseDir/data/bigwig/*.bw" -params.bed = "$baseDir/data/annot/*.bed" - -log.info "bigwig files : ${params.bw}" -log.info "bed files : ${params.bed}" - -Channel - .fromPath( params.bw ) - .ifEmpty { error "Cannot find any bigwig files matching: ${params.bw}" } - .set { bw_files } - -Channel - .fromPath( params.bed ) - .ifEmpty { error "Cannot find any bed files matching: ${params.bed}" } - .map { it -> [(it.baseName =~ /([^\.]*)/)[0][1], it]} - .set { bed_files } - -process compute_matrix { - tag "$bed_file_id" - publishDir "results/mapping/region_matrix/", mode: 'copy' - - input: - file bw from bw_files.collect() - set bed_file_id, file(bed) from bed_files.collect() - - output: - set bed_file_id, "*.mat.gz" into region_matrix - - script: -""" -computeMatrix scale-regions -S ${bw} \ - -p ${task.cpus} \ - -R ${bed} \ - --beforeRegionStartLength 100 \ - --afterRegionStartLength 100 \ - -o ${bed_file_id}.mat.gz -""" -} diff --git a/src/nf_modules/deeptools/plot_profile.config b/src/nf_modules/deeptools/plot_profile.config deleted file mode 100644 index 93207846..00000000 --- a/src/nf_modules/deeptools/plot_profile.config +++ /dev/null @@ -1,57 +0,0 @@ -profiles { - docker { - docker.temp = "auto" - docker.enabled = true - process { - withName: plot_profile { - container = "lbmc/deeptools:3.0.2" - cpus = 4 - } - } - } - singularity { - singularity.enabled = true - singularity.cacheDir = "./bin/" - process { - withName: compute_matrix { - container = "lbmc/deeptools:3.0.2" - cpus = 4 - } - } - } - psmn{ - singularity.enabled = true - singularity.cacheDir = "/.singularity_psmn/" - singularity.runOptions = "--bind /Xnfs,/scratch" - process{ - withName: plot_profile { - container = "lbmc/deeptools:3.0.2" - executor = "sge" - clusterOptions = "-cwd -V" - cpus = 32 - memory = "30GB" - time = "24h" - queue = "CLG6242deb384A,CLG6242deb384C,CLG5218deb192A,CLG5218deb192B,CLG5218deb192C,CLG5218deb192D,SLG5118deb96,SLG6142deb384A,SLG6142deb384B,SLG6142deb384C,SLG6142deb384D" - penv = "openmp32" - } - } - } - ccin2p3 { - singularity.enabled = true - singularity.cacheDir = "$baseDir/.singularity_in2p3/" - singularity.runOptions = "--bind /pbs,/sps,/scratch" - process{ - withName: plot_profile { - container = "lbmc/deeptools:3.0.2" - scratch = true - stageInMode = "copy" - stageOutMode = "rsync" - executor = "sge" - clusterOptions = "-P P_lbmc -l os=cl7 -l sps=1 -r n\ - " - cpus = 1 - queue = "huge" - } - } - } -} diff --git a/src/nf_modules/deeptools/plot_profile.nf b/src/nf_modules/deeptools/plot_profile.nf deleted file mode 100644 index dfce4e55..00000000 --- a/src/nf_modules/deeptools/plot_profile.nf +++ /dev/null @@ -1,36 +0,0 @@ -params.matrix = "$baseDir/data/region_matrix/*.mat.gz" -params.title = "plot title" - -log.info "matrix files : ${params.matrix}" -log.info "plot title : ${params.title}" - -Channel - .fromPath( params.matrix ) - .ifEmpty { error "Cannot find any matrix files matching: ${params.matrix}" } - .map { it -> [(it.baseName =~ /([^\.]*)/)[0][1], it]} - .set { matrix_files } - -process plot_profile { - tag "$file_id" - publishDir "results/mapping/region_matrix/", mode: 'copy' - - input: - set file_id, file(matrix) from matrix_files - - output: - set file_id, "*.pdf" into region_matrix - - script: -/* -see more option at -https://deeptools.readthedocs.io/en/develop/content/tools/plotProfile.html -*/ -""" -plotProfile -m ${matrix} \ - --plotFileFormat=pdf \ - -out ${file_id}.pdf \ - --plotType=fill \ - --perGroup \ - --plotTitle "${params.title}" -""" -} diff --git a/src/nf_modules/fastp/fastp_paired.config b/src/nf_modules/fastp/fastp_paired.config deleted file mode 100644 index dc9bf8cd..00000000 --- a/src/nf_modules/fastp/fastp_paired.config +++ /dev/null @@ -1,56 +0,0 @@ -profiles { - docker { - docker.temp = "auto" - docker.enabled = true - process { - withName: fastp_fastq { - container = "lbmc/fastp:0.19.7" - cpus = 1 - } - } - } - singularity { - singularity.enabled = true - singularity.cacheDir = "./bin/" - process { - withName: fastp_fastq { - cpus = 1 - container = "lbmc/fastp:0.19.7" - } - } - } - psmn{ - singularity.enabled = true - singularity.cacheDir = "/.singularity_psmn/" - singularity.runOptions = "--bind /Xnfs,/scratch" - process{ - withName: fastp_fastq { - container = "lbmc/fastp:0.19.7" - executor = "sge" - clusterOptions = "-cwd -V" - cpus = 1 - memory = "20GB" - time = "12h" - queue = "monointeldeb128" - } - } - } - ccin2p3 { - singularity.enabled = true - singularity.cacheDir = "$baseDir/.singularity_in2p3/" - singularity.runOptions = "--bind /pbs,/sps,/scratch" - process{ - withName: fastp_fastq { - container = "lbmc/fastp:0.19.7" - scratch = true - stageInMode = "copy" - stageOutMode = "rsync" - executor = "sge" - clusterOptions = "-P P_lbmc -l os=cl7 -l sps=1 -r n\ - " - cpus = 1 - queue = "huge" - } - } - } -} diff --git a/src/nf_modules/fastp/fastp_paired.nf b/src/nf_modules/fastp/fastp_paired.nf deleted file mode 100644 index 88d6710b..00000000 --- a/src/nf_modules/fastp/fastp_paired.nf +++ /dev/null @@ -1,34 +0,0 @@ -params.fastq = "$baseDir/data/fastq/*_{1,2}.fastq" - -log.info "fastq files : ${params.fastq}" - -Channel - .fromFilePairs( params.fastq ) - .ifEmpty { error "Cannot find any fastq files matching: ${params.fastq}" } - .set { fastq_files } - -process fastp_fastq { - tag "$pair_id" - publishDir "results/fastq/fastp/", mode: 'copy' - - input: - set pair_id, file(reads) from fastq_files - - output: - file "*.{zip,html}" into fastp_report - set pair_id, file "*.fastq.gz" fastq_trim_files - - script: -""" -fastp --thread ${task.cpus} \ ---qualified_quality_phred 20 \ ---disable_length_filtering \ ---detect_adapter_for_pe \ ---in1 ${reads[0]} \ ---in2 ${reads[1]} \ ---out1 ${pair_id}_R1_trim.fastq.gz \ ---out2 ${pair_id}_R2_trim.fastq.gz \ ---html ${pair_id}.html \ ---report_title ${pair_id} -""" -} diff --git a/src/nf_modules/fastp/fastp_single.config b/src/nf_modules/fastp/fastp_single.config deleted file mode 100644 index dc9bf8cd..00000000 --- a/src/nf_modules/fastp/fastp_single.config +++ /dev/null @@ -1,56 +0,0 @@ -profiles { - docker { - docker.temp = "auto" - docker.enabled = true - process { - withName: fastp_fastq { - container = "lbmc/fastp:0.19.7" - cpus = 1 - } - } - } - singularity { - singularity.enabled = true - singularity.cacheDir = "./bin/" - process { - withName: fastp_fastq { - cpus = 1 - container = "lbmc/fastp:0.19.7" - } - } - } - psmn{ - singularity.enabled = true - singularity.cacheDir = "/.singularity_psmn/" - singularity.runOptions = "--bind /Xnfs,/scratch" - process{ - withName: fastp_fastq { - container = "lbmc/fastp:0.19.7" - executor = "sge" - clusterOptions = "-cwd -V" - cpus = 1 - memory = "20GB" - time = "12h" - queue = "monointeldeb128" - } - } - } - ccin2p3 { - singularity.enabled = true - singularity.cacheDir = "$baseDir/.singularity_in2p3/" - singularity.runOptions = "--bind /pbs,/sps,/scratch" - process{ - withName: fastp_fastq { - container = "lbmc/fastp:0.19.7" - scratch = true - stageInMode = "copy" - stageOutMode = "rsync" - executor = "sge" - clusterOptions = "-P P_lbmc -l os=cl7 -l sps=1 -r n\ - " - cpus = 1 - queue = "huge" - } - } - } -} diff --git a/src/nf_modules/fastp/fastp_single.nf b/src/nf_modules/fastp/fastp_single.nf deleted file mode 100644 index 31262172..00000000 --- a/src/nf_modules/fastp/fastp_single.nf +++ /dev/null @@ -1,32 +0,0 @@ -params.fastq = "$baseDir/data/fastq/*.fastq" - -log.info "fastq files : ${params.fastq}" - -Channel - .fromPath( params.fastq ) - .ifEmpty { error "Cannot find any fastq files matching: ${params.fastq}" } - .map { it -> [(it.baseName =~ /([^\.]*)/)[0][1], it]} - .set { fastq_files } - -process fastp_fastq { - tag "$file_id" - publishDir "results/fastq/fastp/", mode: 'copy' - - input: - set file_id, file(reads) from fastq_files - - output: - file "*.{zip,html}" into fastp_report - set file_id, file "*.fastq.gz" fastq_trim_files - - script: -""" -fastp --thread ${task.cpus} \ ---qualified_quality_phred 20 \ ---disable_length_filtering \ ---in1 ${reads} \ ---out1 ${file_id}_R1_trim.fastq.gz \ ---html ${file_id}.html \ ---report_title ${file_id} -""" -} diff --git a/src/nf_modules/fastqc/fastqc_paired.config b/src/nf_modules/fastqc/fastqc_paired.config deleted file mode 100644 index 5f12694b..00000000 --- a/src/nf_modules/fastqc/fastqc_paired.config +++ /dev/null @@ -1,56 +0,0 @@ -profiles { - docker { - docker.temp = "auto" - docker.enabled = true - process { - withName: fastqc_fastq { - container = "lbmc/fastqc:0.11.5" - cpus = 1 - } - } - } - singularity { - singularity.enabled = true - singularity.cacheDir = "./bin/" - process { - withName: fastqc_fastq { - cpus = 1 - container = "lbmc/fastqc:0.11.5" - } - } - } - psmn{ - singularity.enabled = true - singularity.cacheDir = "/.singularity_psmn/" - singularity.runOptions = "--bind /Xnfs,/scratch" - process{ - withName: fastqc_fastq { - container = "lbmc/fastqc:0.11.5" - executor = "sge" - clusterOptions = "-cwd -V" - cpus = 1 - memory = "20GB" - time = "12h" - queue = "monointeldeb128" - } - } - } - ccin2p3 { - singularity.enabled = true - singularity.cacheDir = "$baseDir/.singularity_in2p3/" - singularity.runOptions = "--bind /pbs,/sps,/scratch" - process{ - withName: fastqc_fastq { - container = "lbmc/fastqc:0.11.5" - scratch = true - stageInMode = "copy" - stageOutMode = "rsync" - executor = "sge" - clusterOptions = "-P P_lbmc -l os=cl7 -l sps=1 -r n\ - " - cpus = 1 - queue = "huge" - } - } - } -} diff --git a/src/nf_modules/fastqc/fastqc_paired.nf b/src/nf_modules/fastqc/fastqc_paired.nf deleted file mode 100644 index 6755edec..00000000 --- a/src/nf_modules/fastqc/fastqc_paired.nf +++ /dev/null @@ -1,26 +0,0 @@ -params.fastq = "$baseDir/data/fastq/*_{1,2}.fastq" - -log.info "fastq files : ${params.fastq}" - -Channel - .fromFilePairs( params.fastq ) - .ifEmpty { error "Cannot find any fastq files matching: ${params.fastq}" } - .set { fastq_files } - -process fastqc_fastq { - tag "$pair_id" - publishDir "results/fastq/fastqc/", mode: 'copy' - - input: - set pair_id, file(reads) from fastq_files - - output: - file "*.{zip,html}" into fastqc_report - - script: -""" -fastqc --quiet --threads ${task.cpus} --format fastq --outdir ./ \ -${reads[0]} ${reads[1]} -""" -} - diff --git a/src/nf_modules/fastqc/fastqc_single.config b/src/nf_modules/fastqc/fastqc_single.config deleted file mode 100644 index 5f12694b..00000000 --- a/src/nf_modules/fastqc/fastqc_single.config +++ /dev/null @@ -1,56 +0,0 @@ -profiles { - docker { - docker.temp = "auto" - docker.enabled = true - process { - withName: fastqc_fastq { - container = "lbmc/fastqc:0.11.5" - cpus = 1 - } - } - } - singularity { - singularity.enabled = true - singularity.cacheDir = "./bin/" - process { - withName: fastqc_fastq { - cpus = 1 - container = "lbmc/fastqc:0.11.5" - } - } - } - psmn{ - singularity.enabled = true - singularity.cacheDir = "/.singularity_psmn/" - singularity.runOptions = "--bind /Xnfs,/scratch" - process{ - withName: fastqc_fastq { - container = "lbmc/fastqc:0.11.5" - executor = "sge" - clusterOptions = "-cwd -V" - cpus = 1 - memory = "20GB" - time = "12h" - queue = "monointeldeb128" - } - } - } - ccin2p3 { - singularity.enabled = true - singularity.cacheDir = "$baseDir/.singularity_in2p3/" - singularity.runOptions = "--bind /pbs,/sps,/scratch" - process{ - withName: fastqc_fastq { - container = "lbmc/fastqc:0.11.5" - scratch = true - stageInMode = "copy" - stageOutMode = "rsync" - executor = "sge" - clusterOptions = "-P P_lbmc -l os=cl7 -l sps=1 -r n\ - " - cpus = 1 - queue = "huge" - } - } - } -} diff --git a/src/nf_modules/fastqc/fastqc_single.nf b/src/nf_modules/fastqc/fastqc_single.nf deleted file mode 100644 index ab7e22aa..00000000 --- a/src/nf_modules/fastqc/fastqc_single.nf +++ /dev/null @@ -1,26 +0,0 @@ -params.fastq = "$baseDir/data/fastq/*.fastq" - -log.info "fastq files : ${params.fastq}" - -Channel - .fromPath( params.fastq ) - .ifEmpty { error "Cannot find any fastq files matching: ${params.fastq}" } - .map { it -> [(it.baseName =~ /([^\.]*)/)[0][1], it]} - .set { fastq_files } - -process fastqc_fastq { - tag "$file_id" - publishDir "results/fastq/fastqc/", mode: 'copy' - - input: - set file_id, file(reads) from fastq_files - - output: - file "*.{zip,html}" into fastqc_report - - script: -""" -fastqc --quiet --threads ${task.cpus} --format fastq --outdir ./ ${reads} -""" -} - diff --git a/src/nf_modules/hisat2/indexing.config b/src/nf_modules/hisat2/indexing.config deleted file mode 100644 index 5d154dd4..00000000 --- a/src/nf_modules/hisat2/indexing.config +++ /dev/null @@ -1,57 +0,0 @@ -profiles { - docker { - docker.temp = "auto" - docker.enabled = true - process { - withName: index_fasta { - container = "lbmc/hisat2:2.1.0" - cpus = 4 - } - } - } - singularity { - singularity.enabled = true - singularity.cacheDir = "./bin/" - process { - withName: index_fasta { - cpus = 4 - container = "lbmc/hisat2:2.1.0" - } - } - } - psmn{ - singularity.enabled = true - singularity.cacheDir = "/.singularity_psmn/" - singularity.runOptions = "--bind /Xnfs,/scratch" - process{ - withName: index_fasta { - container = "lbmc/hisat2:2.1.0" - executor = "sge" - clusterOptions = "-cwd -V" - memory = "20GB" - cpus = 32 - time = "12h" - queue = "CLG6242deb384A,CLG6242deb384C,CLG5218deb192A,CLG5218deb192B,CLG5218deb192C,CLG5218deb192D,SLG5118deb96,SLG6142deb384A,SLG6142deb384B,SLG6142deb384C,SLG6142deb384D" - penv = "openmp32" - } - } - } - ccin2p3 { - singularity.enabled = true - singularity.cacheDir = "$baseDir/.singularity_in2p3/" - singularity.runOptions = "--bind /pbs,/sps,/scratch" - process{ - withName: index_fasta { - container = "lbmc/hisat2:2.1.0" - scratch = true - stageInMode = "copy" - stageOutMode = "rsync" - executor = "sge" - clusterOptions = "-P P_lbmc -l os=cl7 -l sps=1 -r n\ - " - cpus = 1 - queue = "huge" - } - } - } -} diff --git a/src/nf_modules/hisat2/indexing.nf b/src/nf_modules/hisat2/indexing.nf deleted file mode 100644 index 1b11b3ef..00000000 --- a/src/nf_modules/hisat2/indexing.nf +++ /dev/null @@ -1,32 +0,0 @@ -/* -* Hisat2 : -* Imputs : fastq files -* Imputs : fasta files -* Output : bam files -*/ - -/* fasta indexing */ -params.fasta = "$baseDir/data/bam/*.fasta" - -log.info "fasta files : ${params.fasta}" - -Channel - .fromPath( params.fasta ) - .ifEmpty { error "Cannot find any fasta files matching: ${params.fasta}" } - .set { fasta_file } - -process index_fasta { - tag "$fasta.baseName" - publishDir "results/mapping/index/", mode: 'copy' - - input: - file fasta from fasta_file - - output: - file "*.index*" into index_files - - script: -""" -hisat2-build -p ${task.cpus} ${fasta} ${fasta.baseName}.index -""" -} diff --git a/src/nf_modules/hisat2/mapping_paired.config b/src/nf_modules/hisat2/mapping_paired.config deleted file mode 100644 index 964db521..00000000 --- a/src/nf_modules/hisat2/mapping_paired.config +++ /dev/null @@ -1,55 +0,0 @@ -profiles { - docker { - docker.temp = "auto" - docker.enabled = true - process { - withName: mapping_fastq { - cpus = 4 - container = "lbmc/hisat2:2.1.0" - } - } - } - singularity { - singularity.enabled = true - singularity.cacheDir = "./bin/" - process { - withName: mapping_fastq { - cpus = 4 - container = "lbmc/hisat2:2.1.0" - } - } - } - sge { - process{ - withName: mapping_fastq { - beforeScript = "source /usr/share/lmod/lmod/init/bash; module use ~/privatemodules" - module = "hisat2/2.1.0:samtools/1.7" - executor = "sge" - clusterOptions = "-cwd -V" - memory = "20GB" - cpus = 32 - time = "12h" - queue = "CLG6242deb384A,CLG6242deb384C,CLG5218deb192A,CLG5218deb192B,CLG5218deb192C,CLG5218deb192D,SLG5118deb96,SLG6142deb384A,SLG6142deb384B,SLG6142deb384C,SLG6142deb384D" - penv = "openmp32" - } - } - } - ccin2p3 { - singularity.enabled = true - singularity.cacheDir = "$baseDir/.singularity_in2p3/" - singularity.runOptions = "--bind /pbs,/sps,/scratch" - process{ - withName: mapping_fastq { - container = "lbmc/hisat2:2.1.0" - scratch = true - stageInMode = "copy" - stageOutMode = "rsync" - executor = "sge" - clusterOptions = "-P P_lbmc -l os=cl7 -l sps=1 -r n\ - " - cpus = 1 - queue = "huge" - } - } - } -} diff --git a/src/nf_modules/hisat2/mapping_paired.nf b/src/nf_modules/hisat2/mapping_paired.nf deleted file mode 100644 index 28b37e00..00000000 --- a/src/nf_modules/hisat2/mapping_paired.nf +++ /dev/null @@ -1,48 +0,0 @@ -params.fastq = "$baseDir/data/fastq/*_{1,2}.fastq" -params.index = "$baseDir/data/index/*.index.*" - -log.info "fastq files : ${params.fastq}" -log.info "index files : ${params.index}" - -Channel - .fromFilePairs( params.fastq ) - .ifEmpty { error "Cannot find any fastq files matching: ${params.fastq}" } - .set { fastq_files } -Channel - .fromPath( params.index ) - .ifEmpty { error "Cannot find any index files matching: ${params.index}" } - .set { index_files } - -process mapping_fastq { - tag "$pair_id" - publishDir "results/mapping/", mode: 'copy' - - input: - set pair_id, file(reads) from fastq_files - file index from index_files.collect() - - output: - file "*" into counts_files - set pair_id, "*.bam" into bam_files - file "*_report.txt" into mapping_report - - script: - index_id = index[0] - for (index_file in index) { - if (index_file =~ /.*\.1\.ht2/ && !(index_file =~ /.*\.rev\.1\.ht2/)) { - index_id = ( index_file =~ /(.*)\.1\.ht2/)[0][1] - } - } -""" -hisat2 -p ${task.cpus} \ - -x ${index_id} \ - -1 ${reads[0]} \ - -2 ${reads[1]} 2> \ -${pair_id}_hisat2_report.txt | \ -samtools view -Sb - > ${pair_id}.bam - -if grep -q "Error" ${pair_id}_hisat2_report.txt; then - exit 1 -fi -""" -} diff --git a/src/nf_modules/hisat2/mapping_single.config b/src/nf_modules/hisat2/mapping_single.config deleted file mode 100644 index 964db521..00000000 --- a/src/nf_modules/hisat2/mapping_single.config +++ /dev/null @@ -1,55 +0,0 @@ -profiles { - docker { - docker.temp = "auto" - docker.enabled = true - process { - withName: mapping_fastq { - cpus = 4 - container = "lbmc/hisat2:2.1.0" - } - } - } - singularity { - singularity.enabled = true - singularity.cacheDir = "./bin/" - process { - withName: mapping_fastq { - cpus = 4 - container = "lbmc/hisat2:2.1.0" - } - } - } - sge { - process{ - withName: mapping_fastq { - beforeScript = "source /usr/share/lmod/lmod/init/bash; module use ~/privatemodules" - module = "hisat2/2.1.0:samtools/1.7" - executor = "sge" - clusterOptions = "-cwd -V" - memory = "20GB" - cpus = 32 - time = "12h" - queue = "CLG6242deb384A,CLG6242deb384C,CLG5218deb192A,CLG5218deb192B,CLG5218deb192C,CLG5218deb192D,SLG5118deb96,SLG6142deb384A,SLG6142deb384B,SLG6142deb384C,SLG6142deb384D" - penv = "openmp32" - } - } - } - ccin2p3 { - singularity.enabled = true - singularity.cacheDir = "$baseDir/.singularity_in2p3/" - singularity.runOptions = "--bind /pbs,/sps,/scratch" - process{ - withName: mapping_fastq { - container = "lbmc/hisat2:2.1.0" - scratch = true - stageInMode = "copy" - stageOutMode = "rsync" - executor = "sge" - clusterOptions = "-P P_lbmc -l os=cl7 -l sps=1 -r n\ - " - cpus = 1 - queue = "huge" - } - } - } -} diff --git a/src/nf_modules/hisat2/mapping_single.nf b/src/nf_modules/hisat2/mapping_single.nf deleted file mode 100644 index 0fdb729e..00000000 --- a/src/nf_modules/hisat2/mapping_single.nf +++ /dev/null @@ -1,53 +0,0 @@ -/* -* for single-end data -*/ - -params.fastq = "$baseDir/data/fastq/*.fastq" -params.index = "$baseDir/data/index/*.index*" - -log.info "fastq files : ${params.fastq}" -log.info "index files : ${params.index}" - -Channel - .fromPath( params.fastq ) - .ifEmpty { error "Cannot find any fastq files matching: ${params.fastq}" } - .map { it -> [(it.baseName =~ /([^\.]*)/)[0][1], it]} - .set { fastq_files } -Channel - .fromPath( params.index ) - .ifEmpty { error "Cannot find any index files matching: ${params.index}" } - .set { index_files } - -process mapping_fastq { - tag "$file_id" - publishDir "results/mapping/", mode: 'copy' - - input: - set file_id, file(reads) from fastq_files - file index from index_files.collect() - - output: - file "*" into count_files - set file_id, "*.bam" into bam_files - file "*_report.txt" into mapping_report - - script: - index_id = index[0] - for (index_file in index) { - if (index_file =~ /.*\.1\.ht2/ && !(index_file =~ /.*\.rev\.1\.ht2/)) { - index_id = ( index_file =~ /(.*)\.1\.ht2/)[0][1] - } - } -""" -hisat2 -p ${task.cpus} \ - -x ${index_id} \ - -U ${reads} 2> \ -${file_id}_hisat2_report.txt | \ -samtools view -Sb - > ${file_id}.bam - -if grep -q "Error" ${file_id}_hisat2_report.txt; then - exit 1 -fi - -""" -} diff --git a/src/nf_modules/htseq/htseq.config b/src/nf_modules/htseq/htseq.config deleted file mode 100644 index 931ca784..00000000 --- a/src/nf_modules/htseq/htseq.config +++ /dev/null @@ -1,75 +0,0 @@ -profiles { - docker { - docker.temp = "auto" - docker.enabled = true - process { - withName: sort_bam { - container = "lbmc/samtools:1.7" - cpus = 1 - } - withName: counting { - container = "lbmc/htseq:0.11.2" - cpus = 1 - } - } - } - singularity { - singularity.enabled = true - singularity.cacheDir = "./bin/" - process { - withName: sort_bam { - container = "lbmc/samtools:1.7" - cpus = 1 - } - withName: counting { - container = "lbmc/htseq:0.11.2" - cpus = 1 - } - } - } - psmn{ - singularity.enabled = true - singularity.cacheDir = "/.singularity_psmn/" - singularity.runOptions = "--bind /Xnfs,/scratch" - process{ - withName: sort_bam { - container = "lbmc/htseq:0.11.2" - executor = "sge" - clusterOptions = "-cwd -V" - cpus = 1 - memory = "20GB" - time = "12h" - queue = "monointeldeb128" - } - } - } - ccin2p3 { - singularity.enabled = true - singularity.cacheDir = "$baseDir/.singularity_in2p3/" - singularity.runOptions = "--bind /pbs,/sps,/scratch" - process{ - withName: sort_bam { - container = "lbmc/samtools:1.7" - scratch = true - stageInMode = "copy" - stageOutMode = "rsync" - executor = "sge" - clusterOptions = "-P P_lbmc -l os=cl7 -l sps=1 -r n\ - " - cpus = 1 - queue = "huge" - } - withName: counting { - container = "lbmc/htseq:0.11.2" - scratch = true - stageInMode = "copy" - stageOutMode = "rsync" - executor = "sge" - clusterOptions = "-P P_lbmc -l os=cl7 -l sps=1 -r n\ - " - cpus = 1 - queue = "huge" - } - } - } -} diff --git a/src/nf_modules/htseq/htseq.nf b/src/nf_modules/htseq/htseq.nf deleted file mode 100644 index 7cade9a5..00000000 --- a/src/nf_modules/htseq/htseq.nf +++ /dev/null @@ -1,52 +0,0 @@ -params.bam = "$baseDir/data/bam/*.bam" -params.gtf = "$baseDir/data/annotation/*.gtf" - -log.info "bam files : ${params.bam}" -log.info "gtf files : ${params.gtf}" - -Channel - .fromPath( params.bam ) - .ifEmpty { error "Cannot find any fastq files matching: ${params.bam}" } - .map { it -> [(it.baseName =~ /([^\.]*)/)[0][1], it]} - .set { bam_files } -Channel - .fromPath( params.gtf ) - .ifEmpty { error "Cannot find any gtf file matching: ${params.gtf}" } - .set { gtf_file } - -process sort_bam { - tag "$file_id" - cpus 4 - - input: - set file_id, file(bam) from bam_files - - output: - set file_id, "*_sorted.sam" into sorted_bam_files - - script: -""" -# sort bam by name -samtools sort -@ ${task.cpus} -n -O SAM -o ${file_id}_sorted.sam ${bam} -""" -} - -process counting { - tag "$file_id" - publishDir "results/quantification/", mode: 'copy' - - input: - set file_id, file(bam) from sorted_bam_files - file gtf from gtf_file - - output: - file "*.count" into count_files - - script: -""" -htseq-count ${bam} ${gtf} \ --r pos --mode=intersection-nonempty -a 10 -s no -t exon -i gene_id \ -> ${file_id}.count -""" -} - diff --git a/src/nf_modules/kallisto/indexing.config b/src/nf_modules/kallisto/indexing.config deleted file mode 100644 index 1f3f39e8..00000000 --- a/src/nf_modules/kallisto/indexing.config +++ /dev/null @@ -1,57 +0,0 @@ -profiles { - docker { - docker.temp = "auto" - docker.enabled = true - process { - withLabel kallisto { - container = "lbmc/kallisto:0.44.0" - cpus = 4 - } - } - } - singularity { - singularity.enabled = true - singularity.cacheDir = "./bin/" - process { - withLabel: kallisto { - container = "lbmc/kallisto:0.44.0" - cpus = 4 - } - } - } - psmn{ - singularity.enabled = true - singularity.cacheDir = "/.singularity_psmn/" - singularity.runOptions = "--bind /Xnfs,/scratch" - process{ - withLabel: kallisto { - container = "lbmc/kallisto:0.44.0" - executor = "sge" - clusterOptions = "-cwd -V" - cpus = 32 - memory = "30GB" - time = "24h" - queue = "CLG6242deb384A,CLG6242deb384C,CLG5218deb192A,CLG5218deb192B,CLG5218deb192C,CLG5218deb192D,SLG5118deb96,SLG6142deb384A,SLG6142deb384B,SLG6142deb384C,SLG6142deb384D" - penv = "openmp32" - } - } - } - ccin2p3 { - singularity.enabled = true - singularity.cacheDir = "$baseDir/.singularity_in2p3/" - singularity.runOptions = "--bind /pbs,/sps,/scratch" - process{ - withLabel: kallisto { - container = "lbmc/kallisto:0.44.0" - scratch = true - stageInMode = "copy" - stageOutMode = "rsync" - executor = "sge" - clusterOptions = "-P P_lbmc -l os=cl7 -l sps=1 -r n\ - " - cpus = 1 - queue = "huge" - } - } - } -} diff --git a/src/nf_modules/kallisto/indexing.nf b/src/nf_modules/kallisto/indexing.nf deleted file mode 100644 index 5b0fba5e..00000000 --- a/src/nf_modules/kallisto/indexing.nf +++ /dev/null @@ -1,28 +0,0 @@ -params.fasta = "$baseDir/data/bam/*.fasta" - -log.info "fasta files : ${params.fasta}" - -Channel - .fromPath( params.fasta ) - .ifEmpty { error "Cannot find any bam files matching: ${params.fasta}" } - .set { fasta_file } - -process index_fasta { - tag "$fasta.baseName" - publishDir "results/mapping/index/", mode: 'copy' - label "kallisto" - - input: - file fasta from fasta_file - - output: - file "*.index*" into index_files - file "*_kallisto_report.txt" into index_files_report - - script: -""" -kallisto index -k 31 --make-unique -i ${fasta.baseName}.index ${fasta} \ -2> ${fasta.baseName}_kallisto_report.txt -""" -} - diff --git a/src/nf_modules/kallisto/mapping_paired.config b/src/nf_modules/kallisto/mapping_paired.config deleted file mode 100644 index 962e1fdc..00000000 --- a/src/nf_modules/kallisto/mapping_paired.config +++ /dev/null @@ -1,59 +0,0 @@ -profiles { - docker { - docker.temp = "auto" - docker.enabled = true - process { - withLabel: kallisto { - container = "lbmc/kallisto:0.44.0" - cpus = 4 - } - } - } - singularity { - singularity.enabled = true - singularity.cacheDir = "./bin/" - process { - withLabel: kallisto { - container = "lbmc/kallisto:0.44.0" - cpus = 4 - } - } - } - psmn{ - singularity.enabled = true - singularity.cacheDir = "/.singularity_psmn/" - singularity.runOptions = "--bind /Xnfs,/scratch" - process{ - withLabel: kallisto { - container = "lbmc/kallisto:0.44.0" - executor = "sge" - clusterOptions = "-cwd -V" - cpus = 32 - memory = "30GB" - time = "24h" - queue = "CLG6242deb384A,CLG6242deb384C,CLG5218deb192A,CLG5218deb192B,CLG5218deb192C,CLG5218deb192D,SLG5118deb96,SLG6142deb384A,SLG6142deb384B,SLG6142deb384C,SLG6142deb384D" - penv = "openmp32" - } - } - } - ccin2p3 { - singularity.enabled = true - singularity.cacheDir = "$baseDir/.singularity_in2p3/" - singularity.runOptions = "--bind /pbs,/sps,/scratch" - process{ - withLabel: kallisto { - container = "lbmc/kallisto:0.44.0" - scratch = true - stageInMode = "copy" - stageOutMode = "rsync" - executor = "sge" - clusterOptions = "-P P_lbmc -l os=cl7 -l sps=1 -r n\ - " - cpus = 1 - queue = "huge" - } - } - } -} - - diff --git a/src/nf_modules/kallisto/mapping_paired.nf b/src/nf_modules/kallisto/mapping_paired.nf deleted file mode 100644 index 56f13000..00000000 --- a/src/nf_modules/kallisto/mapping_paired.nf +++ /dev/null @@ -1,36 +0,0 @@ -params.fastq = "$baseDir/data/fastq/*_{1,2}.fastq" -params.index = "$baseDir/data/index/*.index.*" - -log.info "fastq files : ${params.fastq}" -log.info "index files : ${params.index}" - -Channel - .fromFilePairs( params.fastq ) - .ifEmpty { error "Cannot find any fastq files matching: ${params.fastq}" } - .set { fastq_files } -Channel - .fromPath( params.index ) - .ifEmpty { error "Cannot find any index files matching: ${params.index}" } - .set { index_files } - -process mapping_fastq { - tag "$reads" - publishDir "results/mapping/quantification/", mode: 'copy' - label "kallisto" - - input: - set pair_id, file(reads) from fastq_files - file index from index_files.collect() - - output: - file "*" into counts_files - - script: -""" -mkdir ${pair_id} -kallisto quant -i ${index} -t ${task.cpus} \ ---bias --bootstrap-samples 100 -o ${pair_id} \ -${reads[0]} ${reads[1]} &> ${pair_id}/kallisto_report.txt -""" -} - diff --git a/src/nf_modules/kallisto/mapping_single.config b/src/nf_modules/kallisto/mapping_single.config deleted file mode 100644 index 962e1fdc..00000000 --- a/src/nf_modules/kallisto/mapping_single.config +++ /dev/null @@ -1,59 +0,0 @@ -profiles { - docker { - docker.temp = "auto" - docker.enabled = true - process { - withLabel: kallisto { - container = "lbmc/kallisto:0.44.0" - cpus = 4 - } - } - } - singularity { - singularity.enabled = true - singularity.cacheDir = "./bin/" - process { - withLabel: kallisto { - container = "lbmc/kallisto:0.44.0" - cpus = 4 - } - } - } - psmn{ - singularity.enabled = true - singularity.cacheDir = "/.singularity_psmn/" - singularity.runOptions = "--bind /Xnfs,/scratch" - process{ - withLabel: kallisto { - container = "lbmc/kallisto:0.44.0" - executor = "sge" - clusterOptions = "-cwd -V" - cpus = 32 - memory = "30GB" - time = "24h" - queue = "CLG6242deb384A,CLG6242deb384C,CLG5218deb192A,CLG5218deb192B,CLG5218deb192C,CLG5218deb192D,SLG5118deb96,SLG6142deb384A,SLG6142deb384B,SLG6142deb384C,SLG6142deb384D" - penv = "openmp32" - } - } - } - ccin2p3 { - singularity.enabled = true - singularity.cacheDir = "$baseDir/.singularity_in2p3/" - singularity.runOptions = "--bind /pbs,/sps,/scratch" - process{ - withLabel: kallisto { - container = "lbmc/kallisto:0.44.0" - scratch = true - stageInMode = "copy" - stageOutMode = "rsync" - executor = "sge" - clusterOptions = "-P P_lbmc -l os=cl7 -l sps=1 -r n\ - " - cpus = 1 - queue = "huge" - } - } - } -} - - diff --git a/src/nf_modules/kallisto/mapping_single.nf b/src/nf_modules/kallisto/mapping_single.nf deleted file mode 100644 index 7ae21280..00000000 --- a/src/nf_modules/kallisto/mapping_single.nf +++ /dev/null @@ -1,42 +0,0 @@ -params.fastq = "$baseDir/data/fastq/*.fastq" -params.index = "$baseDir/data/index/*.index*" -params.mean = 200 -params.sd = 100 - -log.info "fastq files : ${params.fastq}" -log.info "index files : ${params.index}" -log.info "mean read size: ${params.mean}" -log.info "sd read size: ${params.sd}" - -Channel - .fromPath( params.fastq ) - .ifEmpty { error "Cannot find any fastq files matching: ${params.fastq}" } - .map { it -> [(it.baseName =~ /([^\.]*)/)[0][1], it]} - .set { fastq_files } -Channel - .fromPath( params.index ) - .ifEmpty { error "Cannot find any index files matching: ${params.index}" } - .set { index_files } - -process mapping_fastq { - tag "$file_id" - publishDir "results/mapping/quantification/", mode: 'copy' - label "kallisto" - - input: - set file_id, file(reads) from fastq_files - file index from index_files.collect() - - output: - file "*" into count_files - - script: -""" -mkdir ${file_id} -kallisto quant -i ${index} -t ${task.cpus} --single \ ---bias --bootstrap-samples 100 -o ${file_id} \ --l ${params.mean} -s ${params.sd} \ -${reads} &> ${file_id}/kallisto_report.txt -""" -} - diff --git a/src/nf_modules/macs2/peak_calling.config b/src/nf_modules/macs2/peak_calling.config deleted file mode 100644 index d3cbbdb9..00000000 --- a/src/nf_modules/macs2/peak_calling.config +++ /dev/null @@ -1,57 +0,0 @@ -profiles { - docker { - docker.temp = "auto" - docker.enabled = true - process { - withName: peak_calling { - container = "lbmc/macs2:2.1.2" - cpus = 4 - } - } - } - singularity { - singularity.enabled = true - singularity.cacheDir = "./bin/" - process { - withName: peak_calling { - container = "lbmc/macs2:2.1.2" - cpus = 4 - } - } - } - psmn{ - singularity.enabled = true - singularity.cacheDir = "/.singularity_psmn/" - singularity.runOptions = "--bind /Xnfs,/scratch" - process{ - withName: peak_calling { - container = "lbmc/macs2:2.1.2" - executor = "sge" - clusterOptions = "-cwd -V" - cpus = 32 - memory = "30GB" - time = "24h" - queue = "CLG6242deb384A,CLG6242deb384C,CLG5218deb192A,CLG5218deb192B,CLG5218deb192C,CLG5218deb192D,SLG5118deb96,SLG6142deb384A,SLG6142deb384B,SLG6142deb384C,SLG6142deb384D" - penv = "openmp32" - } - } - } - ccin2p3 { - singularity.enabled = true - singularity.cacheDir = "$baseDir/.singularity_in2p3/" - singularity.runOptions = "--bind /pbs,/sps,/scratch" - process{ - withName: peak_calling { - container = "lbmc/macs2:2.1.2" - scratch = true - stageInMode = "copy" - stageOutMode = "rsync" - executor = "sge" - clusterOptions = "-P P_lbmc -l os=cl7 -l sps=1 -r n\ - " - cpus = 1 - queue = "huge" - } - } - } -} diff --git a/src/nf_modules/macs2/peak_calling.nf b/src/nf_modules/macs2/peak_calling.nf deleted file mode 100644 index 12398f2e..00000000 --- a/src/nf_modules/macs2/peak_calling.nf +++ /dev/null @@ -1,52 +0,0 @@ -params.genome_size = "hs" -params.control_tag = "control" -log.info "bam files : ${params.bam}" -log.info "genome size : ${params.genome_size}" -log.info "control tag : ${params.control_tag}" - -Channel - .fromPath( params.bam ) - .ifEmpty { error "Cannot find any bam files matching: ${params.bam}" } - .map { it -> [(it.baseName =~ /([^\.]*)/)[0][1], it]} - .set { bam_files } - -/* split bam Channel into control and ip if "control" keyword is detected*/ -bam_files_control = Channel.create() -bam_files_ip = Channel.create() -bam_files.choice( - bam_files_control, - bam_files_ip ) { a -> a[0] =~ /.*${params.control_tag}.*/ ? 0 : 1 } - -process peak_calling { - tag "${file_id}" - publishDir "results/peak_calling/${file_id}", mode: 'copy' - - input: - set file_id, file(file_ip) from bam_files_ip - set file_id_control, file(file_control) from bam_files_control - .ifEmpty { - error "Cannot find any bam files matching: ${params.control_tag}" - } - .collect() - - output: - file "*" into peak_output - file "*_report.txt" into peak_calling_report - - script: -/* remove --nomodel option for real dataset */ -""" -macs2 callpeak \ - --nomodel \ - --treatment ${file_ip} \ - --control ${file_control} \ - --name ${file_id} \ - --gsize ${params.genome_size} 2> \ -${file_ip}_macs2_report.txt - -if grep -q "ERROR" ${file_ip}_macs2_report.txt; then - echo "MACS2 error" - exit 1 -fi -""" -} diff --git a/src/nf_modules/multiqc/multiqc_paired.config b/src/nf_modules/multiqc/multiqc_paired.config deleted file mode 100644 index 2d786124..00000000 --- a/src/nf_modules/multiqc/multiqc_paired.config +++ /dev/null @@ -1,84 +0,0 @@ - -profiles { - docker { - docker.temp = "auto" - docker.enabled = true - process { - withName: fastqc_fastq { - container = "lbmc/fastqc:0.11.5" - cpus = 1 - } - withName: multiqc { - container = "lbmc/multiqc:1.7" - cpus = 1 - } - } - } - singularity { - singularity.enabled = true - singularity.cacheDir = "./bin/" - process { - withName: fastqc_fastq { - container = "lbmc/fastqc:0.11.5" - cpus = 1 - } - withName: multiqc { - container = "lbmc/multiqc:1.7" - cpus = 1 - } - } - } - psmn{ - singularity.enabled = true - singularity.cacheDir = "/.singularity_psmn/" - singularity.runOptions = "--bind /Xnfs,/scratch" - process{ - withName: fastqc_fastq { - container = "lbmc/fastqc:0.11.5" - executor = "sge" - clusterOptions = "-cwd -V" - cpus = 1 - memory = "5GB" - time = "6h" - queue = "monointeldeb128" - } - withName: multiqc { - container = "lbmc/multiqc:1.7" - executor = "sge" - clusterOptions = "-cwd -V" - cpus = 1 - memory = "5GB" - time = "6h" - queue = "monointeldeb128" - } - } - } - ccin2p3 { - singularity.enabled = true - singularity.cacheDir = "$baseDir/.singularity_in2p3/" - singularity.runOptions = "--bind /pbs,/sps,/scratch" - process{ - withName: fastq_fastqc { - container = "lbmc/fastqc:0.11.5" - scratch = true - stageInMode = "copy" - stageOutMode = "rsync" - executor = "sge" - clusterOptions = "-P P_lbmc -l os=cl7 -l sps=1 -r" - cpus = 1 - queue = "huge" - } - withName: multiqc { - container = "lbmc/multiqc:1.7" - scratch = true - stageInMode = "copy" - stageOutMode = "rsync" - executor = "sge" - clusterOptions = "-P P_lbmc -l os=cl7 -l sps=1 -r" - cpus = 1 - queue = "huge" - } - } - } -} - diff --git a/src/nf_modules/multiqc/multiqc_paired.nf b/src/nf_modules/multiqc/multiqc_paired.nf deleted file mode 100644 index b459a9bb..00000000 --- a/src/nf_modules/multiqc/multiqc_paired.nf +++ /dev/null @@ -1,43 +0,0 @@ -params.fastq = "$baseDir/data/fastq/*_{1,2}.fastq" - -log.info "fastq files : ${params.fastq}" - -Channel - .fromFilePairs( params.fastq ) - .ifEmpty { error "Cannot find any fastq files matching: ${params.fastq}" } - .set { fastq_files } - -process fastqc_fastq { - tag "$pair_id" - publishDir "results/fastq/fastqc/", mode: 'copy' - - input: - set pair_id, file(reads) from fastq_files - - output: - file "*.{zip,html}" into fastqc_report - - script: -""" -fastqc --quiet --threads ${task.cpus} --format fastq --outdir ./ \ -${reads[0]} ${reads[1]} -""" -} - -process multiqc { - tag "$report[0].baseName" - publishDir "results/fastq/multiqc/", mode: 'copy' - cpus = 1 - - input: - file report from fastqc_report.collect() - - output: - file "*multiqc_*" into multiqc_report - - script: -""" -multiqc -f . -""" -} - diff --git a/src/nf_modules/multiqc/multiqc_single.config b/src/nf_modules/multiqc/multiqc_single.config deleted file mode 100644 index 75f2f9aa..00000000 --- a/src/nf_modules/multiqc/multiqc_single.config +++ /dev/null @@ -1,82 +0,0 @@ -profiles { - docker { - docker.temp = "auto" - docker.enabled = true - process { - withName: fastqc_fastq { - container = "lbmc/fastqc:0.11.5" - cpus = 1 - } - withName: multiqc { - container = "lbmc/multiqc:1.7" - cpus = 1 - } - } - } - singularity { - singularity.enabled = true - singularity.cacheDir = "./bin/" - process { - withName: fastqc_fastq { - container = "lbmc/fastqc:0.11.5" - cpus = 1 - } - withName: multiqc { - container = "lbmc/multiqc:1.7" - cpus = 1 - } - } - } - psmn{ - singularity.enabled = true - singularity.cacheDir = "/.singularity_psmn/" - singularity.runOptions = "--bind /Xnfs,/scratch" - process{ - withName: fastqc_fastq { - container = "lbmc/fastqc:0.11.5" - executor = "sge" - clusterOptions = "-cwd -V" - cpus = 1 - memory = "5GB" - time = "6h" - queue = "monointeldeb128" - } - withName: multiqc { - container = "lbmc/multiqc:1.7" - executor = "sge" - clusterOptions = "-cwd -V" - cpus = 1 - memory = "5GB" - time = "6h" - queue = "monointeldeb128" - } - } - } - ccin2p3 { - singularity.enabled = true - singularity.cacheDir = "$baseDir/.singularity_in2p3/" - singularity.runOptions = "--bind /pbs,/sps,/scratch" - process{ - withName: fastq_fastqc { - container = "lbmc/fastqc:0.11.5" - scratch = true - stageInMode = "copy" - stageOutMode = "rsync" - executor = "sge" - clusterOptions = "-P P_lbmc -l os=cl7 -l sps=1 -r" - cpus = 1 - queue = "huge" - } - withName: multiqc { - container = "lbmc/multiqc:1.7" - scratch = true - stageInMode = "copy" - stageOutMode = "rsync" - executor = "sge" - clusterOptions = "-P P_lbmc -l os=cl7 -l sps=1 -r" - cpus = 1 - queue = "huge" - } - } - } -} diff --git a/src/nf_modules/multiqc/multiqc_single.nf b/src/nf_modules/multiqc/multiqc_single.nf deleted file mode 100644 index ea1115b5..00000000 --- a/src/nf_modules/multiqc/multiqc_single.nf +++ /dev/null @@ -1,44 +0,0 @@ -params.fastq = "$baseDir/data/fastq/*.fastq" - -log.info "fastq files : ${params.fastq}" - -Channel - .fromPath( params.fastq ) - .ifEmpty { error "Cannot find any fastq files matching: ${params.fastq}" } - .map { it -> [(it.baseName =~ /([^\.]*)/)[0][1], it]} - .set { fastq_files } - -process fastqc_fastq { - tag "$file_id" - publishDir "results/fastq/fastqc/", mode: 'copy' - cpus = 1 - - input: - set file_id, file(reads) from fastq_files - - output: - file "*.{zip,html}" into fastqc_report - - script: -""" -fastqc --quiet --threads ${task.cpus} --format fastq --outdir ./ ${reads} -""" -} - -process multiqc { - tag "$report[0].baseName" - publishDir "results/fastq/multiqc/", mode: 'copy' - cpus = 1 - - input: - file report from fastqc_report.collect() - - output: - file "*multiqc_*" into multiqc_report - - script: -""" -multiqc -f . -""" -} - diff --git a/src/nf_modules/music/peak_calling_single.config b/src/nf_modules/music/peak_calling_single.config deleted file mode 100644 index dea6fa7b..00000000 --- a/src/nf_modules/music/peak_calling_single.config +++ /dev/null @@ -1,94 +0,0 @@ -profiles { - docker { - docker.temp = "auto" - docker.enabled = true - process { - withName: compute_mappability { - container = "lbmc/music:6613c53" - cpus = 1 - } - withName: music_preprocessing { - container = "lbmc/music:6613c53" - cpus = 1 - } - withName: music_computation{ - container = "lbmc/music:6613c53" - cpus = 1 - } - } - } - singularity { - singularity.enabled = true - singularity.cacheDir = "./bin/" - process { - withName: compute_mappability { - container = "lbmc/music:6613c53" - cpus = 1 - } - withName: music_preprocessing { - container = "lbmc/music:6613c53" - cpus = 1 - } - withName: music_computation{ - container = "lbmc/music:6613c53" - cpus = 1 - } - } - } - psmn{ - singularity.enabled = true - singularity.cacheDir = "/.singularity_psmn/" - singularity.runOptions = "--bind /Xnfs,/scratch" - process{ - withName: compute_mappability { - container = "lbmc/music:6613c53" - executor = "sge" - clusterOptions = "-cwd -V" - cpus = 1 - memory = "20GB" - time = "12h" - queue = "monointeldeb128" - } - } - } - ccin2p3 { - singularity.enabled = true - singularity.cacheDir = "$baseDir/.singularity_in2p3/" - singularity.runOptions = "--bind /pbs,/sps,/scratch" - process{ - withName: compute_mappability { - container = "lbmc/music:6613c53" - scratch = true - stageInMode = "copy" - stageOutMode = "rsync" - executor = "sge" - clusterOptions = "-P P_lbmc -l os=cl7 -l sps=1 -r n\ - " - cpus = 1 - queue = "huge" - } - withName: music_preprocessing { - container = "lbmc/music:6613c53" - scratch = true - stageInMode = "copy" - stageOutMode = "rsync" - executor = "sge" - clusterOptions = "-P P_lbmc -l os=cl7 -l sps=1 -r n\ - " - cpus = 1 - queue = "huge" - } - withName: music_computation{ - container = "lbmc/music:6613c53" - scratch = true - stageInMode = "copy" - stageOutMode = "rsync" - executor = "sge" - clusterOptions = "-P P_lbmc -l os=cl7 -l sps=1 -r n\ - " - cpus = 1 - queue = "huge" - } - } - } -} diff --git a/src/nf_modules/music/peak_calling_single.nf b/src/nf_modules/music/peak_calling_single.nf deleted file mode 100644 index be280394..00000000 --- a/src/nf_modules/music/peak_calling_single.nf +++ /dev/null @@ -1,104 +0,0 @@ -params.read_size = 100 -params.frag_size = 200 -params.step_l = 50 -params.min_l = 200 -params.max_l = 5000 -log.info "bam files : ${params.bam}" -log.info "index files : ${params.index}" -log.info "fasta files : ${params.fasta}" - -Channel - .fromPath( params.fasta ) - .ifEmpty { error "Cannot find any bam files matching: ${params.fasta}" } - .set { fasta_files } -Channel - .fromPath( params.bam ) - .ifEmpty { error "Cannot find any bam files matching: ${params.bam}" } - .map { it -> [(it.baseName =~ /([^\.]*)/)[0][1], it]} - .set { bam_files } -Channel - .fromPath( params.index ) - .ifEmpty { error "Cannot find any index files matching: ${params.index}" } - .set { index_files } - -process compute_mappability { - tag "${fasta.baseName}" - - input: - file index from index_files.collect() - file fasta from fasta_files - - output: - file "*.bin" into mappability - file "temp/chr_ids.txt" into chr_ids - - script: - -""" -generate_multimappability_signal.csh ${fasta} ${params.read_size} ./ -bash temp_map_reads.csh -bash temp_process_mapping.csh -""" -} - -process music_preprocessing { - tag "${file_id}" - - input: - set file_id, file(bam) from bam_files - file chr_ids from chr_ids.collect() - - output: - set file_id, "preprocessed/*.tar" into preprocessed_bam_files - - script: - -""" -mkdir preprocessed -samtools view *.bam | \ -MUSIC -preprocess SAM stdin preprocessed/ -mkdir preprocessed/sorted -MUSIC -sort_reads preprocessed/ preprocessed/sorted/ -mkdir preprocessed/dedup -MUSIC -remove_duplicates ./preprocessed/sorted 2 preprocessed/dedup/ -cd preprocessed -tar -c -f ${file_id}.tar * -""" -} - -preprocessed_bam_files_control = Channel.create() -preprocessed_bam_files_chip = Channel.create() -preprocessed_bam_files.choice( - preprocessed_bam_files_control, - preprocessed_bam_files_chip ) { a -> a[0] =~ /.*control.*/ ? 0 : 1 } - -process music_computation { - tag "${file_id}" - publishDir "results/peak_calling/${file_id}", mode: 'copy' - - input: - set file_id, file(control) from preprocessed_bam_files_chip - set file_id_control, file(chip) from preprocessed_bam_files_control.collect() - file mapp from mappability.collect() - - output: - file "*" into music_output_forward - file "*.bed" into peaks_forward - - script: - -""" -mkdir mappability control chip -mv ${mapp} mappability/ -tar -xf ${control} -C control/ -tar -xf ${chip} -C chip/ - -MUSIC -get_per_win_p_vals_vs_FC -chip chip/ -control control/ \ - -l_win_step ${params.step_l} \ - -l_win_min ${params.min_l} -l_win_max ${params.max_l} -MUSIC -get_multiscale_punctate_ERs \ - -chip chip/ -control control/ -mapp mappability/ \ - -l_mapp ${params.read_size} -l_frag ${params.frag_size} -q_val 1 -l_p 0 -ls -l -""" -} diff --git a/src/nf_modules/rsem/indexing.config b/src/nf_modules/rsem/indexing.config deleted file mode 100644 index 86f57dde..00000000 --- a/src/nf_modules/rsem/indexing.config +++ /dev/null @@ -1,57 +0,0 @@ -profiles { - docker { - docker.temp = "auto" - docker.enabled = true - process { - withName: index_fasta { - container = "lbmc/rsem:1.3.0" - cpus = 4 - } - } - } - singularity { - singularity.enabled = true - singularity.cacheDir = "./bin/" - process { - withName: index_fasta { - container = "lbmc/rsem:1.3.0" - cpus = 4 - } - } - } - psmn{ - singularity.enabled = true - singularity.cacheDir = "/.singularity_psmn/" - singularity.runOptions = "--bind /Xnfs,/scratch" - process{ - withName: index_fasta { - container = "lbmc/rsem:1.3.0" - executor = "sge" - clusterOptions = "-cwd -V" - cpus = 32 - memory = "30GB" - time = "24h" - queue = "CLG6242deb384A,CLG6242deb384C,CLG5218deb192A,CLG5218deb192B,CLG5218deb192C,CLG5218deb192D,SLG5118deb96,SLG6142deb384A,SLG6142deb384B,SLG6142deb384C,SLG6142deb384D" - penv = "openmp32" - } - } - } - ccin2p3 { - singularity.enabled = true - singularity.cacheDir = "$baseDir/.singularity_in2p3/" - singularity.runOptions = "--bind /pbs,/sps,/scratch" - process{ - withName: index_fasta { - container = "lbmc/rsem:1.3.0" - scratch = true - stageInMode = "copy" - stageOutMode = "rsync" - executor = "sge" - clusterOptions = "-P P_lbmc -l os=cl7 -l sps=1 -r n\ - " - cpus = 1 - queue = "huge" - } - } - } -} diff --git a/src/nf_modules/rsem/indexing.nf b/src/nf_modules/rsem/indexing.nf deleted file mode 100644 index 4b95622a..00000000 --- a/src/nf_modules/rsem/indexing.nf +++ /dev/null @@ -1,39 +0,0 @@ -params.fasta = "$baseDir/data/bam/*.fasta" -params.annotation = "$baseDir/data/bam/*.gff3" - -log.info "fasta files : ${params.fasta}" - -Channel - .fromPath( params.fasta ) - .ifEmpty { error "Cannot find any fasta files matching: ${params.fasta}" } - .set { fasta_file } -Channel - .fromPath( params.annotation ) - .ifEmpty { error "Cannot find any annotation files matching: ${params.annotation}" } - .set { annotation_file } - -process index_fasta { - tag "$fasta.baseName" - publishDir "results/mapping/index/", mode: 'copy' - - input: - file fasta from fasta_file - file annotation from annotation_file - - output: - file "*.index*" into index_files - - script: - def cmd_annotation = "--gff3 ${annotation}" - if(annotation ==~ /.*\.gtf$/){ - cmd_annotation = "--gtf ${annotation}" - } -""" -rsem-prepare-reference -p ${task.cpus} --bowtie2 \ ---bowtie2-path \$(which bowtie2 | sed 's/bowtie2\$//g') \ -${cmd_annotation} ${fasta} ${fasta.baseName}.index > \ -${fasta.baseName}_rsem_bowtie2_report.txt -""" -} - - diff --git a/src/nf_modules/rsem/quantification_paired.config b/src/nf_modules/rsem/quantification_paired.config deleted file mode 100644 index a959b00f..00000000 --- a/src/nf_modules/rsem/quantification_paired.config +++ /dev/null @@ -1,57 +0,0 @@ -profiles { - docker { - docker.temp = "auto" - docker.enabled = true - process { - withName: mapping_fastq { - container = "lbmc/rsem:1.3.0" - cpus = 4 - } - } - } - singularity { - singularity.enabled = true - singularity.cacheDir = "./bin/" - process { - withName: mapping_fastq { - container = "lbmc/rsem:1.3.0" - cpus = 4 - } - } - } - psmn{ - singularity.enabled = true - singularity.cacheDir = "/.singularity_psmn/" - singularity.runOptions = "--bind /Xnfs,/scratch" - process{ - withName: mapping_fastq { - container = "lbmc/rsem:1.3.0" - executor = "sge" - clusterOptions = "-cwd -V" - cpus = 32 - memory = "30GB" - time = "24h" - queue = "CLG6242deb384A,CLG6242deb384C,CLG5218deb192A,CLG5218deb192B,CLG5218deb192C,CLG5218deb192D,SLG5118deb96,SLG6142deb384A,SLG6142deb384B,SLG6142deb384C,SLG6142deb384D" - penv = "openmp32" - } - } - } - ccin2p3 { - singularity.enabled = true - singularity.cacheDir = "$baseDir/.singularity_in2p3/" - singularity.runOptions = "--bind /pbs,/sps,/scratch" - process{ - withName: mapping_fastq { - container = "lbmc/rsem:1.3.0" - scratch = true - stageInMode = "copy" - stageOutMode = "rsync" - executor = "sge" - clusterOptions = "-P P_lbmc -l os=cl7 -l sps=1 -r n\ - " - cpus = 1 - queue = "huge" - } - } - } -} diff --git a/src/nf_modules/rsem/quantification_paired.nf b/src/nf_modules/rsem/quantification_paired.nf deleted file mode 100644 index c9e23ac8..00000000 --- a/src/nf_modules/rsem/quantification_paired.nf +++ /dev/null @@ -1,48 +0,0 @@ -params.fastq = "$baseDir/data/fastq/*_{1,2}.fastq" -params.index = "$baseDir/data/index/*.index.*" - -log.info "fastq files : ${params.fastq}" -log.info "index files : ${params.index}" - -Channel - .fromFilePairs( params.fastq ) - .ifEmpty { error "Cannot find any fastq files matching: ${params.fastq}" } - .set { fastq_files } -Channel - .fromPath( params.index ) - .ifEmpty { error "Cannot find any index files matching: ${params.index}" } - .set { index_files } - -process mapping_fastq { - tag "$pair_id" - publishDir "results/mapping/quantification/", mode: 'copy' - - input: - set pair_id, file(reads) from fastq_files - file index from index_files.toList() - - output: - file "*" into counts_files - - script: - index_id = index[0] - for (index_file in index) { - if (index_file =~ /.*\.1\.bt2/ && !(index_file =~ /.*\.rev\.1\.bt2/)) { - index_id = ( index_file =~ /(.*)\.1\.bt2/)[0][1] - } - } -""" -rsem-calculate-expression --bowtie2 \ ---bowtie2-path \$(which bowtie2 | sed 's/bowtie2\$//g') \ ---bowtie2-sensitivity-level "very_sensitive" \ --output-genome-bam -p ${task.cpus} \ ---paired-end ${reads[0]} ${reads[1]} ${index_id} ${pair_id} \ -2> ${pair_id}_rsem_bowtie2_report.txt - -if grep -q "Error" ${pair_id}_rsem_bowtie2_report.txt; then - exit 1 -fi -""" -} - - diff --git a/src/nf_modules/rsem/quantification_single.config b/src/nf_modules/rsem/quantification_single.config deleted file mode 100644 index a959b00f..00000000 --- a/src/nf_modules/rsem/quantification_single.config +++ /dev/null @@ -1,57 +0,0 @@ -profiles { - docker { - docker.temp = "auto" - docker.enabled = true - process { - withName: mapping_fastq { - container = "lbmc/rsem:1.3.0" - cpus = 4 - } - } - } - singularity { - singularity.enabled = true - singularity.cacheDir = "./bin/" - process { - withName: mapping_fastq { - container = "lbmc/rsem:1.3.0" - cpus = 4 - } - } - } - psmn{ - singularity.enabled = true - singularity.cacheDir = "/.singularity_psmn/" - singularity.runOptions = "--bind /Xnfs,/scratch" - process{ - withName: mapping_fastq { - container = "lbmc/rsem:1.3.0" - executor = "sge" - clusterOptions = "-cwd -V" - cpus = 32 - memory = "30GB" - time = "24h" - queue = "CLG6242deb384A,CLG6242deb384C,CLG5218deb192A,CLG5218deb192B,CLG5218deb192C,CLG5218deb192D,SLG5118deb96,SLG6142deb384A,SLG6142deb384B,SLG6142deb384C,SLG6142deb384D" - penv = "openmp32" - } - } - } - ccin2p3 { - singularity.enabled = true - singularity.cacheDir = "$baseDir/.singularity_in2p3/" - singularity.runOptions = "--bind /pbs,/sps,/scratch" - process{ - withName: mapping_fastq { - container = "lbmc/rsem:1.3.0" - scratch = true - stageInMode = "copy" - stageOutMode = "rsync" - executor = "sge" - clusterOptions = "-P P_lbmc -l os=cl7 -l sps=1 -r n\ - " - cpus = 1 - queue = "huge" - } - } - } -} diff --git a/src/nf_modules/rsem/quantification_single.nf b/src/nf_modules/rsem/quantification_single.nf deleted file mode 100644 index bacba6b3..00000000 --- a/src/nf_modules/rsem/quantification_single.nf +++ /dev/null @@ -1,53 +0,0 @@ -params.fastq = "$baseDir/data/fastq/*.fastq" -params.index = "$baseDir/data/index/*.index*" -params.mean = 200 -params.sd = 100 - -log.info "fastq files : ${params.fastq}" -log.info "index files : ${params.index}" -log.info "mean read size: ${params.mean}" -log.info "sd read size: ${params.sd}" - -Channel - .fromPath( params.fastq ) - .ifEmpty { error "Cannot find any fastq files matching: ${params.fastq}" } - .map { it -> [(it.baseName =~ /([^\.]*)/)[0][1], it]} - .set { fastq_files } -Channel - .fromPath( params.index ) - .ifEmpty { error "Cannot find any index files matching: ${params.index}" } - .set { index_files } - -process mapping_fastq { - tag "$file_id" - publishDir "results/mapping/quantification/", mode: 'copy' - - input: - set file_id, file(reads) from fastq_files - file index from index_files.collect() - - output: - file "*" into count_files - - script: - index_id = index[0] - for (index_file in index) { - if (index_file =~ /.*\.1\.bt2/ && !(index_file =~ /.*\.rev\.1\.bt2/)) { - index_id = ( index_file =~ /(.*)\.1\.bt2/)[0][1] - } - } -""" -rsem-calculate-expression --bowtie2 \ ---bowtie2-path \$(which bowtie2 | sed 's/bowtie2\$//g') \ ---bowtie2-sensitivity-level "very_sensitive" \ ---fragment-length-mean ${params.mean} --fragment-length-sd ${params.sd} \ ---output-genome-bam -p ${task.cpus} \ -${reads} ${index_id} ${file_id} \ -2> ${file_id}_rsem_bowtie2_report.txt - -if grep -q "Error" ${file_id}_rsem_bowtie2_report.txt; then - exit 1 -fi -""" -} - diff --git a/src/nf_modules/sambamba/index_bams.config b/src/nf_modules/sambamba/index_bams.config deleted file mode 100644 index da8f84fc..00000000 --- a/src/nf_modules/sambamba/index_bams.config +++ /dev/null @@ -1,57 +0,0 @@ -profiles { - docker { - docker.temp = "auto" - docker.enabled = true - process { - withName: index_bam { - container = "lbmc/sambamba:0.6.9" - cpus = 4 - } - } - } - singularity { - singularity.enabled = true - singularity.cacheDir = "./bin/" - process { - withName: index_bam { - container = "lbmc/sambamba:0.6.9" - cpus = 4 - } - } - } - psmn{ - singularity.enabled = true - singularity.cacheDir = "/.singularity_psmn/" - singularity.runOptions = "--bind /Xnfs,/scratch" - process{ - withName: index_bam { - container = "lbmc/sambamba:0.6.9" - executor = "sge" - clusterOptions = "-cwd -V" - cpus = 32 - memory = "30GB" - time = "24h" - queue = "CLG6242deb384A,CLG6242deb384C,CLG5218deb192A,CLG5218deb192B,CLG5218deb192C,CLG5218deb192D,SLG5118deb96,SLG6142deb384A,SLG6142deb384B,SLG6142deb384C,SLG6142deb384D" - penv = "openmp32" - } - } - } - ccin2p3 { - singularity.enabled = true - singularity.cacheDir = "$baseDir/.singularity_in2p3/" - singularity.runOptions = "--bind /pbs,/sps,/scratch" - process{ - withName: index_bam { - container = "lbmc/sambamba:0.6.9" - scratch = true - stageInMode = "copy" - stageOutMode = "rsync" - executor = "sge" - clusterOptions = "-P P_lbmc -l os=cl7 -l sps=1 -r n\ - " - cpus = 1 - queue = "huge" - } - } - } -} diff --git a/src/nf_modules/sambamba/index_bams.nf b/src/nf_modules/sambamba/index_bams.nf deleted file mode 100644 index 3ea36df4..00000000 --- a/src/nf_modules/sambamba/index_bams.nf +++ /dev/null @@ -1,25 +0,0 @@ -params.bam = "$baseDir/data/bam/*.bam" - -log.info "bams files : ${params.bam}" - -Channel - .fromPath( params.bam ) - .ifEmpty { error "Cannot find any bam files matching: ${params.bam}" } - .map { it -> [(it.baseName =~ /([^\.]*)/)[0][1], it]} - .set { bam_files } - -process index_bam { - tag "$file_id" - - input: - set file_id, file(bam) from bam_files - - output: - set file_id, "*.bam*" into indexed_bam_file - - script: -""" -sambamba index -t ${task.cpus} ${bam} -""" -} - diff --git a/src/nf_modules/sambamba/sort_bams.config b/src/nf_modules/sambamba/sort_bams.config deleted file mode 100644 index 61057327..00000000 --- a/src/nf_modules/sambamba/sort_bams.config +++ /dev/null @@ -1,58 +0,0 @@ -profiles { - docker { - docker.temp = "auto" - docker.enabled = true - process { - withName: sort_bam { - container = "lbmc/sambamba:0.6.9" - cpus = 4 - } - } - } - singularity { - singularity.enabled = true - singularity.cacheDir = "./bin/" - process { - withName: sort_bam { - container = "lbmc/sambamba:0.6.9" - cpus = 4 - } - } - } - psmn{ - singularity.enabled = true - singularity.cacheDir = "/.singularity_psmn/" - singularity.runOptions = "--bind /Xnfs,/scratch" - process{ - withName: sort_bam { - container = "lbmc/sambamba:0.6.9" - executor = "sge" - clusterOptions = "-cwd -V" - cpus = 4 - memory = "30GB" - time = "24h" - queue = "CLG6242deb384A,CLG6242deb384C,CLG5218deb192A,CLG5218deb192B,CLG5218deb192C,CLG5218deb192D,SLG5118deb96,SLG6142deb384A,SLG6142deb384B,SLG6142deb384C,SLG6142deb384D" - penv = "openmp32" - } - } - } - ccin2p3 { - singularity.enabled = true - singularity.cacheDir = "$baseDir/.singularity_in2p3/" - singularity.runOptions = "--bind /pbs,/sps,/scratch" - process{ - withName: sort_bam { - container = "lbmc/sambamba:0.6.9" - scratch = true - stageInMode = "copy" - stageOutMode = "rsync" - executor = "sge" - clusterOptions = "-P P_lbmc -l os=cl7 -l sps=1 -r n\ - " - cpus = 1 - queue = "huge" - } - - } - } -} diff --git a/src/nf_modules/sambamba/sort_bams.nf b/src/nf_modules/sambamba/sort_bams.nf deleted file mode 100644 index ac610cdc..00000000 --- a/src/nf_modules/sambamba/sort_bams.nf +++ /dev/null @@ -1,26 +0,0 @@ -params.bam = "$baseDir/data/bam/*.bam" - -log.info "bams files : ${params.bam}" - -Channel - .fromPath( params.bam ) - .ifEmpty { error "Cannot find any bam files matching: ${params.bam}" } - .map { it -> [(it.baseName =~ /([^\.]*)/)[0][1], it]} - .set { bam_files } - -process sort_bam { - tag "$file_id" - cpus 4 - - input: - set file_id, file(bam) from bam_files - - output: - set file_id, "*_sorted.bam" into sorted_bam_files - - script: -""" -sambamba sort -t ${task.cpus} -o ${file_id}_sorted.bam ${bam} -""" -} - diff --git a/src/nf_modules/sambamba/split_bams.config b/src/nf_modules/sambamba/split_bams.config deleted file mode 100644 index e9df7d69..00000000 --- a/src/nf_modules/sambamba/split_bams.config +++ /dev/null @@ -1,57 +0,0 @@ -profiles { - docker { - docker.temp = "auto" - docker.enabled = true - process { - withName: split_bam { - container = "lbmc/sambamba:0.6.9" - cpus = 4 - } - } - } - singularity { - singularity.enabled = true - singularity.cacheDir = "./bin/" - process { - withName: split_bam { - container = "lbmc/sambamba:0.6.9" - cpus = 4 - } - } - } - psmn{ - singularity.enabled = true - singularity.cacheDir = "/.singularity_psmn/" - singularity.runOptions = "--bind /Xnfs,/scratch" - process{ - withName: split_bam { - container = "lbmc/sambamba:0.6.9" - executor = "sge" - clusterOptions = "-cwd -V" - cpus = 32 - memory = "30GB" - time = "24h" - queue = "CLG6242deb384A,CLG6242deb384C,CLG5218deb192A,CLG5218deb192B,CLG5218deb192C,CLG5218deb192D,SLG5118deb96,SLG6142deb384A,SLG6142deb384B,SLG6142deb384C,SLG6142deb384D" - penv = "openmp32" - } - } - } - ccin2p3 { - singularity.enabled = true - singularity.cacheDir = "$baseDir/.singularity_in2p3/" - singularity.runOptions = "--bind /pbs,/sps,/scratch" - process{ - withName: split_bam { - container = "lbmc/sambamba:0.6.9" - scratch = true - stageInMode = "copy" - stageOutMode = "rsync" - executor = "sge" - clusterOptions = "-P P_lbmc -l os=cl7 -l sps=1 -r n\ - " - cpus = 1 - queue = "huge" - } - } - } -} diff --git a/src/nf_modules/sambamba/split_bams.nf b/src/nf_modules/sambamba/split_bams.nf deleted file mode 100644 index ba64d2e2..00000000 --- a/src/nf_modules/sambamba/split_bams.nf +++ /dev/null @@ -1,27 +0,0 @@ -params.bam = "$baseDir/data/bam/*.bam" - -log.info "bams files : ${params.bam}" - -Channel - .fromPath( params.bam ) - .ifEmpty { error "Cannot find any bam files matching: ${params.bam}" } - .map { it -> [(it.baseName =~ /([^\.]*)/)[0][1], it]} - .set { bam_files } - -process split_bam { - tag "$file_id" - cpus 4 - - input: - set file_id, file(bam) from bam_files - - output: - set file_id, "*_forward.bam*" into forward_bam_files - set file_id, "*_reverse.bam*" into reverse_bam_files - script: -""" -sambamba view -t ${task.cpus} -h -F "strand == '+'" ${bam} > ${file_id}_forward.bam -sambamba view -t ${task.cpus} -h -F "strand == '-'" ${bam} > ${file_id}_reverse.bam -""" -} - diff --git a/src/nf_modules/samblaster/dedup_sams.config b/src/nf_modules/samblaster/dedup_sams.config deleted file mode 100644 index e35185c1..00000000 --- a/src/nf_modules/samblaster/dedup_sams.config +++ /dev/null @@ -1,57 +0,0 @@ -profiles { - docker { - docker.temp = "auto" - docker.enabled = true - process { - withName: dedup_sam { - container = "lbmc/samblaster:0.1.24" - cpus = 4 - } - } - } - singularity { - singularity.enabled = true - singularity.cacheDir = "./bin/" - process { - withName: split_bam { - container = "lbmc/sambamba:0.6.7" - cpus = 4 - } - } - } - psmn{ - singularity.enabled = true - singularity.cacheDir = "/.singularity_psmn/" - singularity.runOptions = "--bind /Xnfs,/scratch" - process{ - withName: dedup_sam { - container = "lbmc/sambamba:0.6.7" - executor = "sge" - clusterOptions = "-cwd -V" - cpus = 32 - memory = "30GB" - time = "24h" - queue = "CLG6242deb384A,CLG6242deb384C,CLG5218deb192A,CLG5218deb192B,CLG5218deb192C,CLG5218deb192D,SLG5118deb96,SLG6142deb384A,SLG6142deb384B,SLG6142deb384C,SLG6142deb384D" - penv = "openmp32" - } - } - } - ccin2p3 { - singularity.enabled = true - singularity.cacheDir = "$baseDir/.singularity_in2p3/" - singularity.runOptions = "--bind /pbs,/sps,/scratch" - process{ - withName: dedup_sam { - container = "lbmc/sambamba:0.6.7" - scratch = true - stageInMode = "copy" - stageOutMode = "rsync" - executor = "sge" - clusterOptions = "-P P_lbmc -l os=cl7 -l sps=1 -r n\ - " - cpus = 1 - queue = "huge" - } - } - } -} diff --git a/src/nf_modules/samblaster/dedup_sams.nf b/src/nf_modules/samblaster/dedup_sams.nf deleted file mode 100644 index bcfd829c..00000000 --- a/src/nf_modules/samblaster/dedup_sams.nf +++ /dev/null @@ -1,27 +0,0 @@ -params.sam = "$baseDir/data/sam/*.bam" - -log.info "bam files : ${params.bam}" - -Channel - .fromPath( params.bam ) - .ifEmpty { error "Cannot find any bam files matching: ${params.bam}" } - .map { it -> [(it.baseName =~ /([^\.]*)/)[0][1], it]} - .set { bam_files } - -process dedup_sam { - tag "$file_id" - - input: - set file_id, file(bam) from bam_files - - output: - set file_id, "*_dedup.bam*" into dedup_bam_files - script: -""" -samtools view -h ${bam} | \ -samblaster --addMateTags 2> /dev/null | \ -samtools view -Sb - > ${file_id}_dedup.bam -""" -} - - diff --git a/src/nf_modules/samtools/filter_bams.config b/src/nf_modules/samtools/filter_bams.config deleted file mode 100644 index dfd7f8bf..00000000 --- a/src/nf_modules/samtools/filter_bams.config +++ /dev/null @@ -1,57 +0,0 @@ -profiles { - docker { - docker.temp = "auto" - docker.enabled = true - process { - withName: filter_bam { - container = "lbmc/samtools:1.7" - cpus = 4 - } - } - } - singularity { - singularity.enabled = true - singularity.cacheDir = "./bin/" - process { - withName: filter_bam { - container = "lbmc/samtools:1.7" - cpus = 4 - } - } - } - psmn{ - singularity.enabled = true - singularity.cacheDir = "/.singularity_psmn/" - singularity.runOptions = "--bind /Xnfs,/scratch" - process{ - withName: filter_bam { - container = "lbmc/samtools:1.7" - executor = "sge" - clusterOptions = "-cwd -V" - cpus = 32 - memory = "30GB" - time = "24h" - queue = "CLG6242deb384A,CLG6242deb384C,CLG5218deb192A,CLG5218deb192B,CLG5218deb192C,CLG5218deb192D,SLG5118deb96,SLG6142deb384A,SLG6142deb384B,SLG6142deb384C,SLG6142deb384D" - penv = "openmp32" - } - } - } - ccin2p3 { - singularity.enabled = true - singularity.cacheDir = "$baseDir/.singularity_in2p3/" - singularity.runOptions = "--bind /pbs,/sps,/scratch" - process{ - withName: filter_bam { - container = "lbmc/samtools:1.7" - scratch = true - stageInMode = "copy" - stageOutMode = "rsync" - executor = "sge" - clusterOptions = "-P P_lbmc -l os=cl7 -l sps=1 -r n\ - " - cpus = 1 - queue = "huge" - } - } - } -} diff --git a/src/nf_modules/samtools/filter_bams.nf b/src/nf_modules/samtools/filter_bams.nf deleted file mode 100644 index 6e81b758..00000000 --- a/src/nf_modules/samtools/filter_bams.nf +++ /dev/null @@ -1,32 +0,0 @@ -params.bam = "$baseDir/data/bam/*.bam" -params.bed = "$baseDir/data/bam/*.bed" - -log.info "bams files : ${params.bam}" -log.info "bed file : ${params.bed}" - -Channel - .fromPath( params.bam ) - .ifEmpty { error "Cannot find any bam files matching: ${params.bam}" } - .map { it -> [(it.baseName =~ /([^\.]*)/)[0][1], it]} - .set { bam_files } -Channel - .fromPath( params.bed ) - .ifEmpty { error "Cannot find any bed file matching: ${params.bed}" } - .set { bed_files } - -process filter_bam { - tag "$file_id" - - input: - set file_id, file(bam) from bam_files - file bed from bed_files - - output: - set file_id, "*_filtered.bam*" into filtered_bam_files - script: -""" -samtools view -@ ${task.cpus} -hb ${bam} -L ${bed} > ${file_id}_filtered.bam -""" -} - - diff --git a/src/nf_modules/samtools/index_bams.config b/src/nf_modules/samtools/index_bams.config deleted file mode 100644 index 173af8fe..00000000 --- a/src/nf_modules/samtools/index_bams.config +++ /dev/null @@ -1,56 +0,0 @@ -profiles { - docker { - docker.temp = "auto" - docker.enabled = true - process { - withName: index_bam { - container = "lbmc/samtools:1.7" - cpus = 1 - } - } - } - singularity { - singularity.enabled = true - singularity.cacheDir = "./bin/" - process { - withName: index_bam { - container = "lbmc/samtools:1.7" - cpus = 1 - } - } - } - psmn{ - singularity.enabled = true - singularity.cacheDir = "/.singularity_psmn/" - singularity.runOptions = "--bind /Xnfs,/scratch" - process{ - withName: index_bam { - container = "lbmc/samtools:1.7" - executor = "sge" - clusterOptions = "-cwd -V" - cpus = 1 - memory = "20GB" - time = "12h" - queue = "monointeldeb128" - } - } - } - ccin2p3 { - singularity.enabled = true - singularity.cacheDir = "$baseDir/.singularity_in2p3/" - singularity.runOptions = "--bind /pbs,/sps,/scratch" - process{ - withName: index_bam { - container = "lbmc/samtools:1.7" - scratch = true - stageInMode = "copy" - stageOutMode = "rsync" - executor = "sge" - clusterOptions = "-P P_lbmc -l os=cl7 -l sps=1 -r n\ - " - cpus = 1 - queue = "huge" - } - } - } -} diff --git a/src/nf_modules/samtools/index_bams.nf b/src/nf_modules/samtools/index_bams.nf deleted file mode 100644 index 489b0f4f..00000000 --- a/src/nf_modules/samtools/index_bams.nf +++ /dev/null @@ -1,25 +0,0 @@ -params.bam = "$baseDir/data/bam/*.bam" - -log.info "bams files : ${params.bam}" - -Channel - .fromPath( params.bam ) - .ifEmpty { error "Cannot find any bam files matching: ${params.bam}" } - .map { it -> [(it.baseName =~ /([^\.]*)/)[0][1], it]} - .set { bam_files } - -process index_bam { - tag "$file_id" - - input: - set file_id, file(bam) from bam_files - - output: - set file_id, "*.bam*" into indexed_bam_file - - script: -""" -samtools index ${bam} -""" -} - diff --git a/src/nf_modules/samtools/sort_bams.config b/src/nf_modules/samtools/sort_bams.config deleted file mode 100644 index 48f18580..00000000 --- a/src/nf_modules/samtools/sort_bams.config +++ /dev/null @@ -1,57 +0,0 @@ -profiles { - docker { - docker.temp = "auto" - docker.enabled = true - process { - withName: sort_bam { - container = "lbmc/samtools:1.7" - cpus = 4 - } - } - } - singularity { - singularity.enabled = true - singularity.cacheDir = "./bin/" - process { - withName: sort_bam { - container = "lbmc/samtools:1.7" - cpus = 4 - } - } - } - psmn{ - singularity.enabled = true - singularity.cacheDir = "/.singularity_psmn/" - singularity.runOptions = "--bind /Xnfs,/scratch" - process{ - withName: sort_bam { - container = "lbmc/samtools:1.7" - executor = "sge" - clusterOptions = "-cwd -V" - cpus = 32 - memory = "30GB" - time = "24h" - queue = "CLG6242deb384A,CLG6242deb384C,CLG5218deb192A,CLG5218deb192B,CLG5218deb192C,CLG5218deb192D,SLG5118deb96,SLG6142deb384A,SLG6142deb384B,SLG6142deb384C,SLG6142deb384D" - penv = "openmp32" - } - } - } - ccin2p3 { - singularity.enabled = true - singularity.cacheDir = "$baseDir/.singularity_in2p3/" - singularity.runOptions = "--bind /pbs,/sps,/scratch" - process{ - withName: sort_bam { - container = "lbmc/samtools:1.7" - scratch = true - stageInMode = "copy" - stageOutMode = "rsync" - executor = "sge" - clusterOptions = "-P P_lbmc -l os=cl7 -l sps=1 -r n\ - " - cpus = 1 - queue = "huge" - } - } - } -} diff --git a/src/nf_modules/samtools/sort_bams.nf b/src/nf_modules/samtools/sort_bams.nf deleted file mode 100644 index db1b30d1..00000000 --- a/src/nf_modules/samtools/sort_bams.nf +++ /dev/null @@ -1,25 +0,0 @@ -params.bam = "$baseDir/data/bam/*.bam" - -log.info "bams files : ${params.bam}" - -Channel - .fromPath( params.bam ) - .ifEmpty { error "Cannot find any bam files matching: ${params.bam}" } - .map { it -> [(it.baseName =~ /([^\.]*)/)[0][1], it]} - .set { bam_files } - -process sort_bam { - tag "$file_id" - - input: - set file_id, file(bam) from bam_files - - output: - set file_id, "*_sorted.bam" into sorted_bam_files - - script: -""" -samtools sort -@ ${task.cpus} -O BAM -o ${file_id}_sorted.bam ${bam} -""" -} - diff --git a/src/nf_modules/samtools/split_bams.config b/src/nf_modules/samtools/split_bams.config deleted file mode 100644 index 757a946a..00000000 --- a/src/nf_modules/samtools/split_bams.config +++ /dev/null @@ -1,56 +0,0 @@ -profiles { - docker { - docker.temp = "auto" - docker.enabled = true - process { - withName: split_bam { - container = "lbmc/samtools:1.7" - cpus = 2 - } - } - } - singularity { - singularity.enabled = true - singularity.cacheDir = "./bin/" - process { - withName: split_bam { - container = "lbmc/samtools:1.7" - cpus = 2 - } - } - } - psmn{ - singularity.enabled = true - singularity.cacheDir = "/.singularity_psmn/" - singularity.runOptions = "--bind /Xnfs,/scratch" - process{ - withName: split_bam { - container = "lbmc/samtools:1.7" - executor = "sge" - clusterOptions = "-cwd -V" - cpus = 1 - memory = "20GB" - time = "12h" - queue = "monointeldeb128" - } - } - } - ccin2p3 { - singularity.enabled = true - singularity.cacheDir = "$baseDir/.singularity_in2p3/" - singularity.runOptions = "--bind /pbs,/sps,/scratch" - process{ - withName: split_bam { - container = "lbmc/samtools:1.7" - scratch = true - stageInMode = "copy" - stageOutMode = "rsync" - executor = "sge" - clusterOptions = "-P P_lbmc -l os=cl7 -l sps=1 -r n\ - " - cpus = 1 - queue = "huge" - } - } - } -} diff --git a/src/nf_modules/samtools/split_bams.nf b/src/nf_modules/samtools/split_bams.nf deleted file mode 100644 index 0d02a5d1..00000000 --- a/src/nf_modules/samtools/split_bams.nf +++ /dev/null @@ -1,26 +0,0 @@ -params.bam = "$baseDir/data/bam/*.bam" - -log.info "bams files : ${params.bam}" - -Channel - .fromPath( params.bam ) - .ifEmpty { error "Cannot find any bam files matching: ${params.bam}" } - .map { it -> [(it.baseName =~ /([^\.]*)/)[0][1], it]} - .set { bam_files } - -process split_bam { - tag "$file_id" - - input: - set file_id, file(bam) from bam_files - - output: - set file_id, "*_forward.bam*" into forward_bam_files - set file_id, "*_reverse.bam*" into reverse_bam_files - script: -""" -samtools view -hb -F 0x10 ${bam} > ${file_id}_forward.bam & -samtools view -hb -f 0x10 ${bam} > ${file_id}_reverse.bam -""" -} - diff --git a/src/nf_modules/sratoolkit/fastqdump.config b/src/nf_modules/sratoolkit/fastqdump.config deleted file mode 100644 index 4287e92f..00000000 --- a/src/nf_modules/sratoolkit/fastqdump.config +++ /dev/null @@ -1,56 +0,0 @@ -profiles { - docker { - docker.temp = "auto" - docker.enabled = true - process { - withName: fastq_dump { - container = "lbmc/sratoolkit:2.8.2" - cpus = 1 - } - } - } - singularity { - singularity.enabled = true - singularity.cacheDir = "./bin/" - process { - withName: split_bam { - container = "lbmc/sratoolkit:2.8.2" - cpus = 1 - } - } - } - psmn{ - singularity.enabled = true - singularity.cacheDir = "/.singularity_psmn/" - singularity.runOptions = "--bind /Xnfs,/scratch" - process{ - withName: fastq_dump { - container = "lbmc/sratoolkit:2.8.2" - executor = "sge" - clusterOptions = "-cwd -V" - cpus = 1 - memory = "20GB" - time = "12h" - queue = "monointeldeb128" - } - } - } - ccin2p3 { - singularity.enabled = true - singularity.cacheDir = "$baseDir/.singularity_in2p3/" - singularity.runOptions = "--bind /pbs,/sps,/scratch" - process{ - withName: fastq_dump { - container = "lbmc/sratoolkit:2.8.2" - scratch = true - stageInMode = "copy" - stageOutMode = "rsync" - executor = "sge" - clusterOptions = "-P P_lbmc -l os=cl7 -l sps=1 -r n\ - " - cpus = 1 - queue = "huge" - } - } - } -} diff --git a/src/nf_modules/sratoolkit/fastqdump.nf b/src/nf_modules/sratoolkit/fastqdump.nf deleted file mode 100644 index 6ba77271..00000000 --- a/src/nf_modules/sratoolkit/fastqdump.nf +++ /dev/null @@ -1,48 +0,0 @@ -/* -* sra-tools : - -*/ - -/* fastq-dump -* Imputs : srr list -* Outputs : fastq files -*/ - -params.list_srr = "$baseDir/data/SRR/*.txt" - -log.info "downloading list srr : ${params.list_srr}" - -Channel - .fromPath( params.list_srr ) - .ifEmpty { error "Cannot find any bam files matching: ${params.list_srr}" } - .splitCsv() - .map { it -> it[0]} - .set { SRR } - -//run is the column name containing SRR ids - -process fastq_dump { - tag "$file_id" - publishDir "results/download/fastq/${file_id}/", mode: 'copy' - - input: - val file_id from SRR - - output: - set file_id, "*.fastq" into fastq - - script: -""" -HOME=\$(pwd) # ensure that fastq dump tmp file are in the right place -#for test only 10000 reads are downloading with the option -N 10000 -X 20000 -fastq-dump --split-files --defline-seq '@\$ac_\$si/\$ri' --defline-qual "+" -N 10000 -X 20000 ${file_id} -if [ -f ${file_id}_1.fastq ] -then - mv ${file_id}_1.fastq ${file_id}_R1.fastq -fi -if [ -f ${file_id}_2.fastq ] -then - mv ${file_id}_2.fastq ${file_id}_R2.fastq -fi -""" -} diff --git a/src/nf_modules/star/indexing.config b/src/nf_modules/star/indexing.config deleted file mode 100644 index 503c1b8c..00000000 --- a/src/nf_modules/star/indexing.config +++ /dev/null @@ -1,56 +0,0 @@ -profiles { - docker { - docker.temp = "auto" - docker.enabled = true - process { - withName: index_fasta { - container = "lbmc/star:2.7.3a" - cpus = 4 - } - } - } - singularity { - singularity.enabled = true - singularity.cacheDir = "./bin/" - process { - withName: index_fasta { - container = "lbmc/star:2.7.3a" - cpus = 4 - } - } - } - psmn{ - singularity.enabled = true - singularity.cacheDir = "/.singularity_psmn/" - singularity.runOptions = "--bind /Xnfs,/scratch" - process{ - withName: index_fasta { - container = "lbmc/star:2.7.3a" - executor = "sge" - clusterOptions = "-cwd -V" - cpus = 32 - memory = "20GB" - time = "12h" - queue = "CLG6242deb384A,CLG6242deb384C,CLG5218deb192A,CLG5218deb192B,CLG5218deb192C,CLG5218deb192D,SLG5118deb96,SLG6142deb384A,SLG6142deb384B,SLG6142deb384C,SLG6142deb384D" - penv = "openmp32" - } - } - } - ccin2p3 { - singularity.enabled = true - singularity.cacheDir = "$baseDir/.singularity_in2p3/" - singularity.runOptions = "--bind /pbs,/sps,/scratch" - process{ - withName: index_fasta { - container = "lbmc/star:2.7.3a" - scratch = true - stageInMode = "copy" - stageOutMode = "rsync" - executor = "sge" - clusterOptions = "-P P_lbmc -l os=cl7 -l sps=1 -r n" - cpus = 1 - queue = "huge" - } - } - } -} diff --git a/src/nf_modules/star/indexing.nf b/src/nf_modules/star/indexing.nf deleted file mode 100644 index 0f340b2d..00000000 --- a/src/nf_modules/star/indexing.nf +++ /dev/null @@ -1,36 +0,0 @@ -params.fasta = "$baseDir/data/bam/*.fasta" -params.annotation = "$baseDir/data/bam/*.gtf" - -log.info "fasta files : ${params.fasta}" - -Channel - .fromPath( params.fasta ) - .ifEmpty { error "Cannot find any fasta files matching: ${params.fasta}" } - .set { fasta_file } -Channel - .fromPath( params.annotation ) - .ifEmpty { error "Cannot find any annotation files matching: ${params.annotation}" } - .set { annotation_file } - -process index_fasta { - tag "$fasta.baseName" - publishDir "results/mapping/index/", mode: 'copy' - - input: - file fasta from fasta_file - file annotation from annotation_file - - output: - file "*" into index_files - - script: -""" -STAR --runThreadN ${task.cpus} --runMode genomeGenerate \ ---genomeDir ./ \ ---genomeFastaFiles ${fasta} \ ---sjdbGTFfile ${annotation} \ ---genomeSAindexNbases 3 # min(14, log2(GenomeLength)/2 - 1) -""" -} - - diff --git a/src/nf_modules/star/mapping_paired.config b/src/nf_modules/star/mapping_paired.config deleted file mode 100644 index d9d43b94..00000000 --- a/src/nf_modules/star/mapping_paired.config +++ /dev/null @@ -1,56 +0,0 @@ -profiles { - docker { - docker.temp = "auto" - docker.enabled = true - process { - withName: mapping_fastq { - container = "lbmc/star:2.7.3a" - cpus = 4 - } - } - } - singularity { - singularity.enabled = true - singularity.cacheDir = "./bin/" - process { - withName: mapping_fastq { - container = "lbmc/star:2.7.3a" - cpus = 4 - } - } - } - psmn{ - singularity.enabled = true - singularity.cacheDir = "/.singularity_psmn/" - singularity.runOptions = "--bind /Xnfs,/scratch" - process{ - withName: mapping_fastq { - container = "lbmc/star:2.7.3a" - executor = "sge" - clusterOptions = "-cwd -V" - cpus = 32 - memory = "30GB" - time = "24h" - queue = "CLG6242deb384A,CLG6242deb384C,CLG5218deb192A,CLG5218deb192B,CLG5218deb192C,CLG5218deb192D,SLG5118deb96,SLG6142deb384A,SLG6142deb384B,SLG6142deb384C,SLG6142deb384D" - penv = "openmp32" - } - } - } - ccin2p3 { - singularity.enabled = true - singularity.cacheDir = "$baseDir/.singularity_in2p3/" - singularity.runOptions = "--bind /pbs,/sps,/scratch" - process{ - withName: mapping_fastq { - container = "lbmc/star:2.7.3a" - scratch = true - stageInMode = "copy" - stageOutMode = "rsync" - executor = "sge" - clusterOptions = "-P P_lbmc -l os=cl7 -l sps=1 -r n" - cpus = 1 - queue = "huge" - } - } - } -} diff --git a/src/nf_modules/star/mapping_paired.nf b/src/nf_modules/star/mapping_paired.nf deleted file mode 100644 index 9ea90175..00000000 --- a/src/nf_modules/star/mapping_paired.nf +++ /dev/null @@ -1,40 +0,0 @@ -params.fastq = "$baseDir/data/fastq/*_{1,2}.fastq" -params.index = "$baseDir/data/index/*.index.*" - -log.info "fastq files : ${params.fastq}" -log.info "index files : ${params.index}" - -Channel - .fromFilePairs( params.fastq ) - .ifEmpty { error "Cannot find any fastq files matching: ${params.fastq}" } - .set { fastq_files } -Channel - .fromPath( params.index ) - .ifEmpty { error "Cannot find any index files matching: ${params.index}" } - .set { index_files } - -process mapping_fastq { - tag "$pair_id" - publishDir "results/mapping/bams/", mode: 'copy' - - input: - set pair_id, file(reads) from fastq_files - file index from index_files.collect() - - output: - set pair_id, "*.bam" into bam_files - file "*.out" into mapping_report - - script: -""" -mkdir -p index -mv ${index} index/ -STAR --runThreadN ${task.cpus} \ ---genomeDir index/ \ ---readFilesIn ${reads[0]} ${reads[1]} \ ---outFileNamePrefix ${pair_id} \ ---outSAMmapqUnique 0 \ ---outSAMtype BAM SortedByCoordinate -""" -} - diff --git a/src/nf_modules/star/mapping_single.config b/src/nf_modules/star/mapping_single.config deleted file mode 100644 index d9d43b94..00000000 --- a/src/nf_modules/star/mapping_single.config +++ /dev/null @@ -1,56 +0,0 @@ -profiles { - docker { - docker.temp = "auto" - docker.enabled = true - process { - withName: mapping_fastq { - container = "lbmc/star:2.7.3a" - cpus = 4 - } - } - } - singularity { - singularity.enabled = true - singularity.cacheDir = "./bin/" - process { - withName: mapping_fastq { - container = "lbmc/star:2.7.3a" - cpus = 4 - } - } - } - psmn{ - singularity.enabled = true - singularity.cacheDir = "/.singularity_psmn/" - singularity.runOptions = "--bind /Xnfs,/scratch" - process{ - withName: mapping_fastq { - container = "lbmc/star:2.7.3a" - executor = "sge" - clusterOptions = "-cwd -V" - cpus = 32 - memory = "30GB" - time = "24h" - queue = "CLG6242deb384A,CLG6242deb384C,CLG5218deb192A,CLG5218deb192B,CLG5218deb192C,CLG5218deb192D,SLG5118deb96,SLG6142deb384A,SLG6142deb384B,SLG6142deb384C,SLG6142deb384D" - penv = "openmp32" - } - } - } - ccin2p3 { - singularity.enabled = true - singularity.cacheDir = "$baseDir/.singularity_in2p3/" - singularity.runOptions = "--bind /pbs,/sps,/scratch" - process{ - withName: mapping_fastq { - container = "lbmc/star:2.7.3a" - scratch = true - stageInMode = "copy" - stageOutMode = "rsync" - executor = "sge" - clusterOptions = "-P P_lbmc -l os=cl7 -l sps=1 -r n" - cpus = 1 - queue = "huge" - } - } - } -} diff --git a/src/nf_modules/star/mapping_single.nf b/src/nf_modules/star/mapping_single.nf deleted file mode 100644 index 9d3d51b3..00000000 --- a/src/nf_modules/star/mapping_single.nf +++ /dev/null @@ -1,39 +0,0 @@ -params.fastq = "$baseDir/data/fastq/*.fastq" - -log.info "fastq files : ${params.fastq}" -log.info "index files : ${params.index}" - -Channel - .fromPath( params.fastq ) - .ifEmpty { error "Cannot find any fastq files matching: ${params.fastq}" } - .map { it -> [(it.baseName =~ /([^\.]*)/)[0][1], it]} - .set { fastq_files } -Channel - .fromPath( params.index ) - .ifEmpty { error "Cannot find any index files matching: ${params.index}" } - .set { index_files } - -process mapping_fastq { - tag "$file_id" - publishDir "results/mapping/bams/", mode: 'copy' - - input: - set file_id, file(reads) from fastq_files - file index from index_files.collect() - - output: - set file_id, "*.bam" into bam_files - file "*.out" into mapping_report - - script: -""" -mkdir -p index -mv ${index} index/ -STAR --runThreadN ${task.cpus} \ ---genomeDir index/ \ ---readFilesIn ${reads} \ ---outFileNamePrefix ${file_id} \ ---outSAMmapqUnique 0 \ ---outSAMtype BAM SortedByCoordinate -""" -} diff --git a/src/nf_modules/subread/subread.config b/src/nf_modules/subread/subread.config deleted file mode 100644 index 2d09601a..00000000 --- a/src/nf_modules/subread/subread.config +++ /dev/null @@ -1,75 +0,0 @@ -profiles { - docker { - docker.temp = "auto" - docker.enabled = true - process { - withName: sort_bam { - container = "lbmc/samtools:1.7" - cpus = 1 - } - withName: counting { - container = "lbmc/subread:1.6.4" - cpus = 1 - } - } - } - singularity { - singularity.enabled = true - singularity.cacheDir = "./bin/" - process { - withName: sort_bam { - container = "lbmc/samtools:1.7" - cpus = 1 - } - withName: counting { - container = "lbmc/subread:1.6.4" - cpus = 1 - } - } - } - psmn{ - singularity.enabled = true - singularity.cacheDir = "/.singularity_psmn/" - singularity.runOptions = "--bind /Xnfs,/scratch" - process{ - withName: sort_bam { - container = "lbmc/subread:1.6.4" - executor = "sge" - clusterOptions = "-cwd -V" - cpus = 1 - memory = "20GB" - time = "12h" - queue = "monointeldeb128" - } - } - } - ccin2p3 { - singularity.enabled = true - singularity.cacheDir = "$baseDir/.singularity_in2p3/" - singularity.runOptions = "--bind /pbs,/sps,/scratch" - process{ - withName: sort_bam { - container = "lbmc/samtools:1.7" - scratch = true - stageInMode = "copy" - stageOutMode = "rsync" - executor = "sge" - clusterOptions = "-P P_lbmc -l os=cl7 -l sps=1 -r n\ - " - cpus = 1 - queue = "huge" - } - withName: counting { - container = "lbmc/subread:1.6.4" - scratch = true - stageInMode = "copy" - stageOutMode = "rsync" - executor = "sge" - clusterOptions = "-P P_lbmc -l os=cl7 -l sps=1 -r n\ - " - cpus = 1 - queue = "huge" - } - } - } -} diff --git a/src/nf_modules/subread/subread.nf b/src/nf_modules/subread/subread.nf deleted file mode 100644 index f0b53e39..00000000 --- a/src/nf_modules/subread/subread.nf +++ /dev/null @@ -1,52 +0,0 @@ -params.bam = "$baseDir/data/bam/*.bam" -params.gtf = "$baseDir/data/annotation/*.gtf" - -log.info "bam files : ${params.bam}" -log.info "gtf files : ${params.gtf}" - -Channel - .fromPath( params.bam ) - .ifEmpty { error "Cannot find any fastq files matching: ${params.bam}" } - .map { it -> [(it.baseName =~ /([^\.]*)/)[0][1], it]} - .set { bam_files } -Channel - .fromPath( params.gtf ) - .ifEmpty { error "Cannot find any gtf file matching: ${params.gtf}" } - .set { gtf_file } - -process sort_bam { - tag "$file_id" - cpus 4 - - input: - set file_id, file(bam) from bam_files - - output: - set file_id, "*_sorted.sam" into sorted_bam_files - - script: -""" -# sort bam by name -samtools sort -@ ${task.cpus} -n -O SAM -o ${file_id}_sorted.sam ${bam} -""" -} - -process counting { - tag "$file_id" - publishDir "results/quantification/", mode: 'copy' - - input: - set file_id, file(bam) from sorted_bam_files - file gtf from gtf_file - - output: - file "*.count" into count_files - - script: -""" -featureCounts ${bam} -a ${gtf} -p \ - -o ${file_id}.count \ - -R BAM -""" -} - diff --git a/src/nf_modules/urqt/trimming_paired.config b/src/nf_modules/urqt/trimming_paired.config deleted file mode 100644 index f8f533f4..00000000 --- a/src/nf_modules/urqt/trimming_paired.config +++ /dev/null @@ -1,58 +0,0 @@ -profiles { - docker { - docker.temp = "auto" - docker.enabled = true - process { - withLabel: urqt { - cpus = 4 - container = "lbmc/urqt:d62c1f8" - } - } - } - singularity { - singularity.enabled = true - singularity.cacheDir = "./bin/" - process { - withLabel: urqt { - cpus = 4 - container = "lbmc/urqt:d62c1f8" - } - } - } - psmn{ - singularity.enabled = true - singularity.cacheDir = "/.singularity_psmn/" - singularity.runOptions = "--bind /Xnfs,/scratch" - process{ - withLabel: urqt { - container = "lbmc/urqt:d62c1f8" - executor = "sge" - clusterOptions = "-cwd -V" - memory = "5GB" - cpus = 32 - time = "12h" - queue = "CLG6242deb384A,CLG6242deb384C,CLG5218deb192A,CLG5218deb192B,CLG5218deb192C,CLG5218deb192D,SLG5118deb96,SLG6142deb384A,SLG6142deb384B,SLG6142deb384C,SLG6142deb384D" - penv = "openmp32" - } - } - } - ccin2p3 { - singularity.enabled = true - singularity.cacheDir = "$baseDir/.singularity_in2p3/" - singularity.runOptions = "--bind /pbs,/sps,/scratch" - process{ - withLabel: urqt { - container = "lbmc/urqt:d62c1f8" - scratch = true - stageInMode = "copy" - stageOutMode = "rsync" - executor = "sge" - clusterOptions = "-P P_lbmc -l os=cl7 -l sps=1 -r n\ - " - cpus = 1 - queue = "huge" - } - } - } -} - diff --git a/src/nf_modules/urqt/trimming_paired.nf b/src/nf_modules/urqt/trimming_paired.nf deleted file mode 100644 index 0b28219c..00000000 --- a/src/nf_modules/urqt/trimming_paired.nf +++ /dev/null @@ -1,27 +0,0 @@ -log.info "fastq files : ${params.fastq}" - -Channel - .fromFilePairs( params.fastq ) - .ifEmpty { error "Cannot find any fastq files matching: ${params.fastq}" } - .set { fastq_files } - -process trimming { - tag "${reads}" - publishDir "results/fastq/trimming/", mode: 'copy' - label "urqt" - - input: - set pair_id, file(reads) from fastq_files - - output: - set pair_id, "*_trim_R{1,2}.fastq.gz" into fastq_files_trim - - script: -""" -UrQt --t 20 --m ${task.cpus} --gz \ ---in ${reads[0]} --inpair ${reads[1]} \ ---out ${pair_id}_trim_R1.fastq.gz --outpair ${pair_id}_trim_R2.fastq.gz \ -> ${pair_id}_trimming_report.txt -""" -} - diff --git a/src/nf_modules/urqt/trimming_single.config b/src/nf_modules/urqt/trimming_single.config deleted file mode 100644 index e1843f17..00000000 --- a/src/nf_modules/urqt/trimming_single.config +++ /dev/null @@ -1,58 +0,0 @@ -profiles { - docker { - docker.temp = "auto" - docker.enabled = true - process { - withLabel: urqt { - container = "lbmc/urqt:d62c1f8" - cpus = 4 - } - } - } - singularity { - singularity.enabled = true - singularity.cacheDir = "./bin/" - process { - withLabel: urqt { - container = "lbmc/urqt:d62c1f8" - cpus = 4 - } - } - } - psmn{ - singularity.enabled = true - singularity.cacheDir = "/.singularity_psmn/" - singularity.runOptions = "--bind /Xnfs,/scratch" - process{ - withLabel: urqt { - container = "lbmc/urqt:d62c1f8" - executor = "sge" - clusterOptions = "-cwd -V" - cpus = 32 - memory = "5GB" - time = "12h" - queue = "CLG6242deb384A,CLG6242deb384C,CLG5218deb192A,CLG5218deb192B,CLG5218deb192C,CLG5218deb192D,SLG5118deb96,SLG6142deb384A,SLG6142deb384B,SLG6142deb384C,SLG6142deb384D" - penv = "openmp32" - } - } - } - ccin2p3 { - singularity.enabled = true - singularity.cacheDir = "$baseDir/.singularity_in2p3/" - singularity.runOptions = "--bind /pbs,/sps,/scratch" - process{ - withLabel: urqt { - container = "lbmc/urqt:d62c1f8" - scratch = true - stageInMode = "copy" - stageOutMode = "rsync" - executor = "sge" - clusterOptions = "-P P_lbmc -l os=cl7 -l sps=1 -r n\ - " - cpus = 1 - queue = "huge" - } - } - } -} - diff --git a/src/nf_modules/urqt/trimming_single.nf b/src/nf_modules/urqt/trimming_single.nf deleted file mode 100644 index 42bc7c2c..00000000 --- a/src/nf_modules/urqt/trimming_single.nf +++ /dev/null @@ -1,30 +0,0 @@ -params.fastq = "$baseDir/data/fastq/*.fastq" - -log.info "fastq files : ${params.fastq}" - -Channel - .fromPath( params.fastq ) - .ifEmpty { error "Cannot find any fastq files matching: ${params.fastq}" } - .map { it -> [(it.baseName =~ /([^\.]*)/)[0][1], it]} - .set { fastq_files } - -process trimming { - tag "$file_id" - echo true - label "urqt" - - input: - set file_id, file(reads) from fastq_files - - output: - set file_id, "*_trim.fastq.gz" into fastq_files_trim - - script: - """ - UrQt --t 20 --m ${task.cpus} --gz \ - --in ${reads} \ - --out ${file_id}_trim.fastq.gz \ - > ${file_id}_trimming_report.txt - """ -} - -- GitLab