%% Measuring transcriptional elongation rate in live Drosophila melanogaster embryos
%
%% Background and Motivation
% Transcription elongation by RNA Polymerase II (Pol II) has been thought to play an important role in the regulation of gene expression levels (Jonkers and Lis, 2015). Elongation has been thought of as highly regulated and is not uniform in different cell types or even within genes (Jonkers and Lis, 2015). Elongation rates also affect co-transcriptional processes such as splicing and termination (Jonkers and Lis, 2015).  All of this implies that elongation may be the rate limiting step in transcription. Guenther et al. suggested that some post-transcription initiation step was rate limiting after a genome wide analysis of human cells (Guenther et al., 2007). Recent evidence, such as the presence of promoter-proximal stalled Pol II in hundreds of Drosophila genes, indicates that the same might be true in Drosophila (Muse et al., 2007). Hence, an accurate measurement of transcription elongation rate is necessary to understand what role it may be playing in transcription regulation and whether it is rate-limiting.
% Several groups (Ardehali et al., 2009; O’Brien and Lis, 1993; Shermoen and O’Farrell, 1991; Yao et al., 2007) have investigated transcription elongation in Drosophila and have determined the rates to be approximately 1.1-1.5kb/min. The following will briefly review previous studies which measured or estimated the Drosophila transcription elongation rate:
% Ardehali et al. used ChIP assays in Drosophila S2 cells and FRAP on GFP-Pol II in salivary gland cells to study the         transcription elongation rates of Hsp70. They found that a transcription factor, Spt6, played a role in regulating elongation rates, which were measured to be about 1.1 kb/min (Ardehali et al., 2009).
% O’Brien and Lis used nuclear run-on assays to analyze polymerase distributions in heat shock protein genes (hsp70, 22, 23, 26, and 27) in Drosophila Schneider line 2 cells frozen at 30 seconds intervals. Rapid induction of transcription was detected in these genes while rapid repression was detected in the transcription of the histone H1 gene. They found similar results in an in vivo UV cross-linking assay. Both approaches showed the rate of movement of the first wave of RNA polymerase through the hsp70 gene to be approximately 1.2 kb/min (O’Brien and Lis, 1993).
% Yao et al. agreed with this rate in their study of hsp genes in polytene nuclei by FRAP (Yao et al., 2007). However, their agreement was based on qualitative recovery of fluorescence with a GFP tagged RNA Pol II subunit (Rpb3) and the assumption that transcription elongation was the rate limiting step. Additionally, the authors described a recycling of local Pol II that had been bleached, further complicating the elongation rate estimate (Yao et al., 2007).
% Shermoen and O’Farrell, used in situ hybridization to detect nascent transcripts of the Drosophila Ubx gene. Following mitosis, hybridization signals reappear with first a 5’ probe followed by a 3’ probe after a delay consistent with an elongation rate of 1.4 kb/min (Shermoen and O’Farrell, 1991).
% Most of the studies listed above used fixed samples to determine rates of elongation. The single live imaging method depended upon the assumption that elongation was the rate limiting step in the transcription of hsp genes and a FRAP measurement that was complicated by locally recycled Pol II molecules with bleached fluorescent tags. Single Pol II molecules or groups of accurately tagged Pol II could not be detected in different positions along a gene or be followed live as they traversed the gene.
% These previous studies of Drosophila transcription used indirect methods to determine the elongation rate. However, one could argue that the rates determined are not sufficient in the early embryo. An elongation rate of 1.1-1.5kb/min, as determined by these previous studies, is not fast enough to enable the transcription of large genes during the short interphase periods of the pre-cellularized embryo. For example, we know that Short Gastrulation (SOG) is 22kb long, but full length transcripts are produced during the 10-12 minute interphase of early nuclear cycles. Thus, we want to measure the elongation rate more directly using the MS2-MCP system in the early embryo. This may reveal that the previously determined rates are accurate and some other mechanism accounts for the transcription of longer genes in the early embryo or the elongation rate may be faster than previously thought.
%
%% MS2 Elongation Experiment
% To more directly measure the elongation rate in the early Drosophila embryo, we will use the MS2-MCP system. The MS2-MCP system consists of the MS2 stem loop, which is formed in the mRNA upon transcription of the encoded binding sequence, and an MS2 coat protein (MCP) that binds specifically to the MS2 stem loop (Figure 1A). 24 MS2 stem loops are encoded and MCP is labelled with eGFP so that we can see the nascent mRNAs as they are transcribed by Pol II. For this experiment, we created two constructs (Figure 1B), a 5’ construct with the MS2 stem loops placed at the 5’ end of the gene of interest and a 3’ construct with the MS2 stem loops placed at the 3’ end of the gene. The gene in this case is lacZ, which has an approximate length of 3.4 kb. LacZ as well as the MS2 loops are driven by the hunchback P2 enhancer-promoter (P2P). This enhancer-promoter drive expression early during Drosophila embryonic development. Using these constructs, we can calculate the elongation rate by measuring the time between the appearance of transcription spots in the 5’ construct and the 3’ construct (Figure 1C and D) and then dividing the length of the lacZ gene plus the 3’ by this time.
%
%
% Figure 1. (A) The MS2-MCP system. (B) The 5’ construct has the MS2 stem loops placed at the 5’ end of the gene of interest, which in this case is LacZ (6kb). The 3’ construct has the MS2 stem loops placed at the 3’ end of the gene. (C) Frames showing the transcription spots (green) for the 5’ construct, top, and the 3’ construct, bottom. Nuclei are labelled in red. As you would expect, the first 5’ transcription spots appear a couple minutes before the first 3’ transcription spots. (D) We can plot the number of transcription spots vs. time since mitosis (min) for each construct, which will allow us to measure the time between the appearance of transcription spots for the two constructs.
%
%% Imaging Conditions
% The embryos are mounted on an oxygen permeable, hydrophobic membrane using glue, covered in halocarbon oil 27 (refractive index: 1.4071), and slightly compressed with a glass coverslip through which they are imaged. Regardless of the microscope or objective, we aim to have a pixel size of approximately 220 nm and a dwell time of 1.2 us. We take a 10 um z-stack with 21 steps to capture the entire volume of the nucleus (diameter ~ 10 um). Both constructs use MCP tagged with eGFP, which has an excitation maximum of 488 nm and an emission maximum of 509 nm. Histones tagged with RFP allow us to visualize the nuclei. As an example, we use the following settings on a Leica SP8 confocal microscope: 63x objective, 512x256 pixels, 400 Hz, 1.7 zoom, 3x line accumulation (the 10um, 21 step z-stack takes 20 s at these settings).
% We will be imaging only the 5’ construct, but data for the 3’ construct would be taken under identical imaging conditions.
%
%% Data Analysis
% We'll start by opening up a single image and measuring the number of active transcriptional loci (Green dots below. Red is a nuclear RFP-histone marker. ) within that image. Afterwards, we'll program a for loop to do the same for all the images and produce graphs of the number of actively transcribing loci over time. We'll find that this is an accurate measure of the RNA Pol II elongation rate.
%
%
% Open up live script by hitting home -> new -> live script. you can switch to in line figures by hitting the little icon in the top right corner of the window. Add text or new sections by hitting Live Editor -> Text or Live Editor -> Section Break, respectively.
%


