Hi Julie,

Thanks a lot. It works now. I appreciate it.

Thanks,
Aayush Raman
Bioinformatics Research Scientist
Institute for Systems Biology
Seattle WA
206-732-1473

On Thu, Jul 14, 2011 at 6:22 AM, Zhu, Lihua (Julie)
<Julie.Zhu@umassmed.edu>wrote:

>  Aayush,
>
> The getEnrichedGO expects annotatedPeak as a RangedData returned from
> annotatePeakInBatch which contains a field feature, or a character vector
> containing the feature IDs. Supported feature ID types are ensembl_gene_id,
> refseq_id, gene_symbol and entrez_id.
>
> So for your dataset, you could extract the gene symbols or ensembl IDs.
> Alternatively, you could change names.ensembl_gene_id to feature.
>
> Best regards,
>
> Julie
>
>
> On 7/13/11 9:15 PM, "Ayush Raman" <Ayush.Raman@systemsbiology.org> wrote:
>
> Hi Julie,
>
> I hope you are doing good. I am trying to do the GO enrichment on a
> RangedData object. I am running the following command:
>
> *enrichedGO = getEnrichedGO(m.RangedData, orgAnn="org.Mm.eg.db", maxP=
> 0.01, multiAdj = TRUE, minGOterm = 10, multiAdjMethod="BH")
> *
> my *m.RangedData object* looks like:
>
> RangedData with 236 rows and 11 value columns across 202 spaces
>                  space                 ranges   | names.ensembl_gene_id
> names.RefSeqIds names.Entrez.ID <http://names.Entrez.ID>
>  names.Gene.Symbol
>            <character>              <IRanges>   |           <character>
>    <factor>        <factor>          <factor>
> 1   ENSMUSG00000000489 [ 79826330,  79845238]   |    ENSMUSG00000000489
>   NM_011057           18591             Pdgfb
> 2   ENSMUSG00000000740 [125626250, 125629144]   |    ENSMUSG00000000740
>   NM_016738          270106             Rpl13
> 3   ENSMUSG00000001123 [ 78776476,  78798448]   |    ENSMUSG00000001123
>  NM_001159301           16859            Lgals9
> 4   ENSMUSG00000001123 [ 78776476,  78798448]   |    ENSMUSG00000001123
>   NM_010708           16859            Lgals9
> 5   ENSMUSG00000002699 [ 33946920,  33992295]   |    ENSMUSG00000002699
>   NM_010696           16822              Lcp2
> 6   ENSMUSG00000003135 [ 39591837,  39603726]   |    ENSMUSG00000003135
>   NM_028043           52846        D1Bwg0212e
> 7   ENSMUSG00000003283 [152934204, 152977177]   |    ENSMUSG00000003283
>  NM_001172117           15162               Hck
> 8   ENSMUSG00000003283 [152934204, 152977177]   |    ENSMUSG00000003283
>   NM_010407           15162               Hck
> 9   ENSMUSG00000003437 [ 29177970,  29184407]   |    ENSMUSG00000003437
>   NM_019458           54624              Paf1
> ...                ...                    ... ...                   ...
>         ...             ...               ...
> 228 ENSMUSG00000074218 [ 30969190,  30971047]   |    ENSMUSG00000074218
>   NM_009944           12865            Cox7a1
> 229 ENSMUSG00000074922 [ 24550992,  24551846]   |    ENSMUSG00000074922
>   NM_026520           68034           Fam122a
> 230 ENSMUSG00000078201 [ 25110959,  25111872]   |    ENSMUSG00000078201
>   NM_177344          227615           Tmem203
> 231 ENSMUSG00000079197 [ 56206278,  56209950]   |    ENSMUSG00000079197
>  NM_001029855           19188             Psme2
> 232 ENSMUSG00000079197 [ 56206278,  56209950]   |    ENSMUSG00000079197
>   NM_011190           19188             Psme2
> 233 ENSMUSG00000079252 [157882856, 157900866]   |    ENSMUSG00000079252
>  NM_001160181          240832          Tor1aip2
> 234 ENSMUSG00000079252 [157882856, 157900866]   |    ENSMUSG00000079252
>   NM_022329          240832          Tor1aip2
> 235 ENSMUSG00000079737 [ 13672022,  13678498]   |    ENSMUSG00000079737
>   NM_025653           66598     3110001I22Rik
> 236 ENSMUSG00000089944 [ 55392211,  55392727]   |    ENSMUSG00000089944
>   NM_207635           20088             Rps24
>     names.OnThreePrimeArray names.DiffExp names.Score names.Other.Gene.Near
> names.chromosome_name names.start_position
>                    <factor>      <factor>    <factor>              <factor>
>           <character>            <integer>
> 1                         1             0   10.581459                     0
>                    15             79826330
> 2                         0             0   13.226824                     0
>                     8            125626250
> 3                         1             1    4.534911                     0
>                    11             78776476
> 4                         1             1    4.534911                     0
>                    11             78776476
> 5                         1             1    2.645365                     0
>                    11             33946920
> 6                         1             0    2.645365                     0
>                     1             39591837
> 7                         1             1    2.645365                     0
>                     2            152934204
> 8                         1             1    2.645365                     0
>                     2            152934204
> 9                         1             0    6.046548                     1
>                     7             29177970
> ...                     ...           ...         ...                   ...
>                   ...                  ...
> 228                       1             0    3.023274                     1
>                     7             30969190
> 229                       1             0    5.668639                     1
>                    19             24550992
> 230                       1             0    3.779092                     1
>                     2             25110959
> 231                       0             0    2.645365                     1
>                    14             56206278
> 232                       0             0    2.645365                     1
>                    14             56206278
> 233                       1             1    3.023274                     0
>                     1            157882856
> 234                       1             1    3.023274                     0
>                     1            157882856
> 235                       1             1     4.91282                     1
>                    16             13672022
> 236                       0             0    7.936094                     0
>                     1             55392211
>     names.end_position
>              <integer>
> 1             79845238
> 2            125629144
> 3             78798448
> 4             78798448
> 5             33992295
> 6             39603726
> 7            152977177
> 8            152977177
> 9             29184407
> ...                ...
> 228           30971047
> 229           24551846
> 230           25111872
> 231           56209950
> 232           56209950
> 233          157900866
> 234          157900866
> 235           13678498
> 236           55392727
>
> Actually I processed bed file and didn't used Annotatedpeak function from
> ChIPpeakAnno. I performed certain functions got the table as a RangedData
> object.
>
> Now, I am getting a following *error* after running the getEnrichedGO
> command:
>
> *Error in if (class(go.ids) != "matrix" | dim(go.ids)[2] < 4) { :
>   argument is of length zero
> In addition: Warning message:
> In is.na <http://is.na> (IDs) : is.na <http://is.na> () applied to
> non-(list or vector) of type 'NULL'
> *
> My *session info* is as follows:
>
> *R version 2.12.0 (2010-10-15)
> Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit)
>
> locale:
> [1] C
>
> attached base packages:
> [1] stats     graphics  grDevices datasets  utils     methods   base
>
> other attached packages:
>  [1] RColorBrewer_1.0-2                  ChIPpeakAnno_1.6.0
>  limma_3.6.9
>  [4] org.Hs.eg.db_2.4.6                  GO.db_2.4.5
>   BSgenome.Ecoli.NCBI.20080805_1.3.16
>  [7] BSgenome_1.18.3                     GenomicRanges_1.2.3
>   Biostrings_2.18.4
> [10] IRanges_1.8.9                       multtest_2.7.1
>  org.Mm.eg.db_2.4.6
> [13] RSQLite_0.9-4                       DBI_0.2-5
>   AnnotationDbi_1.12.0
> [16] Biobase_2.10.0                      biomaRt_2.6.0
>
>
> loaded via a namespace (and not attached):
> [1] MASS_7.3-11     RCurl_1.4-3     splines_2.12.0  survival_2.36-5
> tools_2.12.0    XML_3.2-0
> *
>
>
> Please let me know where I am going wrong to correct this error. Any
> advice/hints will be highly appreciated.
>
> Thanks.
> Aayush Raman
> Bioinformatics Research Scientist
> Institute for Systems Biology
> Seattle WA
> 206-732-1473
>
>
>

	[[alternative HTML version deleted]]

