write.founder.genomes: Write out the genotypes of DO samples

View source: R/write.founder.genomes.R

write.founder.genomesR Documentation

Write out the genotypes of DO samples

Description

Given a directory containing files generated by the DOQTL HMM (i.e. that end with "genotype.probs.Rdata"), write out two files for each sample containing the founder haplotype blocks.

Usage

  write.founder.genomes(filenames = dir(path = ".", 
  pattern = "genotype.probs.Rdata"), snps)
  write.founder.genomes.from.haps(probs, snps)

Arguments

filenames

Character vector of posterior genotype probability files in R binary format.

probs

Three dimensional numeric array containing the 8 state haplotype probabilities. Dimensions samples x founders x markers.

snps

Data.frame containing the marker locations. SNP ID, chromosome, Mb anc cM locations in columns 1 through 4, respectively.

Details

For each sample, we take the genotype state with the highest probability and write it out.

Value

No value is returned. FALSEiles are written to the current working directory.

Author(s)

Daniel Gatti

Examples

  ## Not run:  write.founder.genomes(filenames = dir(path = ".", 
  pattern = "genotype.probs.Rdata")) 
## End(Not run)

dmgatti/DOQTL documentation built on April 7, 2024, 10:35 p.m.