Answers.Body: <p>As you seem to be learning, the clusterProfiler package is a bit "special". It doesn't filter the results you're seeing for relevance, it returns everything. The <code>GeneRatio</code> is the number of genes in your input list associated with the given GO term (e.g., <code>5</code>) and then a <code>/</code> and the total number of input genes. This is generally not that useful. Since many things aren't documented, you may find <a href="https://github.com/GuangchuangYu/clusterProfiler/blob/6352683788121b8ff1a3dde3312fbe096e3f9f52/R/groupGO.R#L43-L55" rel="nofollow noreferrer">the source code</a> helpful.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-04-26T21:05:52.277Z
Answers.LastActivityDate: 2018-04-26T21:05:52.277Z
Answers.UserDisplayName: Devon Ryan
Body: <p>I am running <code>groupGO</code> function from <code>clusterProfiler</code>:</p>
  
  <pre><code>ggo &lt;- groupGO(gene     = head(gene, 200),
             OrgDb    = org.Mm.eg.db,
             keyType = "ENSEMBL",
             ont      = "BP",
             level    = 2,
             readable = TRUE)
  </code></pre>
  
  <p>And getting the following output:</p>
  
  <pre><code>&gt; head(ggo)
                     ID            Description Count GeneRatio
  GO:0000003 GO:0000003           reproduction     5     5/200
  GO:0008152 GO:0008152      metabolic process    40    40/200
  GO:0001906 GO:0001906           cell killing     0     0/200
  GO:0002376 GO:0002376  immune system process    20    20/200
  GO:0006791 GO:0006791     sulfur utilization     0     0/200
  GO:0006794 GO:0006794 phosphorus utilization     0     0/200
  </code></pre>
  
  <p>As can be seen <code>cell killing</code>, <code>sulfur utilization</code> and <code>phosphorus utilization</code> have <code>zero</code> genes. Then, why are they here at all? Should not the <code>groupGO</code> show only <code>biological processes</code> the fed in genes are related to? This seems very weird to me. What is the meaning of the <code>GeneRatio</code> column?</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-04-26T21:10:28.880Z
Comments.Text: If you don't want terms with zero genes, just use `ggo[ggo$Count>0]`
Comments.UserDisplayName: heathobrien
Tags: <rna-seq><groupgo><clusterprofiler>
Title: clusterProfiler, groupGO: meaning of GeneRatio
ThreadText: # clusterProfiler, groupGO: meaning of GeneRatio
  
  (Asked by: username_0 on 2018-04-26)
  
  I am running `groupGO` function from `clusterProfiler`:
  
  ```
  ggo <- groupGO(gene     = head(gene, 200),
             OrgDb    = org.Mm.eg.db,
             keyType = "ENSEMBL",
             ont      = "BP",
             level    = 2,
             readable = TRUE)
  
  ```
  
  And getting the following output:
  
  ```
  > head(ggo)
                     ID            Description Count GeneRatio
  GO:0000003 GO:0000003           reproduction     5     5/200
  GO:0008152 GO:0008152      metabolic process    40    40/200
  GO:0001906 GO:0001906           cell killing     0     0/200
  GO:0002376 GO:0002376  immune system process    20    20/200
  GO:0006791 GO:0006791     sulfur utilization     0     0/200
  GO:0006794 GO:0006794 phosphorus utilization     0     0/200
  
  ```
  
  As can be seen `cell killing`, `sulfur utilization` and `phosphorus utilization` have `zero` genes. Then, why are they here at all? Should not the `groupGO` show only `biological processes` the fed in genes are related to? This seems very weird to me. What is the meaning of the `GeneRatio` column?
  
  **Tags:** rna-seq, groupgo, clusterprofiler
  
  > **Comments:**
  > **username_1**: If you don't want terms with zero genes, just use `ggo[ggo$Count>0]`  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2018-04-26. Score: 2 | Accepted answer
  
  As you seem to be learning, the clusterProfiler package is a bit "special". It doesn't filter the results you're seeing for relevance, it returns everything. The `GeneRatio` is the number of genes in your input list associated with the given GO term (e.g., `5`) and then a `/` and the total number of input genes. This is generally not that useful. Since many things aren't documented, you may find [the source code](https://github.com/GuangchuangYu/clusterProfiler/blob/6352683788121b8ff1a3dde3312fbe096e3f9f52/R/groupGO.R#L43-L55) helpful.
  
  
  ---
  
  