Page MenuHomec4science

LSF_submit-script-with-containers.sh
No OneTemporary

File Metadata

Created
Thu, Jan 23, 08:24

LSF_submit-script-with-containers.sh

#!/bin/bash
#BSUB -J scicore_pipeline2_with_containers
#BSUB -W 02:00
#BSUB -n 4
#BSUB -R "rusage[mem=2048]"
#BSUB -R beta
#BSUB -R singularity
#BSUB -o scicore_pipeline2_with_containers.out
#BSUB -e scicore_pipeline2_with_containers.err
# get the image
rm -f scicore_pipeline2.img
singularity pull --name scicore_pipeline2.img --size 2048 \
docker://sissource.ethz.ch:5005/balazsl/esct-pipeline-interoperability:pipeline2
# (re-)create output directories
rm -rf output
mkdir -p output/bowtie2
mkdir -p output/samtools
mkdir -p output/freebayes
ref_genome='/data/RefGenome/igenomes/Saccharomyces_cerevisiae/Ensembl/R64-1-1/Sequence'
echo 'Aligning reads with bowtie2...'
singularity exec -B output:/output -B scicore-pipeline2-input-data:/data scicore_pipeline2.img \
bowtie2 -p 4 -x ${ref_genome}/Bowtie2Index/genome \
-q -1 /data/fastq/SRR5511076_1.ds.fastq -2 /data/fastq/SRR5511076_2.ds.fastq \
-S /output/bowtie2/yeast_reseq_ds-bt2aln.sam
echo 'SAM to sorted BAM...'
singularity exec -B output:/output -B scicore-pipeline2-input-data:/data scicore_pipeline2.img \
samtools view -bS /output/bowtie2/yeast_reseq_ds-bt2aln.sam \
| \
singularity exec -B output:/output -B scicore-pipeline2-input-data:/data scicore_pipeline2.img \
samtools sort - --threads 4 -o /output/samtools/yeast_reseq_ds-bt2aln.s.bam
echo 'Calling variants with FreeBayes...'
singularity exec -B output:/output -B scicore-pipeline2-input-data:/data scicore_pipeline2.img \
freebayes -f ${ref_genome}/WholeGenomeFasta/genome.fa \
/output/samtools/yeast_reseq_ds-bt2aln.s.bam > output/freebayes/yeast_reseq_ds-bt2aln.s.vcf

Event Timeline