appliedchemlabwork_tayra.D3 package#
Module contents#
The D3 experiment analysis.
Module Functions#
|
Estimates the length of the DNA from the line data. |
|
Find bands as bounding boxes. |
|
Plots the data from the |
|
The main window of the GUI tools. |
- class appliedchemlabwork_tayra.D3.SuperWindow(parent: QWidget | None = None, flags: WindowType = <WindowType.Window: 1>)[source]#
Bases:
QMainWindowThe main window of the GUI tools.
- Parameters:
- parentQWidget | None
The parent widget.
- flagsWindowType | None
The flags.
- Attributes:
- file_sourceQLineEdit
The text box for the file path to the source image.
- result_locationstr | None
The result output location.
- pick_source_btnQPushButton
The file picking button to open the source image.
- start_btnQPushButton
The button to start detection process.
- imgQImage
The image on the window.
Methods
__init__(parent=None,flags=…)
Initializes the class.
createWindowContents()
Creates the window main contents.
pick_file()
Picks the file.
- createWindowContents()[source]#
Creates the window’s main contents.
This method defines the window’s
CentralWidgetcontents.
- file_source: QLineEdit#
- img: QImage#
- pick_source_btn: QPushButton#
- result_location: str | None#
- start_btn: QPushButton#
- appliedchemlabwork_tayra.D3.estimate(slope: floating[Any] | float, intercept: floating[Any] | float, df: DataFrame) DataFrame[source]#
Estimates the length of the DNA from the line data.
- Parameters:
- slopefloating number
The slope of the line.
- interceptfloating number
The intercept of the line.
- dfDataFrame
The table data.
- Returns:
- dfDataFrame
Modified DataFrame object.
- appliedchemlabwork_tayra.D3.find_boxes(filepath: str, save_to: str, fsave: str = './runs/detect/predict')[source]#
Find bands as bounding boxes.
- Parameters:
- filepathstr
The path to the image file containing the DNA electrophoresis bands.
- save_tostr
The directory to save the data.
- fsavestr, optional
The directory to save the result.
- Returns:
- dataList of Results
The list of the results.
- Raises:
- FileNotFoundError
The image file was not found.
- appliedchemlabwork_tayra.D3.plot_dna(bdata: DataFrame, style: str = 'default') tuple[_Float1D, _Float1D][source]#
Plots the data from the
DataFrameand returns the linear regression result.- Parameters:
- bdataDataFrame
The
DataFrameof the bands of DNA ladder.- styleValid MatplotLib style
The plotting style.
- Returns:
- coeffsArray in shape (2,)
The coefficients.
- errArray in shape (2,)
The standard errors.
Notes
The
bdataparameter must be the following shape.Length / bp
Location
12345
89.07
…
…