Last data update: 2014.03.03

R: Extremely fast linkage map construction for data frame...
mstmap.data.frameR Documentation

Extremely fast linkage map construction for data frame objects using MSTmap.

Description

Extremely fast linkage map construction for data frame objects utilizing the source code for MSTmap (see Wu et al., 2008). The construction includes linkage group clustering, marker ordering and genetic distance calculations.

Usage

## S3 method for class 'data.frame'
mstmap(object, pop.type = "DH", dist.fun = "kosambi",
      objective.fun = "COUNT", p.value = 1e-06, noMap.dist = 15,
      noMap.size = 0, miss.thresh = 1, mvest.bc = FALSE, detectBadData = FALSE,
      as.cross = TRUE, return.imputed = FALSE, trace = FALSE, ...)

Arguments

object

A "data.frame" object containing marker information. The data.frame must explicitly be arranged with markers in rows and genotypes in columns. Marker names are obtained from the rownames of the object and genotype names are obtained from the names component of the object (see Details).

pop.type

Character string specifying the population type of the data frame object. Accepted values are "DH" (doubled haploid), "BC" (backcross), "RILn" (non-advanced RIL population with n generations of selfing) and "ARIL" (advanced RIL) (see Details). Default is "DH".

dist.fun

Character string defining the distance function used for calculation of genetic distances. Options are "kosambi" and "haldane". Default is "kosambi".

objective.fun

Character string defining the objective function to be used when constructing the map. Options are "COUNT" for minimising the sum of recombination events between markers and "ML" for maximising the likelihood objective function. Default is "COUNT".

p.value

Numerical value to specify the threshold to use when constructing linkage groups. Defaults to 1e-06. If a value greater than one is given this feature is turned off and it is assumed that all marker data inputted belong to the same linkage group (see Details).

noMap.dist

Numerical value to specify the smallest genetic distance a set of isolated markers can appear distinct from other linked markers. Isolated markers will appear in their own linkage groups ad will be of size specified by noMap.size.

noMap.size

Numerical value to specify the maximum size of isolated marker linkage groups that have been identified using noMap.dist. This feature can be turned off by setting it to 0. Default is 0.

miss.thresh

Numerical value to specify the threshold proportion of missing marker scores allowable in each of the markers. Markers above this threshold will not be included in the linkage map. Default is 1.

mvest.bc

Logical value. If TRUE missing markers will be imputed before clustering the markers into linkage groups. This is restricted to "BC","DH","ARIL" populations only (see Details).

detectBadData

Logical value. If TRUE possible genotyping errors are detected, set to missing and then imputed as part of the marker ordering algorithm. Genotyping errors will also be printed in the file specified by trace. This is restricted to "BC","DH","ARIL" populations only. (see Details). Default is FALSE.

as.cross

Logical value. If TRUE the constructed linkage map is returned as a R/qtl cross object (see Details). If FALSE then the constructed linkage map is returned as a data.frame with extra columns indicating the linkage group, marker name/position and genetic distance. Default is TRUE.

return.imputed

Logical value. If TRUE then the imputed marker probability matrix is returned for the linkage groups that are constructed (see Details). Default is FALSE.

trace

An automatic tracing facility. If trace = FALSE then minimal MSTmap output is piped to the screen during the algorithm. If trace = TRUE, then detailed output from MSTmap is piped to "MSToutput.txt". This file is equivalent to the output that would be obtained from running the MSTmap executable from the command line.

...

Currently ignored.

Details

The data frame object must have an explicit format with markers in rows and genotypes in columns. The marker names are required to be in the rownames component and the genotype names are required to be in the names component of the object. In each set of names there must be no spaces. If spaces are detected they are exchanged for a "-". Each of the columns of the data frame must be of class "character" (not factors). If converting from a matrix, this can easily be achieved by using the stringAsFactors = FALSE argument for any data.frame method.

