Using boneLM dataset from Morpho package, I performed GPA using Morpho and
geomroph package but found that the results differ.
library(Morpho)
library(geomorph)
require(rgl)
data(boneData)
################################################################################
# Ignoring symmetry
################################################################################
# GPA in Morpho using ProcGPA
procM <- ProcGPA(boneLM, scale = TRUE, reflection = TRUE, CSinit = TRUE,
pcAlign = TRUE)
dat1 <- procM$rotated
# GPA in geomorph using gpagen
procG <- gpagen(boneLM, ProcD = FALSE, Proj = TRUE)
dat2 <- procG$coords
# Angle calculation
AngleFromMorpho <- c(t(dat1[,,1])) - c(t(dat1[,,3]))
AngleFromGeomorph <- c(t(dat2[,,1])) - c(t(dat2[,,3]))
angle.calc(AngleFromMorpho, AngleFromGeomorph) * (180/pi)
# [1] 126.6105 #The direction representing shape difference between
specimen 1 and 3 calculated from both packages differ by 126 degrees. Not
in the same direction!
################################################################################
# Considering the symmetric component
################################################################################
# GPA in Morpho using procSym
left <- c(4,6,8)
right <- c(3,5,7)
pairedLM <- cbind(left,right)
symprocM <- procSym(boneLM, scale = TRUE, reflect = TRUE, CSinit = TRUE,
orp = TRUE, pairedLM = pairedLM, bending = TRUE,
pcAlign = TRUE)
dat3 <- symprocM$Symtan
# GPA in geomorph using bilat.symmetry
symprocG <- bilat.symmetry(boneLM, land.pairs = pairedLM, object.sym =
TRUE,
ind = 1:dim(boneLM)[3])
dat4 <- symprocG$symm.shape
# Angle calculation
AngleFromMorpho2 <- c(t(dat3[1,])) - c(t(dat3[3,]))
AngleFromGeomorph2 <- c(t(dat4[,,1])) - c(t(dat4[,,3]))
angle.calc(AngleFromMorpho2, AngleFromGeomorph2) * (180/pi)
# [1] 95.43279 #The direction representing symmetric component of shape
difference between specimen 1 and 3 calculated from both packages differ by
95 degrees. Not in the same direction!
I have set orthogonal projection in both functions and also using bending
energy as the criteria for minimization. However, the direction
representing shape difference from the 1st and 3rd specimen calculated from
the two packages differ by 126 degrees for total shape and by 95 degrees
for the symmetric component. The differences are obviously not trivial. So
how should we perceive such difference?
Regards,
Lv
--
You received this message because you are subscribed to the Google Groups
"Morphmet" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/morphmet2/7f0f9e60-3b6b-4e4a-a6d0-46c6553be10f%40googlegroups.com.