We used a tool called RAP for the repeat analysis in the paper. RAP was composed by a set of Perl scripts, which were available for download at following links (all these scripts have instructions in the scripts itself):

  1. processBowtieAlignment.pl
  2. countAlignmetReadsforeachTE.pl
  3. calculateReadDensity.pl
  4. MethylationEnrichmentAnalysis.pl

processBowtieAlignment.pl is used to process the Bowtie alignment output (default output), and generate a file containing all of the mapped reads along with the TE which they were mapped to and relevant number of alignment mismatch. The suffix of the output file is ".readcount".

countAlignmetReadsforeachTE.pl takes the output file of processBowtieAlignment.pl as input, and count the number of mapped reads for each TE.

calculateReadDensity.pl is used to normalize the read count of each TE using the total mapped reads in each sample.

MethylationEnrichmentAnalysis.pl is used to combine all of the normalized_read_count file together, and then do the methylation enrichment analysis for each TE across all the samples using the following equation:

        --------------------------------------------------------------------------------
        |  DNA methylation enrichment = log2(obs/exp) = log2(read_density/baseline)    |  
        --------------------------------------------------------------------------------

the sample type file is required by this script, it has two columns separated by tab:
for example:

    Medip_H1EsB1_2lanes.all.normalized.rp   H1ES
    Medip_H1EsB2_2lanes.all.normalized.rp   H1ES
    Medip_HuAC_2lanes.all.normalized.rp     Cortex
    Medip_HuAG_2lanes.all.normalized.rp     GE
    Medip_HuAT_2lanes.all.normalized.rp     FetalBrain

RAP was developed and maintained by Mingchao Xie.

We also have an alternative tool for similar purpose called iteres, users are welcome to have a try.