It is important to know what population type the data frame object is and to correctly input this into pop.type. If pop.type = "ARIL" then it is assumed that the minimal number of heterozygotes have been set to missing before proceeding. The advanced RIL population is then treated like a backcross population for the purpose of linkage map construction. Genetic distances are adjusted post construction. For non-advanced RIL populations pop.type = "RILn", the number of generations of selfing is limited to 20 to ensure sensible input.

The content of the markers in object can either be all numeric (see below) or all character. If markers are of type character then the following allelic content must be explicitly adhered to. For pop.type "BC", "DH" or "ARIL" the two allele types should be represented as ("A" or "a") and ("B" or "b"). For non-advanced RIL populations (pop.type = "RILn") phase unknown heterozygotes should be represented as "X". For all populations, missing marker scores should be represented as ("U" or "-").

This function also extends the functionality of the MSTmap algorithm by allowing users to input a complete numeric data frame of marker probabilities for pop.type "BC", "DH" or "ARIL". The values must be inclusively between 1 (A) and 0 (B) and be representative of the probability that the A allele is present. No missing values are allowed.

The algorithm allows an adjustment of the p.value threshold for clustering of markers to distinct linkage groups (see Wu et al., 2008) and is highly dependent on the number of individuals in the population. As the number of individuals increases the p.value threshold should be decreased accordingly. This may require some trial and error to achieve desired results.

If mvest.bc = TRUE and the population type is "BC","DH","ARIL" then missing values are imputed before markers are clustered into linkage groups. This is only a simple imputation that places a 0.5 probability of the missing observation being one allele or the other and is used to assist the clustering algorithm when there is known to be high numbers of missing observations between pairs of markers.

It should be highlighted that for population types "BC","DH","ARIL", imputation of missing values occurs regardless of the value of mvest.bc. This is achieved using an EM algorithm that is tightly coupled with marker ordering (see Wu et al., 2008). Initially a marker order is obtained omitting missing marker scores and then imputation is performed based on the underlying recombinant probabilities of the flanking markers with the markers containing the missing value. The recombinant probabilities are then recomputed and an update of the pairwise distances are calculated. The ordering algorithm is then run again and the complete process is repeated until convergence. Note, the imputed probability matrix for the linkage map being constructed is returned if return.imputed = TRUE.

For populations "BC","DH","ARIL", if detectBadData = TRUE, the marker ordering algorithm also includes the detection of genotyping errors. For any individual genotype, the detection method is based on a weighted Euclidean metric (see Wu et al., 2008) that is a function of the recombination probabilities of all the markers with the marker containing the suspicious observation. Any genotyping errors detected are set to missing and the missing values are then imputed if mv.est = TRUE. Note, the detection of these errors and their amendment is returned in the imputed probability matrix if return.imputed = TRUE

If as.cross = TRUE then the constructed object is returned as a R/qtl cross object with the appropriate class structure. For "RILn" populations the constructed object is given the class "bcsft" by using the qtl package conversion function convert2bcsft with arguments F.gen = n and BC.gen = 0. For "ARIL" populations the constructed object is given the class "riself".

If return.imputed = TRUE and pop.type is one of "BC","DH","ARIL", then the marker probability matrix is returned for the linkage groups that have been constructed using the algorithm. Each linkage group is named identically to the linkage groups of the map and, if as.cross = TRUE, contains an ordered "map" element and a "data" element consisting of marker probabilities of the A allele being present (i.e. P(A) = 1, P(B) = 0). Both elements contain a possibly reduced version of the marker set that includes all non-colocating markers as well as the first marker of any set of co-locating markers. If as.cross = FALSE then an ordered data frame of matrix probabilities is returned.

Value

If as.cross = TRUE the function returns an R/qtl cross object with the appropriate class structure. The object is a list with usual components "pheno" and "geno". If as.cross = FALSE the function returns an ordered data frame object with additional columns that indicate the linkage group, the position and marker names and genetic distance of the markers within in each linkage group. If markers were omitted for any reason during the construction, the object will have an "omit" component with all omitted markers in a collated matrix. If return.imputed = TRUE then the object will also contain an "imputed.geno" element.

