Commit afe0b42e authored by Sylvain Jasson's avatar Sylvain Jasson
Browse files

Progress

parent c06c6649
user_manual.pdf : spell-pedigree.tex spell-marker.tex spell-qtl.tex spell-qtl-examples.tex version.tex user_manual.tex
pdflatex user_manual.tex && pdflatex user_manual.tex
user_manual.pdf : spell-pedigree.tex spell-marker.tex spell-qtl.tex spell-qtl-examples.tex version.tex user_manual.tex images/Spell-pipeline2.svg
pdflatex --shell-escape user_manual.tex && pdflatex --shell-escape user_manual.tex
version.tex :
git tag | tail -1 > version.tex
......@@ -17,9 +17,10 @@ spell-qtl-examples.tex : ../man/spell-qtl-examples.1.md
/usr/bin/pandoc ../man/spell-qtl-examples.1.md --listings -f markdown -t latex -o spell-qtl-examples.tex
clean:
rm -f *.aux *.log *.pdf *.toc *.out
rm -f *.aux *.log *.pdf *.toc *.out *.lol
rm -f version.tex
rm -f spell-pedigree.tex spell-marker.tex spell-qtl.tex spell-qtl-examples.tex
rm -f images/*.pdf images/*.pdf_tex
veryclean: clean
rm -f *~
......@@ -6,13 +6,22 @@
\usepackage{amssymb}
\usepackage{mathtools}
\usepackage{braket}
\usepackage{hyperref}
\usepackage{hyperref} %required by pandoc
\usepackage{svg}
\usepackage{import} %required for svg inkscape import
\graphicspath{{images/}}
\renewcommand{\lstlistingname}{Sample file}
\renewcommand{\lstlistlistingname}{List of \lstlistingname s}
\lstset{
breakatwhitespace=false,
breaklines=true
}
% required by pandoc... should be in a pandoc.sty file
\providecommand{\tightlist}{%
\setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
......@@ -120,7 +129,7 @@ This model is much like the previous one. The only difference is that interactio
Note that $\forall g_k\in\mathbf{P}, \ \delta_{g_k,g_k,l}=0$: dominance exists only when distinct alleles are involved.
Most of the time, the degree of freedom used by adding a new QTL to such a model is the number of distinct possible allele minus one plus the number of possible interactions $df_{new}-df_{current}=p-1 + \frac{p(p-1)}{2}=\frac{(p-1)(p+2)}{2}$. Some design do not allow to detect such effect (e.g. Back-cross), spell-qtl is able to detect such cases, and will then discard any dominance effect, even if asked.
Most of the time, the degree of freedom used by adding a new QTL to such a model is the number of distinct possible allele minus one plus the number of possible interactions $df_{new}-df_{current}=p-1 + \frac{p(p-1)}{2}=\frac{(p-1)(p+2)}{2}$. Some design do not allow to detect such effect (e.g. Back-cross), \texttt{spell-qtl} is able to detect such cases, and will then discard any dominance effect, even if asked.
\subsubsection{Additive and disconnected model}
......@@ -236,9 +245,9 @@ score(\mathbf{H}=\set{ \set{l} },\mathbf{H}=\varnothing)=-log_{10}P[\mathcal{F}(
\chapter{Underlying parental origin probability model}\label{ch:probas}
The probabilities in equation \ref{eq:complete_model} are computed on the fly by spell-qtl when necessary. A hidden Markov chain representing the origin of the genetic material is derived for any population in the pedigree by spell-pedigree. Depending on the number of different parents in the design and the number of non-independent meiosis the minimal number of states that allow to enjoy the Markov property can be much more than the number of possible genotypes. Spell-pedigree ensures that this number is the smallest possible using lumping operations as soon as it is possible.
The probabilities in equation \ref{eq:complete_model} are computed on the fly by \texttt{spell-qtl} when necessary. A hidden Markov chain representing the origin of the genetic material is derived for any population in the pedigree by \texttt{spell-pedigree}. Depending on the number of different parents in the design and the number of non-independent meiosis the minimal number of states that allow to enjoy the Markov property can be much more than the number of possible genotypes. Spell-pedigree ensures that this number is the smallest possible using lumping operations as soon as it is possible.
At any observed marker, the probabilities of these states are inferred by spell-marker. Note that as soon as non clone population are involved, some information is gathered from siblings in order to infer states probabilities.
At any observed marker, the probabilities of these states are inferred by \texttt{spell-marker}. Note that as soon as non clone population are involved, some information is gathered from siblings in order to infer states probabilities. (See figure \ref{fig:pipeline} for more information about information exchange between parts of the software).
Suppose the locus of interest $q$ being preceded by $n_l$ observed loci and followed by $n_r$ observed loci, the loci sequence being
$[l_{n_l},...,l_2,l_1,q,r_1,r_2,...,r_{n_r}]$. The parental origin probability vector at locus $q$ is then :
......@@ -251,30 +260,109 @@ Suppose the locus of interest $q$ being preceded by $n_l$ observed loci and foll
Where :
\begin{itemize}
\item $T_d$ is the transition matrix of the Markov chain (as a function of genetic distance $d$). It is computed by spell-pedigree;
\item $T_d$ is the transition matrix of the Markov chain (as a function of genetic distance $d$). It is computed by \texttt{spell-pedigree};
\item $\varphi$ is the steady state vector associated with transition matrix $T_d$, $\varphi^{-1}$ its component wise inverse ;
\item $M_l$ is the observation matrix at locus $l$. It is inferred from observations at locus $l$ by spell-marker;
\end{itemize}
Equation \ref{eq:pop} can be applied recursively in order to compute multi-loci joint probabilities. The code in spell-qtl allows these joint probabilities computations when needed.
Equation \ref{eq:pop} can be applied recursively in order to compute multi-loci joint probabilities. The code in \texttt{spell-qtl} allows these joint probabilities computations when needed.
\chapter{Generated outputs}
\chapter{The main Spell-QTL pipeline}
\section{General view}
\begin{figure}[h]
\centering
\includesvg[width=\columnwidth]{images/Spell-pipeline2}
\caption{The main Spell-QTL pipeline}\label{fig:pipeline}
\end{figure}
Global software organization is displayed in figure \ref{fig:pipeline}. More detailed informations about the main purpose of each part and then about the required input files will be provided in this chapter.
\section{Software suite details}
\subsection{\texttt{spell-pedigree}}
\begin{itemize}
\item Computes the transition matrices for the Continuous Time Hidden Markov Models.
\item These computations are inherently dependent, so it can only run sequentially.
\item Outputs a data file that can be fed to \texttt{spell-marker}.
\end{itemize}
\subsection{\texttt{spell-marker}}
\begin{itemize}
\item Computes the 1-point Parental Origins Probabilities by Bayesian inference for all markers.
\item Each marker is independent, so it can run in various ways:
\begin{itemize}
\item Sequentially,
\item Multithreaded,
\item Scheduling jobs on {\em Sun Grid Engine},
\item Sending jobs to remote machines via {\tt ssh}
\end{itemize}
\item Outputs a data file that can be fed to \texttt{spell-qtl}.
\item Can also output the raw Parental Origin Probabilities.
\end{itemize}
\subsection{\texttt{spell-qtl}}
\begin{itemize}
\item Performs the QTL analysis {\em per se}.
\item Can also output the n-point Parental Origin Probabilities along the linkage groups.
\item Can run most computations concurrently on a multicore computer.
\item Computation results are cached on disk (and/or in RAM).
\end{itemize}
\section{Input files}
\subsection{Pedigree}
\subsection{File format}
See \texttt{spell-pedigree} man page (at appendix \ref{ch:spell:predigree})
\subsection{File sample}
\begin{lstlisting}[frame=single,caption={Pedigree (.ped)}]
Founders,1,0,0
Founders,2,0,0
Founders,3,0,0
Founders,4,0,0
F1,5,1,2
F1,6,3,4
CP,7,5,6
F2,8,7,7
F3,9,8,8
F3,10,8,8
F3,11,8,8
\end{lstlisting}
\subsection{Genetic map}
\subsection{File format}
One line per linkage group (space separated) :
\begin{itemize}
\item Starred(*) name for this linkage group
\item Number of markers in the linkage group
\item Name of first marker
\item Series of distance in cM and name of next marker
\end{itemize}
\subsection{File sample}
\begin{lstlisting}[frame=single,breaklines=false,caption={Genetic map (.map)}]
*Chrom1 3 M11 10.5 M12 30.3 M13
*Chrom2 17 M21 5.5 M22 0 M23 2 M24 5 M25 8 M26 11 M27 2.2 M28 2.5 M29 ...
*Chrom3 8 M31 10 M32 10 M33 10 M34 10 M35 10 M36 10 M37 10 M38
\end{lstlisting}
\chapter{Generated outputs}
\begin{appendices}
\chapter{spell-Pedigree man page}
\chapter{\texttt{spell-pedigree} man page} \label{ch:spell:predigree}
\sloppy
\input{spell-pedigree.tex}
\fussy
\chapter{spell-marker man page}
\chapter{\texttt{spell-marker} man page}
\input{spell-marker.tex}
\chapter{spell-qtl man page}
\chapter{\texttt{spell-qtl} man page}
\input{spell-qtl.tex}
\chapter{spell-qtl-examples man page}
\input{spell-qtl-examples.tex}
\end{appendices}
\lstlistoflistings
\tableofcontents
\end{document}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment