green-striped-gecko / PopGenReport

a simple way to analyse population genetic data using R
5 stars 5 forks source link

Issues with null allele, Nei's pairwise Fst #7

Closed RodionSmolnikov closed 2 years ago

RodionSmolnikov commented 2 years ago

Hello! I have installed PopGenReport, as it was recomended on http://www.popgenreport.org/. But I had a couple of problems after I updated all modules to the last versions. Here are messages from tex file. 1) In section "Computation of Nei's pairwise Fst between all pairs of populations" "Error in pairwise.fst(cats, res.type = "{}matrix"{}): could not find function "{}pairwise.fst"{}}" Solution: pairwise.fst is deprecated. Should be changed to pairwise.fstb

2) In section "Testing for null alleles" ~ 80k rows of "Warning in type.convert.default(X[[i]], ...): 'as.is' should be specified by the caller; using TRUE" Solution: reshape:melt function changed since 4.0 R version. Shold be used reshape2:melt

3) In section "Comparison of the observed number of homozygotes vs. expected - overall". "Error in factor(X2): object 'X2' not found" Solution: I didn't find definition of X2 object, looks like it came from <2.1 version. Could you explain, what part of nullalleles object should be used in that ggplots? Or maybe other objects.

I have not enough rights to create pull request for this remote. Here is PR to my fork https://github.com/green-striped-gecko/PopGenReport/pull/6

RodionSmolnikov commented 2 years ago

Hah, sorry, PR from my fork here, please review.

RodionSmolnikov commented 2 years ago

I found it out. X2 was a part of reshape::melt result. Now I just put name of column generated by reshape2::melt