Sexratio with MLINK, bugs in LSP and MLINK

Dr. David Curtis dcurtis at crc.ac.uk
Fri Jul 3 10:47:41 EST 1992


For a long time I've been under the misapprehension that one couldn't
have different male/female recombination fractions with MLINK. I think
this used to be true once, but looking at the 5.1 code it seems it ought
to be possible. Certainly the versions of LCP I have access to don't let
me set a female/male ratio as I can for example with LINKMAP. The thing
that's really been throwing me is that LSP rejects any attempt do this
as an error, and this in fact seems to be due to a bug in the the code
for LSP, in file gmlk.c, line 219, which reads:

    if (c_sxd < 0 || c_sxd > 0)
      lnk_error (LNK_FATAL,LSP_SXDICI,prg,fns,10);

A few lines further are conditions which test for c_sxd being 0, 1 or 2,
which makes me think this is a bug rather than being an obsolete version
from the days before MLINK had this facility. Clearly the code should be
altered as follows:

    if (c_sxd < 0 || c_sxd > 2)
      lnk_error (LNK_FATAL,LSP_SXDICI,prg,fns,10);

So far as I can tell, things work fine then. I'm a bit worried that the
authors of LSP did this on purpose because of some bug in MLINK that
prevented it using this feature reliably, so I'll await their response.
This doesn't get round the limitations with LCP, the command files
produced still have to be edited by hand. To find out how to do this,
run LSP interactively. Essentially, after the numbers giving locus order
change the 0 to a 1, then leave the next number unchanged and then
insert the desired female/male ratio next.

I don't want to complain, but I must say it's been difficult for me to
find out exactly how all these linkage utility programs are supposed to
work - there doesn't seem much documentation for them around the place.

There is another fairly minor bug in MLINK (I think I may have found it
in LINKMAP too, I can't remember) which causes it to crash when running
with dostream set to false. This is because at one point the stream file
is written to without checking dostream first, so clearly the file has
not actually been opened. (I'm speaking C here, I've been using a C
translation. I don't know what happens in Pascal, maybe there isn't even
a problem. ) In the C translation the error is about at line 5680 which reads:

  if (score && !risk)
    fprintf(stream, "% .5E\n", tlike - scorevalue);

and needs changing to:

  if (score && !risk && dostream)
    fprintf(stream, "% .5E\n", tlike - scorevalue);

It would be easy to find the equivalent in the Pascal source.

Hope this saves some other people some time and effort,

Dave Curtis

Academic Department of Psychiatry,    Janet:       dcurtis at UK.AC.CRC
St. Mary's Hospital,                  Elsewhere:   dcurtis at CRC.AC.UK
Praed Street, London W2.              EARN/Bitnet: dcurtis%CRC at UKACRL
Tel 071-725 1993                      Usenet: ...!mcsun!ukc!mrccrc!D.Curtis
-- 

Dave Curtis

Academic Department of Psychiatry,    Janet:       dcurtis at UK.AC.CRC



More information about the Gen-link mailing list