Author(s)

Julian Taylor, Dave Butler, Timothy Close, Yonghui Wu, Stefano Lonardi

References

Y. Wu, P. Bhat, T.J. Close, S. Lonardi, Efficient and Accurate Construction of Genetic Linkage Maps from Minimum Spanning Tree of a Graph Plos Genetics, Volume 4, Issue 10, 2008.

See Also

mstmap.cross

Examples


data(mapDH, package = "ASMap")

## forming data frame object from R/qtl object

dfg <- t(do.call("cbind", lapply(mapDH$geno, function(el) el$data)))
dimnames(dfg)[[2]] <- as.character(mapDH$pheno[["Genotype"]])
dfg <- dfg[sample(1:nrow(dfg), nrow(dfg), replace = FALSE),]
dfg[dfg == 1] <- "A"
dfg[dfg == 2] <- "B"
dfg[is.na(dfg)] <- "U"
dfg <- cbind.data.frame(dfg, stringsAsFactors = FALSE)

## construct map

testd <- mstmap(dfg, dist.fun = "kosambi", trace = FALSE)
pull.map(testd)

## let's get a timing on that ...

system.time(testd <- mstmap(dfg, dist.fun = "kosambi", trace = FALSE))

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(ASMap)
Loading required package: qtl
Loading required package: gtools
Loading required package: fields
Loading required package: spam
Loading required package: grid
Spam version 1.3-0 (2015-10-24) is loaded.
Type 'help( Spam)' or 'demo( spam)' for a short introduction 
and overview of this package.
Help for individual functions is also obtained by adding the
suffix '.spam' to the function name, e.g. 'help( chol.spam)'.

Attaching package: 'spam'

The following objects are masked from 'package:base':

    backsolve, forwardsolve

Loading required package: maps

 # maps v3.1: updated 'world': all lakes moved to separate new #
 # 'lakes' database. Type '?world' or 'news(package="maps")'.  #


Loading required package: RColorBrewer
Loading required package: lattice
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/ASMap/mstmap.data.frame.Rd_%03d_medium.png", width=480, height=480)
> ### Name: mstmap.data.frame
> ### Title: Extremely fast linkage map construction for data frame objects
> ###   using MSTmap.
> ### Aliases: mstmap.data.frame
> ### Keywords: misc
> 
> ### ** Examples
> 
> 
> data(mapDH, package = "ASMap")
> 
> ## forming data frame object from R/qtl object
> 
> dfg <- t(do.call("cbind", lapply(mapDH$geno, function(el) el$data)))
> dimnames(dfg)[[2]] <- as.character(mapDH$pheno[["Genotype"]])
> dfg <- dfg[sample(1:nrow(dfg), nrow(dfg), replace = FALSE),]
> dfg[dfg == 1] <- "A"
> dfg[dfg == 2] <- "B"
> dfg[is.na(dfg)] <- "U"
> dfg <- cbind.data.frame(dfg, stringsAsFactors = FALSE)
> 
> ## construct map
> 
> testd <- mstmap(dfg, dist.fun = "kosambi", trace = FALSE)
Number of linkage groups: 24
The size of the linkage groups are: 41	33	41	54	10	56	6	33	37	32	37	35	27	21	30	40	9	8	15	13	6	6	5	4	
The number of bins in each linkage group: 41	33	41	53	9	55	6	32	36	32	36	34	27	21	29	40	8	7	14	13	5	5	4	3	
> pull.map(testd)
$L1
    6B.m.1     6B.m.2     6B.m.3     6B.m.4     6B.m.5     6B.m.6     6B.m.7 
  0.000000   0.918229   1.377097   3.212784   4.589279   5.048007  14.327408 
    6B.m.8     6B.m.9    6B.m.10    6B.m.11    6B.m.12    6B.m.13    6B.m.14 
 34.105598  34.564326  35.023055  41.947724  46.085585  47.003119  47.461848 
   6B.m.15    6B.m.20    6B.m.16    6B.m.18    6B.m.19    6B.m.17    6B.m.22 
 48.838342  50.214837  51.591331  52.508865  53.317182  53.885107  55.261601 
   6B.m.21    6B.m.23    6B.m.24    6B.m.25    6B.m.26    6B.m.27    6B.m.28 
 55.720330  56.637864  59.392942  59.851671  67.710435  68.172646  68.631375 
   6B.m.29    6B.m.30    6B.m.31    6B.m.32    6B.m.33    6B.m.34    6B.m.35 
 69.090103  71.845182  89.002039  92.252880  94.583402 101.976258 104.271447 
   6B.m.36    6B.m.37    6B.m.38    6B.m.39    6B.m.40    6B.m.41 
104.730175 105.689164 107.942856 110.737854 112.179753 115.403898 

$L2
 1B2.m.33  1B2.m.32  1B2.m.31  1B2.m.30  1B2.m.29  1B2.m.28  1B2.m.27  1B2.m.26 
 0.000000  9.279401 10.655895 11.573429 12.032158 13.867845 15.289476 16.711107 
 1B2.m.25  1B2.m.24  1B2.m.23  1B2.m.22  1B2.m.21  1B2.m.20  1B2.m.19  1B2.m.18 
17.169836 18.546330 19.463864 20.851965 29.173232 31.008919 32.844606 36.520941 
 1B2.m.17  1B2.m.16  1B2.m.15  1B2.m.14  1B2.m.13  1B2.m.12  1B2.m.11  1B2.m.10 
36.979670 38.356164 38.814893 40.650579 42.027074 42.944608 43.862142 44.320871 
  1B2.m.9   1B2.m.8   1B2.m.7   1B2.m.6   1B2.m.5   1B2.m.4   1B2.m.3   1B2.m.2 
44.779599 46.156094 47.991780 48.450509 49.827003 51.203498 51.662226 59.995416 
  1B2.m.1 
60.912950 

$L3
    1A.m.1     1A.m.2     1A.m.3     1A.m.4     1A.m.5     1A.m.6     1A.m.7 
  0.000000   1.376494   4.131573  19.255435  20.631929  21.090658  21.549386 
    1A.m.8     1A.m.9    1A.m.10    1A.m.11    1A.m.12    1A.m.13    1A.m.14 
 22.008114  22.466843  25.221921  26.139456  27.515950  28.452204  28.929648 
   1A.m.15    1A.m.16    1A.m.17    1A.m.18    1A.m.19    1A.m.20    1A.m.21 
 29.388376  30.764871  31.223599  32.141133  32.599862  33.976356  34.893890 
   1A.m.22    1A.m.23    1A.m.24    1A.m.25    1A.m.26    1A.m.27    1A.m.28 
 35.352619  35.811347  39.026782  40.403276  69.421878  71.257565  71.716293 
   1A.m.29    1A.m.30    1A.m.31    1A.m.32    1A.m.33    1A.m.34    1A.m.35 
 74.931727  76.767414  77.972454  79.061398  79.520126  79.978854  87.841188 
   1A.m.36    1A.m.37    1A.m.38    1A.m.39    1A.m.40    1A.m.41 
 92.441279  93.817773 100.742443 103.037632 103.496360 103.955088 

$L4
    5A.m.1     5A.m.2     5A.m.3     5A.m.4     5A.m.5     5A.m.6     5A.m.7 
  0.000000   6.457687   6.916415   8.752102   9.210830   9.669559  10.587093 
    5A.m.8     5A.m.9    5A.m.10    5A.m.11    5A.m.12    5A.m.13    5A.m.14 
 15.650199  21.642021  51.296225  51.754954  53.590640  58.190732  62.328593 
   5A.m.15    5A.m.16    5A.m.17    5A.m.18    5A.m.19    5A.m.20    5A.m.21 
 64.164279  72.497469  73.873963  75.250458  75.709186  76.167915  81.231021 
   5A.m.22    5A.m.23    5A.m.24    5A.m.25    5A.m.26    5A.m.28    5A.m.27 
 94.861697  95.779232 101.771053 102.229781 105.906117 108.201306 108.660034 
   5A.m.29    5A.m.30    5A.m.31    5A.m.32    5A.m.33    5A.m.34    5A.m.36 
109.577568 111.413255 111.871983 112.789518 115.544596 118.760030 120.136525 
   5A.m.37    5A.m.35    5A.m.38    5A.m.40    5A.m.39    5A.m.41    5A.m.42 
120.136525 120.595253 121.512788 123.807976 124.266705 128.866796 130.243290 
   5A.m.43    5A.m.44    5A.m.45    5A.m.46    5A.m.47    5A.m.48    5A.m.49 
130.702019 131.160747 131.619476 132.078204 140.883719 142.719406 143.178134 
   5A.m.50    5A.m.51    5A.m.52    5A.m.53    5A.m.54 
162.424129 180.097313 181.017554 181.476283 181.935011 

$L5
 1D.m.10   1D.m.9   1D.m.8   1D.m.7   1D.m.6   1D.m.5   1D.m.3   1D.m.4 
 0.00000 22.50673 22.96620 23.88404 55.53218 59.75146 78.46976 78.46976 
  1D.m.2   1D.m.1 
78.92881 81.22400 

$L6
     5B.m.1      5B.m.2      5B.m.3      5B.m.4      5B.m.5      5B.m.6 
  0.0000000   0.6705738   3.1549806   4.1082794   5.0258136   7.3210023 
     5B.m.7      5B.m.8      5B.m.9     5B.m.10     5B.m.11     5B.m.12 
 17.0759432  17.5346717  22.1347628  27.1978694  29.9529479  30.8704820 
    5B.m.13     5B.m.14     5B.m.15     5B.m.16     5B.m.17     5B.m.18 
 44.0087763  44.4675048  59.0908447  59.0908447  59.5495731  63.2259086 
    5B.m.19     5B.m.20     5B.m.21     5B.m.22     5B.m.23     5B.m.24 
 64.1830094  66.0883037  67.4947790  70.7102134  76.2372026  77.6136970 
    5B.m.25     5B.m.26     5B.m.27     5B.m.28     5B.m.29     5B.m.30 
 78.0724255  78.5311539  82.6690149 105.7370555 106.6545896 107.1133181 
    5B.m.31     5B.m.32     5B.m.33     5B.m.34     5B.m.35     5B.m.36 
108.0308523 108.9483864 109.4071149 110.3246491 110.7833775 111.2421060 
    5B.m.37     5B.m.38     5B.m.39     5B.m.40     5B.m.41     5B.m.42 
113.5374070 114.0201634 114.9616262 115.4203614 115.8790898 116.3378183 
    5B.m.43     5B.m.44     5B.m.45     5B.m.46     5B.m.47     5B.m.48 
116.7965468 117.7140809 118.1728094 118.6315379 119.0902663 119.5489948 
    5B.m.49     5B.m.50     5B.m.51     5B.m.52     5B.m.53     5B.m.54 
120.0077233 120.4664517 122.3021384 122.7608669 125.0560556 128.7323911 
    5B.m.55     5B.m.56 
141.8706854 142.7882195 

$L7
   4D.m.6    4D.m.5    4D.m.4    4D.m.3    4D.m.2    4D.m.1 
 0.000000  4.600091  8.775866 10.649258 12.159881 13.256931 

$L8
     7A.m.1      7A.m.2      7A.m.3      7A.m.4      7A.m.5      7A.m.6 
  0.0000000   0.6767384   2.6942733   7.2943644  15.6275539  20.6906605 
     7A.m.7      7A.m.8     7A.m.10      7A.m.9     7A.m.11     7A.m.12 
 47.2467766  47.7055051  51.3818405  52.2993747  53.6758691  55.0523636 
    7A.m.13     7A.m.14     7A.m.15     7A.m.16     7A.m.18     7A.m.17 
 56.0159074  60.5696186  61.9461131  62.4048415  63.7813360  64.2400644 
    7A.m.19     7A.m.20     7A.m.21     7A.m.22     7A.m.23     7A.m.24 
 64.6987929  65.6163271  87.0175934  96.7745774  97.6940796  99.9892683 
    7A.m.25     7A.m.26     7A.m.27     7A.m.28     7A.m.29     7A.m.30 
