Debian Codegraph @

docs/source/tutorial/s1_sec.rst

raw
1 Basic SEC-SAXS processing
2 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3 .. _s1p7:
4
5 In a typical SEC-SAXS run, images are continuously collected while the eluate (outflow)
6 of a size exclusion column flows through the SAXS sample cell. As proteins scatter more
7 strongly than buffer, a plot of total scattered intensity vs. time, the so-called SAXS
8 chromatograph (or scattergram), will show a set of peaks similar to what is seen by
9 UV absorption measurement of the SEC system. RAW includes the capability to do routine
10 processing of SEC-SAXS data. This includes creating the SAXS chromatograph from the data,
11 plotting |Rg|, MW, and I(0) across the peaks, and extracting specific frames for further analysis.
12
13 *Note:* In RAW, this is called Series analysis, as the same tools can be used for other
14 sequentially sampled data sets.
15
16 A video version of this tutorial is available:
17
18 .. raw:: html
19
20 <style>.embed-container { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; max-width: 100%; } .embed-container iframe, .embed-container object, .embed-container embed { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }</style><div class='embed-container'><iframe src='https://www.youtube.com/embed/3aJl2kNBPuA' frameborder='0' allowfullscreen></iframe></div>
21
22 The written version of the tutorial follows.
23
24 #. Clear any data loaded into RAW.
25
26 * *Tip:* In the Files tab, click the “Clear All” button to clear all data in RAW.
27
28 #. Go to the Files control tab and navigate to the **sec_sample_1** data directory.
29
30 #. Click on the first data file, **profile_001_0000.dat**\ . Scroll down to the
31 bottom of the file list, and shift click on the last file,
32 **profile_001_0964.dat**\ . This should highlight all of the files in
33 between, as well as the two you clicked on. Click on the "Plot Series"
34 button to load the series into RAW.
35
36 |series_load1_png|
37
38 #. RAW should automatically show you the Series plot panel. If not, click
39 on the Series tab in the plot. Click on the Series tab in the control panel.
40
41 |series_plot_png|
42
43 * *Try:* Each point on this curve is the integrated intensity of a scattering profile.
44 You can figure out which one by right clicking on the filename in the Series list and
45 selecting ‘Show data’. This will show you the frame number and integrated intensity
46 displayed on the plot, and the filename corresponding to the displayed frame number.
47
48 #. Drag the plot so that you can clearly the see the first frame. You’ll notice it has a
49 significantly lower intensity than the rest of the frames. This happens occasionally
50 at the MacCHESS G1 beamline (where the data was taken). It can make it harder to tell
51 what the data is doing.
52
53 * *Tip:* Select the crossed arrows in the plot control bar, and then click and drag on
54 the plot to move the curve around on the screen.
55
56 #. Reload the data as in steps 2-3, but select the second data file,
57 **profile_001_0001.dat** as the initial file in the series.
58
59 * *Tip:* As before, select **profile_001_0001.dat**, scroll down
60 to the last file, and shift click to select the files to load
61 in. Then click the "Plot Series" button.
62
63 #. You will see the same curve plotted as before, but without the very first
64 scattering profile. Remove the other loaded data set. Now you should have
65 a curve where the baseline is very close to the bottom of the plot.
66
67 |series_plot2_png|
68
69 #. In some cases it is more useful to look at the mean intensity, the intensity at a
70 specific *q* value, or the intensity in a range of *q* values than the total
71 intensity. Right click on the plot and select mean intensity for the left
72 axis y data. Then try the intensity at *q=0.02* and in the *q* range 0.01-0.03.
73
74 * *Note:* You need to have the drag button in the plot control bar unselected to
75 get a right click menu.
76
77 * *Tip:* CHROMIXS, in the ATSAS software displays the average intensity
78 over the *q* range 0.01-0.08 :math:`Å^{-1}`. To achieve a similar
79 display in RAW, set your q range for the intensity to that. Note that
80 RAW will display the sum of the intensity over the range while CHROMIXS
81 displays mean intensity for the range, so the results won't be exactly the same.
82
83 #. Return to plotting the integrated intensity. Zoom in near the base of the peak. Notice
84 that there are two smaller peaks on the left, likely corresponding to higher order
85 oligomers that we don’t have the signal to properly resolve. Also notice that the
86 baseline after the peak is not the same as the baseline before the peak. This can happen
87 for several reasons, such as damaged protein sticking to the sample cell windows.
88
89 * *Tip:* Click on the magnifying glass at the bottom of the plot, then click
90 and drag on the plot to select a region to zoom in on.
91
92 |series_plot3_png|
93
94 #. Zoom back out to the full plot.
95
96 * *Tip:* Click the Home (house) button at the bottom of the plot.
97
98 #. In order to determine if we really have a single species across the peak, we will
99 calculate the |Rg| and MW as a function of frame number. Click on the "LC
100 Analysis" button at the bottom of the Series control panel or right click on the
101 filename in the Series control panel and select "LC Series analysis" to open the
102 LC Series analysis panel.
103
104 * *Note:* At the top of the control panel in this window, in the 'Series info'
105 section you'll see several settings. If you had RNA instead of protein,
106 you would use the Vc Mol. type menu to select that option. This affects
107 the calculation of the molecular weight. You could also change the Vp
108 density away from the default value, or change the averaging window
109 (discussed below).
110
111 |lc_analysis_main_png|
112
113 #. The LC Series analysis panel provides basic and advanced analysis tools for
114 liquid chromatography experiments. Here we will show how to select buffer
115 and sample regions, and send final processed data to the Profiles plot. The
116 advanced baseline correction features are discussed later.
117
118 In order to calculate |Rg| and other parameters as a function of elution time
119 (Frame #), we need to define a buffer region. RAW can do this automatically.
120 In the 'Buffer' section click the 'Auto' button.
121
122 |lc_analysis_buffer_auto_png|
123
124 * *Checkpoint:* You should see a buffer range show up in the buffer list,
125 with defined start and end values. The region will be shown in green on
126 the Unsubtracted plot.
127
128 |lc_analysis_buffer_range_png|
129
130 #. You can make fine manual adjustments to the buffer range if necessary. Zoom
131 in on the baseline around the buffer region. Use the up/down arrows for the
132 Start and End points to adjust the buffer region a little bit. You will see
133 the region on the plot update as you make the changes.
134
135 |lc_analysis_buffer_adjust_png|
136
137 * *Warning:* The automatic buffer determination can be wrong! Always be sure
138 to manually inspect the region it picked. In particular, large flat leading edge
139 shoulders next to the main peak can look like a baseline region to the
140 algorithm, and will often mistakenly be picked.
141
142 * *Tip:* If the SAXS data isn't clear (noisy, low signal, etc.), it can be
143 useful to inspect the UV trace associated with the SEC elution to see
144 where there are minor elution components that you should exclude from
145 your buffer selection.
146
147 #. Zoom back out on the plot. Reset the buffer range to 504 to 562 by typing
148 those values in the Start/End range boxes and hitting enter.
149
150 #. To set the buffer region, create a set of subtracted profiles, and calculate
151 structural parameters as a function of elution time, click the 'Set buffer'
152 button. This may take a while to calculate.
153
154 |lc_analysis_buffer_set_png|
155
156 * *Note:* All of the files in the given buffer range will be averaged and used as a buffer.
157 A sliding average window (size defined by the 'Averaging window size' in the
158 'Series Info' section) is then moved across the SEC curve. So for a
159 window of size five, the profiles corresponding to frames 0-4, 1-5, 2-6,
160 etc will be averaged. From each of these averaged set of curves, the average
161 buffer will be subtracted, and RAW will attempt to calculate the |Rg|,
162 MW, and I(0). These values are then plotted as a function of frame number.
163
164 * *Warning:* It is important that the buffer range actually be buffer! In this case,
165 we need to make sure to not include the small peaks before the main peak.
166
167 #. Once the calculation is finished, the window should automatically display the
168 Subtracted plot. If it doesn't, click on the 'Subtracted' tab in the plot.
169 On this plot there is a new Intensity vs. Frame # curve, representing the
170 subtracted data. There is also a set of markers, showing one of the calculated
171 parameters. By default the |Rg| displayed. The calculated parameters are
172 plotted on the right Y axis. You can show |Rg|, I(0), and MW calculated by
173 the volume of correlation (Vc) and adjusted Porod volume (Vp) methods. Click
174 on the 'Calculated value' menu to switch between the different displays.
175
176 * *Try:* Show the |Rg|, MW (Vc), and MW (Vp). Notice that the MW estimate
177 varies between the two different methods.
178
179 * *Note:* You’ll notice a region of roughly constant |Rg| across the peak. To
180 either side there are regions with higher or lower |Rg| values. Some of these
181 variations, particularly on the right side, are from scattering profiles
182 near the edge of the peak with lower concentrations of sample, leading
183 to more noise in determining the |Rg| values. There may also be some
184 effects from the small peaks on the leading (left) side of the peak,
185 and from the baseline mismatch between left and right sides of the peak.
186
187 |lc_analysis_subtracted_png|
188
189 #. A monodisperse peak should display a region of flat |Rg| and MW near the center.
190 Note that some spread on either edge can come from small shoulders of other
191 components, bad buffer selection, or just the low signal to noise in the tails
192 of the peak. Zoom in on the |Rg| and MW values across the peak to verify that
193 these show a significant flat region.
194
195 RAW can automatically determine a good sample region (good being defined
196 as monodisperse and excluding low signal to noise data). To do this, click
197 the 'Auto' button in the Sample region.
198
199 |lc_analysis_sample_auto_png|
200
201 * *Checkpoint:* You should see a sample range show up in the sample list,
202 with defined start and end values. The region will be shown in green on
203 the Subtracted plot.
204
205 |lc_analysis_sample_region_png|
206
207 #. In the plot, zoom in on the peak region and verify that the |Rg| and MW seem
208 flat in the selected sample range.
209
210 |lc_analysis_sample_region_plot_png|
211
212 * *Tip:* You can manually adjust the sample region range in the same way
213 as the buffer range, using the controls in the Start/End boxes.
214
215 #. Once you are satisfied with the region picked (should be 699-713), click the
216 'To Profiles Plot' button. This averages the selected region and sends the resulting
217 average to RAW's Profiles Plot.
218
219 * *Note:* RAW first averages the selected sample and buffer regions in the
220 unsubtracted data, then subtracts. This avoids the possibility of correlated
221 noise that would arise from averaging the subtracted files.
222
223 |lc_analysis_sample_to_main_plot_png|
224
225 #. If you adjust the sample or buffer region in a way that could be problematic,
226 RAW will warn you. Try this.
227
228 * Adjust the Buffer start to include more of the elution range, such as
229 starting at 450. You will want to click on the 'Unsubtracted' plot to
230 see the buffer range. Then click 'Set Buffer'. You will see a warning window
231 telling you what might be wrong with the selected region. Click 'Cancel'.
232
233 |lc_analysis_buffer_range_warning_png|
234
235 * Adjust the Sample start to include some of the non-flat Rg region, such as
236 starting at 680. Then click 'To Profiles Plot'. You will see a warning window
237 telling you what might be wrong with the selected region. Click 'Cancel'.
238
239 |lc_analysis_sample_range_warning_png|
240
241 * *Note:* For buffer regions, RAW checks frame-wise similarity across the
242 whole *q* range and at low and high *q*, correlations in intensity, and
243 whether there are multiple singular values in the selected region.
244
245 For sample regions, RAW checks frame-wise similarity across the
246 whole *q* range and at low and high *q*, correlations in calculated Rg
247 and MW values, whether there are multiple singular values in the selected
248 region, and if some of the selected frames decrease the signal to noise
249 of the average.
250
251 #. Click 'OK' to close the window and save your analysis results. In the Info panel
252 above the Series control panel you should see information about the series,
253 including the selected buffer and sample ranges. If you reopen
254 the LC analysis window you will see the buffer and sample regions you selected
255 are remembered.
256
257 #. Click on the Profiles plot tab and the Profiles tab. You should see one scattering
258 profile, the buffer subtracted data set you sent to the Profiles plot. Carry out
259 Guinier and MW analysis.
260
261 * *Note:* The I(0) reference and absolute calibration will not be accurate for
262 SEC-SAXS data, as the concentration is not accurately known.
263
264 * *Question:* How does the |Rg| and MW you get from the averaged curve compare
265 to what RAW found automatically for the peak?
266
267 * *Tip:* Make sure your plot axes are Log-Lin or Log-Log. Make sure that both
268 plots are shown by clicking the 1/2 button at the bottom of the plot window.
269
270 #. This particular dataset shows a small difference between initial and final buffer
271 scattering profiles. A better scattering profile might be obtained by using buffer
272 from both sides of the peak. To do so, start by reopening the LC Series Analysis panel.
273
274 #. Switch to showing the unsubtracted intensity by clicking on the 'Unsubtracted' plot tab.
275
276 #. Add a second buffer region by clicking the 'Add region' button.
277
278 #. For the second region, click the 'Pick' button.
279
280 |lc_analysis_buffer_pick_png|
281
282 #. Move your mouse across the plot. You will see a vertical green line moving
283 with the mouse cursor. This represents the start of the buffer region. Click
284 once to fix the start point where you click. Move the mouse further to the
285 right and click again to fix the end point of the buffer region.
286
287 |lc_analysis_two_buffers_png|
288
289 #. Once you are happy with the second buffer region, click 'Set buffer'. A range like
290 ~840-896 is reasonable.
291
292 #. A warning window will pop up. In this case, we have purposefully chosen two
293 buffer regions because they are different, so ignore the warning and click
294 'Continue'.
295
296 #. Remove the old sample region by clicking in the empty space to the right of
297 the 'Pick' button to highlight it, and then clicking the 'Remove region' button.
298
299 |lc_analysis_remove_sample_png|
300
301 #. Click the 'Auto' button to automatically find a new sample region. Click the
302 'To Profiles Plot' button to send that new region to the Profiles plot.
303
304 * *Try:* You can see what the data subtracted by just the second buffer
305 region looks like by removing the first buffer region, setting the buffer
306 again, finding a new good sample region, and sending new region to the
307 Profiles plot.
308
309 #. Cancel out of the LC Series analysis window. This will not save the changes
310 you made to the buffer and sample regions.
311
312 #. Carry out the |Rg| and MW analysis on the new curve. How does the scattering
313 profile compare to the one that you generated using only buffer from before
314 the peak?
315
316 * *Tip:* You should see subtle but noticeable differences in the Guinier
317 fit.
318
319 * *Note:* An alternative approach to using several buffer regions is to use
320 a single buffer region and apply a baseline correction. Both approaches
321 have advantages and disadvantages. If you want to do EFA deconvolution,
322 it is best to not use a baseline correction, however in other cases
323 it will be more accurate as it doesn't assume a single average buffer
324 across the peak.
325
326 #. Return to the Series control and plot panels.
327
328 #. If you want to look at either individual profiles or the average of a
329 range of profiles you can send profiles to the Profiles plot. To select which
330 series curve to send profiles from, star the series curve of interest.
331
332 |series_star_png|
333
334 #. In the ‘Data to Profiles plot’ section enter the frame range of interest.
335 For this dataset, try the buffer range you selected: 504 to 562. Then click
336 the ‘Average’ button. That will send the average buffer to the Profiles plot.
337
338 * *Try:* Send the average of the sample range you selected to the main
339 plot (699 to 713), carry out the subtraction, and verify it’s the same as
340 the curve produced by the ‘To Profiles Plot’ button in the LC Series Analysis
341 panel.
342
343 * *Question:* When you send the sample average to the Profiles plot you will
344 get a warning that the profiles are different. Why?
345
346 |series_average_main_plot_png|
347
348 #. You can also send subtracted (or baseline corrected data) to the Profiles plot.
349 For the selected sample range, select the ‘Subtracted’ frames and send each
350 individual profile to the plot using the ‘Plot’ button.
351
352 * *Try:* Average these profiles and verify they match the subtracted
353 profiles for this data set generated previously.
354
355 |series_profile_main_plot_png|
356
357 #. Click on the colored line next
358 to the star in the Series control panel. In the line properties control panel
359 this brings up, change the Calc Marker color to something different. Add a
360 line to the Calc Markers by selecting line style ‘-’ (solid), and adjust
361 the line color to your liking.
362
363 * *Tip:* You can do the same thing to adjust the colors of the scattering
364 profiles and IFTs in the Profiles and IFT control tabs.
365
366 |series_color_png|
367
368 |series_line_props_png|
369
370 #. For certain beamlines (the BioCAT beamline at the APS and the MacCHESS
371 BioSAXS beamline at CHESS), RAW can automatically load in series data
372 from the series panel. This is typically used for online analysis while
373 data is being collected, but can be used to load in series you have
374 already collected as well.
375
376 #. We will load in the Bovine Serum Albumin (BSA) SEC-SAXS data contained
377 in the **sec_sample_2** data folder using this automatic method.
378 In the Series control panel, click the “Select” button. Navigate to
379 the **Tutorial_Data/series_data/sec_sample_2** folder and select any of
380 the **.dat** files in the folder.
381
382 * *Troubleshooting:* If you get an error message, it means you don't have
383 a configuration file loaded. Load the SAXS.cfg file referenced :ref:`earlier <s1p1>`.
384
385 * The configuration file must be set to either BioCAT or MacCHESS beamlines
386 for this method to work. Otherwise, RAW doesn't know how to create
387 all the filenames in a series from a single filename.
388
389 |series_panel_png|
390
391 #. The SEC-SAXS run will automatically load. Note that because SAXS data can be
392 reported with an arbitrary intensity scale, the total intensity of this
393 series is much larger than the previous series.
394
395 #. Right click on the **profile_001** series and select "Adjust scale, offset, q range".
396 This will open a window that allows you to adjust the overall scale and offset
397 for your series data, as well as the q range used for each type of profile
398 in the series data. Set the scale to 1800 and click "OK". You should see
399 that this scales the profiles_001 series to match the BSA series.
400
401 * *Tip:* This applies the scale, offset, and q range settings to every profile
402 in the series. So if you were now to send a profile to the Profiles plot,
403 it would have an overall scale factor of 1800 applied to it.
404
405 |series_scale_png|
406
407 #. Hide the first series (**profile_001**).
408
409 #. Select a good buffer region, and calculate the |Rg| and MW across the peak for the BSA.
410
411 * *Tip:* If you hover your mouse cursor over the info icon, you will see the buffer
412 range and window size used to calculate the parameters.
413
414 * *Question:* Is the BSA peak one species?
415
416 #. Find the useful region of the peak (constant |Rg|/MW), and send the buffer and sample
417 data to the Profiles plot. Carry out the standard |Rg| and MW analysis on the subtracted
418 scattering profile. For BSA, we expect |Rg| ~28 Å and MW ~66 kDa.
419
420 #. In the Series control tab, right click on the name of BSA curve in the list. Select export
421 data and save it in an appropriate location. This will save a CSV file with the frame
422 number, integrated intensity, radius of gyration, molecular weight, filename for each
423 frame number, and a few other items. This allows you to plot that data for publications,
424 align it with the UV trace, or whatever else you want to do with it.
425
426 * *Try:* Open the **.csv** file you just saved in Excel or Libre/Open Office Calc.
427
428 #. Select both items in the Series control panel list, and save them in the **series_data**
429 folder. This saves the series data in a form that can be quickly loaded by RAW.
430
431 * *Try:* Clear the Series data and then open one of your saved files from the Files tab
432 using either the “Plot” or “Plot Series” button.
433
434 #. Select just the **profile_001** item, right click and select "Save report". Check
435 the profiles associated with the SEC-SAXS series, so that you're saving a
436 report that includes both the series and the averaged subtracted profile.
437 Save the report as a pdf.
438
439 |series_report_png|
440
441 .. |series_load1_png| image:: images/series_load1.png
442 :width: 500 px
443 :target: ../_images/series_load1.png
444
445 .. |series_panel_png| image:: images/series_panel.png
446 :width: 400 px
447 :target: ../_images/series_panel.png
448
449 .. |series_plot_png| image:: images/series_plot.png
450 :target: ../_images/series_plot.png
451
452 .. |series_plot2_png| image:: images/series_plot2.png
453 :target: ../_images/series_plot2.png
454
455 .. |series_plot3_png| image:: images/series_plot3.png
456 :target: ../_images/series_plot2.png
457
458 .. |lc_analysis_main_png| image:: images/lc_analysis_main.png
459 :target: ../_images/series_analysis_main.png
460
461 .. |lc_analysis_buffer_auto_png| image:: images/lc_analysis_buffer_auto.png
462 :width: 300 px
463 :target: ../_images/series_panel.png
464
465 .. |lc_analysis_buffer_range_png| image:: images/lc_analysis_buffer_range.png
466 :target: ../_images/lc_analysis_buffer_range.png
467
468 .. |lc_analysis_buffer_adjust_png| image:: images/lc_analysis_buffer_adjust.png
469 :width: 300 px
470 :target: ../_images/lc_analysis_buffer_adjust.png
471
472 .. |lc_analysis_buffer_set_png| image:: images/lc_analysis_buffer_set.png
473 :width: 300 px
474 :target: ../_images/lc_analysis_buffer_set.png
475
476 .. |lc_analysis_subtracted_png| image:: images/lc_analysis_subtracted.png
477 :target: ../_images/lc_analysis_subtracted.png
478
479 .. |lc_analysis_sample_auto_png| image:: images/lc_analysis_sample_auto.png
480 :width: 300 px
481 :target: ../_images/lc_analysis_sample_auto.png
482
483 .. |lc_analysis_sample_region_png| image:: images/lc_analysis_sample_region.png
484 :target: ../_images/lc_analysis_sample_region.png
485
486 .. |lc_analysis_sample_region_plot_png| image:: images/lc_analysis_sample_region_plot.png
487 :target: ../_images/lc_analysis_sample_region_plot.png
488
489 .. |lc_analysis_sample_to_main_plot_png| image:: images/lc_analysis_sample_to_main_plot.png
490 :width: 300 px
491 :target: ../_images/lc_analysis_sample_to_main_plot.png
492
493 .. |lc_analysis_buffer_range_warning_png| image:: images/lc_analysis_buffer_range_warning.png
494 :width: 500 px
495 :target: ../_images/lc_analysis_buffer_range_warning.png
496
497 .. |lc_analysis_sample_range_warning_png| image:: images/lc_analysis_sample_range_warning.png
498 :width: 500 px
499 :target: ../_images/lc_analysis_sample_range_warning.png
500
501 .. |lc_analysis_buffer_pick_png| image:: images/lc_analysis_buffer_pick.png
502 :width: 300 px
503 :target: ../_images/lc_analysis_buffer_pick.png
504
505 .. |lc_analysis_two_buffers_png| image:: images/lc_analysis_two_buffers.png
506 :target: ../_images/lc_analysis_two_buffers.png
507
508 .. |lc_analysis_remove_sample_png| image:: images/lc_analysis_remove_sample.png
509 :width: 300 px
510 :target: ../_images/lc_analysis_remove_sample.png
511
512 .. |series_star_png| image:: images/series_star.png
513 :width: 400 px
514 :target: ../_images/series_star.png
515
516 .. |series_average_main_plot_png| image:: images/series_average_main_plot.png
517 :width: 400 px
518 :target: ../_images/series_average_main_plot.png
519
520 .. |series_profile_main_plot_png| image:: images/series_profile_main_plot.png
521 :width: 400 px
522 :target: ../_images/series_profile_main_plot.png
523
524 .. |series_color_png| image:: images/series_color.png
525 :width: 400 px
526 :target: ../_images/series_color.png
527
528 .. |series_line_props_png| image:: images/series_line_props.png
529 :width: 400 px
530 :target: ../_images/series_line_props.png
531
532 .. |series_scale_png| image:: images/series_scale.png
533 :width: 300 px
534 :target: ../_images/series_scale.png
535
536 .. |series_report_png| image:: images/series_report.png
537 :width: 450 px
538 :target: ../_images/series_report.png
539
540
541 .. |Rg| replace:: R\ :sub:`g`