#Input
samtools view -s 0.50 -bh /project/epigenome/K562/helmuth/Sample_mpimg_L4212-11_CH-044-0170.bam chr1:22500000-25000000 > K562_Input.bam
cat header.sam > K562_Input.reduced.sam
samtools view K562_Input.bam | awk '{OFS="\t"}; {print 1,$2,$3,$4,$5,$6,$7,$8,$9,"*","*"}' >> K562_Input.reduced.sam
rm -f K562_Input.bam
samtools view -Sbh K562_Input.reduced.sam | samtools sort -l 9 -@ 8 - K562_Input
rm -f K562_Input.reduced.sam
samtools index K562_Input.bam
#H3K4me3
samtools view -s 0.50 -bh /project/epigenome/K562/helmuth/Sample_mpimg_L4212-4_CH-044-0163.bam chr1:22500000-25000000 > K562_H3K4me3.bam
cat header.sam > K562_H3K4me3.reduced.sam
samtools view K562_H3K4me3.bam | awk '{OFS="\t"}; {print 1,$2,$3,$4,$5,$6,$7,$8,$9,"*","*"}' >> K562_H3K4me3.reduced.sam
rm -f K562_H3K4me3.bam
samtools view -Sbh K562_H3K4me3.reduced.sam | samtools sort -l 9 -@ 8 - K562_H3K4me3
rm -f K562_H3K4me3.reduced.sam
samtools index K562_H3K4me3.bam
#H3K36me3
samtools view -s 0.50 -bh /project/epigenome/K562/helmuth/Sample_mpimg_L4212-8_CH-044-0167.bam chr1:22500000-25000000 > K562_H3K36me3.bam
cat header.sam > K562_H3K36me3.reduced.sam
samtools view K562_H3K36me3.bam | awk '{OFS="\t"}; {print 1,$2,$3,$4,$5,$6,$7,$8,$9,"*","*"}' >> K562_H3K36me3.reduced.sam
rm -f K562_H3K36me3.bam
samtools view -Sbh K562_H3K36me3.reduced.sam | samtools sort -l 9 -@ 8 - K562_H3K36me3
rm -f K562_H3K36me3.reduced.sam
samtools index K562_H3K36me3.bam
