annotate peaks using a custom genome
1
0
Entering edit mode
C T ▴ 140
@c-t-5858
Last seen 10 months ago
United States

Hi,

I am trying to use annoPeaks function to annotate peaks using my custom genome. Based on posts I've seen, I thought I should be able to but I got the following error.

## create annotation file from EnsDb or TxDb
a673_hap1.txdb <- makeTxDbFromGFF('a673_hap1.gtf')
a673_hap1.anno <- toGRanges(a673_hap1.txdb, format='gene')

grp1.anno.gr=annoPeaks(grp1.gr,annoData=a673_hap1.anno)
    Error in h(simpleError(msg, call)) : 
      error in evaluating the argument 'x' in selecting a method for function 'intersect': The style does not have a compatible entry for the species supported by Seqname. Please see genomeStyles() for
      supported species/style

This is what's in my a673_hap1.anno:

a673_hap1.anno
GRanges object with 71833 ranges and 0 metadata columns:
                        seqnames              ranges strand
                           <Rle>           <IRanges>  <Rle>
  ENSG00000000003.15  scaffold_6   97335214-97348105      -
   ENSG00000000005.6  scaffold_6   97293053-97308002      +
  ENSG00000000419.14 scaffold_24   21723067-21747340      -
  ENSG00000000457.14  scaffold_2 106095547-106139877      -
  ENSG00000000460.17  scaffold_2 105908026-106099938      +
                 ...         ...                 ...    ...
               G9971 scaffold_14       598928-609082      +
               G9973 scaffold_14       632154-640352      -
               G9975 scaffold_14       639846-658693      +
               G9976 scaffold_14       653879-694712      -
               G9978 scaffold_14       699469-795141      -
  -------
  seqinfo: 91 sequences from an unspecified genome; no seqlengths

and my grp1.gr

grp1.gr
GRanges object with 24848 ranges and 8 metadata columns:
             seqnames        ranges strand |        name score_log2FC signalValue_log2FC pValue_.log10pval qValue_.log10FDR
                <Rle>     <IRanges>  <Rle> | <character>    <numeric>          <numeric>         <numeric>        <numeric>
      [1]  scaffold_1 441094-441594      * |       peak1      38.8817           0.777633          0.477357         0.453945
      [2]  scaffold_1 466057-466557      * |       peak2     201.8671           4.037342          2.975743         2.774827
      [3]  scaffold_1 637117-637617      * |       peak3     230.8204           4.616407          2.864806         2.672847
      [4]  scaffold_1 644425-644925      * |       peak4     127.7402           2.554804          1.987845         1.863558
      [5]  scaffold_1 957786-958286      * |       peak5      83.7902           1.675804          0.759540         0.719528
      ...         ...           ...    ... .         ...          ...                ...               ...              ...
  [24844] scaffold_98   74064-74564      * |   peak24844      128.420            2.56839           1.23324          1.16319
  [24845] scaffold_99   13025-13525      * |   peak24845      288.647            5.77294           5.17810          4.79905
  [24846] scaffold_99   26685-27185      * |   peak24846      294.912            5.89823           5.30847          4.91814
  [24847] scaffold_99   28661-29161      * |   peak24847      608.445           12.16890          26.73869         25.20493
  [24848] scaffold_99   32152-32652      * |   peak24848      293.745            5.87490           6.32785          5.85132
  -------
  seqinfo: 74 sequences from an unspecified genome; no seqlengths

Is there anything special I need to do to annotate peaks using a custom genome gtf file? If ChIPpeakAnno does not support custom genome, is there other packages that do?

Thank you in advance for your help.

ChIPSeq annotate ChIPpeakAnno • 558 views
ADD COMMENT
0
Entering edit mode

In case anyone need to do the same thing. I can't figure out how to make it work with ChIPpeakAnno. But, I figured out that I can easily do this with ChIPseeker

ADD REPLY
0
Entering edit mode
Kai Hu ▴ 70
@kai
Last seen 5 weeks ago
Worcester

Hi there,

Thanks for your question!

This issue is likely due to the custom "seqnames" in your GRanges objects that causes seqlevelsStyle() to hiccup. I have patched it in the devel version of ChIPpeakAnno, details see this commit.

You can try to install the devel version of ChIPpeakAnno and test if it works or not.

devtools::install_github("jianhong/ChIPpeakAnno", ref = "devel")
ADD COMMENT

Login before adding your answer.

Traffic: 647 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6