[R-sig-genetics] Fwd: Help in Pegas
Zhian Kamvar
kamvarz at science.oregonstate.edu
Mon Jan 2 19:54:58 CET 2017
Hi Ramendra,
> Warning message:
> In pegas::amova(amova_dist ~ Pop, data = amova_stra, nperm = 0) :
> at least one missing value in the distance object.
This warning is most likely caused by having genotypes with reciprocal missing data, which result in a distance matrix with missing data. You have two options:
1. Interpolate the missing data in the distance matrix with the ape functions additive() or ultrametric() (see: http://stackoverflow.com/a/34022156/2752888 <http://stackoverflow.com/a/34022156/2752888> and http://dx.doi.org/10.1093/bioinformatics/bth211).
2. Find the genotypes that have the most incompatibilities (you can use the poppr function incomp() for this) and remove them.
Hope that helps,
Zhian
> On Jan 2, 2017, at 01:37 , Ramendra Nath Sarma <rnsarma at aau.ac.in> wrote:
>
> 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]]
>
> _______________________________________________
> R-sig-genetics mailing list
> R-sig-genetics at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-genetics
[[alternative HTML version deleted]]
More information about the R-sig-genetics
mailing list