Skip to content
Snippets Groups Projects
Verified Commit 139175cb authored by Laurent Modolo's avatar Laurent Modolo
Browse files

Merge branch 'dev'

parents a4809608 7aaaa9ed
Branches
Tags v0.2.5
No related merge requests found
Showing
with 143 additions and 261 deletions
profiles {
docker {
docker.temp = 'auto'
docker.enabled = true
process {
$mapping_fastq {
container = "bowtie2:2.3.4.1"
}
}
}
sge {
process{
$mapping_fastq {
beforeScript = "module purge; module load SAMtools/1.7; module load Bowtie2/2.3.4.1"
}
}
}
}
./nextflow src/nf_modules/Bowtie2/tests/index.nf \
-c src/nf_modules/Bowtie2/bowtie2.config \
./nextflow src/nf_modules/Bowtie2/indexing.nf \
-c src/nf_modules/Bowtie2/indexing.config \
-profile docker \
--fasta "data/tiny_dataset/fasta/tiny_v2.fasta"
./nextflow src/nf_modules/Bowtie2/tests/mapping_single.nf \
-c src/nf_modules/Bowtie2/bowtie2.config \
./nextflow src/nf_modules/Bowtie2/mapping_single.nf \
-c src/nf_modules/Bowtie2/mapping_single.config \
-profile docker \
--index "data/tiny_dataset/fasta/*.bt2" \
--fastq "data/tiny_dataset/fastq/tiny*_S.fastq"
./nextflow src/nf_modules/Bowtie2/tests/mapping_paired.nf \
-c src/nf_modules/Bowtie2/bowtie2.config \
./nextflow src/nf_modules/Bowtie2/mapping_paired.nf \
-c src/nf_modules/Bowtie2/mapping_paired.config \
-profile docker \
--index "data/tiny_dataset/fasta/*.bt2" \
--fastq "data/tiny_dataset/fastq/tiny*_R{1,2}.fastq"
......
/*
* fastqc :
* Imputs : fastq files
* Output : pdf files
*/
/* fastQC */
/*
* for single-end data
*/
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}
"""
}
/*
* for paired-end data
*/
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]}
"""
}
profiles {
docker {
docker.temp = 'auto'
docker.enabled = true
process {
$fastqc_fastq {
container = "fastqc:0.11.5"
}
}
}
sge {
process{
$fastqc_fastq {
beforeScript = "module purge; module load FastQC/0.11.5"
executor = "sge"
cpus = 1
memory = "5GB"
time = "6h"
queueSize = 1000
pollInterval = '60sec'
queue = 'monointeldeb128'
}
}
}
}
nextflow src/nf_modules/FastQC/tests/fastqc_paired.nf \
-c src/nf_modules/FastQC/fastqc.config \
nextflow src/nf_modules/FastQC/fastqc_paired.nf \
-c src/nf_modules/FastQC/fastqc_paired.config \
-profile docker \
--fastq "data/tiny_dataset/fastq/tiny_R{1,2}.fastq"
nextflow src/nf_modules/FastQC/tests/fastqc_single.nf \
-c src/nf_modules/FastQC/fastqc.config \
nextflow src/nf_modules/FastQC/fastqc_single.nf \
-c src/nf_modules/FastQC/fastqc_single.config \
-profile docker \
--fastq "data/tiny_dataset/fastq/tiny_S.fastq"
......@@ -3,6 +3,9 @@ profiles {
docker.temp = 'auto'
docker.enabled = true
process {
$sort_bam {
container = "samtools:1.7"
}
$counting {
container = "htseq:0.8.0"
}
......@@ -10,6 +13,9 @@ profiles {
}
sge {
process{
$sort_bam {
beforeScript = "module purge; module load SAMtools/1.7"
}
$trimming {
beforeScript = "module purge; module load HTSeq/0.8.0"
}
......
/*
* htseq :
* Imputs : sorted bams files
* Imputs : gtf
* Output : counts files
*/
/* quality trimming */
params.bam = "$baseDir/data/bam/*.bam"
params.gtf = "$baseDir/data/annotation/*.gtf"
......@@ -15,18 +7,36 @@ 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 "$bam.baseName"
tag "$file_id"
publishDir "results/quantification/", mode: 'copy'
input:
file bam from bam_files
set file_id, file(bam) from sorted_bam_files
file gtf from gtf_file
output:
......@@ -34,7 +44,9 @@ process counting {
script:
"""
htseq-count -r pos --mode=intersection-nonempty -a 10 -s no -t exon -i gene_id \
--format=bam ${bam} ${gtf} > ${bam.baseName}.count
htseq-count ${bam} ${gtf} \
-r pos --mode=intersection-nonempty -a 10 -s no -t exon -i gene_id \
> ${file_id}.count
"""
}
nextflow src/nf_modules/HTSeq/tests/counting.nf \
nextflow src/nf_modules/HTSeq/htseq.nf \
-c src/nf_modules/HTSeq/htseq.config \
-profile docker \
--gtf "data/tiny_dataset/annot/tiny.gff" \
......
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}" }
.set { bam_files }
Channel
.fromPath( params.gtf )
.ifEmpty { error "Cannot find any gtf file matching: ${params.gtf}" }
.set { gtf_file }
process counting {
tag "$bam.baseName"
publishDir "results/quantification/", mode: 'copy'
input:
file bam from bam_files
file gtf from gtf_file
output:
file "*.count" into count_files
script:
"""
htseq-count -r pos --mode=intersection-nonempty -a 10 -s no -t exon -i gene_id \
--format=bam ${bam} ${gtf} > ${bam.baseName}.count
"""
}
profiles {
docker {
docker.temp = 'auto'
docker.enabled = true
process {
$index_fasta {
container = "kallisto:0.44.0"
}
}
}
sge {
process{
$index_fasta {
beforeScript = "module purge; module load Kallisto/0.44.0"
executor = "sge"
cpus = 1
memory = "5GB"
time = "6h"
queueSize = 1000
pollInterval = '60sec'
queue = 'h6-E5-2667v4deb128'
penv = 'openmp8'
}
}
}
}
......@@ -17,11 +17,12 @@ process index_fasta {
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} \
> ${fasta.baseName}_kallisto_report.txt
2> ${fasta.baseName}_kallisto_report.txt
"""
}
/*
* Kallisto :
* 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:
"""
kallisto index -k 31 --make-unique -i ${fasta.baseName}.index ${fasta} \
> ${fasta.baseName}_kallisto_report.txt
"""
}
/*
* for paired-end data
*/
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"
cpus 4
publishDir "results/mapping/quantification/", mode: 'copy'
input:
set pair_id, file(reads) from fastq_files
file index from index_files.collect()
output:
file "*" into counts_files
script:
"""
mkdir ${reads[0].baseName}
kallisto quant -i ${index} -t ${task.cpus} \
--bias --bootstrap-samples 100 -o ${pair_id} \
${reads[0]} ${reads[1]} &> ${pair_id}_kallisto_report.txt
"""
}
/*
* for single-end data
*/
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"
cpus 4
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:
"""
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
"""
}
......@@ -3,9 +3,6 @@ profiles {
docker.temp = 'auto'
docker.enabled = true
process {
$index_fasta {
container = "kallisto:0.44.0"
}
$mapping_fastq {
container = "kallisto:0.44.0"
}
......@@ -13,17 +10,6 @@ profiles {
}
sge {
process{
$index_fasta {
beforeScript = "module purge; module load Kallisto/0.44.0"
executor = "sge"
cpus = 1
memory = "5GB"
time = "6h"
queueSize = 1000
pollInterval = '60sec'
queue = 'h6-E5-2667v4deb128'
penv = 'openmp8'
}
$mapping_fastq {
beforeScript = "module purge; module load Kallisto/0.44.0"
executor = "sge"
......
profiles {
docker {
docker.temp = 'auto'
docker.enabled = true
process {
$mapping_fastq {
container = "kallisto:0.44.0"
}
}
}
sge {
process{
$mapping_fastq {
beforeScript = "module purge; module load Kallisto/0.44.0"
executor = "sge"
cpus = 4
memory = "5GB"
time = "6h"
queueSize = 1000
pollInterval = '60sec'
queue = 'h6-E5-2667v4deb128'
penv = 'openmp8'
}
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment