Help with plotreftotarget

394 views
Skip to first unread message

angus lawrie

unread,
Jul 30, 2018, 12:38:10 AM7/30/18
to geomorph R package
Hello everyone, I am working with different populations of snails which appear to have different morphologies. I have been using the plotreftotarget function to compare the deformations of the minimum / maximum of principal components 1 and 2 to understand where on my snails the difference in shape is mostly occurring.
I have two questions:
1) I would like to generate populations specfic deformation grids (I have read advice from previous discussions to no success, cannot subset properly?)
2) I would like to use the populations' specific deformations grids on a CVA plot (attached) to demonstrate which populations have what general morphology. 

Cheers,
Angus
CVA plot.png

Antigoni Kaliontzopoulou

unread,
Jul 30, 2018, 9:00:41 AM7/30/18
to geomorph-...@googlegroups.com

Angus,

1) For that you just need general R-indexing to filter each population, and then from that you can calculate the mean shape of each population and make deformation grids to compare them (with each other, or to the grand mean), e.g.

sh.pop1 <- shape[,,pop=="pop1"]

mean.pop1 <- mshape(sh.pop1)

grand.mean <- mshape(shape)

plotRefToTarget(grand.mean, mean.pop1)

This assumes you have a grouping object called pop, and (superimposed) shape data in a 3d-array called "shape"

2) If your objective is to review the shapes of each group, the approach above should be enough. For numerous reasons, I would recommend a PCA over a CVA plot for examining where these groups lie in morphospace and how much they overlap. For a detailed account on why this is the case, please read:

Klingenberg, C. P., and L. R. Monteiro. 2005. Distances and directions in multidimensional shape spaces: implications for morphometric applications. Syst. Biol. 54:678–688.

Mitteroecker, P., and F. L. Bookstein. 2011. Linear Discrimination, Ordination, and the Visualization of Selection Gradients in Modern Morphometrics. Evol. Biol. 38:100–114.

Hope this helps

Antigoni

--
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 post to this group, send email to geomorph-...@googlegroups.com.
Visit this group at https://groups.google.com/group/geomorph-r-package.
To view this discussion on the web, visit https://groups.google.com/d/msgid/geomorph-r-package/5815d8ed-2f81-4377-919e-aaaf6f622a72%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

-- 
Antigoni Kaliontzopoulou 

Assistant Researcher
CIBIO/InBIO, Centro de Investigação em Biodiversidade e Recursos Genéticos
University of Porto
Campus Agrário de Vairão, 4485-661 Vairão
PORTUGAL

https://cibio.up.pt/research-groups-1/details/phenevol
http://cibio.up.pt/people/details/akaliont
http://antigonik.wix.com/akaliontzopoulou
http://www.seh-herpetology.org/

Mike Collyer

unread,
Jul 30, 2018, 9:10:04 AM7/30/18
to geomorph-...@googlegroups.com
There is also an example for subsetting coordinates by group and finding their means using the coords.subset function.  

It is a good idea to go through the geomorph table of contents, in addition to reading past threads, as we have added many functions over the years, often based on issues/needs that have emerged in the google group discussions.

Best,
Mike

angus lawrie

unread,
Sep 12, 2018, 4:05:19 AM9/12/18
to geomorph R package
Thank you for your reply Antigoni, 
I have been trying to go ahead with my analysis as you suggested but cannot work out how to convert my superimposed data into a 3d-array. I'm a bit lost where to start as the results from gpagen don't generate data which is either a matrix (to convert into a 3d array using arrayspecs) or an array. I thought using the geomorph.data.frame may work, but this does not generate a matrix either.
Could you please advise how one converts aligned Procrustes data into an array?
Thank you for your time,
Angus

On Monday, 30 July 2018 21:00:41 UTC+8, Antigoni Kaliontzopoulou wrote:

Angus,

1) For that you just need general R-indexing to filter each population, and then from that you can calculate the mean shape of each population and make deformation grids to compare them (with each other, or to the grand mean), e.g.

sh.pop1 <- shape[,,pop=="pop1"]

mean.pop1 <- mshape(sh.pop1)

grand.mean <- mshape(shape)

plotRefToTarget(grand.mean, mean.pop1)

