# Make a universe of excluded regions of the genome
cd MakeGencodeTSS
./make_TSS_file_from_annotation_with_confidence_better.sh ../gencode.v19.annotation.gtf ../biotypes.txt
gtf2bed  < MakeGencodeTSS/gencode.v19.annotation_capped_sites.gff > gencode.v19.annotation_capped_sites.bed

## Gencode Protein Coding genes
bedtools slop -i gencode.v19.annotation_capped_sites.bed -g hg19.chrom.sizes -b 3000 | cut -f1,2,3 > gencode_tss_3kb_flanking.bed

## H3K4me3
bedtools slop -i H3K4me3_filtered_peaks.bed -g hg19.chrom.sizes -b 3000 > H3K4me3_3kb_flanking.bed

## Merge TSS and H3K4me3 peaks
bedops --everything gencode_tss_3kb_flanking.bed H3K4me3_3kb_flanking.bed | sort-bed - > excluded_3kb_flanking.bed
