inspect: A function that inspects the genotypes of individuals

Description Usage Arguments Value Author(s) Examples

View source: R/inspect.R

Description

This function allows one to inspect the genotypes of all individuals in your input file to see whether genetic data is available, and if so what the proportion of homozygotes, heterozygotes fraction of missing values is.

Usage

1
inspect(ind, gen)

Arguments

ind

The input file with individuals, which should contain at least the columns brood, individual, type, social.parent, year.

gen

The input file with genotypes, which should contain the loci-names as column headers and the individual names as row-header and should only contain the values 0, 1, 2 or NA.

Value

the individuals file with a summary of the genotypes attached. #'

brood

an identifier of the brood to which the offspring and adults belong/are associated with

individual

an identifier of the offspring

type

denotes whether the individual is an offspring, adult female (potential dam) or adult male (potential sire)

social.parent

if the individual is the social parent of the brood then equal to 1, else 0

year

the year or cohort that is being considered, adults can be potential dam or sire in some years, but no in others

sampled

if the individual's genotypic data is in the genotypes file then equal to 1, else 0

homozygote.0

the proportion of loci that was scored as 0 (homozygotes at common allele)

homozygote.1

the proportion of loci that was scored as 1 (homozygotes at rare allele)

homozygote.2

the proportion of loci that was scored as 2 (heterozygote)

missing

the proportion of loci that has missing values (NA)

number.loci

the number of loci that has genotypic information (i.e. not NA)

Author(s)

Martijn van de Pol, martijn@myscience.eu

Examples

1
2
overview<-inspect(ind=individuals[1:22,], gen=genotypes)
head(overview)

hiphop documentation built on Aug. 19, 2020, 5:07 p.m.