Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
  • dev
  • master
  • v0.1.0
  • v0.1.2
  • v0.2.0
  • v0.2.1
  • v0.2.2
  • v0.2.3
  • v0.2.4
  • v0.2.5
  • v0.2.6
  • v0.2.7
  • v0.2.8
  • v0.2.9
  • v0.3.0
  • v0.4.0
  • v2.0.0
17 results

Target

Select target project
  • LBMC/regards/nextflow
  • elabaron/nextflow
  • lanani/nextflow
  • mlepetit/nextflow
  • mdjaffar/nextflow
  • LBMC/RMI2/rmi2_pipelines
  • lpicard/nextflow
  • rseraphi/nextflow
  • hregue/nextflow
  • letien02/nextflow
  • mshamjal/nextflow
  • z483801/nextflow
  • fduveau/nextflow
  • cginevra/nextflow
  • dtorresc/nextflow
  • fmortreu/nextflow
  • jshapiro/nextflow
  • carpin/nextflow
  • LBMC/Delattre/JU28_59vs17_SNP
  • jclaud01/nextflow
  • dchalopi/nextflow
  • mvilcot/nextflow
  • mherbett/nextflow
  • lestrada/nextflow
  • nfontrod/nextflow
  • gbenoit/nextflow
  • gyvert/nextflow
  • aguill09/nextflow
  • alapendr/nextflow
  • jprobin/nextflow
  • vvanoost/nextflow
  • jblin/nextflow
  • mparis/nextflow
  • ogandril/nextflow
  • cbourgeo/nextflow
  • ggirau03/nextflow
  • ecombe01/nextflow
  • acorbin/nextflow
  • pberna01/nextflow
  • pmarie01/nextflow
  • rhoury/nextflow
  • lgely/nextflow
  • jvalat/nextflow
  • cfournea/nextflow
  • mprieux/nextflow
  • hpolvech/nextflow
  • LBMC/nextflow
  • mcariou/nextflow
  • z483800/nextflow
  • yjia01/nextflow
  • jkleine/nextflow
  • LBMC/Palladino/RNAseq_nextflow
  • jseimand/nextflow
  • nlecouvr/nextflow-nathan
54 results
Select Git revision
  • master
  • tp_experimental_biologists
