Scripts for MEM analysis