Answers.Body: <p>I had a similar case just recently.</p>
  <p>The <code>tssRegion</code> argument ChIPseeker is used to define what is considered a promoter, which is frequently the question at hand. However, ChIPseeker will not perform any kind of filtering on the annotated peak file.</p>
  <p>In the results there is a column <code>annotation</code> that contains information what kind of genomic region the peak is in. If it is within your <code>tssRegion</code> window it will be labeled as a promoter.<br />
  In your case the annotation is <code>1st Exon = Exon (ENST00000413759.1/ENST00000413759.1, exon 1 of 1) 9</code>. This tells you that the peak is not part of the promoter region you defined and located within the first exon of the indicated transcript. The peak is really far away from TLR4 (374699 bp) but I think all other sequences nearby are pseudogenes and this is why TLR4 is selected as the closest gene.</p>
  <p>You can get an overview over the annotations using <code>plotAnnoPie(peakAnno)</code></p>
  <p>tl;dr: you need to filter the results of the ChIPseeker annotation to get the genomic regions you want.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-12-02T11:12:05.450Z
Answers.Text: Glad this is a reproducible problem and now its more confusing for some peak the genes assigned are perfectly fine matches  to the coordinate given but for others its would be in the intro or some exon but would show as annotation being promoter. " ChIPseeker annotation to get the genomic regions you want."  how shall i do that ? simple distanetoTSS filter?
Answers.UserDisplayName: kcm
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-12-02T11:56:39.177Z
Answers.Text: you can either directly use the distance to TSS to or define the promoter region via `tssRegion` and then filter all peaks where the annotation contains "Promoter" i.e. `grepl("Promoter", annotated.df$annotation)`
Answers.UserDisplayName: PPK
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-12-03T09:23:03.660Z
Answers.Text: i did annotate again with homer it seems pretty accurate as compared to chipseeker ran homer with default parameters it works fine ..need to find why the same can;t be seen with chipseeker
Answers.UserDisplayName: kcm
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-12-02T10:18:10.210Z
Answers.LastActivityDate: 2020-12-02T10:28:21.107Z
Answers.LastEditDate: 2020-12-02T10:28:21.107Z
Answers.UserDisplayName: PPK
Body: <pre><code>library(ChIPseeker)
  library(TxDb.Hsapiens.UCSC.hg38.knownGene)
  txdb &lt;- TxDb.Hsapiens.UCSC.hg38.knownGene
  library(clusterProfiler)
  library(org.Hs.eg.db)
  
  peaks &lt;- readPeakFile(&quot;MACS_folder/pol2_chip/Pol_2pausing/pol2_diff_peak.bed&quot;)
  
  print(peaks)
  
  
  #peakAnno &lt;- annotatePeak(&quot;merge/blast.bed&quot;, tssRegion=c(-3000, 3000),
  #                        TxDb=txdb, annoDb=&quot;org.Hs.eg.db&quot;)
  
  peakAnno &lt;- annotatePeak(peaks, tssRegion=c(-1000, 1000),
                           TxDb=txdb, annoDb=&quot;org.Hs.eg.db&quot;)
  </code></pre>
  <p>So this is basically what im doing to annotate the peaks.</p>
  <p>Now the issue comes with annotation for example I see TLR4 annotated to this</p>
  <pre><code>118082896   118083202   307 *   shp1_R1_peak_679    Exon (ENST00000413759.1/ENST00000413759.1, exon 1 of 1) 9   117708197   117708979   783 1   7099    ENST00000490685.1   374699  ENSG00000136869 TLR4
  </code></pre>
  <p>Now The peak is 679 as you can see from the IGV plot as well as annotated file. But when i see in IGV browser TLR4 is far away from the peak where i get the annotation.</p>
  <p>So now is it an issue with the code im using or due to the inherent nature of the data.</p>
  <p>Any help or suggestion would be really appreciated.</p>
  <p><a href="https://i.sstatic.net/fnIzD.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/fnIzD.png" alt="TLR4" /></a></p>
  
Tags: <ngs><chip-seq>
Title: chipseeker annotation issue
ThreadText: # chipseeker annotation issue
  
  (Asked by: username_0 on 2020-12-02)
  
  ```
  library(ChIPseeker)
  library(TxDb.Hsapiens.UCSC.hg38.knownGene)
  txdb <- TxDb.Hsapiens.UCSC.hg38.knownGene
  library(clusterProfiler)
  library(org.Hs.eg.db)
  
  peaks <- readPeakFile("MACS_folder/pol2_chip/Pol_2pausing/pol2_diff_peak.bed")
  
  print(peaks)
  
  #peakAnno <- annotatePeak("merge/blast.bed", tssRegion=c(-3000, 3000),
  #                        TxDb=txdb, annoDb="org.Hs.eg.db")
  
  peakAnno <- annotatePeak(peaks, tssRegion=c(-1000, 1000),
                           TxDb=txdb, annoDb="org.Hs.eg.db")
  
  ```
  
  So this is basically what im doing to annotate the peaks.
  
  Now the issue comes with annotation for example I see TLR4 annotated to this
  
  ```
  118082896   118083202   307 *   shp1_R1_peak_679    Exon (ENST00000413759.1/ENST00000413759.1, exon 1 of 1) 9   117708197   117708979   783 1   7099    ENST00000490685.1   374699  ENSG00000136869 TLR4
  
  ```
  
  Now The peak is 679 as you can see from the IGV plot as well as annotated file. But when i see in IGV browser TLR4 is far away from the peak where i get the annotation.
  
  So now is it an issue with the code im using or due to the inherent nature of the data.
  
  Any help or suggestion would be really appreciated.
  
  [![TLR4](https://i.sstatic.net/fnIzD.png)](https://i.sstatic.net/fnIzD.png)
  
  **Tags:** ngs, chip-seq
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2020-12-02. Score: 2 | Accepted answer
  
  I had a similar case just recently.
  
  The `tssRegion` argument ChIPseeker is used to define what is considered a promoter, which is frequently the question at hand. However, ChIPseeker will not perform any kind of filtering on the annotated peak file.
  
  In the results there is a column `annotation` that contains information what kind of genomic region the peak is in. If it is within your `tssRegion` window it will be labeled as a promoter.  
  In your case the annotation is `1st Exon = Exon (ENST00000413759.1/ENST00000413759.1, exon 1 of 1) 9`. This tells you that the peak is not part of the promoter region you defined and located within the first exon of the indicated transcript. The peak is really far away from TLR4 (374699 bp) but I think all other sequences nearby are pseudogenes and this is why TLR4 is selected as the closest gene.
  
  You can get an overview over the annotations using `plotAnnoPie(peakAnno)`
  
  tl;dr: you need to filter the results of the ChIPseeker annotation to get the genomic regions you want.
  
  > **Comments:**
  > **username_0**: Glad this is a reproducible problem and now its more confusing for some peak the genes assigned are perfectly fine matches  to the coordinate given but for others its would be in the intro or some exon but would show as annotation being promoter. " ChIPseeker annotation to get the genomic regions you want."  how shall i do that ? simple distanetoTSS filter?  
  > **username_1**: you can either directly use the distance to TSS to or define the promoter region via `tssRegion` and then filter all peaks where the annotation contains "Promoter" i.e. `grepl("Promoter", annotated.df$annotation)`  
  > **username_0**: i did annotate again with homer it seems pretty accurate as compared to chipseeker ran homer with default parameters it works fine ..need to find why the same can;t be seen with chipseeker  
  
  ---
  
  