prepare_snppit_infile: prepare long-format genotypes for snppit

View source: R/prepare_snppit_infile.R

prepare_snppit_infileR Documentation

prepare long-format genotypes for snppit

Description

The meta data, S, determines who gets put into the snppit infile via a left join. So, if it turns out that we are requsting the addition of individuals that are not in G, this will throw an error.

Usage

prepare_snppit_infile(
  G,
  S,
  use_spawner_group = TRUE,
  use_sex = TRUE,
  min_age = 1,
  max_age = 6,
  geno_err = 0.005,
  outf = tempfile()
)

Arguments

G

a long format data frame of SNPs. It must have, at a minimum, the columns indiv, locus, gene_copy, allele_int. Missing data should be represented as NA.

S

a data frame of meta data with the columns indiv, year, sex, spawner_group, and hatchery

Details

This function is called within run_snippit().

Value

Function does not return a value of any importance. The side effect of the function is to write out a snppit input file!

Examples

prepare_snppit_infile(G = coho_genotypes, S = coho_metadata)

eriqande/HatcheryPedAgree documentation built on Sept. 21, 2023, 7:24 p.m.