loki_faq.tex 7.11 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146
	 \Large{Loki FAQ v0.4}\\
	 Simon C. Heath\\
	 October 2002
\subsection{Where is the home page for Loki?}
\subsection{What does Loki stand for?}
It doesn't stand for anything.  Loki is a name not an acronym (and a bad
pun).  As such it should be written as Loki, not LOKI.  Loki is one of the
Norse gods, and was known for his cunning and intelligence (which sounds
better than the alternative way if putting it which is that Loki is the god
of evil{\ldots}).
\subsection{How do I find the answer to a question which isn't here?}
Email me at \verb+heath@cng.fr+.  If the question is general enough
I will add it to the FAQ.
\subsection{How should I refer to Loki in papers?}
I would be grateful if the following 2 references
were cited if Loki is used in a study:
\item S.C.Heath (1997). Markov chain Monte Carlo segregation and linkage analysis
for oligogenic models. \textbf{61}:748--760.
\item S.C.Heath, G.L.Snow, E.A.Thompson, C.Tseng and E.M.Wijsman (1997). MCMC
segregation and linkage analysis. \emph{Genetic Epidemiology}
I would also be very interested if you could email me at
\verb+heath@cng.fr+ when a
paper describing a study which uses Loki is published so that I can keep a
track of who is using Loki for what.
\subsection{What is the best machine/operating system for running Loki?}
The fastest you have.  In general, large amounts of memory are not required,
but a fast CPU is.  The fastest system I've tried Loki on so far is one with dual
667MHz alpha EV67 processors, though Pentium systems are more cost effective
and work very well.  As for operating systems - I can only recommend a UNIX
variant.  Large amounts of disk space are useful as the output files can get
very large very quickly.
\section{Getting and compiling Loki}
\subsection{Where do I get the latest version?}
The latest released version is obtainable from
Development versions can be obtained from
\subsection{What do I do now I have it?}
You should first untar it.  You should receive the file compressed so you
must first uncompress it and then untar it by typing:
	 gunzip loki.tar.gz
	 tar -xf loki.tar
If you have GNU tar installed you should be able to do this is one go with:
	 tar -zxf loki.tar
In the event that the tar you have doesn't like either of these forms try:
	 cat loki.tar | tar xf -
If that doesn't work then consult your man pages and/or the local guru.
After untarring the archive you should cd into the main loki directory and
read the README files that are there.  After that, simply typing:
	 make install
should be enough to get you going.  If not, read the README files again, and
as a last resort, email me at \verb+heath@cng.fr+ with a description of the
problem, the error messages you get, and the output of \verb+uname -a+.
\subsection{How do I run it?}
Read the documentation{\ldots} Specifically look in the \verb+docs/+ subdirectory.
\subsection{How do I compile Loki on a PC?}
Best solution - install Linux/FreeBSD/OpenBSD/NetBSD and follow the normal
instructions.  Otherwise you're really on your own.  If you decide to port
Loki to a PC I would be interested, and would be prepared to help point out
the areas which are likely to cause trouble.  Most of the Loki code follows ANSI
standard - there's a small amount which is POSIX compliant so works on
modern UNIX variants but will cause problems on PC's.
\subsection{How do I compile Loki on a Mac?}
If you have a recent Mac running OS-X then Loki should compile and run with
no problems.  Otherwise, see \ref{pc_quest}.
\section{Reading in datafiles}
\subsection{How do I read in files in LINKAGE format?}
The main difference with LINKAGE files over the `normal' Loki files is that
LINKAGE files have a separate pedigree identifier (column 1), and pedigree
ids can be re-used in different pedigrees.  From Loki 2.3, LINKAGE files can
be read in directly by giving 4 parameters to the PEDIGREE command in the
control file, specifying the columns containing the pedigree id, id, father,
mother.  See the section on the PEDIGREE command in the documentation.
\section{Map functions}
\subsection{How do I use a Kosambi map in Loki?}
By default, Loki assumes that input maps use Haldane's map function.
However, many published maps use Kosambi's map function.  In this case, use
the command MAP FUNCTION KOSAMBI in the parameter file, which tells Loki to
convert the input map into a Haldane map.
\section{IBD Estimation}
\subsection{Is there a problem with inbred pedigrees and IBD estimation?}
There is no problem with the estimation procedure.  However, the IBD
estimates are generally wanted so that they can be used by other analysis
programs that may have a problem with inbreeding.  Check the manual or
contact the developers of the analysis program to see if there is a problem
with inbred pedigrees.
\subsection{How long should I run Loki for to get IBD estimates?}
Depends on the pedigree size, amount of missing data and (very importantly)
the marker spacing.  Tightly linked markers (1cM or less) can require many
sample iterations to get stable estimates.  If you want a ball park
estimate, I generally use at least 100000 iterations.  See next question{\ldots} 
\subsection{How can I tell if I have run Loki long enough to get IBD estimates?}
A reasonable way to go about assessing the quality of the estimates is to
repeat multiple times (with different random number seeds{\ldots} ), and see
how closely the results match.  I will be developing scripts to make this
easier so email me if you are interested.
\subsection{Can I restart a Loki IBD estimation analysis?}
No.  The IBD estimates are not stored in the dump file.  This may be fixed
if I have time.
\subsection{What runtime options should I use for IBD estimation?}
If using multiple markers I would always set the lm\_ratio to be $0.5$ or
higher.  This greatly improves mixing in many cases.  It is also often
worthwhile to use the OUTPUT FREQUENCY command so that IBD estimates are not
collected at every iteration (as the collection can be very costly).  Always
compress the output files with the COMPRESS IBD OUTPUT command.
\subsection{How do I generate MIBD files for SOLAR?}
First load the pedigree into SOLAR to generate the \verb+pedindex.cde+\ and
\verb+pedindex.out+\ files.  Copy the files to the directory you are running
Loki from.  Run Loki using the original ID codes that went into SOLAR.  Put
the following in the parameter file:
ESTIMATE IBD GRID 0,100,1 # Or whatever grid you want
SET lm_ratio 0.5
When Loki has finished, all of the MIBD files will be in the directory