Learn R Programming

DOQTL (version 1.8.0)

write.founder.genomes: 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.

Value

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

Details

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

Examples

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

Run the code above in your browser using DataLab