Download mEpigram from here
mEpigram requires a graph of possible k-mer interactions to function. Download the graphs here: CpG mode, non-CpG mode
The programs were written in Perl, Python2.7 and Julia (0.4.5 or later)
Although the Julia scripts are not required for motif discovery, it's recommended that you installed Julia to use motif scanning and enrichment calculation.
If you want to generate motif logos, please install WebLOGO on your computer.
It's recommended to run mEpigram using the mepigram_wrapper.py script:
Insert methylation information into the genome, the input is assumed to be in BEDGRAPH by default. In BEDGRAPH format, each line contains chromosome name, start location (0-based index), start location +1, and a methylation value between 0-1.0. An output directory will be created to contain the new genome with methylation information. The reference genome should be in a directory format, with each chromosomal sequence contained in a separate file, labeled by its chromosome name.
CpG mode (typeE):
python modifyReference.py -f input.bedgraph -r referencegenomedirectory -o methylrefgenomeA
OR non-CpG mode (typeEF):
python modifyReference.py --typeEF -f input.bedgraph -r referencegenomedirectory -o methylrefgenomeA
Make methylated sequences from bed files and the genome above:
python BedtoFasta.py -f input.regions.bed -r methylrefgenomeA -o output.faa
Make background model: Calculate the number of k-mers in the genome. This might take some time but you only need to do this once per reference genome.
CpG mode (typeE):
perl bgModeltypeE.pl 8 methylrefgenomeA
OR non-CpG mode (typeEF):
perl bgModeltypeEF.pl 7 methylrefgenomeA
Please make sure you run this command inside the mEpigram directory
CpG mode (typeE):
mepigram_wrapper.py -f fastafile -m typeE -b backgroundmodel -g graphdir
OR Non-CpG mode (typeEF):
mepigram_wrapper.py -f fastafile -m typeEF -b backgroundmodel -g graphdir