run_snppit: Parentage analysis (using SNPPT.exe) #' Function that...

Description Usage Arguments Details Examples

View source: R/script - run_snppit.R

Description

Download snppit here: https://github.com/eriqande/snppit Extract the zip-file, rename the "snppit-master" folder to "snppit", and place the folder in the same working directory as this script.

Usage

1
2
3
4
5
6
7
run_snppit(
  df_offspring,
  df_parents,
  projectName = "project1",
  overwrite = F,
  useGroups = F
)

Arguments

df_offspring

Data frame contaning offspring ID's and SNP genotypes (see above)

df_parents

Data frame containing parent ID's, sex, population, and SNP genotypes (see above)

projectName

Optional. A name that will be used for files created during the proces

overwrite

Optional. If the script should overwrite any older snppit analysis (or read the old one again instead of re-doing it)

useGroups

Optional. If parent grups should be used, only parents within the same group will be considered as parents together.

Details

Then you're ready! Usually, to run snppit, you need to prepare a specially formatted genpop file with your offspring and parent data SNP data, then run snppit via the command line. This r function saves you some time by doing the genpop formatting and command line stuff for you, in R. All you need to do is to supply the function with two datasets: parents and offspring, and the function will return the resulting parentage analysis ready to use in R.

The function takes two datasets as parameters, one for offspring and one for parents.
Both datasets must be formated as folows:

Examples

1
parentage_data <- run_snppt(offspring, parents, "Project_oct2019")

Eiriksen/fishytools documentation built on April 4, 2020, 5:08 a.m.