<p>I found my answer <a href="https://www.biostars.org/p/444909/" rel="nofollow noreferrer">here</a>. It uses <code>getGeneLengthAndGCContent</code> but changes a small part of the function.</p>

CC BY-SA 4.0
2021-05-30T19:02:46.603Z
2021-05-30T19:02:46.603Z
An Ignorant Wanderer
<p>I am trying to use the <code>getGeneLengthAndGCContent</code> function from the <code>EDASeq</code> library to retrieve gene lengths for c. elegans. I retrieved Ensemble gene ids from Biomart for c.elegans and I'm using those as input to getGeneLengthAndGCContent (I picked "ensemble_gene_id" from the filters of the worm annotation Mart). Here's an example of how I'm trying to use the function:</p>

<pre><code>getGeneLengthAndGCContent("WBGene00001042", org, mode=c("biomart", "org.db"))
</code></pre>

<p>When I try to run this, I get </p>

<pre><code>Error in getGeneLengthAndGCContent("WBGene00001042", org, mode = c("biomart",  : 
  Only ENTREZ or ENSEMBL gene IDs are supported.
</code></pre>

CC BY-SA 4.0
2020-06-18T14:51:50.657Z
@ATpoint oh that's weird why does BioMart list it as such?
An Ignorant Wanderer
CC BY-SA 4.0
2020-06-18T14:52:46.440Z
@ATpoint also when I look at Ensembl I don't find any other identifier for a gene of c elegans (here's an example http://uswest.ensembl.org/Caenorhabditis_elegans/Gene/Summary?g=WBGene00001042;r=III:5415556-5419565;t=W03A5.7.1). Could you guide me as to where to find those other ids?
An Ignorant Wanderer
CC BY-SA 4.0
2020-06-18T22:16:29.810Z
@ATpoint so WBGene00001042 is indeed the Ensembl id?
An Ignorant Wanderer
<ensembl>
getGeneLengthAndGCContent in EDASeq complains about "Ensemble gene ID"
# getGeneLengthAndGCContent in EDASeq complains about "Ensemble gene ID"

(Asked by: username_0 on 2020-06-17)

I am trying to use the getGeneLengthAndGCContent function from the EDASeq library to retrieve gene lengths for c. elegans. I retrieved Ensemble gene ids from Biomart for c.elegans and I'm using those as input to getGeneLengthAndGCContent (I picked "ensemble_gene_id" from the filters of the worm annotation Mart). Here's an example of how I'm trying to use the function:
getGeneLengthAndGCContent("WBGene00001042", org, mode=c("biomart", "org.db"))

When I try to run this, I get 
Error in getGeneLengthAndGCContent("WBGene00001042", org, mode = c("biomart",  : 
  Only ENTREZ or ENSEMBL gene IDs are supported.

**Tags:** ensembl
> **Comments:**
> **username_0**: @ATpoint oh that's weird why does BioMart list it as such?  
> **username_0**: @ATpoint also when I look at Ensembl I don't find any other identifier for a gene of c elegans (here's an example http://uswest.ensembl.org/Caenorhabditis_elegans/Gene/Summary?g=WBGene00001042;r=III:5415556-5419565;t=W03A5.7.1). Could you guide me as to where to find those other ids?  
> **username_0**: @ATpoint so WBGene00001042 is indeed the Ensembl id?  

---

## 1 answers

### Answer by username_0 on 2021-05-30. Score: 1 | Accepted answer

I found my answer [here](https://www.biostars.org/p/444909/). It uses `getGeneLengthAndGCContent` but changes a small part of the function.


---

