write.ibdhaplo {rres}R Documentation

Write IBDHAPLO

Description

write.ibdhaplo prepares the marker data file for running IBDHAPLO.

Usage

write.ibdhaplo(marker, freq, data, member, input.allele = TRUE,
  input.haplotype = FALSE, outfile = tempfile("ibdhaplo", fileext = ".txt"))

Arguments

marker

numeric vector, marker genetic positions in cM.

freq

numeric vector, marker reference allele frequencies.

data

numeric matrix, genetic marker data.

member

string vector, member ID.

input.allele

logical, default TRUE.

input.haplotype

logical, default FALSE.

outfile

string, output file name.

Details

The input marker data needs to be subject/haplotype by marker/allele. For example, suppose data is a 4x10 matrix, use input.allele = FALSE if data contains counts of reference alleles of 4 individuals at 10 markers; use input.haplotype = TRUE if data contains allelic types of 4 haplotypes at 10 markers; use default options if data contains allelic types of 4 individuals at 5 markers.

References

MORGAN Tutorial, https://www.stat.washington.edu/thompson/Genepi/MORGAN/Morgan.shtml.

Brown et al. (2012) Genetics 190:1447-1460, https://www.ncbi.nlm.nih.gov/pubmed/22298700.

Examples

## Not run: 
nsnp = 7 # number of SNPs
freq = runif(nsnp, 0.05, 0.95)
nhaplo = 4 # number of founder haplotypes
haplotype = sim.haplotype(freq, nhaplo)
marker = sort(runif(7,0,100))
write.ibdhaplo(marker, freq, haplotype, member = c("ind1", "ind2"), 
input.haplotype = TRUE)

## End(Not run)

[Package rres version 1.1 Index]