calc.nnfit.from.file {MDSMap} | R Documentation |
Nearest neighbour fit from estimated map and file of pairwise recombination fractions.
Description
Calculates a nearest neighbour fit based from an estimated map and a file containing pairwise recombination fractions and LOD scores.
Usage
calc.nnfit.from.file(estmap, fname, mapfn = "haldane", n = NULL,
header = FALSE)
Arguments
estmap |
A character string indicating the name of a comma separated value file with the first column containing marker names in the order of their estimated position. |
fname |
A character string specifying the base name of the file
|
mapfn |
Character string, |
n |
Vector of character strings or numbers specifying the markers to be
omitted from the analysis. Default is |
header |
Logical argument indicating whether the .csv file estmap contains headers - default is TRUE |
Details
Reads in two files fname.txt
and estmap
.
The data is cast the data into symmetric matrices of pairwise recombination
fractions and LOD scores with the order of columns and rows in the matrix
determined by the order specified in estmap
. A distance matrix is
calculated according to the method specified by mapfn
. Haldane is the
default map function, None just uses recombination fractions and the other
alternative is Kosambi (see dmap
for details). The nearest
neighbour fit is then calculated (see calc.nnfit
for details)
estmap
should contain marker names in the first column in the order
of the estimated map.
fname
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
A list with the following elements:
fit |
Sum over all markers of the nearest neighbour fits. |
pointfits |
The nearest neighbour fit for each marker. |
meanfit |
Mean of the nearest neighbour fits over all markers. |
See Also
dmap
, calc.nnfit
, calc.pair.rf.lod