fast_conformation.gui package

Submodules

fast_conformation.gui.analysis_config module

class fast_conformation.gui.analysis_config.AnalysisCategory(widget: Callable, tool_tip: str = '')[source]

Bases: object

Data class to represent an analysis category.

widget

A callable that returns the widget associated with the analysis.

Type:

Callable

tool_tip

A string that provides a description of the analysis category.

Type:

str

tool_tip: str = ''
widget: Callable
class fast_conformation.gui.analysis_config.AnalysisConfigWidget(job_manager)[source]

Bases: QWidget

The AnalysisConfigWidget class is responsible for providing a user interface to configure various analysis options. It contains general analysis options and specific configurations for different types of analysis (RMSF, RMSD, TMScore, etc.).

job_manager

A manager object that handles job submissions and execution.

show_plot(name, plot_widget)[source]

Display the plot for the given analysis.

Parameters:
  • name – The name of the analysis.

  • plot_widget – The widget containing the plot to be displayed.

class fast_conformation.gui.analysis_config.GeneralAnalysisWidget[source]

Bases: QWidget

GeneralAnalysisWidget provides the user interface for setting general analysis options like job name, output path, sequence pairs, and other configurations.

clear_seq_pairs()[source]

Clears the list of sequence pairs.

select_output_path()[source]

Opens a file dialog to select the output path directory.

select_predictions_path()[source]

Opens a file dialog to select the predictions path directory.

auto_detect_sequence_pairs()[source]

Automatically detects sequence pairs from the selected directory.

get_general_options()[source]

Returns a dictionary of the current general analysis options.

add_seq_pair()[source]

Adds a new sequence pair to the list.

remove_seq_pair()[source]

Removes a sequence pair from the list.

add_seq_pair(seq1='', seq2='')[source]

Adds a new sequence pair to the widget.

Parameters:
  • seq1 – The first sequence in the pair.

  • seq2 – The second sequence in the pair.

auto_detect_sequence_pairs(predictions_path)[source]

Automatically detects sequence pairs based on the structure of the predictions path directory.

Parameters:

predictions_path – The path to the directory containing predictions.

clear_seq_pairs()[source]

Clears all sequence pairs from the layout.

get_general_options()[source]

Retrieves the current general options set in the widget.

Returns:

A dictionary containing the general options.

remove_seq_pair(layout, seq_pair)[source]

Removes a sequence pair from the widget.

Parameters:
  • layout – The layout containing the sequence pair widgets.

  • seq_pair – The sequence pair to be removed.

select_output_path()[source]

Opens a file dialog to allow the user to select an output directory.

select_predictions_path()[source]

Opens a file dialog to allow the user to select a directory containing AF2 predictions.

class fast_conformation.gui.analysis_config.PCAWidget(general_options_getter, job_manager)[source]

Bases: AnalysisWidgetBase

Widget to configure and run PCA (Principal Component Analysis).

validate_inputs()[source]

Validates the inputs provided by the user.

get_specific_options()[source]

Retrieves the specific options for PCA analysis.

run_specific_analysis()[source]

Runs the PCA analysis with the given configuration.

get_specific_options()[source]

Retrieves the specific options for PCA analysis.

Returns:

A dictionary containing the specific options for PCA analysis.

run_specific_analysis(config)[source]

Runs the PCA analysis with the given configuration.

Parameters:

config – The configuration options for the PCA analysis.

validate_inputs()[source]

Validates the inputs provided by the user for PCA analysis.

Returns:

A list of errors if any input is invalid, otherwise an empty list.

class fast_conformation.gui.analysis_config.RMSD2DWidget(general_options_getter, job_manager)[source]

Bases: AnalysisWidgetBase

Widget to configure and run 2D RMSD (Root Mean Square Deviation) analysis.

validate_inputs()[source]

Validates the inputs provided by the user.

get_specific_options()[source]

Retrieves the specific options for 2D RMSD analysis.

run_specific_analysis()[source]

Runs the 2D RMSD analysis with the given configuration.

get_specific_options()[source]

Retrieves the specific options for 2D RMSD analysis.

Returns:

A dictionary containing the specific options for 2D RMSD analysis.

run_specific_analysis(config)[source]