115.6166113 123.4789445 124.3964787 129.0017975 129.4657101 130.3832442 
    7A.m.31     7A.m.33     7A.m.32 
133.8068945 134.4914755 134.4914755 

$L9
    3A.m.37     3A.m.36     3A.m.35     3A.m.34     3A.m.33     3A.m.32 
  0.0000000   0.4587285   0.4587285   1.8352229   2.2939514   4.5891402 
    3A.m.31     3A.m.30     3A.m.29     3A.m.28     3A.m.27     3A.m.26 
  5.5066743   7.4768940  15.9172288  26.6285944  38.3224121  44.3317651 
    3A.m.25     3A.m.24     3A.m.23     3A.m.22     3A.m.21     3A.m.20 
 50.7894517  56.7812731  57.2400015  63.6976881  64.6152223  65.5327565 
    3A.m.19     3A.m.16     3A.m.18     3A.m.17     3A.m.15     3A.m.14 
 68.7481909  82.8738429  83.3325714  83.7912999  85.6269866  86.0857150 
    3A.m.13     3A.m.10      3A.m.9     3A.m.11     3A.m.12      3A.m.8 
 86.5444435  90.6823045  92.0587989  93.4352933  95.7304821 126.0290068 
     3A.m.7      3A.m.6      3A.m.5      3A.m.4      3A.m.3      3A.m.2 
126.9465412 133.4042278 134.3217620 137.9980974 144.9227670 145.3814955 
     3A.m.1 
145.8402240 

$L10
   4B.m.32    4B.m.31    4B.m.30    4B.m.29    4B.m.28    4B.m.27    4B.m.26 
  0.000000   8.333189  21.963866  22.881400  24.257894  29.784884  37.647217 
   4B.m.25    4B.m.24    4B.m.23    4B.m.22    4B.m.21    4B.m.20    4B.m.19 
 41.785078  42.243806  43.161340  50.086010  51.003544  52.380039  52.838767 
   4B.m.18    4B.m.17    4B.m.16    4B.m.15    4B.m.14    4B.m.13    4B.m.12 
 53.756301  56.051490  56.510218  58.345905  58.804634  59.263362  59.722091 
   4B.m.11    4B.m.10     4B.m.9     4B.m.8     4B.m.7     4B.m.6     4B.m.5 
 60.180819  60.639547  61.557082  62.015810  64.310999  78.436651  81.191729 
    4B.m.4     4B.m.3     4B.m.2     4B.m.1 
 83.946808  91.340123  91.799301 109.472813 

$L11
    7B.m.1     7B.m.2     7B.m.3     7B.m.4     7B.m.5     7B.m.6     7B.m.7 
  0.000000   9.279401  15.271222  15.729951  21.244743  23.552007  24.314460 
    7B.m.8     7B.m.9    7B.m.10    7B.m.11    7B.m.12    7B.m.13    7B.m.14 
 24.928243  25.845777  26.304506  26.763234  27.680769  28.598303  30.893491 
   7B.m.15    7B.m.16    7B.m.17    7B.m.18    7B.m.19    7B.m.20    7B.m.21 
 31.352220  32.269754  33.187288  33.646017  35.481703  38.236782  39.154316 
   7B.m.22    7B.m.23    7B.m.24    7B.m.25    7B.m.26    7B.m.27    7B.m.28 
 39.154316  42.369751  42.828479  45.583558  48.798992  49.716526  68.434452 
   7B.m.29    7B.m.30    7B.m.31    7B.m.32    7B.m.33    7B.m.34    7B.m.35 
 69.351986  72.107065  78.098886  78.557614  79.016343  80.392837  84.069173 
   7B.m.36    7B.m.37 
 84.527901 108.162200 

$L12
   2B.m.1    2B.m.2    2B.m.3    2B.m.4    2B.m.5    2B.m.6    2B.m.7    2B.m.8 
 0.000000  2.779284 25.847324 26.306053 31.833042 41.112443 49.445632 51.281319 
   2B.m.9   2B.m.10   2B.m.11   2B.m.12   2B.m.13   2B.m.14   2B.m.15   2B.m.16 
51.740047 52.198776 61.004291 61.921825 63.757512 65.134006 65.592735 66.051463 
  2B.m.17   2B.m.18   2B.m.19   2B.m.20   2B.m.21   2B.m.22   2B.m.23   2B.m.24 
66.510191 67.427726 68.345260 69.721754 70.180483 71.556977 72.933472 73.392200 
  2B.m.26   2B.m.25   2B.m.27   2B.m.28   2B.m.29   2B.m.30   2B.m.32   2B.m.31 
75.687389 76.146117 76.604846 77.522380 77.981108 78.439837 78.898565 78.898565 
  2B.m.33   2B.m.34   2B.m.35 
80.734252 81.192980 97.326893 

$L13
    6A.m.1     6A.m.2     6A.m.3     6A.m.4     6A.m.5     6A.m.6     6A.m.7 
 0.0000000  0.4587285  1.3762626  3.6714514  5.5071381  7.3428248 19.0183998 
    6A.m.8     6A.m.9    6A.m.10    6A.m.11    6A.m.12    6A.m.13    6A.m.14 
24.0815064 24.5402349 33.3564951 34.7434160 42.6057493 46.7436102 53.6682798 
   6A.m.15    6A.m.16    6A.m.17    6A.m.18    6A.m.19    6A.m.20    6A.m.21 
55.5039665 56.4215007 56.8802292 57.7977634 58.2564918 60.0921785 61.4686730 
   6A.m.22    6A.m.23    6A.m.24    6A.m.25    6A.m.26    6A.m.27 
69.3310062 94.1151752 95.0327093 95.4914378 98.2465163 98.7052448 

$L14
 4A.m.30  4A.m.29  4A.m.28  4A.m.27  4A.m.26  4A.m.25  4A.m.24  4A.m.23 
 0.00000  6.92467 18.60024 26.93343 43.06735 44.44384 44.90257 45.82010 
 4A.m.22  4A.m.21  4A.m.20  4A.m.19  4A.m.18  4A.m.17  4A.m.16  4A.m.15 
46.73764 47.19637 48.11390 51.79024 53.16673 53.62546 83.92398 84.38271 
 4A.m.14  4A.m.13  4A.m.12  4A.m.11  4A.m.10 
86.67790 94.54023 94.99896 95.91650 98.21169 

$L15
  3B.m.30   3B.m.29   3B.m.28   3B.m.27   3B.m.26   3B.m.25   3B.m.24   3B.m.23 
  0.00000  10.23223  22.39308  30.25542  34.39367  34.85278  38.99064  53.45281 
  3B.m.22   3B.m.21   3B.m.20   3B.m.19   3B.m.17   3B.m.18   3B.m.16   3B.m.15 
 56.35664  61.41974  66.48285  67.40038  68.31792  68.77665  69.23537  69.69410 
  3B.m.14   3B.m.13   3B.m.11   3B.m.12   3B.m.10    3B.m.9    3B.m.8    3B.m.7 
 73.83196  74.29069  74.74942  74.74942  75.20815  97.15989  98.07742 104.62589 
   3B.m.6    3B.m.5    3B.m.4    3B.m.3    3B.m.2    3B.m.1 
129.29712 131.59231 132.05104 132.50977 133.42730 133.88603 

$L16
   2A.m.1    2A.m.2    2A.m.3    2A.m.4    2A.m.5    2A.m.6    2A.m.7    2A.m.8 
  0.00000  14.62334  24.37828  25.29581  27.13150  41.25715  46.78414  47.24287 
   2A.m.9   2A.m.10   2A.m.11   2A.m.12   2A.m.13   2A.m.15   2A.m.16   2A.m.14 
 51.38073  67.51465  67.97337  68.43210  68.89083  69.82371  72.57880  74.87398 
  2A.m.17   2A.m.18   2A.m.19   2A.m.20   2A.m.21   2A.m.22   2A.m.23   2A.m.24 
 75.33271  77.16840  89.81679  90.27552  94.41338  94.87211  95.33084  98.54627 
  2A.m.25   2A.m.26   2A.m.27   2A.m.28   2A.m.29   2A.m.30   2A.m.31   2A.m.32 
100.84146 103.59654 105.43223 106.34976 107.28893 122.91627 123.37500 128.43810 
  2A.m.33   2A.m.34   2A.m.35   2A.m.36   2A.m.37   2A.m.38   2A.m.39   2A.m.40 
128.89683 134.34910 145.98633 147.36282 148.28146 149.66012 150.58144 153.23551 

$L17
  4A.m.9   4A.m.8   4A.m.7   4A.m.6   4A.m.5   4A.m.3   4A.m.4   4A.m.2 
0.000000 1.835687 1.835687 2.294415 2.753144 3.670678 4.129406 6.424595 
  4A.m.1 
7.801089 

$L18
   2D1.m.1    2D1.m.2    2D1.m.3    2D1.m.4    2D1.m.5    2D1.m.6    2D1.m.7 
 0.0000000  0.4751034  0.9770841  1.4647560  2.4502769  6.0582889  6.0582889 
   2D1.m.8 
19.1965832 

$L19
   6D.m.15    6D.m.14    6D.m.13    6D.m.12    6D.m.11    6D.m.10     6D.m.9 
 0.0000000  0.9225051  4.1379396 10.6171243 39.6108758 57.8493328 58.7668670 
    6D.m.8     6D.m.7     6D.m.6     6D.m.5     6D.m.4     6D.m.3     6D.m.2 
59.2262509 69.4591643 69.9178927 70.8354269 71.2941554 71.7528838 71.7528838 
    6D.m.1 
72.2116123 

$L20
 2D2.m.13  2D2.m.12  2D2.m.11   2D2.m.9  2D2.m.10   2D2.m.8   2D2.m.7   2D2.m.6 
 0.000000  3.215434 10.137246 11.057585 11.516314 42.462588 46.604440 47.065947 
  2D2.m.5   2D2.m.4   2D2.m.3   2D2.m.2   2D2.m.1 
49.363919 51.660367 59.519492 59.982607 60.441335 

$L21
   3D.m.1    3D.m.2    3D.m.3    3D.m.4    3D.m.5    3D.m.6 
0.0000000 0.0000000 0.4606647 3.6788493 8.2797557 8.7384897 

$L22
    5D.m.6     5D.m.5     5D.m.4     5D.m.3     5D.m.2     5D.m.1 
 0.0000000  0.4587285  0.4587285 17.1024336 17.5611621 18.0198906 

$L23
  1B1.m.1   1B1.m.2   1B1.m.3   1B1.m.4   1B1.m.5 
0.0000000 0.9175342 3.6726127 7.8104736 7.8104736 

$L24
  7D.m.1   7D.m.3   7D.m.2   7D.m.4 
 0.00000 16.13391 16.13391 21.66090 

> 
> ## let's get a timing on that ...
> 
> system.time(testd <- mstmap(dfg, dist.fun = "kosambi", trace = FALSE))
Number of linkage groups: 24
The size of the linkage groups are: 41	33	41	54	10	56	6	33	37	32	37	35	27	21	30	40	9	8	15	13	6	6	5	4	
The number of bins in each linkage group: 41	33	41	53	9	55	6	32	36	32	36	34	27	21	29	40	8	7	14	13	5	5	4	3	
   user  system elapsed 
  1.068   0.000   1.067 
> 
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>