Answers.Body: <p>that was solved by changing seq level:</p>
  <pre><code>newnames &lt;- paste0(c(&quot;1&quot;,&quot;2&quot;,&quot;3&quot;,&quot;4&quot;, &quot;5&quot;,&quot;6&quot;,&quot;7&quot;, &quot;8&quot;,&quot;9&quot;,&quot;10&quot;,&quot;11&quot;,&quot;12&quot;,&quot;13&quot;,&quot;14&quot;,&quot;15&quot;,&quot;16&quot;,&quot;17&quot;,&quot;18&quot;,&quot;19&quot;,&quot;20&quot;,&quot;21&quot;,&quot;22&quot;,&quot;X&quot;,&quot;Y&quot;,&quot;MT&quot;))
  names(newnames) &lt;- paste0(c(&quot;NC_000001.11&quot;,&quot;NC_000002.12&quot;,&quot;NC_000003.12&quot;,&quot;NC_000004.12&quot;, &quot;NC_000005.10&quot;,&quot;NC_000006.12&quot;,&quot;NC_000007.14&quot;, &quot;NC_000008.11&quot;,&quot;NC_000009.12&quot;,&quot;NC_000010.11&quot;,&quot;NC_000011.10&quot;,&quot;NC_000012.12&quot;,&quot;NC_000013.11&quot;,&quot;NC_000014.9&quot;,&quot;NC_000015.10&quot;,&quot;NC_000016.10&quot;,&quot;NC_000017.11&quot;,&quot;NC_000018.10&quot;,&quot;NC_000019.10&quot;,&quot;NC_000020.11&quot;,&quot;NC_000021.9&quot;,&quot;NC_000022.11&quot;,&quot;NC_000023.11&quot;,&quot;NC_000024.10&quot;,&quot;NC_012920.1&quot;))
  
  peaks_with_new_seq_level &lt;- renameSeqlevels(peaks_with_old_seq_level,newnames)<span class="math-container">```</span>
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-12-16T21:28:45.520Z
Answers.LastActivityDate: 2020-12-16T21:28:45.520Z
Answers.UserDisplayName: Mariam
Body: <p>I have differential binding sites object obtain from diffBind (dba.report). I am using the ChIP Seeker package to annotate the peaks but keep getting the following error: Error in (function (classes, fdef, mtable) : unable to find an inherited method for function ‘NSBS’ for signature ‘&quot;SortedByQueryHits&quot;’</p>
  <p>I used diffloop package to add chr to the chromosome column but it did not work. Result in the same error.</p>
  <p>Please let me know if you have any idea how to fix it. Highly appreciated
  Here is my peakset</p>
  <pre><code>BD
  
    seqnames              ranges strand |      Conc Conc_condition Conc_Control      Fold      p-value         FDR
                 &lt;Rle&gt;           &lt;IRanges&gt;  &lt;Rle&gt; | &lt;numeric&gt;     &lt;numeric&gt;    &lt;numeric&gt; &lt;numeric&gt;    &lt;numeric&gt;   &lt;numeric&gt;
      [1] NC_000003.12   75668856-75670016      * |  12.27197    12.8243533      0.76175  12.06260 1.43013e-102 1.41852e-97
      [2] NC_000024.10   11320736-11323578      * |  10.58988    11.1419124      0.76175  10.38016 1.15927e-100 5.74930e-96
      [3] NC_000004.12         37431-38634      * |   6.42233     0.0596816      8.06241  -8.00273  6.67673e-98 2.20750e-93
      [4] NC_000017.11   21678164-21686752      * |   9.26507     9.8163416      0.76175   9.05459  3.54723e-95 8.79607e-91
      [5] NC_000022.11   12692637-12694102      * |   9.64945    10.2010195      0.76175   9.43927  2.35838e-87 4.67845e-83
      ...          ...                 ...    ... .       ...           ...          ...       ...          ...         ...
    [226] NC_000004.12 131722954-131744030      * |   11.8156      12.36301     5.337173   7.02584  2.54289e-17 4.78151e-16
    [227] NC_000015.10   68134159-68136364      * |    8.2514       8.80099     0.969455   7.83153  2.28289e-16 3.73532e-15
    [228] NC_000005.10   34189082-34194027      * |   10.4671      11.01445     3.990668   7.02378  1.46745e-15 2.12829e-14
    [229] NC_000018.10       108003-108613      * |   11.2783       5.46414    12.912836  -7.44869  3.68643e-12 3.26794e-11
    [230] NC_000004.12   49709306-49710113      * |   12.0662       6.40350    13.698765  -7.29526  1.23922e-08 6.37694e-0
  
  peakAnno &lt;- annotatePeak(BD, tssRegion=c(-3000, 3000), TxDb=txdb, annoDb=&quot;org.Hs.eg.db&quot;)
  &gt; peakAnno &lt;- annotatePeak(BD, tssRegion=c(-3000, 3000), TxDb=txdb, annoDb=&quot;org.Hs.eg.db&quot;)
  &gt;&gt; preparing features information...         2020-11-12 01:08:37 PM 
  &gt;&gt; identifying nearest features...       2020-11-12 01:08:37 PM 
  &gt;&gt; calculating distance from peak to TSS...  2020-11-12 01:08:38 PM 
  &gt;&gt; assigning genomic annotation...       2020-11-12 01:08:38 PM 
  Error in (function (classes, fdef, mtable)  : 
    unable to find an inherited method for function ‘NSBS’ for signature ‘&quot;SortedByQueryHits&quot;’```
  </code></pre>
  