Runs the 2D RMSD analysis with the given configuration.

Parameters:

config – The configuration options for the 2D RMSD analysis.

validate_inputs()[source]

Validates the inputs provided by the user for 2D RMSD analysis.

Returns:

A list of errors if any input is invalid, otherwise an empty list.

class fast_conformation.gui.analysis_config.RMSDAnalysisWidget(general_options_getter, job_manager)[source]

Bases: AnalysisWidgetBase

Widget to configure and run RMSD (Root Mean Square Deviation) analysis.

validate_inputs()[source]

Validates the inputs provided by the user.

get_specific_options()[source]

Retrieves the specific options for RMSD analysis.

run_specific_analysis()[source]

Runs the RMSD analysis with the given configuration.

get_specific_options()[source]

Retrieves the specific options for RMSD analysis.

Returns:

A dictionary containing the specific options for RMSD analysis.

run_specific_analysis(config)[source]

Runs the RMSD analysis with the given configuration.

Parameters:

config – The configuration options for the RMSD analysis.

validate_inputs()[source]

Validates the inputs provided by the user for RMSD analysis.

Returns:

A list of errors if any input is invalid, otherwise an empty list.

class fast_conformation.gui.analysis_config.RMSFAnalysisWidget(general_options_getter, job_manager)[source]

Bases: AnalysisWidgetBase

Widget to configure and run RMSF (Root Mean Square Fluctuation) analysis.

validate_inputs()[source]

Validates the inputs provided by the user.

get_specific_options()[source]

Retrieves the specific options for RMSF analysis.

run_specific_analysis()[source]

Runs the RMSF analysis with the given configuration.

get_specific_options()[source]

Retrieves the specific options for RMSF analysis.

Returns:

A dictionary containing the specific options for RMSF analysis.

run_specific_analysis(config)[source]

Runs the RMSF analysis with the given configuration.

Parameters:

config – The configuration options for the RMSF analysis.

validate_inputs()[source]

Validates the inputs provided by the user for RMSF analysis.

Returns:

A list of errors if any input is invalid, otherwise an empty list.

class fast_conformation.gui.analysis_config.TMSCOREWidget(general_options_getter, job_manager)[source]

Bases: AnalysisWidgetBase

Widget to configure and run TMScore analysis.

validate_inputs()[source]

Validates the inputs provided by the user.

get_specific_options()[source]

Retrieves the specific options for TMScore analysis.

run_specific_analysis()[source]

Runs the TMScore analysis with the given configuration.

get_specific_options()[source]

Retrieves the specific options for TMScore analysis.

Returns:

A dictionary containing the specific options for TMScore analysis.

run_specific_analysis(config)[source]

Runs the TMScore analysis with the given configuration.

Parameters:

config – The configuration options for the TMScore analysis.

validate_inputs()[source]

Validates the inputs provided by the user for TMScore analysis.

Returns:

A list of errors if any input is invalid, otherwise an empty list.

class fast_conformation.gui.analysis_config.TrajectorySavingWidget(general_options_getter, job_manager)[source]

Bases: AnalysisWidgetBase

Widget to configure and run trajectory saving.

validate_inputs()[source]

Validates the inputs provided by the user.

get_specific_options()[source]

Retrieves the specific options for trajectory saving.

run_specific_analysis()[source]

Runs the trajectory saving process with the given configuration.

get_specific_options()[source]

Retrieves the specific options for trajectory saving.

Returns:

A dictionary containing the specific options for trajectory saving.

run_specific_analysis(config)[source]

Runs the trajectory saving process with the given configuration.

Parameters:

config – The configuration options for trajectory saving.

validate_inputs()[source]

Validates the inputs provided by the user for trajectory saving.

Returns:

A list of errors if any input is invalid, otherwise an empty list.

class fast_conformation.gui.analysis_config.TwoTMScoreWidget(general_options_getter, job_manager)[source]

Bases: AnalysisWidgetBase

Widget to configure and run 2D TMScore analysis.

validate_inputs()[source]

Validates the inputs provided by the user.

get_specific_options()[source]

Retrieves the specific options for 2D TMScore analysis.

run_specific_analysis()[source]

Runs the 2D TMScore analysis with the given configuration.

