ERGA-consortium / EARs

The ERGA Assembly Reports repository
MIT License
10 stars 21 forks source link

Ploidy estimation reported in some EARs is incorrect #33

Closed talioto closed 5 months ago

talioto commented 5 months ago
  1. https://github.com/ERGA-consortium/EARs/blob/main/Assembly_Reports/Erebia_palarica/ilErePala4/ilErePala4_EAR.pdf. ancestral ploidy reported as 1 in the EAR but it is 2 in GoaT
  2. https://github.com/ERGA-consortium/EARs/blob/main/Assembly_Reports/Graellsia_isabellae/ilGraIsab1/ilGraIsab1.1_EAR.pdf ancestral ploidy reported as 1 in the EAR but it is 2 in GoaT
  3. Phyllidia flava also: ancestral ploidy reported as 1 in the EAR but it is 2 in GoaT

Something is going wrong here.

diegomics commented 5 months ago

Yes. I'm getting it with: ploidy = (math.floor(chrom_num / haploid_number)) So for Erebia palarica is: 38/22=1.73 -> 1

This is because I'm using one query to get all the data, and ploidy does not result from that query. But I'm adding another query to fix this. Give me a couple of hours to test this fix.

diegomics commented 5 months ago

Hi @talioto would you like to try this update: https://raw.githubusercontent.com/diegomics/EARs/main/make_EAR.py

Let me know if it works for you. If it does, I will merge it into this repo.

gitcruz commented 5 months ago

Hi @diegomics

I just tested it on ilGraIsab1.1 and now it correctly reports the goat's ploidy.

ilGraIsab1.1_EAR_ploidy_fixed.pdf

Thanks for your quick response, Fernando

diegomics commented 5 months ago

Thanks @gitcruz Merging now