[BioC] getEnrichedGo in ChIPPeakAnno Error

Zhu, Lihua (Julie) Julie.Zhu at umassmed.edu
Wed May 18 15:46:54 CEST 2011


Gillian,

I think the top six features you selected does not have any corresponding GO
terms assigned. I tried with a few Ensemble IDs from your list, it worked
fine. So I believe if you use the entire annotated dataset, it would work.

enriched.GO =
getEnrichedGO(c("ENSMUSG00000019852","ENSMUSG00000019850","ENSMUSG0000002606
8","ENSMUSG00000026048"), orgAnn="org.Mm.eg.db", maxP=0.01, multiAdj=FALSE,
minGOterm=10, multiAdjMethod="")

Please let me know if it works with the entire dataset. Thanks!

Best regards,

Julie


On 5/18/11 6:33 AM, "Gillian Bob" <gillianscience at yahoo.co.uk> wrote:

> Hi all,
>
> I'm having some trouble with the getEnrichedGo function in ChIPPeakAnno - I
> haven't been able to find a solution by looking through the mailing list, but
> I might not have the right search terms.
>
> With this command:
>
>> SicerGO <- getEnrichedGO(annotatedSicer[1:6,], orgAnn="org.Mm.eg.db",
>> feature_id_type="ensembl_gene_id", maxP=0.01, multiAdj=FALSE, minGOterm=10,
>> multiAdjMethod="")
>
>
> I get the error:
>
>> Error in if (class(go.ids) != "matrix" | dim(go.ids)[2] < 4) { :
>   argument is of length zero
>
> My annotated dataset was generated by using:
>
>> SicerRF = BED2RangedData(SicerDF)
>
> followed by:
>> mart = useMart("ensembl", dataset="mmusculus_gene_ensembl")
>
>> annotatedSicer = annotatePeakInBatch(SicerRF, mart, featureType=c("TSS"))
>> library(org.Mm.eg.db)
>
> and then the Gotest:
>
>> SicerGO <- getEnrichedGO(annotatedSicer[1:6,], orgAnn="org.Mm.eg.db",
>> feature_id_type="ensembl_gene_id", maxP=0.01, multiAdj=FALSE, minGOterm=10,
>> multiAdjMethod="")
>
>
>
> I'm using R version 2.13.0 on Ubuntu.
>
> I'm sure it's something simple, as it works fine on a test dataset.  The two
> started off in exactly the same format (chr start stop name number_of_tags)
> and I treated them exactly the same way.  As far as I can see, the two
> annotated datasets look exactly the
>  same.  The error also looks more to do with the go ids than with the datasets
> (though I may be misunderstanding it) - I got the exact same error when I
> accidentally used the human go terms (i.e. orgAnn="org.Hs.eg.db") with my
> mouse data.
>
> This is what my annotated dataset which does not work looks like:
>> annotatedSicer
> RangedData with 89375 rows and 9 value columns across 21 spaces
>                                 space               ranges   |        peak
>
>  <factor>            <IRanges>   | <character>
> peak10 ENSMUSG00000064376           1 [ 4549800,  4551799]   |      peak10
> peak1002 ENSMUSG00000079587         1 [42968000, 42969199]   |    peak1002
> peak1003 ENSMUSG00000079587         1 [43009400, 43010599]   |    peak1003
> peak1004 ENSMUSG00000041878         1 [43148400, 43150199]   |    peak1004
> peak1008 ENSMUSG00000067579         1 [43321400, 43322199]   |    peak1008
> peak1009 ENSMUSG00000067579         1 [43340200,
>  43341799]   |    peak1009
> peak1010 ENSMUSG00000066877         1 [43502000, 43504199]   |    peak1010
> peak1011 ENSMUSG00000066877         1 [43627600, 43628799]   |    peak1011
> peak1012 ENSMUSG00000026051         1 [43787400, 43788199]   |    peak1012
> ...                               ...                  ... ...         ...
> peak89374 ENSMUSG00000091571        Y   [1835800, 1836599]   |
>  peak89374
> peak89375 ENSMUSG00000090600        Y   [2531000, 2531999]   |   peak89375
> peak89366 ENSMUSG00000053211        Y   [  88800,   89399]   |   peak89366
> peak89367 ENSMUSG00000075874        Y   [ 335000,  335999]   |   peak89367
> peak89369 ENSMUSG00000068457        Y   [ 581200,  582199]   |   peak89369
> peak89370 ENSMUSG00000069044        Y   [ 816800,  817599]   |   peak89370
> peak89371 ENSMUSG00000069044        Y   [ 897000,  897999]   |   peak89371
> peak89372
>  ENSMUSG00000069044        Y   [1108800, 1109799]   |   peak89372
> peak89373 ENSMUSG00000000103        Y   [1459800, 1460399]   |   peak89373
>                                   strand            feature start_position
>                              <character>        <character>      <numeric>
> peak10
>  ENSMUSG00000064376              + ENSMUSG00000064376        4519098
> peak1002 ENSMUSG00000079587            + ENSMUSG00000079587       43009719
> peak1003 ENSMUSG00000079587            + ENSMUSG00000079587       43009719
> peak1004 ENSMUSG00000041878            + ENSMUSG00000041878       43149433
> peak1008 ENSMUSG00000067579            + ENSMUSG00000067579       43246001
> peak1009 ENSMUSG00000067579            +
>  ENSMUSG00000067579       43246001
> peak1010 ENSMUSG00000066877            + ENSMUSG00000066877       43502596
> peak1011 ENSMUSG00000066877            + ENSMUSG00000066877       43502596
> peak1012 ENSMUSG00000026051            + ENSMUSG00000026051       43787447
> ...                                  ...                ...            ...
> peak89374
>  ENSMUSG00000091571           + ENSMUSG00000091571        1855009
> peak89375 ENSMUSG00000090600           + ENSMUSG00000090600        2550262
> peak89366 ENSMUSG00000053211           - ENSMUSG00000053211          61650
> peak89367 ENSMUSG00000075874           - ENSMUSG00000075874         328073
> peak89369 ENSMUSG00000068457           - ENSMUSG00000068457         433304
> peak89370 ENSMUSG00000069044           -
>  ENSMUSG00000069044         635400
> peak89371 ENSMUSG00000069044           - ENSMUSG00000069044         635400
> peak89372 ENSMUSG00000069044           - ENSMUSG00000069044         635400
> peak89373 ENSMUSG00000000103           - ENSMUSG00000000103        1362123
>                              end_position insideFeature
>  distancetoFeature
>                                 <numeric>   <character>         <numeric>
> peak10 ENSMUSG00000064376         4519204    downstream             30702
> peak1002 ENSMUSG00000079587      43011992      upstream            -41719
> peak1003 ENSMUSG00000079587      43011992  overlapStart              -319
> peak1004 ENSMUSG00000041878      43150680
>  overlapStart             -1033
> peak1008 ENSMUSG00000067579      43246483    downstream             75399
> peak1009 ENSMUSG00000067579      43246483    downstream             94199
> peak1010 ENSMUSG00000066877      43627360  overlapStart              -596
> peak1011 ENSMUSG00000066877      43627360    downstream            125004
> peak1012 ENSMUSG00000026051      43799423  overlapStart
>  -47
> ...                                   ...           ...               ...
> peak89374 ENSMUSG00000091571      1855344      upstream            -19209
> peak89375 ENSMUSG00000090600      2552957      upstream            -19262
> peak89366 ENSMUSG00000053211       133852        inside             45052
> peak89367
>  ENSMUSG00000075874       328191      upstream             -6809
> peak89369 ENSMUSG00000068457       582202        inside              1002
> peak89370 ENSMUSG00000069044       796225      upstream            -20575
> peak89371 ENSMUSG00000069044       796225      upstream           -100775
> peak89372 ENSMUSG00000069044       796225      upstream           -312575
> peak89373
>  ENSMUSG00000000103      1426357      upstream            -33443
>                              shortestDistance fromOverlappingOrNearest
>                                     <numeric>              <character>
> peak10 ENSMUSG00000064376               30596             NearestStart
> peak1002
>  ENSMUSG00000079587             40520             NearestStart
> peak1003 ENSMUSG00000079587               319             NearestStart
> peak1004 ENSMUSG00000041878               481             NearestStart
> peak1008 ENSMUSG00000067579             74917             NearestStart
> peak1009 ENSMUSG00000067579             93717
>  NearestStart
> peak1010 ENSMUSG00000066877               596             NearestStart
> peak1011 ENSMUSG00000066877               240             NearestStart
> peak1012 ENSMUSG00000026051                47             NearestStart
> ...
>  ...                      ...
> peak89374 ENSMUSG00000091571            18410             NearestStart
> peak89375 ENSMUSG00000090600            18263             NearestStart
> peak89366 ENSMUSG00000053211            27150             NearestStart
> peak89367 ENSMUSG00000075874             6809             NearestStart
> peak89369
>  ENSMUSG00000068457                3             NearestStart
> peak89370 ENSMUSG00000069044            20575             NearestStart
> peak89371 ENSMUSG00000069044           100775             NearestStart
> peak89372 ENSMUSG00000069044           312575             NearestStart
> peak89373 ENSMUSG00000000103            33443             NearestStart
>
> And this is the
>  one which does work:
>> annotatedTest
> RangedData with 6076 rows and 9 value columns across 2 spaces
>                                      space               ranges   |
>                                   <factor>            <IRanges>   |
> MACS_peak_1000 ENSMUSG00000070942        1 [40382990, 40382991]   |
> MACS_peak_1001 ENSMUSG00000070942        1 [40415507,
>  40415508]   |
> MACS_peak_1002 ENSMUSG00000070942        1 [40421610, 40421611]   |
> MACS_peak_1003 ENSMUSG00000026068        1 [40603971, 40603972]   |
> MACS_peak_1005 ENSMUSG00000079588        1 [41187605, 41187606]   |
> MACS_peak_1006 ENSMUSG00000079588        1 [41190193, 41190194]   |
> MACS_peak_1007 ENSMUSG00000079588        1 [41196105, 41196106]   |
> MACS_peak_1008 ENSMUSG00000079588        1 [41214348, 41214349]   |
> MACS_peak_1009 ENSMUSG00000053640        1 [42114801, 42114802]
>  |
> ...                                    ...                  ... ...
> MACS_peak_6057 ENSMUSG00000019853       10 [18355569, 18355570]   |
> MACS_peak_6058 ENSMUSG00000019852       10 [18382781, 18382782]   |
> MACS_peak_6059 ENSMUSG00000019852       10 [18463508, 18463509]   |
> MACS_peak_6064 ENSMUSG00000019850       10 [18734845, 18734846]   |
> MACS_peak_6065 ENSMUSG00000019850       10 [18843883, 18843884]   |
> MACS_peak_6066 ENSMUSG00000019850       10
>  [18873528, 18873529]   |
> MACS_peak_6067 ENSMUSG00000019850       10 [18886027, 18886028]   |
> MACS_peak_6068 ENSMUSG00000019850       10 [18888316, 18888317]   |
> MACS_peak_6069 ENSMUSG00000019850       10 [18897274, 18897275]   |
>                                             peak      strand
> feature
>
>  <character> <character>        <character>
> MACS_peak_1000 ENSMUSG00000070942 MACS_peak_1000           +
> ENSMUSG00000070942
> MACS_peak_1001 ENSMUSG00000070942 MACS_peak_1001           +
> ENSMUSG00000070942
> MACS_peak_1002 ENSMUSG00000070942 MACS_peak_1002           +
> ENSMUSG00000070942
> MACS_peak_1003 ENSMUSG00000026068 MACS_peak_1003           +
> ENSMUSG00000026068
> MACS_peak_1005 ENSMUSG00000079588 MACS_peak_1005           +
> ENSMUSG00000079588
> MACS_peak_1006 ENSMUSG00000079588 MACS_peak_1006           +
> ENSMUSG00000079588
> MACS_peak_1007 ENSMUSG00000079588
>  MACS_peak_1007           + ENSMUSG00000079588
> MACS_peak_1008 ENSMUSG00000079588 MACS_peak_1008           +
> ENSMUSG00000079588
> MACS_peak_1009 ENSMUSG00000053640 MACS_peak_1009           +
> ENSMUSG00000053640
> ...                                          ...         ...
> ...
> MACS_peak_6057 ENSMUSG00000019853 MACS_peak_6057           -
> ENSMUSG00000019853
> MACS_peak_6058 ENSMUSG00000019852
>  MACS_peak_6058           - ENSMUSG00000019852
> MACS_peak_6059 ENSMUSG00000019852 MACS_peak_6059           -
> ENSMUSG00000019852
> MACS_peak_6064 ENSMUSG00000019850 MACS_peak_6064           -
> ENSMUSG00000019850
> MACS_peak_6065 ENSMUSG00000019850 MACS_peak_6065           -
> ENSMUSG00000019850
> MACS_peak_6066 ENSMUSG00000019850 MACS_peak_6066           -
> ENSMUSG00000019850
> MACS_peak_6067 ENSMUSG00000019850 MACS_peak_6067           -
> ENSMUSG00000019850
> MACS_peak_6068 ENSMUSG00000019850 MACS_peak_6068           -
> ENSMUSG00000019850
> MACS_peak_6069 ENSMUSG00000019850
>  MACS_peak_6069           - ENSMUSG00000019850
>                                   start_position end_position insideFeature
>                                        <numeric>    <numeric>   <character>
> MACS_peak_1000 ENSMUSG00000070942       40381472     40422316        inside
> MACS_peak_1001 ENSMUSG00000070942       40381472
>  40422316        inside
> MACS_peak_1002 ENSMUSG00000070942       40381472     40422316        inside
> MACS_peak_1003 ENSMUSG00000026068       40572207     40608550        inside
> MACS_peak_1005 ENSMUSG00000079588       40862446     40912112    downstream
> MACS_peak_1006 ENSMUSG00000079588       40862446     40912112    downstream
> MACS_peak_1007 ENSMUSG00000079588       40862446     40912112    downstream
> MACS_peak_1008 ENSMUSG00000079588       40862446     40912112
>  downstream
> MACS_peak_1009 ENSMUSG00000053640       42286571     42287953      upstream
> ...                                          ...          ...           ...
> MACS_peak_6057 ENSMUSG00000019853       18259929     18265882      upstream
> MACS_peak_6058 ENSMUSG00000019852       18307817     18463564        inside
> MACS_peak_6059 ENSMUSG00000019852       18307817
>  18463564        inside
> MACS_peak_6064 ENSMUSG00000019850       18720716     18735463        inside
> MACS_peak_6065 ENSMUSG00000019850       18720716     18735463      upstream
> MACS_peak_6066 ENSMUSG00000019850       18720716     18735463      upstream
> MACS_peak_6067 ENSMUSG00000019850       18720716     18735463      upstream
> MACS_peak_6068 ENSMUSG00000019850       18720716     18735463      upstream
> MACS_peak_6069 ENSMUSG00000019850       18720716
>  18735463      upstream
>                                   distancetoFeature shortestDistance
>                                           <numeric>        <numeric>
> MACS_peak_1000 ENSMUSG00000070942              1518             1518
> MACS_peak_1001 ENSMUSG00000070942
>  34035             6808
> MACS_peak_1002 ENSMUSG00000070942             40138              705
> MACS_peak_1003 ENSMUSG00000026068             31764             4578
> MACS_peak_1005 ENSMUSG00000079588            325159           275493
> MACS_peak_1006 ENSMUSG00000079588            327747           278081
> MACS_peak_1007 ENSMUSG00000079588
>  333659           283993
> MACS_peak_1008 ENSMUSG00000079588            351902           302236
> MACS_peak_1009 ENSMUSG00000053640           -171770           171769
> ...                                             ...              ...
> MACS_peak_6057 ENSMUSG00000019853            -89687
>  89687
> MACS_peak_6058 ENSMUSG00000019852             80783            74964
> MACS_peak_6059 ENSMUSG00000019852                56               55
> MACS_peak_6064 ENSMUSG00000019850               618              617
> MACS_peak_6065 ENSMUSG00000019850           -108420           108420
> MACS_peak_6066 ENSMUSG00000019850           -138065
>  138065
> MACS_peak_6067 ENSMUSG00000019850           -150564           150564
> MACS_peak_6068 ENSMUSG00000019850           -152853           152853
> MACS_peak_6069 ENSMUSG00000019850           -161811           161811
>
>  fromOverlappingOrNearest
>                                                <character>
> MACS_peak_1000 ENSMUSG00000070942             NearestStart
> MACS_peak_1001 ENSMUSG00000070942             NearestStart
> MACS_peak_1002 ENSMUSG00000070942             NearestStart
> MACS_peak_1003 ENSMUSG00000026068             NearestStart
> MACS_peak_1005 ENSMUSG00000079588             NearestStart
> MACS_peak_1006
>  ENSMUSG00000079588             NearestStart
> MACS_peak_1007 ENSMUSG00000079588             NearestStart
> MACS_peak_1008 ENSMUSG00000079588             NearestStart
> MACS_peak_1009 ENSMUSG00000053640             NearestStart
> ...                                                    ...
> MACS_peak_6057 ENSMUSG00000019853             NearestStart
> MACS_peak_6058
>  ENSMUSG00000019852             NearestStart
> MACS_peak_6059 ENSMUSG00000019852             NearestStart
> MACS_peak_6064 ENSMUSG00000019850             NearestStart
> MACS_peak_6065 ENSMUSG00000019850             NearestStart
> MACS_peak_6066 ENSMUSG00000019850             NearestStart
> MACS_peak_6067 ENSMUSG00000019850             NearestStart
> MACS_peak_6068 ENSMUSG00000019850             NearestStart
> MACS_peak_6069 ENSMUSG00000019850
>  NearestStart
>
> I tried rebooting R and reinstalling all the packages, and I still end with
> the exact same error.  I'm totally stuck and would be really grateful for any
> help.
>
> Thanks!
>
> --Gillian
>
>
>
>         [[alternative HTML version deleted]]
>



More information about the Bioconductor mailing list