get_specific_options()[source]

Retrieves the specific options for 2D TMScore analysis.

Returns:

A dictionary containing the specific options for 2D TMScore analysis.

run_specific_analysis(config)[source]

Runs the 2D TMScore analysis with the given configuration.

Parameters:

config – The configuration options for the 2D TMScore analysis.

validate_inputs()[source]

Validates the inputs provided by the user for 2D TMScore analysis.

Returns:

A list of errors if any input is invalid, otherwise an empty list.

fast_conformation.gui.build_msa module

class fast_conformation.gui.build_msa.MSAOptionsWidget(job_manager)[source]

Bases: AnalysisWidgetBase

MSAOptionsWidget provides a user interface for configuring and running multiple sequence alignment (MSA) jobs using either jackhmmer or mmseqs2.

init_ui()[source]

Initializes the UI components.

select_sequence_path()[source]

Opens a file dialog to select the sequence file.

select_output_path()[source]

Opens a file dialog to select the output directory.

toggle_additional_options()[source]

Toggles visibility of additional options based on the selected MSA type.

validate_inputs()[source]

Validates the user inputs.

get_specific_options()[source]

Retrieves the specific options for MSA analysis.

run_specific_analysis()[source]

Runs the specific MSA analysis.

run_analysis()[source]

Validates inputs, merges configurations, and starts the MSA job.

get_specific_options()[source]

Retrieves the specific options set by the user for MSA analysis.

Returns:

A dictionary containing the specific MSA options.

init_ui()[source]

Initializes the user interface components for the widget.

run_analysis()[source]

Validates the inputs, merges configurations, and starts the MSA job.

run_specific_analysis()[source]

Runs the specific MSA analysis based on the provided configuration.

Parameters:

config – A dictionary containing the configuration options for the MSA analysis.

select_output_path()[source]

Opens a file dialog to allow the user to select an output directory.

select_sequence_path()[source]

Opens a file dialog to allow the user to select a sequence file.

toggle_additional_options()[source]

Toggles the visibility of additional options based on the selected MSA type.

validate_inputs()[source]

Validates the user inputs to ensure they are correct before running the MSA job.

Returns:

A list of error messages if validation fails, otherwise an empty list.

fast_conformation.gui.build_msa.run_msa_job(config)[source]

Runs the MSA job based on the configuration provided.

Parameters:

config – A dictionary containing the configuration options for the MSA job.

fast_conformation.gui.dock_widget module

class fast_conformation.gui.dock_widget.Category(widget: Callable[[JobManager], QWidget], tool_tip: str = '')[source]

Bases: object

A data class that represents a category in the main widget.

widget

A callable that returns a QWidget, taking a JobManager as an argument.

Type:

Callable[[fast_conformation.gui.job_manager.JobManager], PyQt5.QtWidgets.QWidget]

tool_tip

A string representing the tooltip text for the category.

Type:

str

tool_tip: str = ''
widget: Callable[[JobManager], QWidget]
class fast_conformation.gui.dock_widget.MainWidget(parent, job_manager)[source]

Bases: QWidget

MainWidget serves as the central widget for managing different tasks such as building MSA, making predictions, and analyzing results. It provides an interface for selecting tasks and displaying the appropriate configuration widgets.

create_dock_widget()[source]

Creates a new dock widget for selecting options.

create_new_job_widget()[source]

Creates the widget that allows the user to select a new job.

wrap_with_border()[source]

Wraps a given widget with a border layout.

_on_item_clicked()[source]

Handles the event when an item in the icon grid is clicked.

clear_dock_widget()[source]

Clears the contents of the current dock widget.

show_job_status_page()[source]

Displays the job status page in a dock widget.

show_new_job_page()[source]

Displays the new job selection page in a dock widget.

clear_layout()[source]

Clears the contents of a given layout.

clear_dock_widget()[source]

Clears the contents of the current dock widget, removing all its child widgets.

clear_layout(layout, start_index=0)[source]

Clears the contents of a given layout, starting from a specified index.

Parameters:
  • layout – The QLayout to clear.

  • start_index – The index from which to start clearing the layout.

create_dock_widget()[source]

Creates a new dock widget for selecting options. If an existing dock widget is present, it is cleared before creating the new one.

