Checking and counting consecutive genes

Checking and counting consecutive genes

I want to check if there are gene clusters (consecutive genes with the same function) on each chromosome. So I have the gene genomic orders (coordinates), and function (pfam/gene family etc) for each gene.
Printing lines with sliding windows in bash

Printing lines with sliding windows in bash

This is originally from the work that I was trying to find enriched functional clusters on chromosomes. I made 5-gene sliding 50-gene blocks and tested functional enrichment in each block.