genind2introgress: Generate inputs for Introgress from genind object

View source: R/genind2introgress.R

genind2introgressR Documentation

Generate inputs for Introgress from genind object

Description

This function parses a genind object to create input data frames for running genomic cline analysis in the Introgress R package

Usage

genind2introgress(
  gen,
  p1,
  p2,
  admix,
  missingPerLoc = 0.5,
  missingPerInd = 0.5,
  subset = NULL,
  drop = TRUE,
  prefix = "introgress"
)

Arguments

gen

Genind object containing data for parental and admixed populations

p1

Character or vector containing population names for the p1 group

p2

Character or vector containing population names for the p2 group

admix

Character or vector containing population names for the admixed individuals

missingPerLoc

Proportion of missing genotypes allowed to retain a locus

missingPerInd

Proportion of missing genotypes allowed to retain an individual

subset

An optional parameter defining a number of loci to randomly retain

drop

Boolean value defining whether or not to remove monomorphic loci

prefix

Prefix for output Introgress files (default="introgress")

Examples

introgress_input <- genind2introgress(genind, p1=c("PopA", "PopB"),
                                        p2="PopC", admix=c("PopD1", "PopD2"))

introgress_input <- genind2introgress(genind, p1=c("PopA", "PopB"),
                                        p2="PopC", admix=c("PopD1", "PopD2"),
                                        missingPerInd=0.75, missingPerLoc=0.25,
                                        drop=TRUE)

introgress_input <- genind2introgress(genind, p1=c("PopA", "PopB"),
                                        p2="PopC", admix=c("PopD1", "PopD2"),
                                        subset=500)

btmartin721/ClineHelpR documentation built on Oct. 15, 2024, 5:05 a.m.