Comments (6)
could you send a (small) example reproducing the behavior? Cheers
from hierfstat.
Hopefully you mean the following...
data <- read.genepop("medtest.gen", ncode = 2L)
Converting data from a Genepop .gen file to a genind object...
File description: Mediana_7773SNPs_12Pops
...done.
medtest <- boot.ppfst(data, nboot = 100, quant = c(0.025, 0.975), diploid = TRUE)
Error in i + 1 : non-numeric argument to binary operator
wc(data)$sigma.loc
SNP lsiga lsigb lsigw
M00001 2.566286e-02 3.802011e-03 0.47457627
M00002 6.928440e-02 4.692108e-02 0.34745763
M00003 3.936859e-02 2.079705e-01 0.13131313
...
Then when converting the genind object
data1 <- genind2hierfstat(data)
class(data1)
[1] "data.frame"
medtest<- boot.ppfst(data1, nboot = 100, quant = c(0.025, 0.975), diploid = TRUE)
Error in i + 1 : non-numeric argument to binary operator
from hierfstat.
Sorry, what I meant was a small dataset reproducing the error you are getting. I suspect it is due to some loci being missing for whole populations, but would need to see the data to be sure. Cheers
from hierfstat.
alternatively you can share the data via PM if you can't reproduce the behavior
from hierfstat.
The issue seems to be with your population naming scheme, I have to dig further (I was able to reproduce your error once, but then the function ran smoothly). A quick fix is to rename populations using the following;
data1<-genind2hierfstat(data)
data1[,1]<-as.integer(data1[,1])
data.ci<-boot.ppfst(data1,...)
Will investigate
from hierfstat.
Awesome!! Thanks Jerome!
from hierfstat.
Related Issues (20)
- gstat.randtest missing HOT 4
- Parallelizing genet.dist() ? HOT 2
- Calculating FST with Dosage and Missing Data HOT 5
- plot boot.ppfst HOT 4
- Conversion genind to hierfstat df a little inconsistent HOT 2
- pairwise.WCfst(genind2hierfstat(x)) and genet.dist(x, method = "WC84") do not yield the same result HOT 8
- allelic.richness rounded numbers HOT 3
- problem performing sex.biased.test() function HOT 3
- `basic.stats` Ho calculation is actually allele frequency HOT 4
- boot.ppfst throwing an error with "diploid=F" HOT 4
- Fis calculations in basic.stats and boot.ppfis differ HOT 4
- NeiFST_calcuation_error HOT 2
- How to Interpret Negative Fsts HOT 2
- Basic Stats (and Ho/Hs/Fis) Require Population Name to be Numeric With A Single Population HOT 4
- pairwise.WCfst Error - non-conformable arrays HOT 3
- non-numeric argument error in boot.ppfis HOT 5
- Treatment of populations of 1 HOT 10
- NaN as result of basic.stats calculations for small populations HOT 2
- plotting the kinship matrix and printing it HOT 3
- boot.ppfst HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hierfstat.