Comments (1)
Hi Ben,
thanks for the great suggestion!
I have incorporated your changes into the latest version. This added foreach
and doParallel
to the list of required packages, but that list is already so long that it barely matters.
Another thing you can do to speed up extract_f2
is to set the fst
option to FALSE
if you don't need it, because unlike the precomputed f2-statistics, precomputed Fst is not used any function other than fst
.
The fact that it takes so long to run extract_f2
makes me think that you probably run it for a large number of populations. And I assume that in order to not lose all SNPs which are missing in one or more populations, you probably set maxmiss
to values greater than 0. In most cases that's fine, but in some cases this can give you biased f4-statistics (this happens when SNP missingness status is correlated to allele frequency differences).
I think it can be useful to use maxmiss > 0
for many populations to screen a large number of f-statistics, but it's probably a good idea to later get precise estimates either through the default maxmiss = 0
setting, or (if too many SNPs are lost that way) by skipping precomputed f2-statistics altogether, so that different SNPs can be used for each f3- or f4-statistic.
Another option for using precomputed f2-statistics for many populations without losing most SNPs is to use the qpfstats
option which I added to extract_f2
in the latest version. It's described here. It basically calculates smoothed f2-statistics by regressing all possible f2-, f3-, and f4-statistics on a design matrix that describes which f2-statistics contribute to which f2-, f3-, and f4-statistic. The implementation of this in extract_f2
doesn't overlap much with the standard calculation of f2-statistics, so none of the options for making the computation faster or more memory efficient apply here, and I doubt it will currently work for a large number of populations. But I can look into options for getting this to work for many populations, if this turns out to be useful!
Robert
from admixtools.
Related Issues (20)
- Do qpWave, qpAdm, and f5 have requirements on the minimum number of individuals for each population? HOT 1
- est_to_boo does not preserve the SNP block names (number of SNPs), but est_to_loo() does. Is that intended? HOT 2
- large difference of f3 result between admixtools and admixtools2 HOT 1
- Zero drift edges HOT 2
- Behavior affected by other R packages? HOT 2
- Error in if (gimp > 0 && gimp%%plusminus_generations == 0) { : missing value where TRUE/FALSE needed HOT 2
- please add tags/releases HOT 2
- Inconsistent bootstrap significance testing HOT 5
- keyword argument typo lack of error HOT 3
- Comparing graphs with compare_fits HOT 2
- auto_only: change default value to FALSE HOT 1
- qpWave returning one fewer ranks than expected HOT 1
- qpAdm computation stucks when the num. of letf pops below 3
- Issue with f3 and f4 HOT 2
- running many replicates of find_graphs? HOT 1
- Issue with extract_f2 HOT 2
- Problem making f2 file from plink .bed .fam and .bim files HOT 6
- Suggestion: Change to p_emp calculation in compare_fits() HOT 1
- possible to get worst residuals from `find_graphs` models? HOT 1
- Installation / Update error HOT 4
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 admixtools.