check_maxP: check your dataset's maxP distribution

View source: R/exported_functions.R

check_maxPR Documentation

check your dataset's maxP distribution

Description

Function to assess the distribution of maximum genotype probabilities (maxP), if these are available. The function plots a violin graph showing the distribution of the samples' maxP.

Usage

check_maxP(probgeno_df)

Arguments

probgeno_df

A data frame as read from the scores file produced by function saveMarkerModels of R package fitPoly, or alternatively, a data frame containing the following columns:

SampleName

Name of the sample (individual)

MarkerName

Name of the marker

P0

Probabilities of dosage score '0'

P1...

Probabilities of dosage score '1' etc. (up to max dosage, e.g. P4 for tetraploid population)

maxP

Maximum genotype probability identified for a particular individual and marker combination

maxgeno

Most probable dosage for a particular individual and marker combination

geno

Most probable dosage for a particular individual and marker combination, if maxP exceeds a user-defined threshold (e.g. 0.9), otherwise NA

Value

This function does not return any value, is simply a visualisation tool to help assess data quality.

Examples

data("gp_df")
check_maxP(gp_df)

polymapR documentation built on Nov. 5, 2023, 1:09 a.m.