I am using HOMER to get read mapping around TE (well, I need to make a heatmap). I am using following command:

    annotatePeaks.pl  XXX.bed  XXX(genome)   -bedGraph XXX.bedgraph -size 200 -hist 2 -ghist  -noadj -fragLength 0   > XXX.txt

Before running this command, I converted my bed file using changeNewLine.pl and configured my genome in HOMER. I have been using this tool and so this command for couple of weeks now. From terminal result it seems ok. Here is the result in terminal: 

    Peak file = XXX.bed
    Genome = XXX
    Organism = null
    bedGraph Files:
    XXX.bedgraph
    Peak Region set to 200
    -----------------------------------------------------
    Histogram mode activated (bin size = 2 bp)
    -----------------------------------------------------
    Will create histogram for each gene
    Will NOT normalize tag counts
    Fragment Length set to 0
    Peak/BED file conversion summary:
    BED/Header formatted lines: 4203
    peakfile formatted lines: 0
    Duplicated Peak IDs: 0
    
    Peak File Statistics:
    Total Peaks: 4203
    Redundant Peak IDs: 0
    Peaks lacking information: 0 (need at least 5 columns per peak)
    Peaks with misformatted coordinates: 0 (should be integer)
    Peaks with misformatted strand: 0 (should be either +/- or 0/1)
    
    Peak file looks good!
    
    Resizing peaks...
    Reading Positions...
    -----------------------
    Compiling per bp Histograms...
    Finding Tags in Peaks from each directory...
    
    Order of experiments in output file:
    XXX.bedgraph


But, the number of rows in my output file and number in input bed file are not same. Number in output file is much less. Would you please tell me what went wrong and how can I get all rows in my output file? 

Thank you very much and I am very sorry to bother.



If you just want to get gene annotation for your BED regions, you only need to use annotatePeaks like this:

    perl annotatePeaks.pl MyBED.bed mm9 -annStats AnnotationStats.txt > Annotation.tsv

This always produces an equal number of annotated regions as per my BED file. The correct genome has to be used of course.

HOMER will assume that the BED file regions define your peaks. I don't believe that you have t supply all of the other information such as the bedGraph, peak size, etc.


