[R-sig-genetics] Fwd: Help in Pegas

Ramendra Nath Sarma rnsarma at aau.ac.in
Mon Jan 2 10:37:39 CET 2017


Hi,
I used a file converted from Structure to use Pegas to analysis AMOVA and
to analyse Fst or other population parameters. Iam getting the error with
NA as:
Warning message:
In pegas::amova(amova_dist ~ Pop, data = amova_stra, nperm = 0) :
  at least one missing value in the distance object.
> pegas_amova

    Analysis of Molecular Variance

Call: pegas::amova(formula = amova_dist ~ Pop, data = amova_stra, nperm = 0)

           SSD      MSD  df
Pop         NA       NA   2
Error 16241.53 113.5772 143
Total       NA       NA 145

Variance components:
     Pop    Error
      NA 113.5772

Variance coefficients:
       a
29.23973



My scripts in R as follows:
library("poppr")
library("adegenet")
amova<-read.structure ("~/Desktop/HARENDRA/structure1.str")
strata(amova) <- data.frame(Pop = pop(amova))
library(pegas)
amova_dist  <- dist(amova) # Euclidean distance
amova_dist
amova_stra  <- strata(amova)
amova_stra
pegas_amova <- pegas::amova(amova_dist ~Pop, data = amova_stra, nperm = 0)
pegas_amova


Where I am wrong? Please suggest as novice to R.


----------------------------------------------------------------------------------------------------------------------------------------






*Dr R N SarmaProfessorDepartment of Plant Breeding and GeneticsAssam
Agricultural UniversityJorhat-785013Assam, Indiaweb: www.aau.ac.in;
<http://www.aaau.ac.in> Phone: +91-376-2310526; +91-376231133(R);
9435350529(M)*
--------------------------------------------------------------------------------------------------------------------------

	[[alternative HTML version deleted]]



More information about the R-sig-genetics mailing list