%Load frame 5' movie frame 189
Image = imread('5Loops0189.tif');
%The semicolon suppresses output in the command window. 
imshow(Image);

%We get a black square. Why?
whos Image      %Get information about the data stored in a variable

%Note that our image is a 16-bit image with 2^16 levels of gray. However,
%Matlab (and your screen) can only display 256 levels of gray. We need to
%tell Matlab how to map the different levels. An approach could be to grab
%the dimmest pixel, set it to 0, and grab the brightest pixel, and set it
%to 1.
imshow(Image,[])

%Find a threshold by inspecting the pixel values using imtool
%imtool(Image,[])
Threshold=1000;

%Take the threshold
ImThresh=Image>Threshold;
imshow(ImThresh)

%Label the connected regions in the image
ImLabel=bwlabel(ImThresh);
imshow(ImLabel,[])
%imtool(ImLabel,[])

%To find the number of spots, we find the maximum value corresponding to
%regions in the labeled image
NSpots=max(max(ImLabel))

%
%% Measuring the number of transcribing loci in the entire 5' movie

%Analyze the 5' movie
%Get the images in the folder
D5=dir('5Loops*.tif');

%Segment each image and count spots
for i=1:length(D5)
    %Load the image
    Image=imread(D5(i).name);
    %Take the threshold
    ImThresh=Image>Threshold;
    %Find spots
    ImLabel=bwlabel(ImThresh);
    %Count spots
    NSpots5(i)=max(max(ImLabel));
end
Time5=(1:length(D5))*10;        %In seconds. 
%Time resolution is 10s between images.
plot(Time5,NSpots5,'-r')
xlabel('Time (s)')
ylabel('Nspots')

%
%% Measuring the number of transcribing loci in the entire 3' movie and overlaying the plots


%Analyze the 3' movie
%Get the images in the folder
D3=dir('3Loops*.tif');

%Segment each image and count spots
for i=1:length(D3)
    %Load the image
    Image=imread(D3(i).name);
    %Take the threshold
    ImThresh=Image>Threshold;
    %Find spots
    ImLabel=bwlabel(ImThresh);
    %Count spots
    NSpots3(i)=max(max(ImLabel));
end
Time3=(1:length(D3))*10;        %In seconds

hold on
plot(Time3,NSpots3,'-b')
hold off
legend('5','3')

