snp.param.indiv.fun: snp.param.indiv.fun

Description Usage Arguments Value References Examples

View source: R/snp.param.indiv.fun.R

Description

This function generates SNP parameters (specifically allelic proportion means, standard deviations and welch statistics) as described in the 'Estimation of SNP specific parameters' section of Henshall et al. (2014). If specified, it also generates signal intensity scatter plots and signal intensity against allelic proportion scatter plots (e.g. Figure 1 of Henshall et al. 2014) for each SNP.

Usage

1
2
3
4
5
6
snp.param.indiv.fun(
  snp.dat.indiv,
  min.count = 2,
  min.intensity = 0,
  gen.plots = FALSE
)

Arguments

snp.dat.indiv

is a data frame with the following headings (class in parentheses):

  • 'SAMPLE_ID' is the sample identifier. Samples must be from diploid individuals (i.e. not pools) (integer).

  • 'SNP_ID' is the SNP identifier (character).

  • 'INTENSITY_A' is the area/intensity for allele A (numeric).

  • 'INTENSITY_B' is the area/intensity for allele B (numeric).

  • 'A_ALLELE' is the base represented by allele A (i.e. 'A', 'C', 'G' or 'T') (character).

  • 'B_ALLELE' is the base represented by allele B (i.e. 'A', 'C', 'G' or 'T') (character).

  • 'GENOTYPE' is the SNP genotype call (e.g. 'AT', 'TT'). NA if missing (character).

min.count

is an integer (default = 2) representing the minimum number of each genotype (i.e. 'AA', 'AB', 'BB') for each SNP required for the computation of SNP parameters.

min.intensity

is a numeric variable (default = 0). If the square root of the sum of INTENSITY_A squared and INTENSITY_B squared is less than min.intensity then this record is excluded in the computation of SNP parameters. That is, observations that fall into an arc with a radius equal to min.intensity in the lower left of signal intensity scatter plots are excluded.

gen.plots

is a logical variable. If TRUE then signal intensity scatter plots and signal intensity against allelic proportion scatter plots for each SNP are generated and saved to disc

Value

1. A data frame containing estimates of SNP sepecific parameters (refer to Henshall et al. 2014):

2. '[SNP_ID].intensity.png' (if gen.plots = TRUE): signal intensity scatter plots saved in a sub-directory named 'Results/SNP_intensity_plots' in the working directory.

3. '[SNP_ID].prop.png' (if gen.plots = TRUE): signal intensity against allelic proportion scatter plots saved in a sub-directory named directory named 'Results/SNP_allelic_prop_plots' in the working directory. See Figure 1 of Henshall et al. 2014

References

Henshall JM, Dierens, L Sellars MJ (2014) Quantitative analysis of low-density SNP data for parentage assignment and estimation of family contributions to pooled samples. Genetics Selection Evolution 46, 51. https://doi 10.1186/s12711-014-0051-y

Hamilton MG (2020) Maximum likelihood parentage assignment using quantitative genotypes

Examples

1
2
3
4
5
#Retrieve data for small worked example from Hamilton 2020
data(Ham.snp.dat.indiv)

#Compute SNP parameters
snp.param.indiv.fun(Ham.snp.dat.indiv)

mghamilton/SNPpools documentation built on Feb. 13, 2021, 12:52 a.m.