2 results
Show changes
Showing
with 349 additions and 338 deletions
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}
"""
}
profiles {
docker {
docker.temp = 'auto'
docker.enabled = true
process {
withname: sort_bam {
container = "samtools:1.7"
}
}
}
psmn {
process{
withname: sort_bam {
beforeScript = "source /usr/share/lmod/lmod/init/bash; module use ~/privatemodules"
module = "SAMtools/1.7"
executor = "sge"
clusterOptions = "-m e -cwd -V"
memory = "20GB"
time = "12h"
queue = 'monointeldeb128'
}
}
}
}
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:
"""
samtools sort -@ ${task.cpus} -O BAM -o ${file_id}_sorted.bam ${bam}
"""
}
profiles {
docker {
docker.temp = 'auto'
docker.enabled = true
process {
withname: split_bam {
container = "samtools:1.7"
}
}
}
psmn {
process{
withname: split_bam {
beforeScript = "source /usr/share/lmod/lmod/init/bash; module use ~/privatemodules"
module = "SAMtools/1.7"
executor = "sge"
clusterOptions = "-m e -cwd -V"
memory = "20GB"
time = "12h"
queue = 'monointeldeb128'
}
}
}
}
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 2
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
"""
}
./nextflow src/nf_modules/SAMtools/sort_bams.nf \
-c src/nf_modules/SAMtools/sort_bams.config \
-profile docker \
--bam "data/tiny_dataset/map/tiny_v2.bam"
./nextflow src/nf_modules/SAMtools/index_bams.nf \
-c src/nf_modules/SAMtools/index_bams.config \
-profile docker \
--bam "data/tiny_dataset/map/tiny_v2.sort.bam"
./nextflow src/nf_modules/SAMtools/split_bams.nf \
-c src/nf_modules/SAMtools/split_bams.config \
-profile docker \
--bam "data/tiny_dataset/map/tiny_v2.bam"
./nextflow src/nf_modules/SAMtools/filter_bams.nf \
-c src/nf_modules/SAMtools/filter_bams.config \
-profile docker \
--bam "data/tiny_dataset/map/tiny_v2.bam" \
--bed "data/tiny_dataset/OLD/2genes.bed"
profiles {
docker {
docker.temp = 'auto'
docker.enabled = true
process {
withname: fastq_dump {
container = "sratoolkit:2.8.2"
}
}
}
psmn {
process{
withname: fastq_dump {
beforeScript = "source /usr/share/lmod/lmod/init/bash; module use ~/privatemodules"
module = "SRAtoolkit/2.8.2"
executor = "sge"
clusterOptions = "-m e -cwd -V"
memory = "20GB"
time = "12h"
queue = 'monointeldeb128'
}
}
}
}
/*
* 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:
"""
#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
"""
}
./nextflow src/nf_modules/SRAtoolkit/fastqdump.nf \
-c src/nf_modules/SRAtoolkit/fastqdump.config \
-profile docker \
--list_srr "src/nf_modules/SRAtoolkit/list-srr.txt"
./nextflow src/nf_modules/UrQt/trimming_paired.nf \
-c src/nf_modules/UrQt/trimming_paired.config \
-profile docker \
--fastq "data/tiny_dataset/fastq/tiny_R{1,2}.fastq"
./nextflow src/nf_modules/UrQt/trimming_single.nf \
-c src/nf_modules/UrQt/trimming_single.config \
-profile docker \
--fastq "data/tiny_dataset/fastq/tiny_R{1,2}.fastq"
profiles {
docker {
docker.temp = 'auto'
docker.enabled = true
process {
withName: trimming {
container = "urqt:d62c1f8"
}
}
}
psmn {
process{
withName: trimming {
beforeScript = "source /usr/share/lmod/lmod/init/bash; module use ~/privatemodules"
module = "UrQt/d62c1f8"
executor = "sge"
clusterOptions = "-m e -cwd -V"
memory = "5GB"
time = "12h"
queue = 'E5-2670deb128A,E5-2670deb128B,E5-2670deb128C,E5-2670deb128D,E5-2670deb128E,E5-2670deb128F'
penv = 'openmp16'
}
}
}
}
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}"
cpus 4
publishDir "results/fastq/trimming/", mode: 'copy'
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
"""
}
profiles {
docker {
docker.temp = 'auto'
docker.enabled = true
process {
withName: trimming {
container = "urqt:d62c1f8"
}
}
}
psmn {
process{
withName: trimming {
beforeScript = "source /usr/share/lmod/lmod/init/bash; module use ~/privatemodules"
module = "UrQt/d62c1f8"
executor = "sge"
clusterOptions = "-m e -cwd -V"
memory = "5GB"
time = "12h"
queue = 'E5-2670deb128A,E5-2670deb128B,E5-2670deb128C,E5-2670deb128D,E5-2670deb128E,E5-2670deb128F'
penv = 'openmp16'
}
}
}
}
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"
cpus 4
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
"""
}
// SPDX-FileCopyrightText: 2022 Laurent Modolo <laurent.modolo@ens-lyon.fr>
//
// SPDX-License-Identifier: AGPL-3.0-or-later
version = "0.8.0"
container_url = "lbmc/agat:${version}"
params.gff_to_bed = ""
params.gff_to_bed_out = ""
process gff_to_bed {
container = "${container_url}"
label "big_mem_mono_cpus"
tag "$file_id"
if (params.gff_to_bed_out != "") {
publishDir "results/${params.gff_to_bed_out}", mode: 'copy'
}
input:
tuple val(file_id), path(gff)
output:
tuple val(file_id), path("*.bed"), emit: bed
script:
"""
zcat ${gff} > ${gff.baseName}.gff
agat_convert_sp_gff2bed.pl ${params.gff_to_bed} --gff ${gff.baseName}.gff -o ${gff.simpleName}.bed
"""
}
params.gff_to_gtf = ""
params.gff_to_gtf_out = ""
process gff_to_gtf {
container = "${container_url}"
label "big_mem_mono_cpus"
tag "$file_id"
if (params.gff_to_gtf_out != "") {
publishDir "results/${params.gff_to_gtf_out}", mode: 'copy'
}
input:
tuple val(file_id), path(gff)
output:
tuple val(file_id), path("*.gtf"), emit: gtf
script:
"""
zcat ${gff} > ${gff.baseName}.gff
agat_convert_sp_gff2gtf.pl ${params.gff_to_gtf} --gff ${gff.baseName}.gff -o ${gff.simpleName}.gtf
"""
}
\ No newline at end of file
// SPDX-FileCopyrightText: 2022 Laurent Modolo <laurent.modolo@ens-lyon.fr>
//
// SPDX-License-Identifier: AGPL-3.0-or-later
version = "dd96682"
container_url = "lbmc/alntools:${version}"
params.bam2ec = ""
params.bam2ec_out = ""
process bam2ec {
container = "${container_url}"
label "big_mem_mono_cpus"
tag "$file_id"
if (params.bam2ec_out != "") {
publishDir "results/${params.bam2ec_out}", mode: 'copy'
}
input:
tuple val(file_id), path(bam), path(bam_idx)
tuple val(transcripts_lengths_id), path(transcripts_lengths)
output:
tuple val(file_id), path("${bam.simpleName}.bin"), emit: bin
tuple val(transcripts_lengths_id), path("${transcripts_lengths}"), emit: tsv
tuple val(file_id), path("${bam.simpleName}_bam2ec_report.txt"), emit: report
script:
"""
mkdir tmp
alntools bam2ec \
-c 1 ${params.bam2ec} \
-d ./tmp \
-t ${transcripts_lengths} \
-v \
${bam} ${bam.simpleName}.bin &> \
${bam.simpleName}_bam2ec_report.txt
"""
}
params.gtf_to_transcripts_lengths = ""
params.gtf_to_transcripts_lengths_out = ""
process gtf_to_transcripts_lengths {
container = "${container_url}"
label "big_mem_mono_cpus"
tag "$file_id"
if (params.gtf_to_transcripts_lengths != "") {
publishDir "results/${params.gtf_to_transcripts_lengths}", mode: 'copy'
}
input:
tuple val(file_id), path(gtf)
output:
tuple val(file_id), path("${gtf.simpleName}_transcripts_lengths.tsv"), emit: tsv
script:
"""
awk -F"[\\t;]" '
\$3=="exon" {
ID=gensub(/transcript_id \\"(.*)\\"/, "\\\\1", "g", \$11);
LEN[ID]+=\$5-\$4+1;
}
END{
for(i in LEN)
{print i"\\t"LEN[i]}
}
' ${gtf} > ${gtf.simpleName}_transcripts_lengths.tsv
"""
}
// SPDX-FileCopyrightText: 2022 Laurent Modolo <laurent.modolo@ens-lyon.fr>
//
// SPDX-License-Identifier: AGPL-3.0-or-later
version = "5.1_24Aug19.3e8--hdfd78af_1"
container_url = "quay.io/biocontainers/beagle::${version}"
params.phasing = ""
process phasing {
container = "${container_url}"
label "big_mem_multi_cpus"
tag "$file_id"
input:
tuple val(file_id), path(vcf)
tuple val(ref_id), path(ref_vcf)
output:
tuple val(file_id), path("*.bam*"), emit: bam
script:
"""
beagle nthread=${task.cpus} \
gtgl=${vcf} \
ref=${ref_vcf}
"""
}
// SPDX-FileCopyrightText: 2022 Laurent Modolo <laurent.modolo@ens-lyon.fr>
//
// SPDX-License-Identifier: AGPL-3.0-or-later
version = "2.25.0"
container_url = "lbmc/bedtools:${version}"
params.fasta_from_bed = "-name"
params.fasta_from_bed_out = ""
process fasta_from_bed {
container = "${container_url}"
label "big_mem_mono_cpus"
tag "${file_id}"
if (params.fasta_from_bed_out != "") {
publishDir "results/${params.fasta_from_bed_out}", mode: 'copy'
}
input:
tuple val(fasta_id), path(fasta)
tuple val(file_id), path(bed)
output:
tuple val(file_id), path("*_extracted.fasta"), emit: fasta
script:
"""
bedtools getfasta ${params.fasta_from_bed} \
-fi ${fasta} -bed ${bed} -fo ${bed.baseName}_extracted.fasta
"""
}
params.merge_bed = ""
params.merge_bed_out = ""
process merge_bed {
container = "${container_url}"
label "big_mem_mono_cpus"
tag "${file_id}"
if (params.merge_bed_out != "") {
publishDir "results/${params.merge_bed_out}", mode: 'copy'
}
input:
tuple val(file_id), path(bed)
output:
tuple val(file_id), path("*_merged.fasta"), emit: bed
script:
"""
bedtools merge ${params.merge_bed} -i ${bed} > ${bed[0].simpleName}_merged.bed
"""
}
params.bam_to_fastq_singleend = ""
params.bam_to_fastq_singleend_out = ""
process bam_to_fastq_singleend {
container = "${container_url}"
label "big_mem_mono_cpus"
tag "${bam_id}"
if (params.bam_to_fastq_singleend_out != "") {
publishDir "results/${params.bam_to_fastq_singleend_out}", mode: 'copy'
}
input:
tuple val(bam_id), path(bam)
output:
tuple val(bam_id), path("*.fastq"), emit: fastq
script:
"""
bedtools bamtofastq \
${params.bam_to_fastq_singleend} \
-i ${bam} -fq ${bam.baseName}.fastq
"""
}
params.bam_to_fastq_pairedend = ""
params.bam_to_fastq_pairedend_out = ""
process bam_to_fastq_pairedend {
container = "${container_url}"
label "big_mem_mono_cpus"
tag "${bam_id}"
if (params.bam_to_fastq_pairedend_out != "") {
publishDir "results/${params.bam_to_fastq_pairedend_out}", mode: 'copy'
}
input:
tuple val(bam_id), path(bam)
output:
tuple val(bam_id), path("*.fastq"), emit: fastq
script:
"""
bedtools bamtofastq \
${params.bam_to_fastq_pairedend} \
-i ${bam} -fq ${bam.baseName}_R1.fastq -fq2 ${bam.baseName}_R2.fastq
"""
}
params.bam_to_bedgraph = ""
params.bam_to_bedgraph_out = ""
process bam_to_bedgraph {
container = "${container_url}"
label "big_mem_mono_cpus"
tag "${bam_id}"
if (params.bam_to_bedgraph_out != "") {
publishDir "results/${params.bam_to_bedgraph_out}", mode: 'copy'
}
input:
tuple val(bam_id), path(bam)
output:
tuple val(bam_id), path("*.bed"), emit: bed
script:
"""
bedtools genomecov \
${params.bam_to_bedgraph} \
-ibam ${bam} \
-bg > ${bam.simpleName}.bed
"""
}
// SPDX-FileCopyrightText: 2022 Laurent Modolo <laurent.modolo@ens-lyon.fr>
//
// SPDX-License-Identifier: AGPL-3.0-or-later
version = "1.0"
container_url = "lbmc/bioawk:${version}"
params.fasta_to_transcripts_lengths = ""
params.fasta_to_transcripts_lengths_out = ""
process fasta_to_transcripts_lengths {
container = "${container_url}"
label "big_mem_mono_cpus"
tag "$file_id"
if (params.fasta_to_transcripts_lengths_out != "") {
publishDir "results/${params.fasta_to_transcripts_lengths_out}", mode: 'copy'
}
input:
tuple val(file_id), path(fasta)
output:
tuple val(file_id), path("${fasta.simpleName}_transcripts_lengths.tsv"), emit: tsv
script:
"""
bioawk -c fastx '{print(\$name" "length(\$seq))}' ${fasta} > ${fasta.simpleName}_transcripts_lengths.tsv
"""
}
\ No newline at end of file
// SPDX-FileCopyrightText: 2022 Laurent Modolo <laurent.modolo@ens-lyon.fr>
//
// SPDX-License-Identifier: AGPL-3.0-or-later
version = "0.4.0"
container_url = "lbmc/bioconvert:${version}"
params.bigwig_to_wig = ""
params.bigwig_to_wig_out = ""
process bigwig_to_wig {
container = "${container_url}"
label "big_mem_mono_cpus"
tag "${file_id}"
if (params.bigwig_to_wig_out != "") {
publishDir "results/${params.bigwig_to_wig_out}", mode: 'copy'
}
input:
tuple val(file_id) path(bw)
output:
tuple val(file_id), path("*.wig"), emit: wig
script:
"""
bioconvert bigwig2wiggle ${bw} ${bw.simpleName}.wig
"""
}
params.bigwig2_to_wig2 = ""
params.bigwig2_to_wig2_out = ""
process bigwig2_to_wig2 {
container = "${container_url}"
label "big_mem_mono_cpus"
tag "${file_id}"
if (params.bigwig_to_wig_out != "") {
publishDir "results/${params.bigwig_to_wig_out}", mode: 'copy'
}
input:
tuple val(file_id), path(bw_a), path(bw_b)
output:
tuple val(file_id), path("${bw_a.simpleName}.wig"), path("${bw_b.simpleName}.wig"), emit: wig
script:
"""
bioconvert bigwig2wiggle ${bw_a} ${bw_a.simpleName}.wig
bioconvert bigwig2wiggle ${bw_b} ${bw_b.simpleName}.wig
"""
}
\ No newline at end of file