genind2bgc | R Documentation |
This function parses a genind object to create input data frames for running genomic cline analysis in BGC. It writes the appropriate output files as: <prefix>_p0in.txt, <prefix>_p1in.txt, and <prefix>_admixedin.txt
genind2bgc(
gen,
p1,
p2,
admix,
missingPerLoc = 0.5,
missingPerInd = 0.5,
subset = NULL,
drop = TRUE,
prefix = "bgc"
)
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 |
prefix |
A string giving the prefix for bgc input file names |
bgc_input <- genind2bgc(genind, p1=c("PopA", "PopB"),
p2="PopC", admix=c("PopD1", "PopD2"))
bgc_input <- genind2bgc(genind, p1=c("PopA", "PopB"),
p2="PopC", admix=c("PopD1", "PopD2"),
missingPerInd=0.75, missingPerLoc=0.25)
bgc_input <- genind2bgc(genind, p1=c("PopA", "PopB"),
p2="PopC", admix=c("PopD1", "PopD2"),
subset=500)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.