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?
grur::missing_visualizationto check for pattern of missingness (the first step…)
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/
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.
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||
based on a compound Dirichlet-multinomial distribution. Vignette coming soon.
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!|