legumeinfo / ArachisPheno

AraPheno source code for http://arapheno.1001genomes.org
MIT License
0 stars 0 forks source link

Phenotype detail map shows number of replicates, not accessions #10

Closed svengato closed 4 years ago

svengato commented 4 years ago

Split off from issue #5:

Inconsistency in the number of accessions: This file (study) has Unique acc = 794. The page with this link http://dev.lis.ncgr.org:50007/phenotype/5/ shows 'Geographic distribution of 876 accessions' above the world map. But the table view in the same page has correct number of accessions: 793.

I already changed the map label count from replicates to accessions, but then determined that the map itself shows the number of replicates for each country, not accessions. Working on that now.

svengato commented 4 years ago

Also note that blank/unknown/mislabeled countries do not appear on the map, but do correctly count toward the total and appear in the table below. Very small countries do not appear either. So if you manually sum over all the visible countries on the map, your total will be lower than the number of accessions in the map label.

Example: for linoleic acid, there are values for 738 unique accessions. 154 are from (unknown country) and 3 are from SUN (former Soviet Union, not yet updated). We should see 63 for Zambia, 53 for Brazil, 48 for Bolivia, etc.

svengato commented 4 years ago

This is now fixed, though a bit inelegantly compared to the original code (see the PhenotypeDetail class in arapheno/phenotypedb/views.py for details).