% You can hover your mouse over the figure to pop the image out of the live script window and then maximize it. Once youv'e done that, you can use the "Data Cursor" button to hover over data points in the image to measure the gap between 5' loci appearance and 3' loci appearance. This duration divided by the length of the gene (3.4 kbp) gives the elongation rate.
%
%% Recent Developments
% Fukaya et al. have made the most direct measurement of transcription elongation in Drosophila to date (Fukaya et al., 2017). Fukaya et al. used P2P to drive the expression of a LacZ reporter gene with 24x MS2 at the 5’ UTR and 24x PP7 at the 3’ UTR. PP7 is another type of stem loop that binds its own coat protein, PCP, which doesn’t bind MS2 loops (and MCP doesn’t bind PP7). The stem loops were visualized using MCP-GFP and PCP-mCherry. This system combines our 5’ construct and 3’ construct in the same embryo and overcomes any errors that could arise from slight timing differences between different embryos.
% The lag in timing of the appearance of fluorescence in the two channels depends on the rate of elongation during the transcription of the LacZ reporter gene. The average lag observed was approximately 120s, indicating an elongation rate of 2.4kb/min or 40bp/s. This is roughly twice as fast as previously reported values.
% What could be the reason for the discrepancy? One possibility is that the relatively open chromatin of the early embryo (Blythe and Wieschaus, 2016) plays a role in allowing the rapid elongation rate. Additionally, many of the previous estimates of elongation rates were made using heat shock genes (Ardehali et al., 2009; O’Brien and Lis, 1993; Yao et al., 2007). The elevated temperatures required for induction might affect elongation rate. Another possibility for the discrepancy between this and previous studies is that different elongation rates are associated with different promoters or enhancers.
% In all, Fukaya et al. observed only a 25% variation in elongation rate for different activators, promoters, and reporter genes. Elongation rate does not scale with total RNA output and is, therefore, not likely to be the rate limiting step in transcription. Output does correlate with the frequency of transcriptional bursting. Therefore, the rates of initiation and Pol II release are likely the key factors regulating transcription in the early embryo.
%
%% References
% Ardehali, M.B., Yao, J., Adelman, K., Fuda, N.J., Petesch, S.J., Webb, W.W., and Lis, J.T. (2009). Spt6 enhances the elongation rate of RNA polymerase II in vivo. EMBO J. 28, 1067–1077.
% Blythe, S.A., and Wieschaus, E.F. (2016). Establishment and maintenance of heritable chromatin structure during early Drosophila embryogenesis. eLife 5, e20148.
% Danko, C.G., Hah, N., Luo, X., Martins, A.L., Core, L., Lis, J.T., Siepel, A., and Kraus, W.L. (2013). Signaling pathways differentially affect RNA polymerase II initiation, pausing, and elongation rate in cells. Mol. Cell 50, 212–222.
% Fuchs, G., Voichek, Y., Benjamin, S., Gilad, S., Amit, I., and Oren, M. (2014). 4sUDRB-seq: measuring genomewide transcriptional elongation rates and initiation frequencies within cells. Genome Biol. 15, R69.
% Fukaya, T., Lim, B., and Levine, M. (2017). Rapid Rates of Pol II Elongation in the Drosophila Embryo. Curr. Biol. 27, 1387–1391.
% Hocine, S., Raymond, P., Zenklusen, D., Chao, J.A., and Singer, R.H. (2013). Single-molecule analysis of gene expression using two-color RNA labeling in live yeast. Nat. Methods 10, 119–121.
% Jonkers, I., and Lis, J.T. (2015). Getting up to speed with transcription elongation by RNA polymerase II. Nat. Rev. Mol. Cell Biol. 16, 167–177.
% Muse, G.W., Gilchrist, D.A., Nechaev, S., Shah, R., Parker, J.S., Grissom, S.F., Zeitlinger, J., and Adelman, K. (2007). RNA polymerase is poised for activation across the genome. Nat. Genet. 39, 1507–1511.
% O’Brien, T., and Lis, J.T. (1993). Rapid changes in Drosophila transcription after an instantaneous heat shock. Mol. Cell. Biol. 13, 3456–3463.
% Shermoen, A.W., and O’Farrell, P.H. (1991). Progression of the cell cycle through mitosis leads to abortion of nascent transcripts. Cell 67, 303–310.
% Veloso, A., Kirkconnell, K.S., Magnuson, B., Biewen, B., Paulsen, M.T., Wilson, T.E., and Ljungman, M. (2014). Rate of elongation by RNA polymerase II is associated with specific gene features and epigenetic modifications. Genome Res. 24, 896–905.
% Yao, J., Ardehali, M.B., Fecko, C.J., Webb, W.W., and Lis, J.T. (2007). Intranuclear distribution and local dynamics of RNA polymerase II during transcription activation. Mol. Cell 28, 978–990.