Skip to content
Snippets Groups Projects
Unverified Commit c5a7aa0f authored by Laurent Modolo's avatar Laurent Modolo
Browse files

Merge branch 'dev'

parents 03283317 a2f9dcc6
No related branches found
No related tags found
No related merge requests found
Showing
with 270 additions and 1 deletion
......@@ -2,3 +2,4 @@ nextflow
.nextflow.log*
.nextflow/
work/
results
*
FROM sambamba:0.6.7
MAINTAINER Laurent Modolo
ENV BWA_VERSION=0.7.17
ENV SAMBLASTER_VERSION=0.1.24
ENV PACKAGES curl=7.58.0* \
ca-certificates=20180409 \
build-essential=12.4* \
zlib1g-dev=1:1.2.11*
RUN apt-get update && \
apt-get install -y --no-install-recommends ${PACKAGES} && \
apt-get clean
RUN curl -k -L https://github.com/lh3/bwa/releases/download/v${BWA_VERSION}/bwa-${BWA_VERSION}.tar.bz2 -o bwa-v${BWA_VERSION}.tar.bz2 && \
tar xjf bwa-v${BWA_VERSION}.tar.bz2 && \
cd bwa-${BWA_VERSION}/ && \
make && \
cp bwa /usr/bin && \
cd .. && \
rm -R bwa-${BWA_VERSION}/
RUN curl -k -L https://github.com/GregoryFaust/samblaster/releases/download/v.${SAMBLASTER_VERSION}/samblaster-v.${SAMBLASTER_VERSION}.tar.gz -o samblaster-v.${SAMBLASTER_VERSION}.tar.gz && \
tar xvf samblaster-v.${SAMBLASTER_VERSION}.tar.gz && \
cd samblaster-v.${SAMBLASTER_VERSION}/ && \
make && \
cp samblaster /usr/bin && \
cd .. && \
rm -R samblaster-v.${SAMBLASTER_VERSION}/
#!/bin/sh
docker build src/docker_modules/BWA/0.7.17 -t 'bwa:0.7.17'
FROM broadinstitute/gatk:4.0.8.1
MAINTAINER Laurent Modolo
ENV GATK_VERSION=4.0.8.1
RUN cp gatk /usr/bin/
#!/bin/sh
docker build src/docker_modules/GATK/4.0.8.1 -t 'gatk:4.0.8.1'
FROM ubuntu:18.04
MAINTAINER Laurent Modolo
ENV BCFTOOLS_VERSION=1.7
ENV PACKAGES bcftools=${BCFTOOLS_VERSION}*
RUN apt-get update && \
apt-get install -y --no-install-recommends ${PACKAGES} && \
apt-get clean
#!/bin/sh
docker build src/docker_modules/bcftools/1.7 -t 'bcftools:1.7'
FROM ubuntu:18.04
MAINTAINER Laurent Modolo
ENV BIOAWK_VERSION=1.0
ENV PACKAGES git=1:2.17* \
build-essential=12.4* \
ca-certificates=20180409 \
zlib1g-dev=1:1.2.11* \
byacc
RUN apt-get update && \
apt-get install -y --no-install-recommends ${PACKAGES} && \
apt-get clean
RUN git clone https://github.com/lh3/bioawk.git && \
cd bioawk && \
git checkout tags/v${BIOAWK_VERSION} && \
make && \
cd .. && \
mv bioawk/bioawk /usr/bin/ && \
rm -Rf bioawk
#!/bin/sh
docker build src/docker_modules/bioawk/1.0 -t 'bioawk:1.0'
FROM ubuntu:18.04
MAINTAINER Laurent Modolo
ENV SAMBAMBA_VERSION=0.6.7
ENV PACKAGES curl=7.58.0* \
ca-certificates=20180409 \
build-essential=12.4* \
zlib1g-dev=1:1.2.11*
RUN apt-get update && \
apt-get install -y --no-install-recommends ${PACKAGES} && \
apt-get clean
RUN curl -k -L https://github.com/biod/sambamba/releases/download/v${SAMBAMBA_VERSION}/sambamba_v${SAMBAMBA_VERSION}_linux.tar.bz2 -o sambamba_v${SAMBAMBA_VERSION}_linux.tar.bz2 && \
tar xvjf sambamba_v${SAMBAMBA_VERSION}_linux.tar.bz2 && \
mv sambamba /usr/bin/ && \
rm -R sambamba_v${SAMBAMBA_VERSION}_linux*
#!/bin/sh
docker build src/docker_modules/sambamba/0.6.7 -t 'sambamba:0.6.7'
FROM ubuntu:18.04
MAINTAINER Laurent Modolo
ENV SAMBLASTER_VERSION=0.1.24
ENV PACKAGES curl=7.58.0* \
ca-certificates=20180409 \
build-essential=12.4* \
zlib1g-dev=1:1.2.11*
RUN apt-get update && \
apt-get install -y --no-install-recommends ${PACKAGES} && \
apt-get clean
RUN curl -k -L https://github.com/GregoryFaust/samblaster/releases/download/v.${SAMBLASTER_VERSION}/samblaster-v.${SAMBLASTER_VERSION}.tar.gz -o samblaster-v.${SAMBLASTER_VERSION}.tar.gz && \
tar xvf samblaster-v.${SAMBLASTER_VERSION}.tar.gz && \
cd samblaster-v.${SAMBLASTER_VERSION}/ && \
make && \
cp samblaster /usr/bin && \
cd .. && \
rm -R samblaster-v.${SAMBLASTER_VERSION}/
#!/bin/sh
docker build src/docker_modules/samblaster/0.1.24 -t 'samblaster:0.1.24'
profiles {
docker {
docker.temp = 'auto'
docker.enabled = true
process {
$index_fasta {
container = "bwa:0.7.17"
}
}
}
sge {
process{
$index_fasta {
beforeScript = "module purge; module load BWA/0.7.17"
executor = "sge"
cpus = 1
memory = "5GB"
time = "6h"
queueSize = 1000
pollInterval = '60sec'
queue = 'h6-E5-2667v4deb128'
penv = 'openmp8'
}
}
}
}
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"
cpus 4
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
"""
}
profiles {
docker {
docker.temp = 'auto'
docker.enabled = true
process {
$mapping_fastq {
container = "bwa:0.7.17"
}
}
}
sge {
process{
$mapping_fastq {
beforeScript = "module purge; module load BWA/0.7.17"
executor = "sge"
cpus = 4
memory = "5GB"
time = "6h"
queueSize = 1000
pollInterval = '60sec'
queue = 'h6-E5-2667v4deb128'
penv = 'openmp8'
}
}
}
}
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"
cpus 4
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
"""
}
./nextflow src/nf_modules/BWA/indexing.nf \
-c src/nf_modules/BWA/indexing.config \
-profile docker \
--fasta "data/tiny_dataset/fasta/tiny_v2.fasta"
# ./nextflow src/nf_modules/BWA/mapping_single.nf \
# -c src/nf_modules/BWA/mapping_single.config \
# -profile docker \
# --index "results/mapping/index/tiny_v2.index" \
# --fastq "data/tiny_dataset/fastq/tiny*_S.fastq"
./nextflow src/nf_modules/BWA/mapping_paired.nf \
-c src/nf_modules/BWA/mapping_paired.config \
-profile docker \
--index "results/mapping/index/tiny_v2*" \
--fastq "data/tiny_dataset/fastq/tiny*_R{1,2}.fastq"
profiles {
docker {
docker.temp = 'auto'
docker.enabled = true
process {
$index_bam {
container = "sambamba:0.6.7"
}
}
}
sge {
process{
$index_bam {
beforeScript = "module purge; module load sambamba/0.6.7"
}
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment