Hi all, I have successfully used the following function in Homer to annotate my peaks to closest genes:
annotatePeaks.pl <peak/BED file> <genome> > <output file>
i.e. annotatePeaks.pl ERpeaks.txt hg18 > outputfile.txt
My problem is that some of my peaks are in the middle of introns of genes but are being called to the next gene as the tss of that gene is closer to the centre of the peak. Whether this is "right" or "wrong is a matter for debate, but what I would like to do is annotate peaks to closest RNA, the manual says the following on the matter
Peak vs. tss/tts/rna mode (works with custom GTF file): If the first argument is "tss" (i.e. annotatePeaks.pl tss hg18 ...) then a TSS centric analysis will be carried out. Tag counts and motifs will be found relative to the TSS. (no position file needed) ["tts" now works too - e.g. 3' end of gene] ["rna" specifies gene bodies, will automaticall set "-size given"]
So in theory if I used the following command:
annotatePeaks.pl rna ERpeaks.txt hg18 etc
It should work, but this brings back errors saying "rna" is not allowed in the line.
Any ideas how this can be achieved?
Sorry I meant to ask about annotatePeaks.pl not the motif searching, I have updated the post