<p>Ensembl discontinued our calculation of dN/dS scores for orthologue pairs in release 100 (<a href="https://apr2020.archive.ensembl.org/index.html" rel="nofollow noreferrer">https://apr2020.archive.ensembl.org/index.html</a>). However, even when we did perform these calculations in Ensembl 99 and earlier, we only did this for pairs of orthologues that diverged within the last ∼100 million years, namely between pairs of mammalian, avian or tetraodontiforme genomes. More information can be found here:</p>
<p><a href="https://academic.oup.com/database/article/doi/10.1093/database/bav096/2630091" rel="nofollow noreferrer">https://academic.oup.com/database/article/doi/10.1093/database/bav096/2630091</a></p>

CC BY-SA 4.0
2021-12-08T14:07:23.167Z
Thank you so much
Tom Morgan
CC BY-SA 4.0
2021-12-07T11:54:08.340Z
2021-12-07T11:54:08.340Z
Ben_Moore
<p>I am trying to calculate the dn/ds ratio between the human genes and c.elegans. However, I am getting NA values in the output file</p>
<p>I used the following script</p>
<pre><code>library(biomaRt)

## This gives the full list of all marts, including archives
archives &lt;- listEnsemblArchives()

## For the c.elegans data
ensemblcelegans=useMart(host = 'jan2020.archive.ensembl.org', biomart = 
'ENSEMBL_MART_ENSEMBL', 
                 dataset = &quot;celegans_gene_ensembl&quot;)

filters = listFilters(ensemblcelegans)
attributes = listAttributes(ensemblcelegans)

Celegans_GFList &lt;- scan(&quot;c.elegans.tsv&quot;, what = character())
Celegans_GFListValues&lt;-getBM(attributes = c('ensembl_gene_id', 
'hsapiens_homolog_ensembl_gene',  'hsapiens_homolog_dn', 
                                    'hsapiens_homolog_ds', 'hsapiens_homolog_orthology_type'), 
                     filters = 'ensembl_gene_id', 
                     values = Celegans_GFList, 
                     mart = ensemblcelegans)

Celegans_GFListValues1 &lt;- subset(Celegans_GFListValues, 
Celegans_GFListValues<span class="math-container">$hsapiens_homolog_orthology_type == 'ortholog_one2one')
Celegans_GFListValues1$</span>dnds_ratios &lt;- 
Celegans_GFListValues1<span class="math-container">$hsapiens_homolog_dn/Celegans_GFListValues1$</span>hsapiens_homolog_ds
write.csv(Celegans_GFListValues1, file = &quot;Celegans_GFListValues.csv&quot;)
</code></pre>

CC BY-SA 4.0
2021-12-02T15:21:58.867Z
Hi @Tom, what did you do to debug the problem? Did you check what is the result of Celegans_GFListValues1$hsapiens_homolog_dn/Celegans_GFListValues1$hsapiens_homolog_ds or what is returned by getBM?
llrs
CC BY-SA 4.0
2021-12-02T22:02:11.060Z
@IIrs I am getting NA values
Tom Morgan
CC BY-SA 4.0
2021-12-03T16:37:54.310Z
So, is the data available on Celegans_GFListValues1 ?
llrs
CC BY-SA 4.0
2021-12-05T18:22:08.793Z
The one to one ortholog data is present but dn and ds values are coming as NA for entire input list
Tom Morgan
<r><biomart>
Calculating dn/ds ratio between two model organisms
# Calculating dn/ds ratio between two model organisms

(Asked by: username_0 on 2021-12-02)

I am trying to calculate the dn/ds ratio between the human genes and c.elegans. However, I am getting NA values in the output file
I used the following script
library(biomaRt)

## This gives the full list of all marts, including archives
archives <- listEnsemblArchives()

## For the c.elegans data
ensemblcelegans=useMart(host = 'jan2020.archive.ensembl.org', biomart = 
'ENSEMBL_MART_ENSEMBL', 
                 dataset = "celegans_gene_ensembl")

filters = listFilters(ensemblcelegans)
attributes = listAttributes(ensemblcelegans)

Celegans_GFList <- scan("c.elegans.tsv", what = character())
Celegans_GFListValues<-getBM(attributes = c('ensembl_gene_id', 
'hsapiens_homolog_ensembl_gene',  'hsapiens_homolog_dn', 
                                    'hsapiens_homolog_ds', 'hsapiens_homolog_orthology_type'), 
                     filters = 'ensembl_gene_id', 
                     values = Celegans_GFList, 
                     mart = ensemblcelegans)

Celegans_GFListValues1 <- subset(Celegans_GFListValues, 
Celegans_GFListValues$hsapiens_homolog_orthology_type == 'ortholog_one2one')
Celegans_GFListValues1$dnds_ratios <- 
Celegans_GFListValues1$hsapiens_homolog_dn/Celegans_GFListValues1$hsapiens_homolog_ds
write.csv(Celegans_GFListValues1, file = "Celegans_GFListValues.csv")

**Tags:** r, biomart
> **Comments:**
> **username_1**: Hi @Tom, what did you do to debug the problem? Did you check what is the result of Celegans_GFListValues1$hsapiens_homolog_dn/Celegans_GFListValues1$hsapiens_homolog_ds or what is returned by getBM?  
> **username_0**: @IIrs I am getting NA values  
> **username_1**: So, is the data available on Celegans_GFListValues1 ?  
> **username_0**: The one to one ortholog data is present but dn and ds values are coming as NA for entire input list  

---

## 1 answers

### Answer by username_2 on 2021-12-07. Score: 0 | Accepted answer

Ensembl discontinued our calculation of dN/dS scores for orthologue pairs in release 100 (<https://apr2020.archive.ensembl.org/index.html>). However, even when we did perform these calculations in Ensembl 99 and earlier, we only did this for pairs of orthologues that diverged within the last ∼100 million years, namely between pairs of mammalian, avian or tetraodontiforme genomes. More information can be found here:

<https://academic.oup.com/database/article/doi/10.1093/database/bav096/2630091>

> **Comments:**
> **username_0**: Thank you so much  

---

