Closed rkriebel closed 6 years ago
I will fix it but it's not a good idea anyway to filter on PCA. And to use subset/subsetize, more generally.
2018-06-19 22:02 GMT+02:00 Ricardo Kriebel notifications@github.com:
These functions were working fine on PCA objects until the latest version Momocs_1.2.9.2
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/MomX/Momocs/issues/198, or mute the thread https://github.com/notifications/unsubscribe-auth/AEgoFomBXxdJmi5c-CWCfDEvPpECnqFnks5t-VjXgaJpZM4UuJax .
-- vincentbonhomme.fr http://www.vincentbonhomme.fr
Thanks! I use subset to be able to pass a specific group by the get_chull_area function to calculate morphospace occupation of that group. Not sure how else to do it.
I see I can pull out all groups at once in get_chull_area so that should not be a problem. The other use I had for subset was to be able to include the outgroup species for downstream analyses matching a phylogeny but also be able to remove them for a morphospace of just the focal clade. Thanks again for your help.
Id say as_df on your PCA then regular df handling ?
Le 20 juin 2018 à 02:01, Ricardo Kriebel notifications@github.com a écrit :
I see I can pull out all groups at once in get_chull_area so that should not be a problem. The other use I had for subset was to be able to include the outgroup species for downstream analyses matching a phylogeny but also be able to remove them for a morphospace of just the focal clade. Thanks again for your help.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.
That works for matching with the tree but what I was also doing is removing the sister group and plotting the morphospace without it. The df doesn't allow that so the general question is how to remove a group and plot the morphospace without it. I was doing this: subset(pca_res, !pca_res$fac$clade=="sister")
Filter on the Coe, then pca then whatever you like. You should not filter your PCA calculated on a larger set of individuals!
Le 20 juin 2018 à 18:32, Ricardo Kriebel notifications@github.com a écrit :
That works for matching with the tree but what I was also doing is removing the sister group and plotting the morphospace without it. The df doesn't allow that so the general question is how to remove a group and plot the morphospace without it. I was doing this: subset(pca_res, !pca_res$fac$clade=="sister")
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.
I have like 10 specimens out of 411 I want to remove and they fall within the range of variation of the rest of specimens. Since the possibility of subsetting the PCA was available in Momocs, I used it. I will take your advice and stop doing so.
One thing that would help a lot in general and I can't figure out is to give a transparent color to colorRampPalette like you showed me to apply colors with the current version. In the example below the third group would be hidden. I tried with library scales to give a fully transparent "color" but it gives an error.
plot_PCA(pca_res, ~clade, palette=colorRampPalette(c("orange","purple", "transparent")))
I know. Not exemplified and shouldbe easier but you still can go with pal_alphai guess
Le 20 juin 2018 à 23:26, Ricardo Kriebel notifications@github.com a écrit :
One thing that would help a lot in general and I can't figure out is to give a transparent color to colorRampPalette like you showed me to apply colors with the current version. In the example below the third group would be hidden. I tried with library scales to give a fully transparent "color" but it gives an error.
plot_PCA(pca_res, ~clade, palette=colorRampPalette(c("orange","purple", "transparent")))
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.
Dont ecactly remember but thats possibly the reasowhy i removed it ;)
Le 20 juin 2018 à 23:08, Ricardo Kriebel notifications@github.com a écrit :
I have like 10 specimens out of 411 I want to remove and they fall within the range of variation of the rest of specimens. Since the possibility of subsetting the PCA was available in Momocs, I used it. I will take your advice and stop doing so.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.
if everything goes fine you gonna hva an example on how to highlight there: https://momx.github.io/Momocs/reference/plot_PCA.html
plus filtering on PCA is back
These functions were working fine on PCA objects until the latest version Momocs_1.2.9.2