write.data: Write multilocus genotype tables allowing to specify the use...

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/write.data.R

Description

Writes a multilocus genotype table from the data base allowing to specify for which loci should manual bin limits be used. In order to use manual defined bins you will need to use the function DefBinLim previously

Usage

1
write.data(DB,Mtable,file="MLG table")

Arguments

DB

A data base of the type used by this package, like the generated by transDB

Mtable

A data.frame with two columns Marker and Method, Marker contains the names of the markers in the Data base from where you want to write from; Method contains characters that can be "Alg" if you want to use the MsatAllele algorithm or the name of the data.frame returned by call to DefBinLim for the corresponding locus, if you want to use manually defined bin limits

file

the name of the file to output, don't use extensions. It defaults to "MLG table"

Details

Start by producing the data.frame Mtable that specifies which method to use when writting the multilocus genotypes. If you have previously defined manually bin limits you will need to provide the names of the objects that contain them in the second column of the Mtable argument (don't forget to use quotes). If you want to write all loci with the automatic method simply provide a second column filled with "Alg" for all loci.

Value

The function writes two files, with one and two columns per locus format.

Author(s)

Filipe Alberto

References

Alberto F. MsatAllele_1.0: an R package to visualize the binning of microsatellite alleles Journal of Heredity. 100(3):394,397

See Also

write.PG.file.loc, write.PG.file.all

Examples

1
2
3
4
5
6
7
8
data(DBase)
#In this example I am only using the automatic method
#To use manually defined bins replace the respective
# "Alg" by the name of the resulting obecjet from the
#DefBinLim function, don't forget to use quotes around
#the object name
MethodTab<-data.frame(Marker=unique(DBase$Marker),Method=c("Alg","Alg","Alg","Alg","Alg"))
write.data(DBase,Mtable=MethodTab)

kkeenan02/MsatAllele documentation built on May 20, 2019, 10:42 a.m.