Because there an be no missing data when calculating the kinship correction, we need a way to remove either individuals or markers with missing data. We also need a way to calculate which of these options will remove the least amount of data.
1 2 3 4 5 6 7
a genotype object
Allowable amount of missing information for an individual. If 10 default, all individuals with any missing data at all will be removed.
Allowable amount of missing information for a marker. If 10 default, all markers with any missing data at all will be removed.
the basis prioritization is one of "fewer" = calculate whether removing individuals or markers will remove fewer data points, and start with that. "ind" = remove individuals with missing data before considering markers with missing data. "marker" = remove markers with missing data before considering individuals.
For example, if there is one marker with no data at all, we would rather remove that one marker, than all individuals with missing data. Alternatively, if there is one individual with very sparse genotyping, we would prefer to remove that single individual, rather than all markers with missing data.
This function provides a way to calculate whether individuals or markers should be prioritized when removing data. It then removes those individuals or markers.
The cape object is returned with individuals and markers removed. After this step,
get_geno should return an array with no missing data if ind_missing_thresh
and marker_missing_thresh are both 0. If these numbers are higher, no individual or marker will
be missing more than the set percentage of data.
details All missing genotype data must either be imputed or removed if using the kinship correction.
impute_missing_geno prior to running
ensures that the least possible amount of data are removed before running cape. In some cases, there
will be missing genotype data even after running
impute_missing_geno, in which case,
remove_missing_genotype_data still needs to be run.
run_cape automatically runs these steps when
is set to TRUE.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
## Not run: #remove entries with more than 10\ #removal of markers data_obj <- remove_missing_genotype_data(data_obj, geno_obj, marker_missing_thresh = 10, ind_missing_thresh = 10, prioritize = "marker") #remove markers with more than 5\ #more than 50\ #missing data, prioritizing removal of individuals. data_obj <- remove_missing_genotype_data(data_obj, geno_obj, ind_missing_thresh = 10, marker_missing_thresh = 50, prioritize = "ind") #remove entries witn any missing data prioritizing whichever #method removes the least amount of data data_obj <- remove_missing_genotype_data(data_obj, geno_obj) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.