AMOVA with Structure file

668 views
Skip to first unread message

Ramendra Sarma

unread,
Nov 5, 2015, 9:56:02 AM11/5/15
to poppr


Hio,
What steps should I follow to AMOVA with a file formated for Structure? Sorry for a simple quiestion since I am new to to poppr

Zhian Kamvar

unread,
Nov 5, 2015, 10:03:24 AM11/5/15
to Ramendra Sarma, poppr
Hello,

You can find out how to import data with adegenet's "basics" tutorial located here: https://github.com/thibautjombart/adegenet/blob/master/tutorials/tutorial-basics.pdf

From there, your STRUCTURE file should import as a genind object. If you want to use population strata in your AMOVA analysis, you should read the "strata" tutorial: https://github.com/thibautjombart/adegenet/blob/master/tutorials/tutorial-strata.pdf

After that, you can perform amova with the function poppr.amova. For details, see the help page for the function by typing help("poppr.amova") in your R console.

Best,
Zhian
> On Nov 5, 2015, at 02:45 , Ramendra Sarma <ramendr...@gmail.com> wrote:
>
>
>
> Hio,
> What steps should I follow to AMOVA with a file formated for Structure? Sorry for a simple quiestion since I am new to to poppr
>
> --
> You received this message because you are subscribed to the Google Groups "poppr" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to poppr+un...@googlegroups.com.
> To post to this group, send email to po...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/poppr/aad520dc-04e6-4cf1-9695-d420722c975c%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Ramendra Sarma

unread,
Nov 7, 2015, 11:21:43 AM11/7/15
to poppr, ramendr...@gmail.com
Being novice to R,  I ma finding it difficult perform 'poppr.amova' with my data in structure format with 4 populations. The error message that Im receiving are:

amova<-read.structure(("/home/ramen/Joha_works/Structure_gui/joha_amova.str"))

 How many genotypes are there?
54

 How many markers are there?
88

 Which column contains labels for genotypes ('0' if absent)?
1
Which column contains the population factor ('0' if absent)?
2

 Which other optional columns should be read (press 'return' when done)?
1:

 Which row contains the marker names ('0' if absent)?
1
Are genotypes coded by a single row (y/n)?
n

 Converting data from a STRUCTURE .stru file to a genind object...

> AMOVAamova <- poppr.amova(amova,missing='ignore')
Error in poppr.amova(amova, missing = "ignore") :
  A population hierarchy must be specified
> AMOVAamova <- poppr.amova(amova,missing='ignore', ~Pop/Subpop)
Error: One or more levels in the given strata is not present in the data frame.

How to resolve this issue?

Zhian Kamvar

unread,
Nov 7, 2015, 1:51:18 PM11/7/15
to Ramendra Sarma, poppr
Hi,

This error:
Error: One or more levels in the given strata is not present in the data frame.
means that you tried to specify a level of population strata that doesn't exist. You must specify your population strata in order to specify the hierarchy. Please read the tutorial on defining strata here: https://github.com/thibautjombart/adegenet/blob/master/tutorials/tutorial-strata.pdf

We also have a tutorial for performing AMOVA here: http://grunwaldlab.github.io/Population_Genetics_in_R/AMOVA.html


Best,
Zhian

Reply all
Reply to author
Forward
0 new messages