Commit f19a3ec0 authored by elabaron's avatar elabaron
Browse files

Add Ribowave and Fastq nf modules

 Changes to be committed:
	new file:   src/10_ribowave.nf
	modified:   src/docker_modules/FastQC/0.11.5/Dockerfile : Add perl instalation
	new file:   src/nf_modules/FastQC/fastqc.config
	new file:   src/nf_modules/FastQC/fastqc.nf
	renamed:    src/nf_modules/Ribowave/10_ribowave.nf -> src/nf_modules/Ribowave/pipeline_PSMN.nf
	new file:   src/nf_modules/Ribowave/pipeline_docker.nf
	modified:   src/nf_modules/Ribowave/test/P-site.nf
	new file:   src/ribowave.config
parent 424c95ff
/*
* Ribowave :
* Inputs : gtf genome files
* Inputs : bam file
* Inputs : genome size file
*/
/* PARAMETERS */
params.gtf = ""
params.genome = ""
params.bam = ""
params.genomesize = ""
log.info "gtf file : ${params.gtf}"
log.info "genome fasta file : ${params.genome}"
log.info "bam file(s) : ${params.bam}"
log.info "genomesize file : ${params.genomesize}"
Channel
.fromPath( params.gtf )
.ifEmpty { error "Cannot find any fasta files matching: ${params.gtf}" }
.set { gtf_file }
Channel
.fromPath( params.genome )
.ifEmpty { error "Cannot find any fasta files matching: ${params.genome}" }
.set { genome_file }
Channel
.fromPath( params.bam )
.ifEmpty { error "Cannot find any fastq files matching: ${params.bam}" }
.set { bam_files }
bam_files.into {bam_deter_P_site ; bam_track_P_site}
Channel
.fromPath( params.genomesize )
.ifEmpty { error "Cannot find any index files matching: ${params.genomesize}" }
.set { genomesize_file }
/* CREATE ANNOTATION */
process create_annot {
publishDir "results/ribowave/annotation", mode: 'copy'
input:
file gtf from gtf_file
file genome from genome_file
output:
file "*" into annot_file
file "start_codon.bed" into start_codon_channel
file "final.ORFs" into finalORF_channel
file "exons.gtf" into exon_gtf_channel
script:
"""
/Ribowave/scripts/create_annotation.sh -G ${gtf} -f ${genome} -o ./ -s /Ribowave/scripts
"""
}
/* P-site determination */
process determination_P_site {
tag "$bam.baseName"
publishDir "results/ribowave", mode: 'copy'
input:
file bam from bam_deter_P_site
file start from start_codon_channel
output:
file "*" into p_site_channel
file "*psite1nt.txt" into psite1nt_channel
script:
"""
/Ribowave/scripts/P-site_determination.sh -i ${bam} -S ${start} -o ./ -n ${bam.baseName} -s /Ribowave/scripts
"""
}
/* P-site track */
process track_P_site {
tag "$bam.baseName"
publishDir "results/ribowave", mode: 'copy'
input:
file bam from bam_track_P_site
file exon from exon_gtf_channel
file genomesize from genomesize_file
file p_site from psite1nt_channel
output:
file "*" into track_p_site_channel
file "final.psite" into psite_channel
script:
"""
/Ribowave/scripts/create_track_Ribo.sh -i ${bam} -G ${exon} -g ${genomesize} -P ${p_site} -o ./ -n ${bam.baseName} -s /Ribowave/scripts
"""
}
/* ribowave Identifying translated ORF */
process ribowave_transORF {
publishDir "results/ribowave", mode: 'copy'
input:
file psite from psite_channel
file finalORF from finalORF_channel
output:
file "*" into ribowave_channel
script:
"""
/Ribowave/scripts/Ribowave -PD -a ${psite} -b ${finalORF} -o ./ -n ${bam.baseName} -s /Ribowave/scripts -p 2
"""
}
......@@ -2,7 +2,8 @@ FROM ubuntu:18.04
MAINTAINER Laurent Modolo
ENV FASTQC_VERSION=0.11.5
ENV PACKAGES fastqc=${FASTQC_VERSION}*
ENV PACKAGES fastqc=${FASTQC_VERSION}* \
perl
RUN apt-get update && \
apt-get install -y --no-install-recommends ${PACKAGES} && \
......
profiles {
docker {
docker.temp = 'auto'
docker.enabled = true
process {
$fastqc {
container = "fastqc:0.11.5"
}
}
}
sge {
process{
$fastqc {
beforeScript = "source /home/elabaron/.bashrc ; module load FastQC/0.11.5"
}
}
}
}
/*
* fastqc :
* Imputs : fastq files
* Output : pdf files
*/
/* fastQC */
params.fastq = ""
log.info "fastq files : ${params.fastq}"
Channel
.fromPath( params.fastq )
.ifEmpty { error "Cannot find any fastq files matching: ${params.fastq}" }
.set { fastq_files }
process fastqc {
tag "$fastq.baseName"
publishDir "results/fasqc/${fastq.baseName}/", mode: 'copy'
input:
file fastq from fastq_files
output:
file "*" into fastqc_repport
script:
"""
fastqc -o ./ --noextract -f fastq ${fastq}
"""
}
/*
* Ribowave :
* Inputs : gtf genome files
* Inputs : bam file
* Inputs : genome size file
*/
/* PARAMETERS */
params.gtf = ""
params.genome = ""
params.bam = ""
params.genomesize = ""
log.info "gtf file : ${params.gtf}"
log.info "genome fasta file : ${params.genome}"
log.info "bam file(s) : ${params.bam}"
log.info "genomesize file : ${params.genomesize}"
Channel
.fromPath( params.gtf )
.ifEmpty { error "Cannot find any fasta files matching: ${params.gtf}" }
.set { gtf_file }
Channel
.fromPath( params.genome )
.ifEmpty { error "Cannot find any fasta files matching: ${params.genome}" }
.set { genome_file }
Channel
.fromPath( params.bam )
.ifEmpty { error "Cannot find any fastq files matching: ${params.bam}" }
.set { bam_files }
bam_files.into {bam_deter_P_site ; bam_track_P_site ; bam_ribowave}
Channel
.fromPath( params.genomesize )
.ifEmpty { error "Cannot find any index files matching: ${params.genomesize}" }
.set { genomesize_file }
/* CREATE ANNOTATION */
process create_annot {
publishDir "results/ribowave/annotation", mode: 'copy'
input:
file gtf from gtf_file
file genome from genome_file
output:
file "*" into annot_file
file "start_codon.bed" into start_codon_channel
file "exons.gtf" into exon_gtf_channel
file "final.ORFs" into finalORF_channel
script:
"""
/Ribowave/scripts/create_annotation.sh -G ${gtf} -f ${genome} -o ./ -s /Ribowave/scripts
"""
}
/* P-site determination */
process determination_P_site {
tag "$bam.baseName"
publishDir "results/ribowave/", mode: 'copy'
input:
file bam from bam_deter_P_site
file start from start_codon_channel
output:
file "*" into p_site_channel
file "P-site/*1nt.txt" into psite1nt_channel
script:
"""
/Ribowave/scripts/P-site_determination.sh -i ${bam} -S ${start} -o ./ -n ${bam.baseName} -s /Ribowave/scripts
"""
}
/* P-site track */
process track_P_site {
tag "$bam.baseName"
publishDir "results/ribowave", mode: 'copy'
input:
file bam from bam_track_P_site
file exon from exon_gtf_channel
file genomesize from genomesize_file
file p_site from psite1nt_channel
output:
file "*" into track_p_site_channel
file "bedgraph/${bam.baseName}/final.psite" into psite_channel
script:
"""
/Ribowave/scripts/create_track_Ribo.sh -i ${bam} -G ${exon} -g ${genomesize} -P ${p_site} -o ./ -n ${bam.baseName} -s /Ribowave/scripts
"""
}
/* ribowave Identifying translated ORF */
process ribowave_transORF {
tag "$bam.baseName"
publishDir "results/ribowave", mode: 'copy'
input:
file psite from psite_channel
file bam from bam_ribowave
file finalORF from finalORF_channel
output:
file "*" into ribowave_channel
script:
"""
/Ribowave/scripts/Ribowave -PD -a ${psite} -b ${finalORF} -o ./ -n ${bam.baseName} -s /Ribowave/scripts -p 2
"""
}
params.bam = ""
params.start = ""
params.jobname = ""
log.info "bam file(s) : ${params.bam}"
log.info "start_codon file : ${params.start}"
log.info "job name : ${params.jobname}"
Channel
.fromPath( params.bam )
......@@ -15,8 +13,9 @@ Channel
.ifEmpty { error "Cannot find any index files matching: ${params.start}" }
.set { start_file }
process p_site {
publishDir "results/ribowave/P-site", mode: 'copy'
process determination_P_site {
tag "$bam.baseName"
publishDir "results/ribowave", mode: 'copy'
input:
file bam from bam_files
......@@ -24,9 +23,10 @@ process p_site {
output:
file "*" into p_site_channel
file "*psite1nt.txt" into psite1nt_channel
script:
"""
/Ribowave/scripts/P-site_determination.sh -i ${bam} -S ${start} -o ./ -n ${params.jobname} -s /Ribowave/scripts
/Ribowave/scripts/P-site_determination.sh -i ${bam} -S ${start} -o ./ -n ${bam.baseName} -s /Ribowave/scripts
"""
}
profiles {
docker {
docker.temp = 'auto'
docker.enabled = true
process {
$create_annot {
container = "ribowave:1.0"
}
$determination_P_site {
container = "ribowave:1.0"
}
$track_P_site {
container = "ribowave:1.0"
}
$ribowave_transORF {
container = "ribowave:1.0"
}
}
}
sge {
process{
$create_annot {
beforeScript = "source /home/elabaron/.bashrc; module load BEDtools/2.25.0"
executor = "sge"
cpus = 8
memory = "5GB"
time = "6h"
queue = '*-E5-2667*'
penv = 'openmp8'
}
$determination_P_site {
beforeScript = "source /home/elabaron/.bashrc; module load BEDtools/2.25.0"
executor = "sge"
cpus = 8
memory = "5GB"
time = "6h"
queue = '*-E5-2667*'
penv = 'openmp8'
}
$track_P_site {
beforeScript = "source /home/elabaron/.bashrc; module load BEDtools/2.25.0"
executor = "sge"
cpus = 8
memory = "5GB"
time = "6h"
queue = '*-E5-2667*'
penv = 'openmp8'
}
$ribowave_transORF {
beforeScript = "source /home/elabaron/.bashrc; module load BEDtools/2.25.0"
executor = "sge"
cpus = 8
memory = "128GB"
time = "6h"
queue = '*-E5-2667*'
penv = 'openmp8'
}
}
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment