cash-writeLM: BC, FS and IC method: Write linkage groups/maps to file

$writeLMR Documentation

BC, FS and IC method: Write linkage groups/maps to file

Description

Method for writing results from a linkage analysis in GUSMap to a file.

Usage

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)

Arguments

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 NULL, the results for all the linkage groups are returned.

what

Character vector specifying whether the combined linkage groups "LG-comb" are to be returned or the linkage mapping results "map".

inferGeno

Logical value indicating whether the paternal and maternal haplotypes of the progeny is to be returned.

Details

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.

Value

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:

LG

The linkage number as given in the output from the FS object.

LG_POS

The position of the SNPs across the linkage group. Starts at 1 and increases by one for each SNP in the same linkage group.

CHROM

The chromosome name the SNP was located on in the original genomic assembly.

POS

The position (in base pairs) of the SNP on the original genomic assembly.

TYPE

The segregation type of the SNP. Either BI (both-informative), MI (maternal-informative) or PI (paternal-informative).

RF_PAT

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.

RF_MAT

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.

ERR

The sequencing error estimate for the SNP.

MEAN_DEPTH

The mean read depth of the SNP.

CALLRATE

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.

Author(s)

Timothy P. Bilton

See Also

BC, FS, IC

Examples

## 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")

tpbilton/GUSMap documentation built on Feb. 22, 2025, 12:27 p.m.