write.ATetra | R Documentation |
write.ATetra
uses genotype and population information contained
in a genambig
object to create a
text file of genotypes in the ATetra format.
write.ATetra(object, samples = Samples(object), loci = Loci(object), file = "")
object |
A |
samples |
A character vector of samples to write to the file. This is a subset
of |
loci |
A character vector of loci to write to the file. This is a subset of
|
file |
A character string indicating the path and name to which to write the file. |
Note that missing data are not allowed in ATetra, although
write.ATetra
will still process missing data. When it does so, it
leaves all alleles blank in the file for that particular sample and
locus, and also prints a warning indicating which sample and locus had
missing data.
A file is written but no value is returned.
Lindsay V. Clark
http://www.vub.ac.be/APNA/ATetra_Manual-1-1.pdf
van Puyvelde, K., van Geert, A. and Triest, L. (2010) ATETRA, a new software program to analyze tetraploid microsatellite data: comparison with TETRA and TETRASAT. Molecular Ecology Resources 10, 331-334.
read.ATetra
, write.Tetrasat
,
write.GeneMapper
, write.POPDIST
# set up sample data (usually done by reading files) mysamples <- c("ind1", "ind2", "ind3", "ind4") myloci <- c("loc1", "loc2") mygendata <- new("genambig", samples=mysamples, loci=myloci) mygendata <- reformatPloidies(mygendata, output="one") Genotypes(mygendata, loci="loc1") <- list(c(202,204), c(204), c(200,206,208,212), c(198,204,208)) Genotypes(mygendata, loci="loc2") <- list(c(78,81,84), c(75,90,93,96,99), c(87), c(-9)) PopInfo(mygendata) <- c(1,2,1,2) PopNames(mygendata) <- c("this pop", "that pop") Ploidies(mygendata) <- 4 Description(mygendata) <- "Example for write.ATetra." ## Not run: # write an ATetra file write.ATetra(mygendata, file="atetratest.txt") # view the file cat(readLines("atetratest.txt"),sep="\n") ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.