Madeline 0.935 FAQ

The following is a compilation of questions that I have been asked by users about the new version of Madeline, v. 0.935. Last updated 2004.07.21.ET.

Madeline 0.935 Frequently Asked Questions

1. When trying to configure and then compile Madeline, I get errors about missing "readline" or "history" libraries. Even after installing the GNU readline library from my Linux distributor's RPM or from source, I STILL receive these errors! What is going on and how do I solve these problems?

Welcome to the (sometimes frustrating) world of resolving library dependencies! There are two ways to resolve the dependencies: (1) By installing library packages that have been prebuilt by your OS vendor or (2) By compiling and installing the dependent libraries from source. Since installing pre-built binary packages is usually faster, I'll describe this option first. On some systems, however, building from source is really the best option.

Before getting on with the details, here are the dependencies: The GNU "readline" and "history" libraries are both available in the GNU "readline" distribution and, when compiled from source, both libraries get installed onto your system by default. The GNU "readline" and "history" libraries themselves require one of the following three libraries:

These are low-level libraries for printing characters and moving the cursor around on the console. "Ncurses" stands for "new curses". It is basically a modern replacement for the older "curses" or "termcap" libraries, and is what you would expect on a modern Linux distribution. Older distributions, or other operating systems, like Solaris, may have "termcap" or "curses" instead.

Installing the libraries from vendor-supplied packages. If using an RPM-based Linux distribution like SuSE or Redhat, be sure to only use RPMs supplied by the vendor that match your distribution and version! Vendors like SuSE often break these libraries into two components (and this is usually the cause of your problems!):

  1. The "run-time" components consisting of the actual binary library files (i.e., files which go in /usr/lib and have .so (shared object) or .a (static object) extensions).
  2. The "devel" components consisting of the header files with .h extensions which go in /usr/include.
  3. These are of course required when doing your own development -- or when simply trying to compile someone else's program from source code.

So, for example on SuSE 9.1, you would want to have ALL of the following RPMs installed:

The usual problem is that, despite everyone's best intentions, the "devel" packages are not installed! On other systems, the names of the packages may be slightly different.

Installing dependent libraries from source. Here's the biggest "gotcha" you are likely to encounter: When the ./configure script for GNU readline fails to detect the presence of a system-wide "termcap", "curses", or "ncurses" library, it resorts to using it's own "libgnutermcap.a" file. But then, after installing GNU readline, one of the following happens:

In this latter case, it would have been better if compilation of GNU "readline" had failed in the first place due to lack of a system-wide "curses" library, because it is not at all obvious when "readline" decides to use it's own locally-bundled substitute!

The solution is straight-forward. Make sure you proceed in this order:

  1. Download and install ncurses first! (If you have already installed GNU readline from source, you'll want to make clean and then re-configure and re-install readline so that it will be using the system-wide ncurses.
  2. Download and build readline. The ./configure script will detect the presence of the new ncurses library and use that instead of the locally-bundled substitute.
  3. Download and build Madeline v. 0.935. Madeline's ./configure script should detect both ncurses and readline/history, and the linker should be able to find and link to the system libraries.

2. I have a pedigree table which uses the same numeric codes for gender and affection status as used by the LINKAGE/GENEHUNTER format. When I open up the table in Madeline v. 0.935, the program correctly reports my gender and affection status fields as being core "C" fields, but the gender and affection status of numerous individuals is missing and I receive numerous warning messages. What's going on?

The most likely cause is that you are storing your gender and affection codes in CHARACTER columns instead of in NUMERIC columns. Once opened in Madeline, the gender column often appears not entirely missing because Madeline fixes up missing gender based on the pedigree structure where possible, but your affection column will likely contain only missing values.

Madeline uses associative maps to map gender and affection status. Both numeric and character codes can be stored in the associative maps. Numeric codes are numbers that are not surrounded by quotation marks. Character codes can be either alphabetic characters or numbers that are enclosed by quotation marks. Using the list command will show you the default mappings. The default mappings included to support reading of LINKAGE/GENEHUNTER-style data files are shown in blue below:

M>list GenderStatus
GenderStatus has 6 elements:
GenderStatus[1]=0   <-- #male
GenderStatus[2]=1   <-- #female
M>list AffectionStatus
AffectionStatus has 6 elements:
AffectionStatus[0]=#MISSING   <-- #missing
AffectionStatus[1]=0   <-- #unaffected
AffectionStatus[2]=1   <-- #affected

These default mappings for the LINKAGE/GENEHUNTER format are equivalent to issuing the following commands:

  M>map GenderStatus    1 as #male
  M>map GenderStatus    2 as #female
  M>map AffectionStatus 0 as #missing
  M>map AffectionStatus 1 as #unaffected
  M>map AffectionStatus 2 as #affected

If these mappings appear to not be working, it is highly probable that your NUMERIC codes are actually being stored in CHARACTER columns. There are three solutions to this problem:

1. Change the column definitions in your table from CHARACTER to NUMERIC. If you are using Madeline-style ASCII/UTF-8 tables, you need only change the "C"s to "N"s in the header of the data file. If you are using another format (dBASE, SAS), you will have to issue commands to change the table structure in the appropriate software.

2. Alternatively, you can leave your table unchanged and just add the CHARACTER mappings in Madeline.
Notice the quotation marks:

  M>map GenderStatus    "1" as #male
  M>map GenderStatus    "2" as #female
  M>map AffectionStatus "0" as #missing
  M>map AffectionStatus "1" as #unaffected
  M>map AffectionStatus "2" as #affected

3. The third solution is to change the codes in your table to mnemonic codes (i.e., "M" for male, "F" for female, "A" for affected, etc). Unlike numeric codes, character codes can only be stored in character columns, so this eliminates a source of potential problems from your data processing pipeline.

The third option is the best long-term solution.