estimate.map: Load data, estimate a linkage map and plot diagnostics for...

Description Usage Arguments Details Value References See Also Examples

Description

Load data, estimate a linkage map and plot diagnostics for the fit.

Usage

1
2
3
estimate.map(fname, p = NULL, n = NULL, ispc = TRUE, ndim = 2,
  weightfn = "lod2", mapfn = "haldane", D1lim = NULL, D2lim = NULL,
  D3lim = NULL, displaytext = TRUE)

Arguments

fname

Character string containing the base file from which the data should be read - should contain the complete file name excluding the suffix which should be .txt

p

Smoothing parameter.

n

Vector of integers or character strings containing the name or position in the input list of loci to be excluded from the analysis.

ispc

Logical determining the method to be used to estimate the map. By default this is TRUE and the method of principal curves will be used. If FALSE then the constrained MDS method will be used.

ndim

Integer the number of dimensions to use if the Principal curves method is used. By default this is 2, but it can also be 3.

weightfn

Character string specifying the values to use for the weight matrix in the MDS lod2 or lod.

mapfn

Character string specifying the map function to use on the recombination fractions 'haldane' is default, 'kosambi' or 'none'.

D1lim

Numeric vector specifying the limits of the axis relating to dimension 1 of the wMDS used to estimate the map.

D2lim

Numeric vector specifying the limits of the axis relating to dimension 1 of the wMDS used to estimate the map.

D3lim

Numeric vector specifying the limits of the axis relating to dimension 1 of the wMDS used to estimate the map.

displaytext

Logical argument determining how markers should be labelled in the wMDS configuration plot. If TRUE then marker names are used. If FALSE then numbers are used.

Details

Data is read from a text file which should be of the form described below. By default, ispc=TRUE, in which case maps are estimated using unconstrained weighted MDS followed by fitting a principal curve. Details can be found in the description of the function calc.maps.pc. If ispc=FALSE maps are estimated using spherically constrained weighted MDS. Details can be found in the description of the function calc.maps.sphere.

ndim is only relevant if ispc=TRUE, in which case it specifies the number of dimensions to be used, the default is 2 but it can also be 3 dimensions.

Diagnostic plots are then produced using plot.pcmap for the method of principal curves in 2 dimensions, plot.pcmap3d for the method of principal curves in 3 dimensions and plot.spheremap for the method using spherically constrained MDS.

n specifies markers to be omitted from the analysis. It can be a vector of character strings specifying makers to be omitted, or a vector of integers specifying the markers to omit. The latter method is likely to be useful when removing outliers after inspection of the diagnostic plot, because the output contains a dataframe, locikey, which associates each marker with its identifying number. By default this is NULL and all markers in the file will be analysed.

p is a smoothing parameter which operates quite differently depending on whether map estimation is performed using Principal Curves or Constrained MDS. If the PC method is used, p determines the smoothing parameter spar in the function principal_curve from the package princurve. If NULL then the most appropriate value will be determined using leave one out cross validation. If Constrained MDS is used then p must be set to a number which specifies the penalty for deviations from the sphere in the function smacofSphere from the smacof package. Something between 50 and 100 is generally appropriate and this penalty can be decreased if stress from the constrained analysis is more than about 10 for details)

File names should be of the form fname.txt and it is assumed that they are in a tab or space separated file of the format displayed below. The first entry on the first row is the number of markers to be analysed. Underneath this is a table in which the first two columns contain marker names, the third column contains the pairwise recombination fractions between the markers and the fourth column the associated LOD score. Note that marker names in the first column vary more slowly than in the second column. Missing recombination pairs are acceptable. Recombination fractions greater than 0.499999 are set to that value.

nmarkers
marker_1 marker_2 recombination fraction LOD
1 2 . .
1 3 . .
1 4 . .
. . . .
. . . .
. . . .
2 3 . .
2 4 . .
. . . .

Value

map (s3 class pcmap, pcmap3d or spheremap) from calc.maps.pc if ispc=TRUE or calc.maps.sphere if ispc=FALSE.

References

de Leeuw J, Mair P (2009) Multidimensional scaling using majorization: SMACOF in R. J Stat Softw 31: 1-30 http://www.jstatsoft.org/v31/i03/

Hastie T, Weingessel A, Bengtsson H, Cannoodt R (1999) princurve: Fits a Principal Curve in Arbitrary Dimension. ) R package version 2.1.2. https://CRAN.R-project.org/package=princurve

See Also

smacofSphere, principal_curve, calc.maps.pc, calc.maps.sphere, plot.pcmap, plot.pcmap3d, plot.spheremap

Examples

1
2
estimate.map(system.file("extdata", "lgI.txt", package="MDSMap"),
ndim=3)

MDSMap documentation built on May 1, 2019, 6:51 p.m.