create_new_job_widget()[source]

Creates a widget that allows the user to select a new job.

Returns:

A QWidget that contains the options for selecting a new job.

Return type:

new_job_widget

show_job_status_page()[source]

Displays the job status page in a dock widget.

show_new_job_page()[source]

Displays the new job selection page in a dock widget. If the dock widget already exists, it is made visible again.

wrap_with_border(widget)[source]

Wraps a given widget with a border layout.

Parameters:

widget – The QWidget to be wrapped.

Returns:

A QWidget that wraps the input widget in a border layout.

Return type:

container_widget

fast_conformation.gui.icons module

class fast_conformation.gui.icons.Icons(parent=None)[source]

Bases: QListWidget

Icons is a custom QListWidget that displays a grid of icons with labels. It supports adding individual items with optional tooltips and styling.

addItem()[source]

Adds an item with a label and an optional tooltip.

addItems()[source]

Adds multiple items to the list using a dictionary of labels.

addItem(label: str, tool_tip: str | None = None)[source]

Adds an item to the QListWidget with a label and an optional tooltip.

Parameters:
  • label – The label for the item.

  • tool_tip – Optional tooltip text for the item.

addItems(labels: dict) None[source]

Adds multiple items to the QListWidget from a dictionary of labels.

Parameters:

labels – A dictionary where the keys are labels and the values can contain optional tooltips.

fast_conformation.gui.job_manager module

class fast_conformation.gui.job_manager.JobItemWidget(job_id, status, message, job_manager, name)[source]

Bases: QWidget

Represents a single job item in the JobStatusPage, displaying the job’s name, status, and a button to view the job’s log.

update_status()[source]

Updates the displayed status and message of the job.

show_log()[source]

Displays the log of the job in a new dialog.

show_log()[source]

Displays the log of the job in a new dialog window.

update_status(status, message)[source]

Updates the displayed status and message of the job.

Parameters:
  • status – The new status of the job as a string.

  • message – A string message about the job’s outcome.

class fast_conformation.gui.job_manager.JobManager[source]

Bases: QObject

Manages job execution, monitoring, and status updates within a Qt application. It handles starting jobs, updating statuses, and emitting signals.

job_finished

A PyQt signal emitted when a job finishes, with job_id, success, and message.

job_started

A PyQt signal emitted when a job starts, with the job name.

get_job_log(job_id)[source]

Retrieves the log of the specified job.

Parameters:

job_id – The unique identifier of the job.

Returns:

The log of the job as a string.

get_job_name(job_id)[source]

Retrieves the name of the specified job.

Parameters:

job_id – The unique identifier of the job.

Returns:

The name of the job as a string.

get_job_status(job_id)[source]

Retrieves the current status of the specified job.

Parameters:

job_id – The unique identifier of the job.

Returns:

The status of the job as a string.

job_finished

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

Type:

