Multidimensional scaling (MDS) clustering functionality?

130 views
Skip to first unread message

Michael

unread,
Sep 29, 2023, 2:25:11 PM9/29/23
to plink2-users
Hello, 

Would you consider adding the ability to cluster using MDS in addition to the already available PCA? MDS is distance based and Plink 2.0 can quickly compute the all-by-all distance  matrix  (make-king-table).  It would be nice to be able to quickly generate the MDS coordinates using Plink 2.0. 

    Best, 

            Michael 
 
     

Christopher Chang

unread,
Sep 29, 2023, 6:12:03 PM9/29/23
to plink2-users
That is likely to be added at some point, but to clarify your use case: is this something you're currently able to do by e.g. running --make-king and then loading its output into R, or do you have too many samples for the distance matrix to fit in memory?

Michael Harris

unread,
Oct 2, 2023, 9:47:29 AM10/2/23
to Christopher Chang, plink2-users
I can currently use make-king to calculate the distances.  I have about 6k bacterial genomes in a multi-sample VCF.  The distance calculation in Plink 2.0 works well. I have not tried loading the distance matrix into R yet.  

--
You received this message because you are subscribed to a topic in the Google Groups "plink2-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/plink2-users/PvyQalRzeoI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to plink2-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/plink2-users/c2b5f227-2eaf-4080-9f90-4f9c9c3838c0n%40googlegroups.com.

Christopher Chang

unread,
Oct 2, 2023, 11:26:54 PM10/2/23
to plink2-users
Ok.  It should be practical to work with a 6k x 6k matrix in R.  However, I don't think --make-king (without -table) generates the most useful matrix for MDS purposes; you'd probably want to postprocess the output of --make-king-table to compute a more appropriate distance function, instead.  (plink 1.x --cluster --mds-plot was based on (1 - identity-by-state); that might already be good enough for your purposes?)

Michael Harris

unread,
Oct 3, 2023, 11:20:42 AM10/3/23
to Christopher Chang, plink2-users
Thanks very much for the suggestion.  I will check out -mds-plot in Plink 1.9 .  

Reply all
Reply to author
Forward
0 new messages