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

SAMtools: Dockerfile ubuntu -> alpine

parent 7f9cd94b
No related branches found
No related tags found
No related merge requests found
FROM ubuntu:18.04
FROM alpine:3.8
MAINTAINER Laurent Modolo
ENV SAMTOOLS_VERSION=1.7
ENV PACKAGES samtools=${SAMTOOLS_VERSION}*
ENV PACKAGES git \
make \
gcc \
musl-dev \
zlib-dev \
ncurses-dev \
bzip2-dev \
xz-dev
RUN apt-get update && \
apt-get install -y --no-install-recommends ${PACKAGES} && \
apt-get clean
RUN apk update && \
apk add ${PACKAGES}
RUN git clone https://github.com/samtools/htslib.git && \
cd htslib && \
git checkout ${SAMTOOLS_VERSION} && \
cd .. && \
git clone https://github.com/samtools/samtools.git && \
cd samtools && \
git checkout ${SAMTOOLS_VERSION} && \
make && \
cp samtools /usr/bin/
params.sam = "$baseDir/data/sam/*.sam"
params.sam = "$baseDir/data/sam/*.bam"
log.info "sams files : ${params.sam}"
log.info "bam files : ${params.bam}"
Channel
.fromPath( params.sam )
.ifEmpty { error "Cannot find any sam files matching: ${params.sam}" }
.fromPath( params.bam )
.ifEmpty { error "Cannot find any bam files matching: ${params.bam}" }
.map { it -> [(it.baseName =~ /([^\.]*)/)[0][1], it]}
.set { sam_files }
.set { bam_files }
process dedup_sam {
tag "$file_id"
cpus 4
input:
set file_id, file(sam) from sam_files
set file_id, file(bam) from bam_files
output:
set file_id, "*_dedup.sam*" into dedup_sam_files
set file_id, "*_dedup.bam*" into dedup_bam_files
script:
"""
samblaster --addMateTags -i ${sam} -o ${file_id}_dedup.sam
samtools view -h ${bam} | \
samblaster --addMateTags | \
samtools view -Sb - > ${file_id}_dedub.bam
"""
}
......
./nextflow src/nf_modules/samblaster/dedup_sams.nf \
-c src/nf_modules/samblaster/dedup_sams.config \
-profile docker \
--sam "data/tiny_dataset/map/tiny_v2.sam"
--bam "data/tiny_dataset/map/tiny_v2.bam"
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