jgx65 / hierfstat

the hierfstat package
24 stars 14 forks source link

Genet.dist not keeping population names #50

Closed jennagrimshaw closed 2 years ago

jennagrimshaw commented 2 years ago

First I want to say how much I love this package and many students in my lab use this for genetic studies. So thank you!

My question is that when I use genet.dist on a genind object, it renames the populations from their original names ("MN", "MI", "WI", "NC", "KY", "LA", "OK") to numbers (1, 2,3, 4, 5, 6, 7).

> usda@pop
 [1] MN MN MN MN MN MI WI WI NC NC NC NC NC NC NC NC NC NC NC NC KY KY KY KY KY KY KY KY KY KY KY KY LA LA LA LA LA LA
[39] LA LA LA LA LA LA LA LA LA LA LA LA LA LA LA LA LA LA LA LA LA LA LA OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK
[77] OK OK OK OK OK
Levels: MN MI WI NC KY LA OK
> usda_fst<-genet.dist(usda)
> usda_fst %>% round(digits=3)
      1     2     3     4     5     6
2 0.066                              
3 0.052 0.074                        
4 0.036 0.063 0.048                  
5 0.035 0.061 0.047 0.028            
6 0.038 0.066 0.051 0.030 0.029      
7 0.030 0.058 0.043 0.024 0.024 0.026

I wanted to confirm which number went with which population name. LA is the population that should be the most different. Are these ordered alphabetically perhaps? I just didn't want to make a guess but wanted to be sure.

Thank you so much for your help! Jenna

jgx65 commented 2 years ago

Hi @jennagrimshaw, thanks for your nice words!

I've pushed a new version of genet.dist that should fix the problem, let me know if it works.

jgx65 commented 2 years ago

Hello @jennagrimshaw , can you let me know if the issue is solved, and if so, close it? Many thanks

jennagrimshaw commented 2 years ago

Yes thank you so very much! Jenna

Happy holidays!

On Nov 21, 2021, at 4:41 AM, Jerome Goudet @.**@.>> wrote:

This email originated outside TTU. Please exercise cautionhttps://askit.ttu.edu/phishing!

Hello @jennagrimshawhttps://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fjennagrimshaw&data=04%7C01%7CJenna.grimshaw%40ttu.edu%7Cd04d8488d4ee447aaf9008d9acdb8252%7C178a51bf8b2049ffb65556245d5c173c%7C0%7C0%7C637730881087397658%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=OiM0o7ZpRAWWWod%2BDL4SKh1ebLeXHgwG7DBIjFLtwCE%3D&reserved=0 , can you let me know if the issue is solved, and if so, close it? Many thanks

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fjgx65%2Fhierfstat%2Fissues%2F50%23issuecomment-974792429&data=04%7C01%7CJenna.grimshaw%40ttu.edu%7Cd04d8488d4ee447aaf9008d9acdb8252%7C178a51bf8b2049ffb65556245d5c173c%7C0%7C0%7C637730881087397658%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=pBBs56g7dy7b009UqPJ4rcLij7Z2S5njnGXfiwKurAM%3D&reserved=0, or unsubscribehttps://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAISXPG52C2NB372H4W5PDUTUNDEGNANCNFSM5HYJR6OQ&data=04%7C01%7CJenna.grimshaw%40ttu.edu%7Cd04d8488d4ee447aaf9008d9acdb8252%7C178a51bf8b2049ffb65556245d5c173c%7C0%7C0%7C637730881087407644%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=hDXKaqsLlNDflcm3oSKZ9jrIIGL6U%2Bhgz0OEamRJOY4%3D&reserved=0. Triage notifications on the go with GitHub Mobile for iOShttps://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapps.apple.com%2Fapp%2Fapple-store%2Fid1477376905%3Fct%3Dnotification-email%26mt%3D8%26pt%3D524675&data=04%7C01%7CJenna.grimshaw%40ttu.edu%7Cd04d8488d4ee447aaf9008d9acdb8252%7C178a51bf8b2049ffb65556245d5c173c%7C0%7C0%7C637730881087417645%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=U6dme8lVf4St0QSI5fET2xvce8u%2FdwA%2F2GyXdnQ6A1c%3D&reserved=0 or Androidhttps://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fplay.google.com%2Fstore%2Fapps%2Fdetails%3Fid%3Dcom.github.android%26referrer%3Dutm_campaign%253Dnotification-email%2526utm_medium%253Demail%2526utm_source%253Dgithub&data=04%7C01%7CJenna.grimshaw%40ttu.edu%7Cd04d8488d4ee447aaf9008d9acdb8252%7C178a51bf8b2049ffb65556245d5c173c%7C0%7C0%7C637730881087417645%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=i8ZxwlJlX6KDZiEuprSy1Hfu7gIVPfhZSWqLBhsX0Gw%3D&reserved=0.