The name grur |ɡro͞oˈr| was chosen because the missing genotypes dilemma with RADseq data reminds me of the cheese paradox.
Here, I don’t want to sustain a war or the controversy of cheese with holes, so choose as you like, the French Gruyère or the Swiss Emmental. The paradox is that the more cheese you have the more holes you’ll get. But, the more holes you have means the less cheese you have… So, someone could conclude, the more cheese = the less cheese ? I’ll leave that up to you, back to genomics…
Numerous genomic analysis are vulnerable to missing values, don’t get trapped by missing genotypes in your RADseq dataset.
Use grur to visualize patterns of missingness and perform map-independent imputations of missing genotypes (see features below).
if (!require("remotes")) install.packages("remotes") remotes::install_github("thierrygosselin/grur") library(grur)
Note: not all the packages used for imputations inside grur are installed automatically, why?
- Not all methods will be of interest.
- Some modules used for imputations are more complicated to install, and depending on OS, it will definitely test your R skills and patience.
- By default, you’ll be able to run
grur::missing_visualizationto check for pattern of missingness (the first step…)
Installation details for additonal imputation options
Please follow additional instructions in the vignette to install the required packages for the imputation options you want to conduct:
|imputation options||package||installation difficulty||install instructions|
|imputation.method = “lightgbm”||
|imputation.method = “xgboost”||
|imputation.method = “rf”||
|imputation.method = “rf_pred”||
|if using pmm > 0||
web site and additional info: https://thierrygosselin.github.io/grur/
- Computer setup - installation - troubleshooting
- Function’s documentation
- grur’s features
- How to cite grur: inside R type
grur is still experimental, in order to make the package better, changes are inevitable. Experimental functions will change, argument names will change. Your codes and workflows might break from time to time until grur is stable. Consequently, depending on your tolerance to change, grur might not be for you.
- Philosophy, major changes and deprecated functions/arguments are documented in life cycle section of functions.
- changelog, versions, new features and bug history
- issues and contributions
Assumptions before imputing your dataset
Filtered data: Please don’t try grur with raw data consisting of > 100K SNPs, you will generate all sorts of bias and you’ll be disapointed. Filter your data first! radiator was designed for this.
Correlations: Machine learning algorithms will work better and faster if correlations are reduced to a minimum. If you used filter_rad to filter your dataset, you should be ok. If not, check your dataset for short and long LD.
Pattern of individual heterozygosity: If you have individual heterozygosity patterns and/or correlation of individual heterozygosity with missingness, you might want to skip imputation and go back to filter your data. Please check out radiator::detect_mixed_genomes and radiator::detect_het_outliers.
Patterns of missingness: Look for patterns of missingness (vignette) to better understand the reasons for their presence and tailor the arguments inside grur’s imputation module.
Default arguments: Defaults are there for testing, please, please, please, don’t use grur’s defaults for publications!
|Simulate RADseq data||
|Patterns of missingness||
||Map-independent imputations of missing genotypes with several algorithms (including machine leaning):
* Random Forests (on-the-fly-imputations with randomForestSRC or using predictive modelling using ranger and missRanger),
* Extreme Gradient Tree Boosting (using XGBoost or LightGBM),
* Bayesian PCA (using bpca in pcaMethods),
* Classic Strawman: the most frequently observed, non-missing, genotypes is used for imputation.
Hierarchy: algorithm’s model can account for strata groupings, e.g. if patterns of missingness is found in the data.
Haplotypes: automatically detect SNPs on the same LOCUS (read/haplotype) to impute the SNPs jointly, reducing imputation artifacts. Vignette coming soon.
|Input/Output||grur uses radiator input and output modules. Check out the overview of supported file format.|
|ggplot2-based plotting||Visualization: publication-ready figures of important metrics and statistics.|
|Parallel||Codes designed and optimized for fast computations with, sometimes, progress bars. Works with all OS: Linux, Mac and yes PC!|