#!/bin/bash # # Script used for paired end mapping of MII H3K36me3 and 2-cell H3K9me3 ChIP-seq # In case of questions contact Mads Lerdrup - mads.lerdrup@sund.ku.dk GL=/k/genomes/${1}/index/bowtie2_canonical/${1} FQ=$2 BASE=$(basename $FQ _R1P.fastq.gz) function timestamp() { echo `date "+%Y%m%d-%H%M%S"` } echo "$(timestamp): Mapping of "${BASE}" started..." nice -n 19 bowtie2 --local -X 2000 -p 4 -x ${GL} -1 ${BASE}_R1P.fastq.gz -2 ${BASE}_R2P.fastq.gz 2>${BASE}_bowtie2.log | samtools view -Sb -f 2 | samtools sort -n -> ${BASE}_bt2pp.bam echo "$(timestamp): Mapping of "${BASE}" completed." #bowtie version 2.2.9 used