pedigreesimR: PedigreeSim Management

Description Usage Arguments Value Author(s) Examples

View source: R/pedigreesimR.R

Description

Wrap-up function to run PedigreeSim software, to simulate GBS data, and to do SNP calling with updog package

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
pedigreesimR(
  map,
  haplotypes,
  pedigree,
  centromere = NULL,
  prefPairing = 0,
  quadrivalents = 0,
  ploidy = 4,
  workingfolder = "PedigreeSimR_files",
  filename = "",
  mapfunction = "HALDANE",
  chromosome = "A",
  sampleHap = FALSE,
  seed = NULL,
  allownochiasmata = 1,
  naturalpairing = 0,
  parallelquadrivalents = 0,
  pairedcentromeres = 0,
  mapwidthpad = 4,
  epsilon = c(0, 0),
  missingFreq = c(0, 0),
  GBS = FALSE,
  GBSavgdepth = 60,
  GBSsnpcall = FALSE,
  GBSseq = 0.001,
  GBSbias = 0.7,
  GBSod = 0.005,
  GBSnc = 1,
  monoFilter = TRUE,
  trackErrorSim = FALSE,
  justEssential = FALSE
)

Arguments

map

vector of the marker position.

haplotypes

matrix with haplotype information to be draw

pedigree

pedigree data frame

centromere

numeric with its position

prefPairing

numeric

quadrivalents

numeric

ploidy

integer even number

workingfolder

string with folder name to write input/output files

filename

string with filename id to put in the beggining of the created files

mapfunction

"HALDANE" or "KOSAMBI"

chromosome

string

sampleHap

if TRUE sample haplotypes, if FALSE pick them in sequence

seed

integer to be used to sample haplotypes

allownochiasmata

numeric

naturalpairing

numeric

parallelquadrivalents

numeric

pairedcentromeres

numeric

mapwidthpad

numeric length of marker code

epsilon

vector with two epsilon values for error for genotypic assigment, vector with two values, the first is the parents' epsilon, the second is the offsprings

missingFreq

vector with two missingFreq values to sample missing values for the genotypes, the first is the parents' frequency, the second is the offsprings

GBS

if TRUE simulate GBS data and do SNP calling with updog

GBSavgdepth

average depth to sample total number of reads from Poisson distribution

GBSsnpcall

if TRUE performs SNP calling using updog

GBSseq

the sequencing error rate (rflexdog inner function)

GBSbias

the bias parameter Pr(a read after selected) / Pr(A read after selected) (rflexdog inner function). (rflexdog inner function)

GBSod

the overdispersion parameter (rflexdog inner function).

GBSnc

number of cores for the parallelization for SNP calling

monoFilter

if TRUE filter monomorphic markers from haplotypes

trackErrorSim

if TRUE create a spreadsheet with the simulate error positions given epsilon and missingData (1 if error, 0 if not)

justEssential

it will just run the simulation and avoid GBS/Dosage Calling/Parental haplotype

Value

nothing

Author(s)

Rodrigo R Amadeu, rramadeu@gmail.com

Examples

1
2
3
4
5
6
7
## Not run: 
map = 1:100
haplotypes = fake_haplo(m=50,n=100,seed=1234)
pedigree = diallel_pedigree(parents=7,popsize=1000,selfs=2)
pedigreesimR(map,haplotypes,pedigree)

## End(Not run)

rramadeu/diaQTLSimulations documentation built on Feb. 11, 2022, 1:34 a.m.