This assumes you have a grouping object called pop, and (superimposed) shape data in a 3d-array called "shape"

2) If your objective is to review the shapes of each group, the approach above should be enough. For numerous reasons, I would recommend a PCA over a CVA plot for examining where these groups lie in morphospace and how much they overlap. For a detailed account on why this is the case, please read:

Klingenberg, C. P., and L. R. Monteiro. 2005. Distances and directions in multidimensional shape spaces: implications for morphometric applications. Syst. Biol. 54:678–688.

Mitteroecker, P., and F. L. Bookstein. 2011. Linear Discrimination, Ordination, and the Visualization of Selection Gradients in Modern Morphometrics. Evol. Biol. 38:100–114.

Hope this helps

Antigoni


On 30/07/2018 05:38, angus lawrie wrote:
Hello everyone, I am working with different populations of snails which appear to have different morphologies. I have been using the plotreftotarget function to compare the deformations of the minimum / maximum of principal components 1 and 2 to understand where on my snails the difference in shape is mostly occurring.
I have two questions:
1) I would like to generate populations specfic deformation grids (I have read advice from previous discussions to no success, cannot subset properly?)
2) I would like to use the populations' specific deformations grids on a CVA plot (attached) to demonstrate which populations have what general morphology. 

Cheers,
Angus
--
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-package+unsub...@googlegroups.com.

Antigoni Kaliontzopoulou

unread,
Sep 12, 2018, 5:24:04 AM9/12/18
to geomorph-...@googlegroups.com
Angus,

Please see the help file of gpagen. If you superimposed using this function, the superimposed coordinates already come as an array in the $cords part of the list resulting from gpagen.

Good luck!
Antigoni
> email to geomorph-r-pack...@googlegroups.com <javascript:>.
> To post to this group, send email to geomorph-...@googlegroups.com
> <javascript:>.
> <https://groups.google.com/d/msgid/geomorph-r-package/5815d8ed-2f81-4377-919e-aaaf6f622a72%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> Antigoni Kaliontzopoulou
>
> Assistant Researcher
> CIBIO/InBIO, Centro de Investigação em Biodiversidade e Recursos Genéticos
> University of Porto
> Campus Agrário de Vairão, 4485-661 Vairão
> PORTUGAL
> https://cibio.up.pt/research-groups-1/details/phenevolhttp://cibio.up.pt/people/details/akalionthttp://antigonik.wix.com/akaliontzopoulouhttp://www.seh-herpetology.org/
>
>

--
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 post to this group, send an email to geomorph-...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/geomorph-r-package/b56be18e-93de-469c-99da-8652ff471e33%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
​--


Antigoni Kaliontzopoulou

Assistant Researcher
CIBIO/InBIO, Centro de Investigação em Biodiversidade e Recursos Genéticos
University of Porto
Campus Agrário de Vairão, 4485-661 Vairão
PORTUGAL

https://cibio.up.pt/research-groups-1/details/phenevol
http://antigonik.wix.com/akaliontzopoulou
http://cibio.up.pt/people/details/akaliont

angus lawrie

unread,
Sep 12, 2018, 8:36:25 PM9/12/18
to geomorph R package
Ah yes, thank you very much!!
> To post to this group, send email to geomorph-...@googlegroups.com
> <javascript:>.
> Visit this group at https://groups.google.com/group/geomorph-r-package.
> To view this discussion on the web, visit
> https://groups.google.com/d/msgid/geomorph-r-package/5815d8ed-2f81-4377-919e-aaaf6f622a72%40googlegroups.com
> <https://groups.google.com/d/msgid/geomorph-r-package/5815d8ed-2f81-4377-919e-aaaf6f622a72%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> Antigoni Kaliontzopoulou
>
> Assistant Researcher
> CIBIO/InBIO, Centro de Investigação em Biodiversidade e Recursos Genéticos
> University of Porto
> Campus Agrário de Vairão, 4485-661 Vairão
> PORTUGAL
> https://cibio.up.pt/research-groups-1/details/phenevolhttp://cibio.up.pt/people/details/akalionthttp://antigonik.wix.com/akaliontzopoulouhttp://www.seh-herpetology.org/
>
>

--
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-package+unsub...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages