exportGenePop_RLDNe: Write Genepop file and create an RLDNe list object

View source: R/exportGenepop_RLDNe.R

exportGenePop_RLDNeR Documentation

Write Genepop file and create an RLDNe list object

Description

Write Genepop file and create an RLDNe list object

Usage

exportGenePop_RLDNe(
  EFGLdata,
  filename = "genepop.gen",
  header = "genePopfile",
  pops = NULL,
  loci = NULL,
  useIndNames = FALSE
)

Arguments

filename

the name of the file to write

header

a string to use as the header line of the genepop file

pops

a vector of pops to include. If not specified, all pops are used.

loci

a vector of loci to include. If not specified, all loci are used.

useIndNames

TRUE to use individual names as sample identifiers. Otherwise, population names are used

x

an EFGLdata object

Value

writes a genepop-style file and returns a RLDNe_data object, which is just a list of length 5. The RLDNe_data object merely streamlines the use of subsequent functions by keeping track of file names and population/loci names.

Examples


data("wgp_example_2col")
colnames(wgp_example_2col) <- gsub("_(\\d)$",replacement = "\\.A\\1",colnames(wgp_example_2col))
efgl <- readInData(wgp_example_2col,genotypeStart = 3,pedigreeColumn = 1,nameColumn = 2)
rldne <- exportGenePop_RLDNe(EFGLdata = efgl)


zakrobinson/RLDNe documentation built on Oct. 24, 2024, 5:37 p.m.