Commit 6f57836c authored by SINDT--BARET Yanis's avatar SINDT--BARET Yanis
Browse files

[Add] Add documentation for SSWM

parent 7413a8ef
\usepackage[top=2cm, bottom=2cm, left=2cm, right=2cm]{geometry}
\newcolumntype{L}[1]{>{\raggedright\arraybackslash }b{#1}}
\newcolumntype{C}[1]{>{\centering\arraybackslash }b{#1}}
\lhead[L]{Yanis SINDT-BARET}
\rhead[R]{Beagle - Aevol}
\title{Documentation for Strong Selection Weak Mutations}
\author{Yanis SINDT-BARET}
\textsc{\LARGE INRIA
\\ Beagle - AEVOL}
\\ 2022
\HRule \\[0.4cm]
{ \huge \bfseries Documentation for Strong Selection Weak Mutations}\\
\HRule \\[1cm]
\begin{flushleft} \large
\emph{Done by : }\\
\begin{flushright} \large
\emph{Supervised by :} \\
Leonardo Trujillo\\
Paul Banse \\
morekeywords={self, python3}, % Add keywords here
emph={MyClass,__init__}, % Custom highlighting
emphstyle=\ttb\color{deepred}, % Custom highlighting style
frame=tb, % Any extra options here
\section{\underline{Compute simulation}}
\textbf{First}, you have to install Debian dependencies ; build-essential, cmake and zlib1g-dev. You can install it with this command :
\begin{lstlisting}[language=bash,caption={Install Pre-requisit}]
sudo apt install build-essential cmake zlib1g-dev
\textbf{Then} you have to compile all necesseries files :
mkdir build #Not necessary if there is already a directory build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
\subsection{Run simulation}
\subsubsection{Compute data for one hike}
If you are in the root directory, you have to go to the directory "examples" to have a \textit{basic.json} file (containing primordial information). If you need to generate a \textbf{random genome} (but viable) given in a result.json file, you have to do :
\begin{lstlisting}[language=bash,caption={Create a result.json file}]
cd examples
../build/bin/module_create basic.json
And then, to make a run with this \textit{result.json} file :
\begin{lstlisting}[language=bash,caption={Do a single run}]
cd examples
../build/bin/sswm result.json 0.5 50000 y
\textbf{With} \textbf{0.5} the probability of inversion (between 0 and 1). \textbf{50000} the number of generation. And \textbf{y} to allow neutral mutation (n to not allow it). So :
\begin{lstlisting}[language=bash,caption={Single run template}]
The program give a .csv output file, and its name follow this structure :
There are 6 columns
\item nb\_gen : Current number of generation
\item fitness\_kept : Fitness selected by the model
\item new\_fitness : New fitness calculated with the new sequence mutated
\item mutation : Type of mutation (0 : Switch, 6 : Inversion)
\item nb\_prot\_kept : Number of protein viable with the sequence selected
\item new\_nb\_prot : New number of protein viable calculated with the new sequence mutated
It give also a json file for the last generation containing the DNA sequence. Follow the same name structure but \{RESULT\_FILE\_NAME\}\ is replace by \{JSON\_FILE\_NAME\}\
\subsubsection{Compute data for multiple hike}
If you want to do multiple Hikes, you should use a Python script \textbf{"\textit{multiple\}"}. So you need to run it, in a bash terminal (admit you are still in example) :
\begin{lstlisting}[language=bash,caption={Single run template}]
mkdir new_test_dir
cd new_test_dir
mkdir image
\noindent The program wait from you few commit easily understandable (The number of Hike, Inversion Rate, the number of Generation) but for more information read these point :
\item Create all basic files : When you want to run multiple hikes, the program create different basic files from one given. Write "n" only if the good number of basic files already exist.
\item Inversion rate : A number between 0 and 1 for the probability to do a inversion. (Switch rate is 1 - Inversion rate)
\item Number of generation : The number of generation (Usually 5.000.000)
\item If you want to not allow neutral mutation, you have to uncomment line 55 in \textbf{"multiple\"}
\item If you want to setup the same genome for all hikes, uncomment line 17 in \textbf{"multiple\"}
\noindent This will give you in your new\_test\_dir all \textit{basic.json} files, \textit{resultat.json} files and all \textit{csv} files.
\noindent If you want to try different setting (usually different probability), you should do 30 hikes (as example) for a probability chosen on a bash terminal, and then the same number of hikes with an other probability on a other bash terminal.
Supports Markdown
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