search this blog

Friday, August 14, 2020

Awesome new toys from Vahaduo

Vahaduo now offers a 3D PCA experience. Check it out HERE and HERE. Below are a couple of screen caps of me messing around with the new tools.

Vahaduo says:

Hi everyone!

New tool - PCA 3D Viewer.

Global 25 version:

West Eurasia version:


Dots - ancients, circles - moderns.

Click X, Y, Z or COLOR tab and then click one of the PCx buttons to switch dimensions.

Click already active X, Y, Z or COLOR tab to temporarily reverse selected dimension. It will be restored to a default state when any of the dimensions will be switched to another one.

ADD CUSTOM POINTS - self-explanatory. Points will be added as "+". IMPORTANT - G25 version takes NON-SCALED coordinates. This will be true for any new tool dedicated to G25 and coordinates will be scaled automatically when needed or desired.

"Type parts of names." + TAG button - type parts of names to tag certain samples (try for example "KK1 Afon Pinar"). Search is Case Sensitive. Points will be redrawn as "x".

Next row - Labels and Annotations. Click the right button to cycle trough:


CLICK - click to add/delete labels/annotations.
AUTO - same as CLICK plus labels/annotations will be automatically added to newly plotted or tagged samples. Unfortunately adding new labels and annotations becomes very slow when there is too much of them, so there is a limit for the AUTO setting - 250 labels or 20 annotations at once.

Annotations are editable. They can be dragged to another place and text can be changed. Text can be also wrapped into an HTML SPAN element and some styles can be used, like "font-size" or "color". BR element (new line) works too.

HIGHLIGHT CLICK/OFF/HOVER - highlight all samples that belong to a single population. Set to HOVER to ignore clicks. Set to OFF to disable this feature and to remove highlight triggered by hover (highlights triggered by clicks will stay until they will be cleared or removed by a click). Click white dot to cycle trough available highlight colors.

Plotly buttons:

Default download is set to 1600x1200px PNG.

Custom Plotly buttons:
"Toggle projection: orthographic / perspective" - self-explanatory.
"Toggle background color" - cycles trough dark grey, black, white and light grey. Text color and white highlight will be switched to black when background will be set to white or light grey.
"Toggle color scheme" - cycles trough several gradients.
"Reverse color scheme" - reverses all gradients permanently.
"Download plot as png (custom size)" - default size is the size of the currently displayed plot.

See also...

New Global25 interpretation tools


weure said...

Single Grave>Bell Beaker Davidksi and Kurt Gerhardt

'The substrate of the steephead is the skull of the Yamna related Single Grave!'

Michalis Moriopoulos said...

I have a technical question about PCAs:

Why is it that Eurasian variation dominates the first few principle coordinates of global PCAs? If most of human genetic diversity lies within SSA (and in the San in particular), why do the SSAs all cluster so closely together in typical world PCAs (including this 3D one)? Meanwhile the Eurasians occupy a vast space across the PCA despite not containing as much variation as Africans. Is this because global PCAs are "overloaded" with Eurasians? I wonder how much would change if we had, say, a few thousand more West Africans, a few thousand more Nilotes, more San, etc.

Davidski said...


Is this because global PCAs are "overloaded" with Eurasians? I wonder how much would change if we had, say, a few thousand more West Africans, a few thousand more Nilotes, more San, etc.

It's because of recent founder effects and drift in Eurasia.

So you would need to overload the PCA with Africans and African diversity, and under sample Eurasians, to turn things around.

dsjm1 said...

Very nice - the pan & rotate & tilt really make it a great tool. My screen 10 1920 x 1080. I have a larger one & will try that for greater clarity.

Thanks for pointing to this.

Samuel Andrews said...


Is this showing us cool 3rd PCAs or is it meant to give us a tool to make our own 3rd PCAs?

dsjm1 said...

Have added examples & comments at Anthrogenica - tks David.

vahaduo said...

@ all
I've updated Custom PCA tool.

The changes are small, but they make the tool much easier to use:

Prepend the sample name with label@ to add a label to the point.
Prepend the sample name with labelonly@ to add a label to the plot without adding the point.
Labels for top level groups are added automatically.

vahaduo said...

Default download size in the Custom PCA tool is now set to 1600x1200px and there is a possibility to download custom sized plot via "Download plot as png (custom size)" Plotly button on the right.

vahaduo said...

Another quick update of the Custom PCA tool - "Labels for all samples are added automatically and are placed on a hidden layer."

dsjm1 said...

Vahaduo - many thanks for this - a great tool (as well as the 2D one) - I am finding some folk can't quite grasp the benefit of a 3D model. I have added a link to your 2D model for them as I think these people will find that easier to start with.

It would be great to have a select button that chooses between modern & ancient sources.

Thanks DSM

Michalis Moriopoulos said...


Thanks for the explanation.


I've tried posting my unscaled coordinates into the West Eurasia PCA "custom box" but the box turns red as if in error when I try to load them. I tried other coords-- same problem. Works fine in the World version.

Samuel Andrews said...


I have the same problem as Michalis.

Davidski said...

The West Eurasia PCA only works with coordinates from the West Eurasian PCA analysis.

This one...

vahaduo said...

@ Michalis Moriopoulos && Samuel Andrews

That's West Eurasia PCA, not Global 25 PCA. It's the one that Davidski uses with PAST.

@ Samuel Andrews

"Is this showing us cool 3rd PCAs or is it meant to give us a tool to make our own 3rd PCAs?"

Custom 3D PCA will certainly come in the future. This one is "just" showing a 3D PCA. "Just", because it's like looking at multiple different 2D PCAs at once, depending on the rotation and chosen dimensions. Structures that you know from reprocessed 2D plots are present here as well. You just need to know where to look at.

Compare positions of French, Irish, Vepsian and Belarusian samples on this North Euro PCA made with the updated Custom PCA tool:

with a 3D view of G25 PCA (dimensions 4, 5 and 15):

Or this view of West Eurasia PCA:

with a 3D view of G25 PCA (dimensions 4, 5 and 2):

vahaduo said...

@ dsjm1
Thanks for posting this on AG!

"It would be great to have a select button that chooses between modern & ancient sources."
Doable, just not now. Filtering will be added in the next version.

Samuel Andrews said...


Thanks for the clarity. Your tools are awesome, I use them all the time!

vahaduo said...

@ all

I've added regional PCAs (same as in g25views, some samples may have old coordinates!) and updated the PCA 3D Viewer tool. There are now two more Plotly buttons:

"Toggle aspect mode: cube / data" - full G25 stays as cube by default, the rest will be set to data.

"Toggle marker size" - cycles through small/medium/big, full G25 and both West Eurasian PCAs have this option set to small by default, other PCAs to medium.

You can find a list of available PCAs under this link:

West Eurasia PCA
Global 25 PCA
G25 PCA West Eurasia
G25 PCA Europe
G25 PCA North Europe
G25 PCA North Eurasia
G25 PCA East Asia
G25 PCA South Asia
G25 PCA Caucasus - Near East
G25 PCA Africa

Buttons for PCs that represent less than 1% of the total variance are greyed out.

andrew said...

Would the 3D images be easier to follow as a gif than as a still image in 2D?