Analysis scripts
Kymograph
This script processes Images, with Line or PolyLine ROIs to create kymographs.
Kymographs are created in the form of new OMERO Images, single Z and T, same sizeC as input.
- Kymograph.get_line_data(image, x1, y1, x2, y2, line_w=2, the_z=0, the_c=0, the_t=0)
Grab pixel data covering the specified line, and rotates it horizontally.
Uses current rendering settings and returns 8-bit data. Rotates it so that x1,y1 is to the left, Returning a numpy 2d array. Used by Kymograph.py script. Uses PIL to handle rotating and interpolating the data. Converts to numpy to PIL and back (may change dtype.)
- Parameters
pixels – PixelsWrapper object
y2 (x1, y1, x2,) – Coordinates of line
line_w – Width of the line we want
the_z – Z index within pixels
the_c – Channel index
the_t – Time index
- Kymograph.lines_kymograph(conn, script_params, image, lines, line_width, dataset)
Create a new kymograph Image from one or more lines.
If one line, use this for every time point. If multiple lines, use the first one for length and all the remaining ones for x1,y1 and direction, making all subsequent lines the same length as the first.
- Kymograph.polyline_kymograph(conn, script_params, image, polylines, line_width, dataset)
Create a new kymograph Image from one or more polylines.
- Parameters
polylines – map of theT: {theZ:theZ, points: list of (x,y)}
- Kymograph.process_images(conn, script_params)
Process each image passed to script, generating new Kymograph images.
- Kymograph.run_script()
The main entry point of the script, as called by the client.
Called via the scripting service, passing the required parameters.
Kymograph Analysis
This script is the second Kymograph script, for analyzing lines drawn on kymograph images that have been created by the ‘Kymograph.py’ Script.
- Kymograph_Analysis.run_script()
The main entry point of the script, as called by the client via the scripting service, passing the required parameters.
Plot Profile
This script processes Images which have Line or PolyLine ROIs, saving the intensity of chosen channels to Excel (csv) files.
- Plot_Profile.process_lines(conn, script_params, image, lines, line_width, fout)
Creates a new kymograph Image from one or more lines. If one line, use this for every time point. If multiple lines, use the first one for length and all the remaining ones for x1,y1 and direction, making all subsequent lines the same length as the first.
- Plot_Profile.process_polylines(conn, script_params, image, polylines, line_width, fout)
Output data from one or more polylines on an image. Attach csv to image.
- Parameters
polylines – list of theT:T, theZ:Z, points: list of (x,y)}
- Plot_Profile.run_script()
The main entry point of the script, as called by the client via the scripting service, passing the required parameters.