Calculating intergenic regions
Intergenic regions are simply loci in the genome demarked by where one gene ends and another starts. To calculate intergenic regions: First create a BED file containing the coordinates of all genes Sort this BED file by chromosome and then by the starting position Merge this BED file using mergeBed Run the script below (works…