Comments (3)
AHA It does work with a subset.
I have some individuals who were not assigned to a population, leading to the error.
Thank you for the suggestion!!
from hierfstat.
One thing to note is that your data may be malformed.
You mention:
I have a data set of 4451 individuals and 473 SNPs.
But your data show:
4,386 individuals; 473 loci; 946 alleles
which indicates that you have lost 65 samples somewhere.
Moreover, the error here indicates that you have missing data in your ploidy definitions:
Error in if (any(object@ploidy < 1L)) { :
missing value where TRUE/FALSE needed
Also, given that you mention that specific data set, I'm assuming you are following http://popgen.nescent.org/StartSNP.html as an example?
- Do you get the same error on a sub-set of your data?
- Can you provide a reproducible example?
- What does the result of
unique(ploidy(myData))
look like?
The above may better help us figure out what's going on.
from hierfstat.
Excellent! Thank you for posting a description of the solution :)
If it helps, I would also recommend to have sanity checks throughout your script so that if anything changes, you'll know when it happened:
## read in data and format it --------------------
## ...
# Number of individuals expected
stopifnot(nInd(dat) == 4451)
# Number of loci expected
stopifnot(nLoc(dat) == 473)
# Number of populations expected
stopifnot(nPop(dat) == 9)
## run analyses here -----------------------------
## ...
from hierfstat.
Related Issues (20)
- write.ped() removes first locus from hierfstat object HOT 5
- 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
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.