Problems with sliding semilandmarks (unnatural shapes after GPA)

24 views
Skip to first unread message

atal pande

unread,
Mar 14, 2025, 11:23:22 AMMar 14
to geomorph R package

Hi all,


I am having trouble with sliding semilandmarks in my dataset, which are twisted into strange (biologically impossible) shapes after GPA. I was wondering if anyone would be so kind as to offer some advice.


My data array contains 52 three-dimensional landmarks per specimen, representing four separate structures (eyes) of some species. Each eye is represented by 13 landmarks, of which landmarks 1 and 2 are fixed, while landmarks 3 to 13 form a closed loop and are to be treated as curved sliding semilandmarks. Hence, for each specimen, landmarks 1, 2, 14, 15, 27, 28, 40, 41 are fixed landmarks while landmarks 3 to 13, 16 to 26, 29 to 39, and 42 to 52 are sliding ones, forming four separate loops. See the plot below, where the fixed landmarks are coloured red and the sliding ones are black:




The curve landmarks are not flanked by fixed landmarks, but I made sure to place the first one in the same position in each specimen, and used the same order for placing the rest of them. Next, I generated a .csv file stating which landmarks need to slide between which (please find attached).


Now after GPA, most of my specimens look okay but there are some that show very unnatural and biologically unrealistic shapes, even though the raw landmarks look normal.


For example, raw landmarks:



And procrustes coordinates for the same specimen (specimen 3):



Here the yellow loop looks strange after GPA. Also, The relative sizes of the purple, green, and yellow loops have changed. When I treat all landmarks as fixed, this problem disappears. 


I have tried the following to troubleshoot:


  1. Re-landmarking to make sure all landmarks are placed in the same order

  2. Used only fixed landmarks for rotation during GPA: this solves the issue for some species but not others

  3. Change max.iter, sen, tol, ProcD, Proj parameters in gpagen(): some specimens look okay when using max.iter = 2, but does not work for all

  4. Used digit.curves() to resample my curved landmarks to fewer ones that are perfectly equidistant before performing GPA: made no difference


It is interesting to note that the problematic species have kind of extreme morphologies, deviating from the average ones. I am not sure if this makes a difference. Running the same protocol for a different datasets with more uniform morphologies does not show these issues.


I am using geomorph version ‘4.0.6.999’ and R version 4.3.1 (though I have also tried with the latest version of both on a different PC and it made no difference).


Please find attached the landmark files for a subset of my sample, my R code, and the slider .csv that I used. Apologies for the really long message, and any help would be greatly appreciated :)


Warm regards,
Atal Pande


example.zip

Mike Collyer

unread,
Mar 14, 2025, 2:18:42 PMMar 14
to geomorph-...@googlegroups.com

Dear Atal,

I don’t know if this is your problem, but it is possible for semi-landmarks to slide past each other, and once that happens, the issues tend to become worse with each iteration.  The reason for this is that unlike with fixed-landmarks, only, there is typically no convergence of the GPA algorithm, just an arresting of it.  This is why with two iterations, things maybe do not look as bad — you arrested the analysis before it got worse.  My biggest issue with semi landmarks and GPA is that sliding the landmarks is an individual-level phenomenon but GPA-convergence is a sample-level measurement.  So it is possible that aberrant specimens have unusual effect on a few individuals’ landmarks.

If I had to guess based on the example you provided, I think the severe difference in size among eyes while trying to use the same number of landmarks for each eye is causing problems.  The bending energy matrix is based on all landmarks, not just clusters.  I bet if you did separate GPAs on each eye, you would not have these same issues.  If that were the case, one might consider doing GPA with sliding landmarks by eye, inflating the resulting configurations by centroid size, and then translating eyes back to their fixed landmark positions in the 4-eyed landmark configurations, before finalizing the analysis with GPA without sliding.  

Best,
Mike


--
You received this message because you are subscribed to the Google Groups "geomorph R package" group.
To unsubscribe from this group and stop receiving emails from it, send an email to geomorph-r-pack...@googlegroups.com.
To view this discussion, visit https://groups.google.com/d/msgid/geomorph-r-package/c76f7711-f890-4f75-bf2a-89091aee3ae0n%40googlegroups.com.
<example.zip>

atal pande

unread,
Mar 19, 2025, 4:39:47 AMMar 19
to geomorph R package

Dear Dr. Collyer,

Thank you so much for your suport, your solution worked and now the landmarks look fine!

Warm regards,
Atal
Reply all
Reply to author
Forward
0 new messages