pyqtSignal(*types, name

Type:

str = …, revision

job_started

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

Type:

pyqtSignal(*types, name

Type:

str = …, revision

monitor_queue()[source]

Monitors the queue for job status updates and emits the job_finished signal when a job is completed or fails.

run_job(target, args, job_name)[source]

Runs a job using the backend and emits a signal when the job starts.

Parameters:
  • target – The function to execute as the job.

  • args – A tuple of arguments to pass to the target function.

  • job_name – A string name for the job.

Returns:

The unique identifier for the job.

Return type:

job_id

stop()[source]

Stops the monitoring thread for job status updates.

update_job_status(job_id, success, message)[source]

Emits the job_finished signal with the job’s status.

Parameters:
  • job_id – The unique identifier of the job.

  • success – A boolean indicating if the job was successful.

  • message – A string message about the job’s outcome.

class fast_conformation.gui.job_manager.JobManagerBackend[source]

Bases: object

Manages the backend operations of job execution, including job tracking, status updates, and log management.

jobs

A dictionary to store information about the jobs.

manager

A multiprocessing.Manager instance to manage shared resources.

queue

A multiprocessing.Queue for communication between processes.

get_job_log(job_id)[source]

Retrieves the log of the specified job.

Parameters:

job_id – The unique identifier of the job.

Returns:

The log of the job as a string, or None if the job_id is not found.

get_job_name(job_id)[source]

Retrieves the name of the specified job.

Parameters:

job_id – The unique identifier of the job.

Returns:

The name of the job as a string, or None if the job_id is not found.

get_job_status(job_id)[source]

Retrieves the current status of the specified job.

Parameters:

job_id – The unique identifier of the job.

Returns:

The status of the job as a string, or None if the job_id is not found.

run_job(target, args, job_name)[source]

Runs a job in a separate process, ensuring that the job name is unique and that the arguments are pickleable.

Parameters:
  • target – The function to execute as the job.

  • args – A tuple of arguments to pass to the target function.

  • job_name – A string name for the job.

Returns:

A unique identifier for the job.

Return type:

job_id

Raises:

ValueError – If job_name is not a string, or if arguments are not pickleable.

update_job_status(job_id, status)[source]

Updates the status of the specified job.

Parameters:
  • job_id – The unique identifier of the job.

  • status – The new status of the job as a string.

class fast_conformation.gui.job_manager.JobStatusPage(job_manager)[source]

Bases: QWidget

Displays the status of all jobs in the JobManager. It allows users to view the current status and logs of jobs.

refresh_job_statuses()[source]

Refreshes the list of job statuses.

update_job_status()[source]

Updates the displayed status of a specific job.

add_job_item()[source]

Adds a new job item to the list.

add_job_item(job_id, status, message, name)[source]

Adds a new job item to the list widget.

Parameters:
  • job_id – The unique identifier of the job.

  • status – The current status of the job as a string.

  • message – A string message about the job’s outcome.

  • name – The name of the job.

refresh_job_statuses()[source]

Clears and repopulates the list widget with the current job statuses.

update_job_status(job_id, success, message)[source]

Updates the status of a specific job in the list widget.

Parameters:
  • job_id – The unique identifier of the job.

  • success – A boolean indicating if the job was successful.

  • message – A string message about the job’s outcome.

fast_conformation.gui.job_manager.job_wrapper(job_id, target, log_list, queue, *args)[source]

Wraps the execution of a job to capture stdout and stderr output into a log list, and handles exceptions and job completion status.

Parameters:
  • job_id – A unique identifier for the job.

  • target – The function to be executed as the job.

  • log_list – A shared list to capture log messages.

  • queue – A multiprocessing queue to report the job status.

  • *args – Additional arguments to pass to the target function.

fast_conformation.gui.make_predictions module

class fast_conformation.gui.make_predictions.MakePredictionsWidget(job_manager, general_options_getter=None, *args, **kwargs)[source]

Bases: AnalysisWidgetBase

The MakePredictionsWidget class provides a user interface for configuring and running predictions using different MSA (Multiple Sequence Alignment) options and settings.

init_ui()[source]

Initializes the user interface components.

select_msa_path()[source]

Opens a file dialog to select the MSA file.

select_output_path()[source]

Opens a file dialog to select the output directory.

add_seq_pair()[source]

Adds a new sequence pair input to the interface.

remove_seq_pair()[source]

Removes an existing sequence pair input.

validate_inputs()[source]

Validates the user inputs to ensure they are correct.

get_specific_options()[source]

Retrieves the specific options set by the user.

run_analysis()[source]

Validates inputs, merges configurations, and starts the prediction job.

get_seq_pairs()[source]

Retrieves the sequence pairs input by the user.

add_seq_pair(seq1='', seq2='')[source]

Adds a new sequence pair input to the interface.

Parameters:
  • seq1 – The first sequence in the pair.

  • seq2 – The second sequence in the pair.

get_seq_pairs()[source]

Retrieves the sequence pairs input by the user.

Returns:

A list of sequence pairs, each represented as a list of two integers.

get_specific_options()[source]

Retrieves the specific options set by the user.

Returns:

A dictionary containing the options for the prediction job.

init_ui()[source]

Initializes the user interface components and layout for the widget.

remove_seq_pair(layout)[source]

Removes an existing sequence pair input from the interface.

Parameters:

layout – The layout containing the sequence pair to be removed.

run_analysis()[source]

Validates inputs, merges configurations, and starts the prediction job.

select_msa_path()[source]

Opens a file dialog to allow the user to select the MSA file.

select_output_path()[source]

Opens a file dialog to allow the user to select the output directory.

validate_inputs()[source]

Validates the user inputs to ensure they are correct.

Returns:

A list of error messages if validation fails, otherwise an empty list.

fast_conformation.gui.plot_widget module

class fast_conformation.gui.plot_widget.PlotWidget(parent=None)[source]

Bases: GraphicsLayoutWidget

PlotWidget is a custom widget for plotting data using pyqtgraph. It supports both line plots and scatter plots with optional color mapping and colorbars.

add_plot()[source]

Adds a new plot to the widget.

add_borders()[source]

Adds borders to the plot.

add_scatter()[source]

Adds a scatter plot to the plot item.

add_line()[source]

Adds a line plot to the plot item.

add_colorbar()[source]

Adds a colorbar to the widget.

add_borders(plot)[source]

Adds borders to the given plot.

Parameters:

plot – The plot item to which borders will be added.

add_colorbar(resids)[source]

Adds a colorbar to the widget based on residual values.

Parameters:

resids – Residual values to map the colorbar.

Returns:

The created colorbar item.

add_line(plot_item, x_data, y_data, color, label, lstyle=None)[source]

Adds a line plot to the given plot item.

Parameters:
  • plot_item – The plot item to which the line plot will be added.

  • x_data – The data for the x-axis.

  • y_data – The data for the y-axis.

  • color – The color of the line.

  • label – The label for the legend.

  • lstyle – The line style (e.g., solid, dashed).

add_plot(x_data, y_data, title, x_label, y_label, color=None, label=None, resids=None, scatter=False, colorbar=False)[source]

Adds a new plot to the widget.

Parameters:
  • x_data – The data for the x-axis.

  • y_data – The data for the y-axis.

  • title – The title of the plot.

  • x_label – The label for the x-axis.

  • y_label – The label for the y-axis.

  • color – The color of the line or scatter points.

  • label – The label for the legend.

  • resids – Residual values for coloring scatter points.

  • scatter – Whether to create a scatter plot.

  • colorbar – Whether to add a colorbar for the scatter plot.

Returns:

The created plot item.

add_scatter(plot_item, x_data, y_data, resids=None, color='b', colorbar=False, label=None)[source]

Adds a scatter plot to the given plot item.

Parameters:
  • plot_item – The plot item to which the scatter plot will be added.

  • x_data – The data for the x-axis.

  • y_data – The data for the y-axis.

  • resids – Residual values for coloring the scatter points.

  • color – The color of the scatter points.

  • colorbar – Whether to add a colorbar.

  • label – The label for the legend.

Returns:

The created scatter plot item.

fast_conformation.gui.run_gui module

class fast_conformation.gui.run_gui.BackgroundWidget(parent=None)[source]

Bases: QWidget

A custom QWidget that displays a background image in the main window.

paintEvent()[source]

Handles the painting of the background image.

paintEvent(event)[source]

Handles the painting of the background image, centering it in the widget.

Parameters:

event – The paint event.

class fast_conformation.gui.run_gui.MainFrame[source]

Bases: QMainWindow

MainFrame is the main application window for the FastConformation application. It contains the central widget, toolbar, and dock widgets for managing different tasks.

create_terminal_dock()[source]

Creates a dock widget for displaying the analysis log (terminal output).

show_terminal()[source]

Toggles the visibility of the terminal dock widget.

apply_styles()[source]

Applies custom styles to the main window and widgets.

show_home_page()[source]

Displays the home page, hiding other dock widgets.

show_new_job_page()[source]

Displays the new job page, allowing users to submit new jobs.

show_job_status_page()[source]

Displays the job status page, showing the status of submitted jobs.

show_plot()[source]

Displays a plot in a dock widget.

show_dock_widget()[source]

Displays a specified dock widget.

hide_all_dock_widgets()[source]

Hides all currently visible dock widgets.

set_initial_window_size()[source]

Sets the initial size of the main window.

apply_styles()[source]

Applies custom styles to the main window and its widgets.

create_terminal_dock()[source]

Creates a dock widget for displaying the analysis log (terminal output).

hide_all_dock_widgets()[source]

Hides all currently visible dock widgets.

set_initial_window_size()[source]

Sets the initial size of the main window based on the screen size.

show_dock_widget(title, widget_callable)[source]

Displays a specified dock widget. If it does not exist, creates and displays it.

Parameters:
  • title – The title of the dock widget.

  • widget_callable – A callable that returns the content widget for the dock.

show_home_page()[source]

Displays the home page, hiding all other dock widgets.

show_job_status_page()[source]

Displays the job status page, hiding other dock widgets.

show_new_job_page()[source]

Displays the new job submission page, hiding other dock widgets.

show_plot(title, content_widget)[source]

Displays a plot in a new dock widget.

Parameters:
  • title – The title of the dock widget.

  • content_widget – The widget containing the plot content.

show_terminal()[source]

Toggles the visibility of the terminal dock widget.

class fast_conformation.gui.run_gui.QPlainTextEditLogger(text_edit)[source]

Bases: object

A custom logger that redirects stdout and stderr to a QPlainTextEdit widget.

write()[source]

Appends a message to the text edit widget.

flush()[source]

Dummy method to comply with the logging interface.

flush()[source]

Dummy method to comply with the logging interface.

write(message)[source]

Appends a message to the text edit widget.

Parameters:

message – The message to append.

fast_conformation.gui.run_gui.handle_sigint(signal, frame)[source]

Handles the SIGINT signal, allowing the application to shut down gracefully.

Parameters:
  • signal – The signal received.

  • frame – The current stack frame.

fast_conformation.gui.run_gui.main()[source]

The main entry point for the application. It sets up the application, handles signals, and starts the main event loop.

fast_conformation.gui.widget_base module

class fast_conformation.gui.widget_base.AnalysisWidgetBase(job_manager, general_options_getter=False)[source]

Bases: QWidget

A base class for analysis widgets that provides common functionality such as input validation, configuration merging, and job management.

job_manager

An instance of the JobManager responsible for managing job execution.

timer

A QTimer instance that periodically checks the job manager queue.

validate_inputs()[source]

Validates user inputs. Should be overridden by subclasses.

run_analysis()[source]

Validates inputs, merges configurations, and runs the analysis.

get_specific_options()[source]

Returns specific options for the analysis. Should be overridden by subclasses.

run_specific_analysis()[source]

Runs the specific analysis. Should be overridden by subclasses.

show_error_message()[source]

Displays an error message dialog.

show_info_message()[source]

Displays an informational message dialog.

on_job_finished()[source]

Handles the job finished event, displaying a message to the user.

check_job_manager_queue()[source]

Periodically checks the job manager queue for updates.

check_job_manager_queue()[source]

Periodically checks the job manager queue for updates. This method can be overridden or extended if needed.

get_specific_options()[source]

Retrieves specific options for the analysis. This method should be overridden by subclasses to provide specific options.

Returns:

A dictionary containing specific options for the analysis.

on_job_finished(job_id, success, message)[source]

Handles the job finished event, displaying an informational message to the user.

Parameters:
  • job_id – The ID of the finished job.

  • success – A boolean indicating whether the job was successful.

  • message – A message describing the outcome of the job.

run_analysis()[source]

Validates inputs, merges general and specific configurations, and runs the analysis. If validation fails, an error message is displayed.

run_specific_analysis(config)[source]

Runs the specific analysis using the provided configuration. This method should be overridden by subclasses to implement specific analysis logic.

Parameters:

config – A dictionary containing the merged configuration options.

show_error_message(errors)[source]

Displays an error message dialog with a list of errors.

Parameters:

errors – A list of error messages to display.

show_info_message(message)[source]

Displays an informational message dialog.

Parameters:

message – The message to display.

validate_inputs()[source]

Validates user inputs before running the analysis. This method should be overridden by subclasses to provide specific validation logic.

Returns:

A list of error messages if validation fails, otherwise an empty list.

fast_conformation.gui.widget_base.merge_configs(general_options, specific_options)[source]

Merges two dictionaries, with values from the specific_options dictionary overriding those in the general_options dictionary.

Parameters:
  • general_options – A dictionary containing general configuration options.

  • specific_options – A dictionary containing specific configuration options.

Returns:

A dictionary containing the merged configuration options.

Module contents