this is for holding javascript data
Antonino Ingargiola edited Burst_Variance_Analysis.tex
about 8 years ago
Commit id: 37a11a7ee284e03de5f7fc6cb5038ce9af6cdac4
deletions | additions
diff --git a/Burst_Variance_Analysis.tex b/Burst_Variance_Analysis.tex
index 0cd2f62..7dfc5bb 100644
--- a/Burst_Variance_Analysis.tex
+++ b/Burst_Variance_Analysis.tex
...
\end{equation}
\subsection{BVA Implementation}
BVA analysis consists of four steps: 1) slicing bursts into sub-bursts containing a constant number of consecutive photons,~\textit{n}, 2) computing FRET efficiencies of each sub-burst, 3) calculating the empirical standard deviation ($s_E$) of sub-burst FRET efficiencies over the whole burst, and 4) comparing $s_E$ to the expected standard deviation of a shot-noise limited distribution~(eq.~\ref{eq:binom_std}).
In order If, as in figure~\ref{fig:bva_static}, the observed FRET efficiency distribution
originates from a static mixture of FRET efficiency sub-populations (of different
non-interconverting molecules),
$s_E$ of each burst is only affected by shot noise and will follow the expected standard deviation curve based on eq.~\ref{eq:binom_std}.
Conversely, if the observed distribution originates from biomolecules of a single specie, which
interconverts between different FRET sub-populations in (times comparable to diffusion
time), as in figure~\ref{fig:bva_dynamic}, $s_E$ of each burst will be larger than the expected
shot-noise-limited standard deviation, hence it will be placed above the shot-noise standard
deviation curve (right panel on figure~\ref{fig:bva_dynamic}).
For implementation details please refer to
perform the BVA
using notebook included with FRETBursts
(\href{http://nbviewer.jupyter.org/github/tritemio/FRETBursts_notebooks/blob/master/notebooks/Example%20-%20Burst%20Variance%20Analysis.ipynb}{link}).
\paragraph{Python details}
With FRETBursts,
first, one has to obtain a user can easily get the
photon mask data needed for
each channel BVA analysis.
For start, we need two photon streams: photon during donor excitation (Dex) and acceptor photon during donor excitation (AemDex). These selections are obtained by
\verb|Data.get_ph_times| (see in 4.7) computing photon masks as
follows. follows (see section~\ref{sec:burststimes}):
\begin{lstlisting}
AemDex_mask = ds.get_ph_mask(ph_sel=Ph_sel(Dex='Aem'))
Dex_mask = ds.get_ph_mask(ph_sel=Ph_sel(Dex='DAem'))
AemDex_mask = ds.get_ph_mask(ph_sel=Ph_sel(Dex='Aem'))
AemDex_mask_d = AemDex_mask[Dex_mask]
\end{lstlisting}
Note that a Here, the first two variables (\verb|Dex_mask| and \verb|AemDex_mask|) select
photon
time stamp array by \verb|Data.mburst| is streams from
µs-ALEX the all-photons timestamps arrays,
while
BVA is based upon a single laser excitation. In this regards, to implement BVA for µs-ALEX data, one needs to reduce \verb|AemDex_mask_d|, selects acceptor photons from the
Dex photon
time stamp array as if it only contains photon data stream. As shown below, this selection is
needed to count acceptor photons in sub-bursts during
donor excitation by using \verb|Data.recompute_index_reduce|. In addition, the photon BVA analysis.
Next, we need burst data
array for accepter emission during relative to donor excitation
(AemDex_mask) has stream (by default
burst start-stop index refer to
be further selected accordingly. all-photons timestamps array).
\begin{lstlisting}
bursts = ds_FRET.mburst[0]
ph_d = ds_FRET.get_ph_times(ph_sel=Ph_sel(Dex='DAem'))
bursts = ds_FRET.mburst[0]
bursts_d = bursts.recompute_index_reduce(ph_d)
AemDex_mask_d = AemDex_mask[Dex_mask]
\end{lstlisting}
Using \verb|AemDex_mask_d[start:stop].sum| one can count Here, \verb|ph_d| contains the
number of photons emitted from acceptor in each sub-burst containing a constant number of consecutive photons,~\textit{n}. Then, FRET efficiencies (E_small) of sub-bursts are calculated and used to obtain Dex timestamps, \verb|bursts| the
empirical standard deviation ($s_E$) of sub-burst FRET efficiencies over original burst data and
\verb|bursts_d| the
whole burst
as follows. data with start-stop index relative to \verb|ph_d|.
\begin{lstlisting}
n=7 Finally, once previous variables are computed, we can easily implement the BVA algorithm
by computing the $\sigma_E$ quantity for each burst.
Std_small=[] \begin{lstlisting}
n = 7
E_sub_std = []
for burst in bursts_d:
E_small=[] E_sub = []
startlist = range(burst.istart, burst.istop + 2 - n, n)
stoplist = [i + n for i in startlist]
for start, stop in zip(startlist, stoplist):
A_D = AemDex_mask_d[start:stop].sum()
E = A_D / n
E_small.append(E)
Std_small.append(np.std(E_small)) E_sub.append(E)
E_sub_std.append(np.std(E_sub))
\end{lstlisting}
After computations, one can plot $s_E$ and Here \verb|n| is the
expected standard deviation curve (according to~ eq.~\ref{eq:binom_std}; red curve) with BVA parameter defining the
respect to each burst's FRET efficiency as shown in the right panels number of
figure ~\ref{fig:bva_static} & ~\ref{fig:bva_dynamic}. photons in each sub-burst.
Finally, by plotting the 2D distribution of $s_E$ (i.e. \verb|E_sub_std|) versus the average (uncorrected) E
we obtain the BVA plot of figure~\ref{fig:bva_static} and~\ref{fig:bva_dynamic}.
If, as in figure~\ref{fig:bva_static}, the observed FRET efficiency distribution
originates from a static mixture of FRET efficiency sub-populations (of different
non-interconverting molecules),
$s_E$ of each burst is only affected by shot noise and will follow the expected standard deviation curve based on eq.~\ref{eq:binom_std}.
Conversely, if the observed distribution originates from biomolecules of a single specie, which
interconverts between different FRET sub-populations in (times comparable to diffusion
time), as in figure~\ref{fig:bva_dynamic}, $s_E$ of each burst will be larger than the expected
shot-noise-limited standard deviation, hence it will be placed above the shot-noise standard
deviation curve (right panel on figure~\ref{fig:bva_dynamic}).
For implementation details please refer to the BVA notebook included with FRETBursts
(\href{http://nbviewer.jupyter.org/github/tritemio/FRETBursts_notebooks/blob/master/notebooks/Example%20-%20Burst%20Variance%20Analysis.ipynb}{link}).