[adegenet-forum] Using adegenet with morphometric data

Zhian Kamvar kamvarz at science.oregonstate.edu
Mon Nov 25 13:02:32 CET 2019


 Hello Emma,

You are correct that you can use both find.clusters() and dapc() with your
morphometric data. Both of these functions take data frames or matrices of
samples in rows and characters in columns. I'll answer you questions below

> My dataset is a list but when I looked up the pop function, it can only
take genind and genepop objects, is that correct?

Yes. Genetic data can be placed into the genind/genpop objects because they
represent counts of alleles.

> If so, is there another way to find out how the actual groups compare to
the find.cluster output so that I can continue on to correctly perform a
DAPC on my data?

The pop() function gives you back a vector of population assignments. If
you have that in your original data set, you can compare the column of the
population assignments to the $grp element in the output of find.clusters.
A caveat, however: You don't NEED to run find.clusters() for DAPC if you
already know the group assignments. DAPC creates a multivariate model based
on known group definitions, so your previously defined groups should work
well. If you want to compare your groups to the find.clusters output, you
can test those with chisq.test().

> I tried to run a DAPC with the following code mydata.dapc <- dapc(mydata)
but there were no data points on the graph.

If you are using a data frame, you will need to include a vector of
population assignments as the pop argument.

Hope that helps,
Zhian


On Sat, Nov 23, 2019 at 11:00 AM <
adegenet-forum-request at lists.r-forge.r-project.org> wrote:

> Send adegenet-forum mailing list submissions to
>         adegenet-forum at lists.r-forge.r-project.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
>
> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/adegenet-forum
>
> or, via email, send a message with subject or body 'help' to
>         adegenet-forum-request at lists.r-forge.r-project.org
>
> You can reach the person managing the list at
>         adegenet-forum-owner at lists.r-forge.r-project.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of adegenet-forum digest..."
>
>
> Today's Topics:
>
>    1. Using adegenet with morphometric data (Emma White)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Fri, 22 Nov 2019 16:25:50 +0000
> From: Emma White <Emma.White at Marine.ie>
> To: "adegenet-forum at lists.r-forge.r-project.org"
>         <adegenet-forum at lists.r-forge.r-project.org>
> Subject: [adegenet-forum] Using adegenet with morphometric data
> Message-ID: <d364ad81722d4215a11967663ef31977 at MIEXCH1.Marine.ie>
> Content-Type: text/plain; charset="utf-8"
>
> Hello!
>
> I had a look through the archive for morphometric related questions and I
> only found one so hopefully I'm not duplicating any questions.
>
> I am trying to compare morphometric data with some genetic data from the
> same samples and my colleague has used adegenet to carry out some analysis
> which I would like to replicate. I have successfully used the find.cluster
> function but when I go to use the pop function to see how well the function
> clustered my data compared with the actual groups I get the following
> error: "Error in (function (classes, fdef, mtable) : unable to find an
> inherited methof for function 'pop' for signature '"data.frame"'". My
> dataset is a list but when I looked up the pop function, it can only take
> genind and genepop objects, is that correct? If so, is there another way to
> find out how the actual groups compare to the find.cluster output so that I
> can continue on to correctly perform a DAPC on my data? I tried to run a
> DAPC with the following code mydata.dapc <- dapc(mydata) but there were no
> data points on the graph.
>
> Thanks for your help.
>
> Emma
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> http://lists.r-forge.r-project.org/pipermail/adegenet-forum/attachments/20191122/bc1a2980/attachment-0001.html
> >
>
> ------------------------------
>
> Subject: Digest Footer
>
> _______________________________________________
> adegenet-forum mailing list
> adegenet-forum at lists.r-forge.r-project.org
> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/adegenet-forum
>
> ------------------------------
>
> End of adegenet-forum Digest, Vol 132, Issue 5
> **********************************************
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/adegenet-forum/attachments/20191125/0e1210a3/attachment.html>


More information about the adegenet-forum mailing list