{"action":"created","issue":{"url":"https://api.github.com/repos/GuangchuangYu/ChIPseeker/issues/23","labels_url":"https://api.github.com/repos/GuangchuangYu/ChIPseeker/issues/23/labels{/name}","comments_url":"https://api.github.com/repos/GuangchuangYu/ChIPseeker/issues/23/comments","events_url":"https://api.github.com/repos/GuangchuangYu/ChIPseeker/issues/23/events","html_url":"https://github.com/GuangchuangYu/ChIPseeker/issues/23","id":125872230,"number":23,"title":"annotation is wrong?","user":{"login":"crazyhottommy","id":4106146,"avatar_url":"https://avatars.githubusercontent.com/u/4106146?v=3","gravatar_id":"","url":"https://api.github.com/users/crazyhottommy","html_url":"https://github.com/crazyhottommy","followers_url":"https://api.github.com/users/crazyhottommy/followers","following_url":"https://api.github.com/users/crazyhottommy/following{/other_user}","gists_url":"https://api.github.com/users/crazyhottommy/gists{/gist_id}","starred_url":"https://api.github.com/users/crazyhottommy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crazyhottommy/subscriptions","organizations_url":"https://api.github.com/users/crazyhottommy/orgs","repos_url":"https://api.github.com/users/crazyhottommy/repos","events_url":"https://api.github.com/users/crazyhottommy/events{/privacy}","received_events_url":"https://api.github.com/users/crazyhottommy/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-01-11T04:44:51Z","updated_at":"2016-01-11T17:58:26Z","closed_at":null,"body":"Hi Guangchuan,\r\n\r\nif you can test this:\r\n\r\n```{r}\r\nlibrary(ChIPseeker)\r\nlibrary(TxDb.Hsapiens.UCSC.hg19.knownGene)\r\ntxdb <- TxDb.Hsapiens.UCSC.hg19.knownGene\r\ngr<- GRanges( seqnames =\"chr10\", ranges=IRanges(start= 34802689, end=  34802698), strand=\"+\")\r\n\r\nap<- annotatePeak(gr, tssRegion=c(-3000, 3000), \r\n              TxDb=txdb, annoDb=\"org.Hs.eg.db\",\r\n              sameStrand = FALSE, ignoreOverlap = FALSE,\r\n              ignoreDownstream = TRUE)\r\n\r\nas.data.frame(ap)\r\n  seqnames    start      end width strand        annotation geneChr geneStart  geneEnd geneLength geneStrand\r\n1    chr10 34802689 34802698    10      + Distal Intergenic   chr10  34601188 34715659     114472          -\r\n  geneId transcriptId distanceToTSS         ENSEMBL SYMBOL                             GENENAME\r\n1  56288   uc001ixo.2        -87030 ENSG00000148498  PARD3 par-3 family cell polarity regulator\r\n\r\n\r\n\r\n> sessionInfo()\r\nR version 3.2.2 (2015-08-14)\r\nPlatform: x86_64-apple-darwin13.4.0 (64-bit)\r\nRunning under: OS X 10.10.1 (Yosemite)\r\n\r\nlocale:\r\n[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8\r\n\r\nattached base packages:\r\n[1] stats4    parallel  stats     graphics  grDevices utils     datasets  methods   base     \r\n\r\nother attached packages:\r\n [1] org.Hs.eg.db_3.2.3                      RSQLite_1.0.0                          \r\n [3] DBI_0.3.1                               BSgenome.Hsapiens.UCSC.hg19_1.4.0      \r\n [5] BSgenome_1.38.0                         rtracklayer_1.30.1                     \r\n [7] Biostrings_2.38.3                       XVector_0.10.0                         \r\n [9] TxDb.Hsapiens.UCSC.hg19.knownGene_3.2.2 GenomicFeatures_1.22.7                 \r\n[11] AnnotationDbi_1.32.3                    Biobase_2.30.0                         \r\n[13] ggplot2_2.0.0                           tidyr_0.3.1                            \r\n[15] dplyr_0.4.3                             GenomicInteractions_1.4.1              \r\n[17] GenomicRanges_1.23.10                   GenomeInfoDb_1.7.3                     \r\n[19] IRanges_2.5.19                          S4Vectors_0.9.18                       \r\n[21] BiocGenerics_0.17.2                     ChIPseeker_1.7.5                       \r\n[23] BiocInstaller_1.20.1                   \r\n\r\nloaded via a namespace (and not attached):\r\n [1] httr_1.0.0                  splines_3.2.2               gtools_3.5.0               \r\n [4] Formula_1.2-1               assertthat_0.1              latticeExtra_0.6-26        \r\n [7] Rsamtools_1.22.0            lattice_0.20-33             biovizBase_1.18.0          \r\n[10] chron_2.3-47                digest_0.6.8                RColorBrewer_1.1-2         \r\n[13] colorspace_1.2-6            plyr_1.8.3                  XML_3.98-1.3               \r\n[16] devtools_1.9.1              biomaRt_2.26.1              zlibbioc_1.16.0            \r\n[19] scales_0.3.0                gdata_2.17.0                BiocParallel_1.4.3         \r\n[22] UpSetR_1.0.2                SummarizedExperiment_1.1.13 nnet_7.3-11                \r\n[25] Gviz_1.14.2                 survival_2.38-3             magrittr_1.5               \r\n[28] memoise_0.2.1               gplots_2.17.0               foreign_0.8-66             \r\n[31] data.table_1.9.6            tools_3.2.2                 matrixStats_0.50.1         \r\n[34] gridBase_0.4-7              stringr_1.0.0               munsell_0.4.2              \r\n[37] cluster_2.0.3               plotrix_3.6-1               lambda.r_1.1.7             \r\n[40] caTools_1.17.1              futile.logger_1.4.1         grid_3.2.2                 \r\n[43] RCurl_1.95-4.7              dichromat_2.0-0             VariantAnnotation_1.16.4   \r\n[46] igraph_1.0.1                labeling_0.3                bitops_1.0-6               \r\n[49] boot_1.3-17                 gtable_0.1.2                curl_0.9.4                 \r\n[52] R6_2.1.1                    GenomicAlignments_1.7.11    gridExtra_2.0.0            \r\n[55] knitr_1.12                  Hmisc_3.17-1                futile.options_1.0.0       \r\n[58] KernSmooth_2.23-15          stringi_1.0-1               Rcpp_0.12.2                \r\n[61] rpart_4.1-10                acepack_1.3-3.3   \r\n```\r\n\r\n`gr` is in the intron of PARD3, not sure why the annotation is distal intergenic.\r\n\r\nThanks.\r\nMing"},"comment":{"url":"https://api.github.com/repos/GuangchuangYu/ChIPseeker/issues/comments/170634713","html_url":"https://github.com/GuangchuangYu/ChIPseeker/issues/23#issuecomment-170634713","issue_url":"https://api.github.com/repos/GuangchuangYu/ChIPseeker/issues/23","id":170634713,"user":{"login":"crazyhottommy","id":4106146,"avatar_url":"https://avatars.githubusercontent.com/u/4106146?v=3","gravatar_id":"","url":"https://api.github.com/users/crazyhottommy","html_url":"https://github.com/crazyhottommy","followers_url":"https://api.github.com/users/crazyhottommy/followers","following_url":"https://api.github.com/users/crazyhottommy/following{/other_user}","gists_url":"https://api.github.com/users/crazyhottommy/gists{/gist_id}","starred_url":"https://api.github.com/users/crazyhottommy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crazyhottommy/subscriptions","organizations_url":"https://api.github.com/users/crazyhottommy/orgs","repos_url":"https://api.github.com/users/crazyhottommy/repos","events_url":"https://api.github.com/users/crazyhottommy/events{/privacy}","received_events_url":"https://api.github.com/users/crazyhottommy/received_events","type":"User","site_admin":false},"created_at":"2016-01-11T17:58:26Z","updated_at":"2016-01-11T17:58:26Z","body":"I think it has to do with the gene annotation package, let's try refseq:\r\n\r\n```{r}\r\n\r\nlibrary(GenomicFeatures)\r\nhg19.refseq.db <- makeTxDbFromUCSC(genome=\"hg19\", table=\"refGene\")\r\n\r\ngr<- GRanges( seqnames =\"chr10\", ranges=IRanges(start= 34802689, end=  34802698), strand=\"+\")\r\n\r\nap<- annotatePeak(gr, tssRegion=c(-3000, 3000), \r\n                         TxDb=hg19.refseq.db, level = \"transcript\", annoDb=\"org.Hs.eg.db\",\r\n                         sameStrand = FALSE, ignoreOverlap = FALSE,\r\n                         ignoreDownstream = TRUE)\r\n\r\n>as.data.frame(ap)\r\nseqnames    start      end width strand        annotation geneChr geneStart  geneEnd geneLength geneStrand\r\n1    chr10 34802689 34802698    10      + Distal Intergenic   chr10  34048641 34061608      12968          -\r\n     geneId transcriptId distanceToTSS         ENSEMBL    SYMBOL                                   GENENAME\r\n1 100505583    NR_038932       -741081 ENSG00000261683 LINC00838 long intergenic non-protein coding RNA 838\r\n```\r\n\r\nIf you check the refseq ID\r\n```{r}\r\n>transcripts(hg19.refseq.db)[transcripts(hg19.refseq.db)$tx_name==\"NM_001184791\"]\r\nGRanges object with 1 range and 2 metadata columns:\r\n      seqnames               ranges strand |     tx_id      tx_name\r\n         <Rle>            <IRanges>  <Rle> | <integer>  <character>\r\n  [1]    chr10 [34398488, 35104253]      - |     26255 NM_001184791\r\n```\r\n\r\nNM_001184791 is one of the transcripts of PARD3 gene.\r\n\r\nthe peak 34802689-----34802698  actually resides in the intron of  NM_001184791.  It is not annotating PARD3 as the overlapping gene, but LINC00838 which is more upstream of the PARD3 gene. You can verify this on the IGV browser.\r\n\r\nThanks for looking into this!\r\n\r\nMing"}}