Tags: <differential-expression><chip-seq><sequence-annotation><peak-calling>
Title: annotation using ChIPseeker package error
ThreadText: # annotation using ChIPseeker package error
  
  (Asked by: username_0 on 2020-11-16)
  
  I have differential binding sites object obtain from diffBind (dba.report). I am using the ChIP Seeker package to annotate the peaks but keep getting the following error: Error in (function (classes, fdef, mtable) : unable to find an inherited method for function ‘NSBS’ for signature ‘"SortedByQueryHits"’
  
  I used diffloop package to add chr to the chromosome column but it did not work. Result in the same error.
  
  Please let me know if you have any idea how to fix it. Highly appreciated
  Here is my peakset
  
  ```
  BD
  
    seqnames              ranges strand |      Conc Conc_condition Conc_Control      Fold      p-value         FDR
                 <Rle>           <IRanges>  <Rle> | <numeric>     <numeric>    <numeric> <numeric>    <numeric>   <numeric>
      [1] NC_000003.12   75668856-75670016      * |  12.27197    12.8243533      0.76175  12.06260 1.43013e-102 1.41852e-97
      [2] NC_000024.10   11320736-11323578      * |  10.58988    11.1419124      0.76175  10.38016 1.15927e-100 5.74930e-96
      [3] NC_000004.12         37431-38634      * |   6.42233     0.0596816      8.06241  -8.00273  6.67673e-98 2.20750e-93
      [4] NC_000017.11   21678164-21686752      * |   9.26507     9.8163416      0.76175   9.05459  3.54723e-95 8.79607e-91
      [5] NC_000022.11   12692637-12694102      * |   9.64945    10.2010195      0.76175   9.43927  2.35838e-87 4.67845e-83
      ...          ...                 ...    ... .       ...           ...          ...       ...          ...         ...
    [226] NC_000004.12 131722954-131744030      * |   11.8156      12.36301     5.337173   7.02584  2.54289e-17 4.78151e-16
    [227] NC_000015.10   68134159-68136364      * |    8.2514       8.80099     0.969455   7.83153  2.28289e-16 3.73532e-15
    [228] NC_000005.10   34189082-34194027      * |   10.4671      11.01445     3.990668   7.02378  1.46745e-15 2.12829e-14
    [229] NC_000018.10       108003-108613      * |   11.2783       5.46414    12.912836  -7.44869  3.68643e-12 3.26794e-11
    [230] NC_000004.12   49709306-49710113      * |   12.0662       6.40350    13.698765  -7.29526  1.23922e-08 6.37694e-0
  
  peakAnno <- annotatePeak(BD, tssRegion=c(-3000, 3000), TxDb=txdb, annoDb="org.Hs.eg.db")
  > peakAnno <- annotatePeak(BD, tssRegion=c(-3000, 3000), TxDb=txdb, annoDb="org.Hs.eg.db")
  >> preparing features information...         2020-11-12 01:08:37 PM 
  >> identifying nearest features...       2020-11-12 01:08:37 PM 
  >> calculating distance from peak to TSS...  2020-11-12 01:08:38 PM 
  >> assigning genomic annotation...       2020-11-12 01:08:38 PM 
  Error in (function (classes, fdef, mtable)  : 
    unable to find an inherited method for function ‘NSBS’ for signature ‘"SortedByQueryHits"’```
  
  ```
  
  **Tags:** differential-expression, chip-seq, sequence-annotation, peak-calling
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2020-12-16. Score: 2
  
  that was solved by changing seq level:
  
  ```
  newnames <- paste0(c("1","2","3","4", "5","6","7", "8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","X","Y","MT"))
  names(newnames) <- paste0(c("NC_000001.11","NC_000002.12","NC_000003.12","NC_000004.12", "NC_000005.10","NC_000006.12","NC_000007.14", "NC_000008.11","NC_000009.12","NC_000010.11","NC_000011.10","NC_000012.12","NC_000013.11","NC_000014.9","NC_000015.10","NC_000016.10","NC_000017.11","NC_000018.10","NC_000019.10","NC_000020.11","NC_000021.9","NC_000022.11","NC_000023.11","NC_000024.10","NC_012920.1"))
  
  peaks_with_new_seq_level <- renameSeqlevels(peaks_with_old_seq_level,newnames)```
  
  ```
  
  
  ---
  
  