Commit 4b6f0968 authored by Turnhout, M.C. van's avatar Turnhout, M.C. van
Browse files

Merge branch 'testing' of gitlab.tue.nl:stem/dmalab into testing

parents a8786ab1 c70b0560
# Version 0.03 (pending), collect results, finish and add documentation
# Version 0.03, collect results, finish and add documentation
https://gitlab.tue.nl/STEM/DMAlab/tree/v0.03
......
......@@ -410,8 +410,8 @@ labdef = DMA_labconfig; % Courtesy of Douglas
% and finally:
labdef.DMAlabUrl = 'https://gitlab.tue.nl/STEM/DMAlab';
labdef.DMAlabBranch = 'testing'; % Update to 'master' before merge!
labdef.DMAlabVersion = '0.03-beta+'; % Update *before* merge!
labdef.DMAlabBranch = 'master'; % Update to 'master' before merge!
labdef.DMAlabVersion = '0.03'; % Update *before* merge!
end
......
......@@ -17,7 +17,7 @@ DMAlab was developed (and tested) with Matlab
\end{description}
\noindent DMAlab does not need to be `installed', but Matlab needs to know where the scripts are. In other words, the directory with the DMAlab scripts needs to be added to the \href{https://www.mathworks.com/help/matlab/matlab_env/what-is-the-matlab-search-path.html}{Matlab search path}.
\noindent \dmalab{} does not need to be `installed', but Matlab needs to know where the scripts are. In other words, the directory with the \dmalab{} scripts needs to be added to the \href{https://www.mathworks.com/help/matlab/matlab_env/what-is-the-matlab-search-path.html}{Matlab search path}.
There multiple ways to achieve this:
\begin{enumerate}
......@@ -28,7 +28,7 @@ On the command line, type
\end{lstlisting}
and add the line \texttt{addpath} \textsl{<thefullpathtoyourDMAlabdirectory>}
\begin{lstlisting}[numbers=none, language=octave]
addpath /home/mark/git/DMAlab/
addpath ~/git/DMAlab/
\end{lstlisting}
If you have spaces in the full name of this path, you may be better of adding the line \texttt{addpath(`}\textsl{<the full path to your DMAlab directory>}\texttt{`)}:
\begin{lstlisting}[numbers=none, language=octave]
......
......@@ -15,7 +15,7 @@ Note that \dmalab{} has been set up to be as flexible as possible, but as of yet
The function \DMA{tracedroplet} creates overview images for the data of a given droplet over time. It is called with the full path to the image of interest and a list of droplet numbers of interest, e.g.\ with `\texttt{124}' the (very short) list with droplet numbers:
\vspace*{-0.4em}\begin{lstlisting}[language=DMAlab,numbers=none]
DMA_tracedroplet('/home/mark/tue/log/191031_druppels/k562activated002_002_004.tif', 124);
DMA_tracedroplet('~/git/DMAlab/data/k562activated002_002_004.tif', 124);
\end{lstlisting}
This will produce three overview images for the data in the \texttt{.bf}-, \texttt{.fluo}- and \texttt{.ncel}-files (figure \ref{tracedropletbfline}).
\begin{figure}[h]
......
......@@ -15,7 +15,8 @@ Watch the wait-bar pop-up and decide whether there is time enough to get (me) so
\noindent If you wish to validate, check, or update DMAlab parameters for the specific directory (experiment) that you wish to process, you can launch one of the user-interfaces:
\begin{description}
\item[\DMA{prepexp}] is a CLI to set up general DMAlab parameters (section \ref{expprep}).
\item[\DMA{setfluoparam}] is a GUI to evaluate and set-up image analysis parameters (section \ref{secsetfluoparam}).
\item[\DMA{setfluoparam}] is a GUI to evaluate and set-up image analysis parameters for cell detection in the fluorescence channels of the stack (section \ref{secsetfluoparam}).
\item[\DMA{setBFparam}] is a GUI to evaluate and set-up image analysis parameters for droplet detection in the bright-field channel of the stack (section \ref{secsetBFparam}).
\end{description}
......@@ -106,11 +107,15 @@ And that basically sets up the experiment for now. The updated \texttt{param}-st
With those follow-up question (lines\,15--17), you can choose to proceed with verification or tuning of the droplet detection parameters (\DMA{setBFparam}, section \ref{secsetBFparam}); to proceed with verification or tuning of the image processing and cell detection parameters (\DMA{setfluoparam}, section \ref{secsetfluoparam}); and/or proceed with processing of the data, here and now (\DMA{processdir}). Finally (line\,18), \DMA{prepexp} assumes that you are not done, yet.
\section{Processing and results}\label{process}
\section{Processing}\label{process}
\subsection{Processing}
Processing of a stack consists of four steps
As stated at the start of this chapter, to process all the image stacks in your target directory, call:
\begin{lstlisting}[numbers=none, language=DMAlab]
>> DMA_processdir
\end{lstlisting}
a dialogue box will pop-up for the user to interactively select the target directory. \DMA{processdir} will look for the file \DMAlab{param} in the target directory and read the processing parameters from that file. If the file does not exist (yet), \DMA{processdir} will use the default settings.
\DMA{processdir} then simply calls \DMA{analyseFoV} for each image stack found in the work directory. Processing of a stack consists of four steps
\begin{enumerate}
\item analysis of the brightfield images in the stack for droplet detection and tracing \\ (\DMA{analyseFoV}, section \ref{dropdetect})
\item image pre-processing of the fluorescence channels for cell identification\\ (\DMA{preprocessfluo}, section \ref{fluoprep})
......@@ -119,26 +124,23 @@ Processing of a stack consists of four steps
\end{enumerate}
\DMA{analyseFoV} first performs step\,1 for all brightfield images in the stack. Then it loops over the fluorescence channels to perform steps\,2\&3, and then it parses those results for step\,4. The number of brightfield images (or time points) is inferred from the number of analysis channels (\param{nchan}) and the total number of images in the stack.
If you call \DMA{analyseFoV} without input arguments:
\DMA{processdir} will finally call \DMA{collectdir} to collect the (raw) data from all the stack analysis into summary overview files (section \ref{outsummary}).\\
\noindent It is also possible to analyse individual image stacks with \DMA{anayseFoV} from the command line. If you call \DMA{analyseFoV} without input arguments:
\begin{lstlisting}[numbers=none, language=DMAlab]
>> [BF, fluo, ncel] = DMA_analyseFoV
\end{lstlisting}
a dialogue box will pop-up for the user to interactively select the target directory. \DMA{analyseFoV} will look for the file \DMAlab{param} in the target directory and read the processing parameters from that file. If the file does not exist (yet), \DMA{analyseFoV} will use the default settings. \\
And then it will simply call \DMA{analyseFoV} with the obtained settings on all the image stacks in the target directory.
\noindent As stated at the start of this chapter, to process all the image stacks in your target directory, call:
\begin{lstlisting}[numbers=none, language=DMAlab]
>> DMA_processdir
\end{lstlisting}
a dialogue box will pop-up for the user to interactively select the target directory. \DMA{processdir} will look for the file \DMAlab{param} in the target directory and read the processing parameters from that file. If the file does not exist (yet), \DMA{processdir} will use the default settings.
And then it will simply call \DMA{analyseFoV} with the obtained settings on all the image stacks in the target directory.
\section{Output}\label{flowresults.bf}
\subsection{Results}\label{flowresults.bf}
\DMA{analyseFoV} writes a number of files to disk for each analysed image stack in the directory defined by \param{odir}. The filenames will be the same as that of the analysed image stack, but with e.g.\ \texttt{.bf}, \texttt{.fluo}, \texttt{.ncel} or \texttt{.csv} substituted for the extension \texttt{.tif}.
\DMA{analyseFoV} writes a number of files to disk for each analysed image stack in the directory defined by \param{odir}. The filenames will be the same as that of the analysed image stack, but with e.g.\ \texttt{.bf}, \texttt{.fluo}, \texttt{.ncel} or \texttt{.csv} substituted for the extension \texttt{.tif}. These are all just and regular text files.
These are all just and regular text files.
\subsubsection{Droplet tracing, \texttt{.bf}}\label{outputbf}
\subsection{Droplet tracing, \texttt{.bf}}\label{outputbf}
The \texttt{.bf}-file contains the results of the droplet tracing. For each detected droplet it contains a row with five results for each time point. Its size is thus (number of detect droplets)$\times$($5\cdot$(number of time points)), and the results of the $n$\ap{th} time point can be found at positions $5(n-1)+1$ through $5n$ in each row.
......@@ -151,26 +153,26 @@ The five parameters are
\item droplet centre movement compared to previous frame [pixel]
\end{enumerate}
\subsubsection{Mean fluorescence intensities, \texttt{.fluo}}\label{outputfluo}
\subsection{Mean fluorescence intensities, \texttt{.fluo}}\label{outputfluo}
The \texttt{.fluo}-file contains the mean intensity of the detected cell(s), either absolute or relative to background (section \ref{countfluosec}). For each detected droplet in \texttt{.bf} it contains a row with \param{nchan}-1 mean intensities for each time point. Its size is thus (number of detected droplets)$\times$((number of fluorescence channels)$\cdot$(number of time points)), and the results of the $n$\ap{th} time point can be found at positions $(\text{\param{nchan}}-1)(n-1)+1$ through $(\text{\param{nchan}}-1)n$ in each row.
The \texttt{.fluo}-file contains the mean intensity of the detected cell(s), either absolute or relative to background (section \ref{cellcounting}). For each detected droplet in \texttt{.bf} it contains a row with \param{nchan}-1 mean intensities for each time point. Its size is thus (number of detected droplets)$\times$((number of fluorescence channels)$\cdot$(number of time points)), and the results of the $n$\ap{th} time point can be found at positions $(\text{\param{nchan}}-1)(n-1)+1$ through $(\text{\param{nchan}}-1)n$ in each row.
\subsubsection{Mean background intensity, \texttt{.bgi}}\label{outputbgi}
\subsection{Mean background intensity, \texttt{.bgi}}\label{outputbgi}
The \texttt{.bgi}-file contains the mean pixel intensity of the background. For each detected droplet in \texttt{.bf} it contains a row with \param{nchan}-1 mean intensities for each time point. Its size is thus (number of detected droplets)$\times$((number of fluorescence channels)$\cdot$(number of time points)), and the results of the $n$\ap{th} time point can be found at positions $(\text{\param{nchan}}-1)(n-1)+1$ through $(\text{\param{nchan}}-1)n$ in each row.
%
%\subsection{Cell counts, \texttt{.ncel}} \label{outputncel}
%
% The \texttt{.ncel}-file contains the number of detected cell(s). For each detected droplet in \texttt{.bf} it contains a row with \param{nchan}-1 counts for each time point. Its size is thus (number of detect droplets)$\times$((number of fluorescence channels)$\cdot$(number of time points)), and the results of the $n$\ap{th} time point can be found at positions $(\text{\param{nchan}}-1)(n-1)+1$ through $(\text{\param{nchan}}-1)n$ in each row.
\subsubsection{Cell counts, \texttt{.ncel}} \label{outputncel}
The \texttt{.ncel}-file contains the number of detected cell(s). For each detected droplet in \texttt{.bf} it contains a row with \param{nchan}-1 counts for each time point. Its size is thus (number of detect droplets)$\times$((number of fluorescence channels)$\cdot$(number of time points)), and the results of the $n$\ap{th} time point can be found at positions $(\text{\param{nchan}}-1)(n-1)+1$ through $(\text{\param{nchan}}-1)n$ in each row.
\subsubsection{Cell counts, \texttt{.csv}}
\subsection{Cell counts, \texttt{.csv}}
The \texttt{.csv}-file collects the results of \texttt{.ncel} in a different format (and probably opens in your spreadsheet program, it's still text though!). This file contains a row for each fluorescence channel for each detected droplet. Each row starts with the droplet index (row reference for \texttt{.bf}, \texttt{.fluo} and \texttt{.ncel}) and is followed by the cell count for that channel for each time point.
Its size is thus ((number of detected droplets)$\cdot$((\text{\param{nchan}}-1))$\times$((number of time points)+1), and results for the $n$\ap{th} channel of the $d$\ap{th} droplet are in row $(\text{\param{nchan}}-1)d+n$.
\subsubsection{Dead cell counts, \texttt{.dcel}} \label{outputdcel}
\subsection{Dead cell counts, \texttt{.dcel}} \label{outputdcel}
The \texttt{.dcel}-file contains the number of detected cell(s) that have died during the experiment (cells that were already dead at the start of the experiment are not counted). For each detected droplet with at least one cell appearing in the `dead cell' fluorescence channel (last index in \param{fluo}), it contains \param{nchan}-1 rows with dead cell counts for each time point.
......@@ -180,7 +182,7 @@ The last row for each droplet contains the counts of cells in the dead cell chan
The size is thus ((number of detect droplets with dead cells)$\cdot$(number of fluorescence channels))$\times$ (number of time points)).
\subsubsection{Individual cell properties, \texttt{.ob}(IxyA)}\label{outputobX}
\subsection{Individual cell properties, \texttt{.ob}(IxyA)}\label{outputobX}
The \texttt{.ob}(IxyA)-files contain the individual data for \param{maxcells} detected cell(s) per fluorescence channel per droplet. These files contain (number of detected droplets)$\cdot$\param{maxcells} rows with \param{nchan}-1 values for each time point for each droplet in \texttt{.bf}. Their size is thus ((number of detect droplets)$\cdot$(\param{maxcells}))$\times$((number of fluorescence channels)$\cdot$(number of time points)), and the results of the $n$\ap{th} time point for the $d$\ap{th} droplet can be found at positions $(\text{\param{nchan}}-1)(n-1)+1$ through $(\text{\param{nchan}}-1)n$ in rows \param{maxcells}$(d-1)+1$ through \param{maxcells}$d$.
......@@ -189,6 +191,13 @@ When less than \param{maxcells} cells have been detected, the remaining data po
\noindent The file \texttt{.obI} contains the mean absolute pixel intensities for the detected cells; the files \texttt{.obx} and \texttt{.oby} contain the cells' (centroid) coordinates (in pixels); and the file \texttt{.obA} contain the cells' size (area, in pixels).
\subsection{Directory summary}\label{outsummary}
At the moment, \DMA{collectdir} simply concatenates all the individual \texttt{.ncel} files into \texttt{allncel.csv} in the image stack directory, and all the individual \texttt{.dcel} files into \texttt{alldcel.csv} in the image stack directory.
Further functionality is planned, but not yet implemented.
\section{\texttt{DMAlab\_param}}
......
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