$writeLM | R Documentation |
Method for writing results from a linkage analysis in GUSMap to a file.
BCobj$writeLM(file, direct = "./", LG = NULL, what = NULL, inferGeno = TRUE)
FSobj$writeLM(file, direct = "./", LG = NULL, what = NULL, inferGeno = TRUE)
ICobj$writeLM(file, direct = "./", LG = NULL, what = NULL, inferGeno = TRUE)
file |
Character value giving the name of the file to write to. |
direct |
Character value for the directory to write the file to (relative to the current working working directory) |
LG |
Integer vector giving the indices of the linkage groups to write. If |
what |
Character vector specifying whether the combined linkage groups |
inferGeno |
Logical value indicating whether the paternal and maternal haplotypes of the progeny is to be returned. |
Linkage groups and linkage maps (if computed) are written to a file.
When what = NULL
, the linkage mapping results computed using the $computeMap
function are returned
if they are available, otherwise the linkage groups with BI SNPs information is returned.
If inferGeno=TRUE
, then the maternal and paternal haplotypes of the progeny in the population are returned. These haplotypes
are computed using the Viterbi algorithm with the parameters from the final map.
The function returns a csv file with the rows representing the SNPs and the columns containing the linkage group and linkage map information. The columns of the file are:
The linkage number as given in the output from the FS object.
The position of the SNPs across the linkage group. Starts at 1 and increases by one for each SNP in the same linkage group.
The chromosome name the SNP was located on in the original genomic assembly.
The position (in base pairs) of the SNP on the original genomic assembly.
The segregation type of the SNP. Either BI (both-informative), MI (maternal-informative) or PI (paternal-informative).
The sum of the recombination fraction estimates for the paternal meioses. Starts at zero for the first SNP in the linkage groups and increases across the linkage group.
The sum of the recombination fraction estimates for the maternal meioses. Starts at zero for the first SNP in the linkage groups and increases across the linkage group.
The sequencing error estimate for the SNP.
The mean read depth of the SNP.
The proportion of individuals in which there is at least one read across the SNP.
If no linkage maps have been computed (using the $computeMap
), then the
columns RF_PAT, RF_MAT and ERR are not returned.
If inferGeno=TRUE
, then extra columns are appended to the file containing the paternal and maternal haplotype of the progeny. Each additional column
is titled "MAT_[sampleID]" or "PAT_[sampleID]", where "MAT_[sampleID]" denotes the maternal haplotype in individual
[sampleID] and "PAT_[sampleID]" is the paternal haplotype in individual [sampleID], where [sampleID] is replaced with the
sampleID of the particular individual. The entries of these extra columns are either A
for the reference allele or B
for the
alternate allele.
Timothy P. Bilton
BC
, FS
, IC
## Simulate some sequencing data
set.seed(6745)
config <- list(list(sample(c(1,2,4), size=30, replace=TRUE)))
F1data <- simFS(0.01, config=config, meanDepth=10, nInd=50)
## Compute 2-point recombination fractions
F1data$rf_2pt(nClust=1)
## create and order linkage groups
F1data$createLG()
F1data$addBIsnps()
F1data$orderLG(ndim=5)
F1data$computeMap()
## return the results to a file
F1data$writeLM(file = "test")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.