transphire package (Developer area)¶
Subpackages¶
Submodules¶
transphire.buttoncontainer module¶
transphire.emaildialog module¶
TranSPHIRE is supposed to help with the cryo-EM data collection Copyright (C) 2017 Markus Stabrin
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
transphire.framecontainer module¶
TranSPHIRE is supposed to help with the cryo-EM data collection Copyright (C) 2017 Markus Stabrin
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
-
class
transphire.framecontainer.
FrameContainer
(parent=None, **kwargs)[source]¶ Bases:
PyQt5.QtWidgets.QWidget
FrameContainer widget.
Inherits from: QWidget
Buttons: Add - Add FrameWidget widget to the layout
LineEdit: First frame - First frame to use for a smaller amount of dose Last frame - Last frame to use for a smaller amount of dose
-
add_widget
()[source]¶ Add a FrameWidget widget to the dynamic layout. Called when the add button is clicked.
Arguments: None
Returns: None
-
enable
(var, use_all)[source]¶ Enable or disable the buttons and widgets.
Arguments: var - State of buttons (True or False) use_all - Disable all buttons (True) or only some (False)
Return: None
-
transphire.framewidget module¶
TranSPHIRE is supposed to help with the cryo-EM data collection Copyright (C) 2017 Markus Stabrin
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
-
class
transphire.framewidget.
FrameWidget
(first, last, dose_weight, default, parent=None)[source]¶ Bases:
PyQt5.QtWidgets.QWidget
FrameWidget widget.
Inherits from: QWidget
Buttons: Delete - Delete this instance of the variable.
Signals: delete - Delete this instance of the variable (class instance).
-
delete
¶
-
transphire.inputbox module¶
TranSPHIRE is supposed to help with the cryo-EM data collection Copyright (C) 2017 Markus Stabrin
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
-
class
transphire.inputbox.
InputBox
(is_password, restart_names=None, is_stop=False, settings=None, parent=None)[source]¶ Bases:
PyQt5.QtWidgets.QDialog
Show a message box with an input field.
Inherits: QDialog
Signals: None
-
setDefault
(text)[source]¶ Set the default values for the QLineEdit.
text - Text to put
Returns: None
-
transphire.loadcontent module¶
TranSPHIRE is supposed to help with the cryo-EM data collection Copyright (C) 2017 Markus Stabrin
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
-
class
transphire.loadcontent.
LoadContent
(typ, separator, settings_folder, hdd=None, parent=None)[source]¶ Bases:
PyQt5.QtWidgets.QWidget
LoadContent widget. Widget used for the LoadContentContainer.
Inherits from: QWidget
Signals: delete - Emited, when the delete button is pressed (object)
-
delete
¶
-
transphire.loadcontentcontainer module¶
TranSPHIRE is supposed to help with the cryo-EM data collection Copyright (C) 2017 Markus Stabrin
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
-
class
transphire.loadcontentcontainer.
LoadContentContainer
(typ, template_name, templates, settings_folder, is_shared, default_file, parent=None)[source]¶ Bases:
PyQt5.QtWidgets.QWidget
LoadContentContainer widget Inherits from: QWidget
Buttons: Save settings - Save currently defined settings to settings files Add - Add new Mount entry (Case Mount)
-
add_widget
(name=None, hdd=None)[source]¶ Add new widget to layout.
Arguments: name - Name of new mount point (default None) hdd - Is hdd entry (default None)
Return: None
-
get_settings
()[source]¶ Get settings from tab or normal normal widget.
Arguments: None
Return: List of widget settings
-
get_settings_tab
()[source]¶ Get settings from tab widget.
Arguments: None
Return: List of widget settings
-
get_settings_widget
()[source]¶ Get settings from normal widget.
Arguments: None
Return: List of widget settings
-
remove_widget
(separator)[source]¶ Remove widget from layout.
Arguments: separator - List of seperator widgets
Return: None
-
transphire.loadwindow module¶
TranSPHIRE is supposed to help with the cryo-EM data collection Copyright (C) 2017 Markus Stabrin
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
-
class
transphire.loadwindow.
DefaultSettings
(apply, settings_directory, template_name, parent=None)[source]¶ Bases:
PyQt5.QtWidgets.QDialog
DefaultSettings dialog. Dialog used to enter default values.
Inherits from: QDialog
-
accept_apply
()[source]¶ Set the apply settings variable to True before saving.
Argumens: None
Return: None
-
add_tab
(widget, name)[source]¶ Add a new widget to the tab widget
Arguments: widget - Widget to add as new tab Name - Name of the new tab
Return: None
-
check_modified_widgets
(done)[source]¶ Check, if a widget is modified before saving.
Arguments: done - If True, close after input, else apply settings.
Return: True if no modification, else False
-
fill_default_dict
()[source]¶ Fill the default dict with the information from the function dict.
Arguments: None - The self.default_dict is used
Returns: None - The self.default_dict is changed in-place
-
get_apply
()[source]¶ Getter for the self.apply variable.
Arguments: None
Return: Content of self.apply
-
static
get_content_default
(edit_settings, apply, settings_folder, template_name)[source]¶ Staticmethod to open the default content dialog.
Arguments: edit_settings - If True, open default settings dialog, else just return content apply - Apply settings after closing the default settings dialog settings_folder - Folder to store the default settings
Return: Content for the widgets, Content of the apply variable
-
transphire.logviewer module¶
transphire.logviewerdialog module¶
transphire.mainwindow module¶
TranSPHIRE is supposed to help with the cryo-EM data collection Copyright (C) 2017 Markus Stabrin
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
-
class
transphire.mainwindow.
MainWindow
(content_raw, content_gui, content_pipeline, settings_folder, mount_directory, template_name, version, n_feedbacks, parent=None)[source]¶ Bases:
PyQt5.QtWidgets.QMainWindow
MainWindow widget. Connects GUI and worker threads.
Inherits from: QMainWindow
Buttons: None
Signals: None
-
abort_finished
(*args, **kwargs)[source]¶ Set the mount worker abort variable to True.
Arguments: None
Return: None
-
check_quota
()[source]¶ Check the quota for the project and scratch directory.
Arguments: None
Return: None
-
closeEvent
(event)[source]¶ Quit threads before close and check if the process is still running
Arguments: event - QCloseEvent.
Return: None
-
continue_dialog
(text1, text2, is_stop=False, is_restart=False, settings=None)[source]¶ Check if the user wants to run the continue mode.
Arguments: text1 - Dialog window name. text2 - Text of the dialog.
Return: True, if the input is YES!
-
enable
(var, use_all=False)[source]¶ Enable or disable widgets
Arguments: var - Enable status of the widgets. use_all - Disable/Enable everything (Default False)
Return: None
-
fill_content
(content_gui)[source]¶ Fill the layouts of the central widget.
Arguments: content_gui - Content used to create the GUI outfit.
Return: List of errors that occured.
-
get_start_settings
(monitor=False)[source]¶ Start TranSPHIRE processing.
Arguments: None
Return: None
-
load
(file_name=None)[source]¶ Load settings from settings file.
Arguments: file_name - Name of the file (default None)
Return: None
-
monitor
(start)[source]¶ Start the TranSPHIRE monitor processing.
Arguments: start - True if start, False if stop
Returns: None
-
postprocess_content
(error_list)[source]¶ Do postprocessing of creating GUI content, like connecting signals.
Arguments: error_list - List of errors that occured.
Return: True, if saving was succesful.
-
reset_gui
(template_name, load_file)[source]¶ Reset the content of the mainwindow.
Arguments: template_name - Name of the template to load load_file - Settings file (default None).
Return: None
-
save
(file_name=None, temp=False, interactive=False, do_message=True)[source]¶ Save GUI status to file.
Arguments: file_name - File name to save settings to. temp - File is a temporary save file.
Return: True, if saving was succesful.
-
save_temp_settings
()[source]¶ Save the status of the GUI in a temp file.
Arguments: None
Return: True, if saving was succesful.
-
set_central_widget
()[source]¶ Reset the central widget of the MainWindow.
Arguments: None
Return: None
-
set_design
(settings)[source]¶ Load settings from settings file.
Arguments: settings - Settings as dictionary.
Return: None
-
set_layout_structure
()[source]¶ Setup the layout structure for the central widget.
Arguments: None
Return: None
-
set_settings
(settings)[source]¶ Load settings from settings file.
Arguments: settings - Settings as dictionary.
Return: None
-
static
settings_to_dict
(settings)[source]¶ Make the settings readable for the widgets set settings method.
Arguments: settings - Settings as dictionary.
Return: None
-
sig_reset
¶
-
transphire.messagebox module¶
TranSPHIRE is supposed to help with the cryo-EM data collection Copyright (C) 2017 Markus Stabrin
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
transphire.mountcalculator module¶
TranSPHIRE is supposed to help with the cryo-EM data collection Copyright (C) 2017 Markus Stabrin
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
-
class
transphire.mountcalculator.
MountCalculator
(name, parent=None)[source]¶ Bases:
PyQt5.QtCore.QObject
MountCalculator object.
Inherits from: QObject
Buttons: None
Signals: sig_finished - Signal emitted, if process finished (str, str, str)
-
calculate_df_quota
(key, mount_folder)[source]¶ Calculate the quota with the help of the df command.
Arguments: key - Mount point key mount_folder - Mount folder
Return: None
-
calculate_get_quota
(key, quota, mount_folder)[source]¶ Calculate the quota by calculating the size of every file.
Arguments: key - Mount point key mount_folder - Mount folder quota - User provided maximum quota
Return: None
-
calculate_ssh_quota
(user, folder, device, mount_folder, ssh_dict, quota_command_dict, password_dict)[source]¶ Calculate the quota via ssh.
Arguments: mount_folder - Mount folder user - Username folder - Folder to mount device - Device name ssh_dict - ssh_dict containing ssh information quota_command_dict - Dictionary containing the quota commands password_dict - Dictionary containing passwords
Return: None
-
get_folder_size
(folder, size)[source]¶ Get the size of the folder recursively
Arguments: folder - Folder to check contents size - Current caclulated size
Return: Calculated size
-
static
get_quota_quota_command
(text, folder)[source]¶ Extract the quota from the quota command.
Arguments: text - Text returned by quota command. folder - Mounted folder
Return: None
-
get_ssh_quota
(user, folder, device)[source]¶ Get the quota via ssh command.
Arguments: user - User name folder - Mounted folder device - Device name
Return: None
-
sig_finished
¶
-
transphire.mountcontainer module¶
TranSPHIRE is supposed to help with the cryo-EM data collection Copyright (C) 2017 Markus Stabrin
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
-
class
transphire.mountcontainer.
MountContainer
(content_mount, mount_worker, parent=None, **kwargs)[source]¶ Bases:
PyQt5.QtWidgets.QWidget
MountContainer widget.
Inherits from: QWidget
Buttons: None
Signals: None
transphire.mountwidget module¶
TranSPHIRE is supposed to help with the cryo-EM data collection Copyright (C) 2017 Markus Stabrin
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
-
class
transphire.mountwidget.
MountWidget
(content, mount_worker, parent=None)[source]¶ Bases:
PyQt5.QtWidgets.QWidget
MountWidget widget.
Inherits from: QWidget
Buttons: mount_button - Mount mount point umount_button - Umount mount point
Signals: None
-
get_settings
()[source]¶ Return settings of the content.
Arguments: None
Returns: Settings as dictionary
-
transphire.mountworker module¶
TranSPHIRE is supposed to help with the cryo-EM data collection Copyright (C) 2017 Markus Stabrin
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
-
class
transphire.mountworker.
MountWorker
(password, settings_folder, mount_directory, parent=None)[source]¶ Bases:
PyQt5.QtCore.QObject
Mounting and unmounting shared devices.
Inherits from: QObject
Buttons: None
Signals: sig_mount_hdd - Signal connected to mount HDD (device|str) sig_mount - Signal connected to mount a mount point (device|str, user|str, password|str, folder|str, server|str, typ|str, domain|str, version|str, sec|str, gid|str) sig_umount - Signal connected to unmount a mount point (device_folder|str, device|str, thread|object)
sig_success - Signal emitted, if a task was a success (text|str, device|str, color|str) sig_error - Signal emitted, if a task was a failure (text|str, device|str) sig_info - Signal emitted, to show text in a text box (text|str) sig_notification - Signal emitted, to send a notification message (text|str)
sig_add_save - Signal connected to add a save file to the dictionary (device|str, ss_address|str, quota_command|str, is_right_quota|str, quota|str) sig_load_save - Signal connected to load data from save file (No object) sig_refresh - Signal connected to recalculate quota (No object) sig_quota - Signal emitted, to refresh the quota status in the GUI (text|str, device|str, color|str) sig_set_settings - Signal connected set quota related settings (settings|object)
sig_calculate_ssh_quota - Signal emitted to calculate the quota via ssh (user|str, folder|str, device|str, mount_folder|str, ssh_dict|object, quota_command_dict|object, password_dict|object) sig_calculate_df_quota - Signal emitted to calculate the quota via system information (device|str, mount_folder|str) sig_calculate_get_quota - Signal emitted to calculate the quota brute force (device|str, total_quota|str, mount_folder|str)
-
add_save
(device, ssh_address, quota_command, is_right_quota, quota)[source]¶ Add a save file to the dictonaries.
Arguments: device - Mounted device name ssh_address - ssh adress quota_command - Command to calculate quota via ssh is_right_quota - True, if df is showing the right quota quota - Provided maximum quota
Return: None
-
fill_quota_project_and_scratch
(name, directory, warning, quota_limit)[source]¶ Refresh quota information for the project and scratch directory.
Arguments: name - Name (project or scratch) directory - Directory to check warning - current warning status quota_limit - Limit of the quota to show a warning
Return: Current warning status
-
mount
(device, user, password, folder, server, typ, domain, version, sec, gid, folder_from_root, fixed_folder)[source]¶ Mount device except HDD
Arguments: device - Device name user - Username password - User password folder - Mount folder server - Server name typ - Mount type domain - Domain name version - Mount type version sec - security protocol gid - groupid to mount folder_from_root - Absolute path pointing towards the mount point
Return: None
-
set_settings
(settings)[source]¶ Set settings used by the worker.
Arguments: settings - TranSPHIRE settings
Return: None
-
sig_add_save
¶
-
sig_calculate_df_quota
¶
-
sig_calculate_get_quota
¶
-
sig_calculate_ssh_quota
¶
-
sig_error
¶
-
sig_info
¶
-
sig_load_save
¶
-
sig_mount
¶
-
sig_mount_hdd
¶
-
sig_notification
¶
-
sig_quota
¶
-
sig_refresh
¶
-
sig_set_folder
¶
-
sig_set_settings
¶
-
sig_success
¶
-
sig_umount
¶
-
transphire.notificationcontainer module¶
TranSPHIRE is supposed to help with the cryo-EM data collection Copyright (C) 2017 Markus Stabrin
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
-
class
transphire.notificationcontainer.
NotificationContainer
(content, mount_worker, process_worker, settings_folder, parent=None, **kwargs)[source]¶ Bases:
PyQt5.QtWidgets.QWidget
Container for notification widgets
Inherits: QWidget
Signals: sig_stop - Signal is emitted, if the user is sending /stop via telegram
-
enable
(var, use_all)[source]¶ Enable or disable the widgets of the widget.
Arguments: var - True(Enable) or False(Disable) use_all - Disable or enable all
Returns: None
-
get_telegram_messages
()[source]¶ Check the messages in telegram for commands.
Arguments: None
Returns: None
-
get_telegram_user
(page)[source]¶ Get the users and the user id
Arguments: page - Webpage of the telegram bot
Returns: Dictionary of users
-
send_notification
(text)[source]¶ Send a notification to specified users.
Arguments: text - Text to send
Returns: None
-
send_to_user
(user_id, text, name)[source]¶ Send a message to all users.
Arguments: user_id - User id of the receiving person text - Text of the message name - Name of the sender
Returns: None
-
set_settings
(settings)[source]¶ Set settings.
Arguments: settings - Settings as dictionary to set.
Returns: None
-
sig_stop
¶
-
transphire.notificationwidget module¶
TranSPHIRE is supposed to help with the cryo-EM data collection Copyright (C) 2017 Markus Stabrin
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
-
class
transphire.notificationwidget.
NotificationWidget
(name, default, default_programs_dict, parent=None)[source]¶ Bases:
PyQt5.QtWidgets.QWidget
Widget for notification phone numbers
-
add_exceptions
(name)[source]¶ Add a person to the exception list and dont send notification anymore.
Arguments: name - Name of the person
Returns: None
-
get_settings
()[source]¶ Get text of the currently selected combo item.
Arguments: None
Returns: Settings dictionary
-
transphire.passworddialog module¶
TranSPHIRE is supposed to help with the cryo-EM data collection Copyright (C) 2017 Markus Stabrin
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
transphire.plotcontainer module¶
TranSPHIRE is supposed to help with the cryo-EM data collection Copyright (C) 2017 Markus Stabrin
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
-
class
transphire.plotcontainer.
PlotContainer
(name, content, plot_labels, plot_name, plot_worker, plot_type, layout, *args, parent=None, **kwargs)[source]¶ Bases:
PyQt5.QtWidgets.QMainWindow
Qwidget in combination with a FigureCanvas.
Inherits: QMainWindow
-
activate_tab
(name)[source]¶ Activate the tab with the name: name.
Arguments: name - Name of the activation
Returns: None
-
enable
(var, use_all)[source]¶ Enable or disable the widgets.
var - It True, enable widgets, else disable use_all - If True, enable/disable all widgets, else only a subset
Returns: None
-
transphire.plotwidget module¶
TranSPHIRE is supposed to help with the cryo-EM data collection Copyright (C) 2017 Markus Stabrin
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
-
class
transphire.plotwidget.
MplCanvas
(no_grid, width=5, height=5, dpi=100, parent=None)[source]¶ Bases:
matplotlib.backends.backend_qtagg.FigureCanvasQTAgg
-
sig_twin
¶
-
-
class
transphire.plotwidget.
MplCanvasWidget
(no_grid, plot_type, is_twin=False, width=5, height=5, dpi=100, parent=None)[source]¶ Bases:
PyQt5.QtWidgets.QWidget
-
class
transphire.plotwidget.
PlotWidget
(label, plot_typ, dock_widget, twin_container, *args, parent=None, **kwargs)[source]¶ Bases:
PyQt5.QtWidgets.QWidget
PlotWidget widget. Widget used to show data plots.
Inherits from: QWidget
Signals: None
-
class
transphire.plotwidget.
SelectWidget
(parent=None)[source]¶ Bases:
PyQt5.QtWidgets.QWidget
-
sig_update
¶
-
transphire.plotworker module¶
TranSPHIRE is supposed to help with the cryo-EM data collection Copyright (C) 2017 Markus Stabrin
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
-
class
transphire.plotworker.
PlotWorker
(parent=None)[source]¶ Bases:
PyQt5.QtCore.QObject
Plot different information about motion correction and ctf estimation.
Inherits: QObject
Signals: sig_data - Emitted, if data for plotting is found (name|str, data|object, directory|str, settings|object) sig_notification - Emitted, if phase plate limit is reached. (text|str)
-
set_settings
(settings)[source]¶ Set settings for the calculation of the arrays.
name - Name of the software that calls the calculation directory_name - Name of the directory that contains the log files settings - TranSPHIRE settings
Returns: None
-
sig_calculate
¶
-
sig_data
¶
-
sig_new_round
¶
-
sig_reset
¶
-
sig_reset_list
¶
-
sig_set_visual
¶
-
sig_visible
¶
-
transphire.processthread module¶
TranSPHIRE is supposed to help with the cryo-EM data collection Copyright (C) 2017 Markus Stabrin
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
-
class
transphire.processthread.
ProcessThread
(shared_dict, name, content_settings, queue_com, password, settings, mount_directory, use_threads_set, stop, abort, has_finished, data_frame, parent=None)[source]¶ Bases:
object
Worker thread
Inherits from: object
Buttons: None
Signals: None
-
add_to_queue
(aim, root_name, allow_dublicate=False)[source]¶ Add item to queue.
Arguments: aim - Aim queue root_name - Name to add
Return: None
-
add_to_queue_file
(root_name, file_name, allow_dublicate=False)[source]¶ Add item to queue_file.
Arguments: root_name - Name to add file_name - File to append to
Return: Name removed from the queue.
-
all_in_queue_file
(aim, root_name, lock=True)[source]¶ Add item to queue.
Arguments: aim - Aim queue root_name - Name to add
Return: None
-
already_in_queue_file
(aim, root_name)[source]¶ Add item to queue.
Arguments: aim - Aim queue root_name - Name to add
Return: None
-
already_in_translation_file
(root_name)[source]¶ Check, if the root_name already exists in the translation file.
root_name - root_name
Returns: True, if root_name in translation file.
-
append_to_translate
(root_name, new_name, xml_file, output_queue_dict=None)[source]¶ Write to the translation file.
root_name - Root name of the file new_name - New name of the file xml_file - XML or GTG file that contains meta data information
Returns: None
-
check_connection
()[source]¶ Check, if the process got a lost connection error.
Arguments: None
Return: True, if the process did not get an error, else False
-
check_full
()[source]¶ Check, if the program got an no space error.
Arguments: None
Return: True, if there is a no space error, else False
-
static
check_if_mounted
(directory)[source]¶ Check, if the mount point is still present.
Arguments: directory - Directory to check.
Return: True, if the mount point is still present, else False
-
check_quota
()[source]¶ Check, if the computer reached the quota limit.
Arguments: None
Return: True, if the computer did not hit the limit, else False
-
check_ready_for_copy
(file_out)[source]¶ Check, if the current file is ready to copy.
file_out - File to copy
Returns: True, if ready
-
copy_as_another_user
(file_in, file_out)[source]¶ Copy to device as another user via sudo.
file_in - Input file path file_out - Output file path
Returns: None
-
copy_as_user
(file_in, file_out)[source]¶ Copy to another device.
file_in - Input file path file_out - Output file path
Returns: None
-
lost_connection
(typ)[source]¶ Handle lost connection errors.
Arguments: typ - Typ of the error
Return: None
-
mkdir_p_as_another_user
(folder)[source]¶ Create folders recursively as another user with the help of sudo.
folder - Folder structure to create
Returns: None
-
recursive_search
(directory, file_list, find_meta)[source]¶ Find files in a recursive search.
directory - Directory to search files. file_list - List of files that have been found. find_meta - Find meta data flag.
Returns: List of files found
-
remove_from_queue
()[source]¶ Remove item from queue.
Arguments: None
Return: Name removed from the queue.
-
remove_from_queue_file
(root_name, file_name, lock=True)[source]¶ Remove the files from the queue file.
Arguments: root_name - Name of the file to delete
Return: None
-
remove_from_translate
(root_name, output_queue_dict=None)[source]¶ Remove line from the translation file.
root_name - Root name of the file to remove
Returns: None
-
run_auto3d
(root_name)[source]¶ Run AutoSPHIRE. In case of Feedback rounds, just work with what is available. Otherwise, first wait until the required minimum number of classes is reached. Once this condition is met, create the combined classes file and provide it to the first AutoSPHIRE run. Afterwards, when the root_name is None start AutoSPHIRE when the minimum number of particles is met.
root_name - name of the file to process.
Returns: None
-
run_command
(command, log_prefix, block_gpu, gpu_list, shell, file_to_delete=None, root_name_input='INVALID')[source]¶ Run the command with respect to the gpu list.
command - Command to run block_gpu - Block the GPU gpu_list - List of GPUs to use settings - Transphire settings
Return: log_file name, err_file name
-
run_compress
(root_name)[source]¶ Compress stack.
root_name - Name of the file to compress
Returns: None
-
run_copy_extern
(root_name)[source]¶ Copy to Work/Backup/HDD
root_name - Root name of the file to copy
Returns: None
-
run_ctf
(root_name)[source]¶ Run CTF estimation.
root_name - name of the file to process.
Returns: None
-
run_extract
(root_name)[source]¶ Run Particle extraction.
root_name - name of the file to process.
Returns: None
-
run_import
(root_name)[source]¶ Import found files to em-transfer.
root_name - Root name of file to copy.
Returns: None
-
run_motion
(root_name)[source]¶ Do the motion correction.
root_name - Root name of the micrograph.
Returns: None
-
run_picking
(root_name)[source]¶ Run picking particles.
root_name - name of the file to process.
Returns: None
-
run_select2d
(root_name)[source]¶ Run Particle extraction.
root_name - name of the file to process.
Returns: None
-
run_software_meta
(directory)[source]¶ Copy meta files produces by the collection software.
Arguments: directory - Start directory for recursive search.
Return: None
-
run_train2d
(root_name)[source]¶ Run Particle extraction.
root_name - name of the file to process.
Returns: None
-
static
try_write
(*args, **kwargs)¶
-
transphire.processworker module¶
TranSPHIRE is supposed to help with the cryo-EM data collection Copyright (C) 2017 Markus Stabrin
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
-
class
transphire.processworker.
MyManager
(address=None, authkey=None, serializer='pickle', ctx=None)[source]¶ Bases:
multiprocessing.managers.BaseManager
-
LifoQueue
(*args, **kwds)¶
-
-
class
transphire.processworker.
ProcessWorker
(password, content_process, mount_directory, parent=None)[source]¶ Bases:
PyQt5.QtCore.QObject
Setup and start worker threads
Inherits from: QObject
Buttons: None
Signals: sig_start - Connected to the run method to start the process (settings|object) sig_finished - Emitted, if run method finishes (No objects) sig_error - Emitted, if an error occured (text|str) sig_status - Emitted to change the status (text|str, device|str, color|str) sig_notification - Emitted to send a notification (text|str) sig_plot_ctf - Emitted to plot ctf information (ctf_name|str, ctf_settings|object, settings|object) sig_plot_motion - Emitted to plot motion information (motion_name|str, motion_settings|object, settings|object) sig_plot_picking - Emitted to plot picking information (picking_name|str, picking_settings|str, settings|object)
-
check_queue
(queue_com)[source]¶ Check the content of the queues and react accordingly.
Arguments: queue_com
Return: None
-
pre_check_programs
()[source]¶ Check, if all programs the user wants to use are available.
Arguments: None
Return: True, if programs exist, else False
-
prefill_queue
(shared_dict, entry, restart_dict, keep_list)[source]¶ Prefill the queues for continue mode
Arguments: shared_dict - Shared dictionary entry - Name of the queue process
Return: None
-
run
(settings, restart_dict)[source]¶ Start the process.
Arguments: settings - Transphire settings
Return: None
-
run_monitor
(typ_dict, queue_com, full_content)[source]¶ Run the TranSPHIRE monitor process.
Arguments: typ_dict - Dictionary for the queue types queue_com - Dictionary for queue communication
Returns: None
-
run_process
(typ_dict, queue_com, share_dict, bad_dict, queue_dict, content_process, full_content, manager, restart_dict)[source]¶ Run the TranSPHIRE process.
Arguments: typ_dict - Dictionary for the queue types queue_com - Dictionary for queue communication
Returns: None
-
sig_error
¶
-
sig_finished
¶
-
sig_notification
¶
-
sig_set_project_directory
¶
-
sig_start
¶
-
sig_status
¶
-
signal_plot
¶
-
transphire.separator module¶
TranSPHIRE is supposed to help with the cryo-EM data collection Copyright (C) 2017 Markus Stabrin
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
transphire.settingscontainer module¶
TranSPHIRE is supposed to help with the cryo-EM data collection Copyright (C) 2017 Markus Stabrin
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
-
class
transphire.settingscontainer.
SettingsContainer
(content, name, global_dict, settings_folder, mount_worker, parent=None, **kwargs)[source]¶ Bases:
PyQt5.QtWidgets.QWidget
Widget for setting widgets.
Inherits: QWidget
-
change_state
(name)[source]¶ Change the state of widgets based on the choice of the corresponding combo box
name - Name of the group to change status (Emitted by the combo box)
Returns: None
-
enable
(var, use_all)[source]¶ Disable or enable all widgets
Arguments: var - If True, enable the widgets, else disable them use_all - If True, all widgets are enabled/disabled
Returns: None
-
get_settings
(quiet=False)[source]¶ Get the settings as dict
Arguments: quiet - If True, no prints are executed
Returns: Settings as dictionary
-
set_design
(settings)[source]¶ Set settings to the widgets
Arguments: settings - Settings to set.
Returns: None
-
set_settings
(settings)[source]¶ Set settings to the widgets
Arguments: settings - Settings to set.
Returns: None
-
sig_adjust_tab
¶
-
sig_change_use_movie
¶
-
transphire.settingswidget module¶
TranSPHIRE is supposed to help with the cryo-EM data collection Copyright (C) 2017 Markus Stabrin
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
-
class
transphire.settingswidget.
SettingsWidget
(name, content, content_others, mount_directory, global_dict=None, input_file_names=None, parent=None)[source]¶ Bases:
PyQt5.QtWidgets.QWidget
Widget for setting entrys
Inherits: QWidget
Signals: sig_index_changed - Emitted, if the index of a combo box changes (Combo box name|str)
-
change_color_if_true
()[source]¶ Change the color, if the types are all true.
Arguments: None
Returns: None
-
get_combo_entries
()[source]¶ Get the entries of the combo boxes.
Arguments: None
Returns: List containing entries.
-
get_settings
(quiet=False)[source]¶ Get the settings as dict.
Arguments: quiet - True, if prints should not be shown.
Returns: None, if an error occured. Settings as dictionary.
-
set_settings
(text, is_checked)[source]¶ Set settings
text - Text to set to the widget.
Returns: None
-
sig_index_changed
¶
-
transphire.statuscontainer module¶
TranSPHIRE is supposed to help with the cryo-EM data collection Copyright (C) 2017 Markus Stabrin
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
-
class
transphire.statuscontainer.
StatusContainer
(content, content_mount, content_pipeline, mount_worker, process_worker, content_font, parent=None, **kwargs)[source]¶ Bases:
PyQt5.QtWidgets.QWidget
Container for status widgets
Inherits: QWidget
Signals: sig_refresh_quota - Connected to change the quota text (no object)
-
refresh_quota
(text, device, color)[source]¶ Refresh the quota
Arguments: text - Text to show device - Device name color - Color of the text
Returns: None
-
sig_refresh_quota
¶
-
transphire.statuswidget module¶
TranSPHIRE is supposed to help with the cryo-EM data collection Copyright (C) 2017 Markus Stabrin
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
-
class
transphire.statuswidget.
StatusWidget
(name, default_name, default_quota, parent=None)[source]¶ Bases:
PyQt5.QtWidgets.QWidget
Widget to show the current status of the processes.
Inherits: QWidget
Signals: sig_change_info_name - Connected, to change the info name information (text|str, color|str) sig_change_info_quota - Connected, to change the quota name information (text|str, color|str)
-
change_info_name
(text, color)[source]¶ Change the info text and the info text color.
Arguments: text - Text to put color - Color to use
Returns: None
-
change_info_quota
(text, color)[source]¶ Change the info text and the info text color.
Arguments: text - Text to put color - Color to use
Returns: None
-
sig_change_info_name
¶
-
sig_change_info_quota
¶
-
transphire.tabdocker module¶
TranSPHIRE is supposed to help with the cryo-EM data collection Copyright (C) 2017 Markus Stabrin
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
-
class
transphire.tabdocker.
TabDocker
(parent=None, **kwargs)[source]¶ Bases:
PyQt5.QtWidgets.QWidget
Tab widget for the settingswidgets.
Inherits: QWidget
-
add_tab
(widget, name, add_widgets=True)[source]¶ Add a new tab to the TabDocker
Arguments: widget - Widget to add name - Name of the widget
Return: None
-
currentIndex
()[source]¶ Get the current Index of the tab_widget.
Returns: Current index of self.tab_widget
-
enable_tab
(visible)[source]¶ Enable or disable the tab.
Arguments: visible - Enable if True, Disable if False name - Name of the tab to disable.
Returns: None
-
indexOf
(widget)[source]¶ Get the index of the widget.
Arguments: widget - Adress of the widget
Returns: Index of the widget
-
latest_active
= [None]¶
-
removeTab
(idx)[source]¶ Remove the widget located at tab idx
Arguments: idx - Idx of the widget
Returns: None
-
setCurrentIndex
(idx)[source]¶ Set the current Index of the tab_widget.
Arguments: idx - Index to set
Returns: Current index of self.tab_widget
-
setCurrentWidget
(widget)[source]¶ Set the current widget of the tab_widget.
Arguments: idx - Widget to set
Returns: Current index of self.tab_widget
-
setMovable
(status)[source]¶ Set the movable status for the tab widgets
Arguments: status - Boolean variable for the status
Returns: None
-
setTabEnabled
(index, state)[source]¶ Set the tab position index to the enable state.
Arguments: index - Tab position index state - State (True or False)
Returns: None
-
setTabPosition
(position)[source]¶ Set the tab position of the Tab bar
Arguments: position - Tab position as string [‘North’, ‘East’, ‘West’, ‘South’]
Returns: None
-
setTabText
(idx, text)[source]¶ Set the text for the tab at idx
Arguments: idx - Index of the tab text - Text of the tab
Returns: None
-
sig_start_plot
¶
-
transphire.templatedialog module¶
transphire.transphire_class2d module¶
TranSPHIRE is supposed to help with the cryo-EM data collection Copyright (C) 2017 Markus Stabrin
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
-
transphire.transphire_class2d.
create_class2d_command
(class2d_name, stack_name, file_name, output_dir, settings, queue_com, name)[source]¶ Create the command to combine BDB stacks.
-
transphire.transphire_class2d.
create_isac2_1_2_combine_command
(class2d_name, file_names, file_name, output_dir, settings)[source]¶ Create e2bdb.py combine command
-
transphire.transphire_class2d.
create_isac2_1_2_command
(class2d_name, stack_name, file_name, output_dir, settings, name)[source]¶ Create e2bdb.py combine command
-
transphire.transphire_class2d.
create_stack_combine_command
(class2d_name, file_names, file_name, output_dir, settings, queue_com, name)[source]¶ Create the command to combine BDB stacks.
transphire.transphire_content module¶
TranSPHIRE is supposed to help with the cryo-EM data collection Copyright (C) 2017 Markus Stabrin
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
-
transphire.transphire_content.
default_auto_sphire_v1_3
()[source]¶ Content for auto sphire
Arguments: None
Return: Content items as list
-
transphire.transphire_content.
default_cinderella_v0_3_1
()[source]¶ Content of cinderella v0.3.1
Arguments: None
Return: Content items as list
-
transphire.transphire_content.
default_compress_command_line
()[source]¶ Content for compression
Arguments: None
Return: Content items as list
-
transphire.transphire_content.
default_copy
(settings_folder)[source]¶ Content of Copy tab.
Arguments: None
Return: Content items as list
-
transphire.transphire_content.
default_cryolo_train_v1_5_4
()[source]¶ Content of crYOLO_train version 1.5.4
Arguments: None
Return: Content items as list
-
transphire.transphire_content.
default_cryolo_train_v1_5_8
()[source]¶ Content of crYOLO_train version 1.5.8
Arguments: None
Return: Content items as list
-
transphire.transphire_content.
default_cryolo_train_v1_7_4
()[source]¶ Content of crYOLO_train version 1.7.4
Arguments: None
Return: Content items as list
-
transphire.transphire_content.
default_cryolo_v1_0_4
()[source]¶ Content of crYOLO version 1.0.4
Arguments: None
Return: Content items as list
-
transphire.transphire_content.
default_cryolo_v1_1_0
()[source]¶ Content of crYOLO version 1.1.0
Arguments: None
Return: Content items as list
-
transphire.transphire_content.
default_cryolo_v1_2_1
()[source]¶ Content of crYOLO version 1.2.1
Arguments: None
Return: Content items as list
-
transphire.transphire_content.
default_cryolo_v1_4_1
()[source]¶ Content of crYOLO version 1.4.1
Arguments: None
Return: Content items as list
-
transphire.transphire_content.
default_cryolo_v1_5_8
()[source]¶ Content of crYOLO version 1.5.8
Arguments: None
Return: Content items as list
-
transphire.transphire_content.
default_cter_v1_0
()[source]¶ Content of CTER SPHIRE version 1.0.
Arguments: None
Return: Content items as list
-
transphire.transphire_content.
default_ctffind_4_v4_1_8
()[source]¶ Content of CTFFind version 4.1.8.
Arguments: None
Return: Content items as list
-
transphire.transphire_content.
default_font
()[source]¶ Content of Font tab.
Arguments: None
Return: Content items as list
-
transphire.transphire_content.
default_gctf_v1_06
()[source]¶ Content of GCtf version 1.06.
Arguments: None
Return: Content items as list
-
transphire.transphire_content.
default_gctf_v1_18
()[source]¶ Content of GCtf version 1.18.
Arguments: None
Return: Content items as list
-
transphire.transphire_content.
default_general
()[source]¶ Content of General tab.
Arguments: None
Return: Content items as list
-
transphire.transphire_content.
default_input
()[source]¶ Content of General tab.
Arguments: None
Return: Content items as list
-
transphire.transphire_content.
default_isac2_1_2
()[source]¶ Content of sp_isac2(gpu) version 1.2
Arguments: None
Return: Content items as list
-
transphire.transphire_content.
default_motion_cor_2_v1_0_0
()[source]¶ Content of MotionCor2 version 1.0.0.
Arguments: None
Return: Content items as list
-
transphire.transphire_content.
default_motion_cor_2_v1_0_5
()[source]¶ Content of MotionCor2 version 1.0.5.
Arguments: None
Return: Content items as list
-
transphire.transphire_content.
default_motion_cor_2_v1_1_0
()[source]¶ Content of MotionCor2 version 1.1.0.
Arguments: None
Return: Content items as list
-
transphire.transphire_content.
default_motion_cor_2_v1_3_0
()[source]¶ Content of MotionCor2 version 1.3.0.
Arguments: None
Return: Content items as list
-
transphire.transphire_content.
default_mount
(hdd=None)[source]¶ Content of Mount tab.
Arguments: hdd - Content is related to HDD
Return: Content items as list
-
transphire.transphire_content.
default_notification
()[source]¶ Content of notification tab.
Arguments: None
Return: Content items as list
-
transphire.transphire_content.
default_notification_widget
()[source]¶ Content of notification widget.
Arguments: None
Return: Content items as list
-
transphire.transphire_content.
default_others
(settings_folder)[source]¶ Content of Status tab.
Arguments: None
Return: Content items as list
-
transphire.transphire_content.
default_path
()[source]¶ Content of Path tab.
Arguments: None
Return: Content items as list
-
transphire.transphire_content.
default_pipeline
()[source]¶ Content of pipeline tab.
Arguments: None
Return: Content items as list
transphire.transphire_ctf module¶
TranSPHIRE is supposed to help with the cryo-EM data collection Copyright (C) 2017 Markus Stabrin
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
-
transphire.transphire_ctf.
combine_ctf_outputs
(data, data_orig, root_path, file_name, settings, queue_com, shared_dict, name, sum_file, dw_file)[source]¶ Combine the ctf outputs to one SPHIRE partres and one RELION star file.
root_path - Root path of the file file_name - File name of the ctf file. settings - TranSPHIRE settings queue_com - Queue for communication name - Name of process sum_file - Name of the dose uncorrected sum file
Returns: None
-
transphire.transphire_ctf.
contrast_to_shift
(a_cont)[source]¶ Transform amplitude contrast to phase shift.
a_cont - Amplitude contrast value in percent
Returns: Phase shift in degrees.
-
transphire.transphire_ctf.
create_cter_1_0_command
(ctf_name, file_sum, file_input, output_dir, settings)[source]¶ Create the CTER v1.0 command
-
transphire.transphire_ctf.
create_cter_1_3_command
(ctf_name, file_sum, file_input, output_dir, settings)[source]¶ Create the CTER v1.3 command
-
transphire.transphire_ctf.
create_ctffind_4_v4_1_13_command
(ctf_name, file_sum, file_input, file_output, set_name, settings)[source]¶ Create the ctffind command
-
transphire.transphire_ctf.
create_ctffind_4_v4_1_8_command
(ctf_name, file_sum, file_input, file_output, set_name, settings)[source]¶ Create the ctffind command
-
transphire.transphire_ctf.
create_export_data
(export_data, lines, maximum_string)[source]¶ Write export data to file.
export_data - Data to export. file_name - Name of the file to write to.
Returns: In place modificaion of lines
-
transphire.transphire_ctf.
create_gctf_v1_06_command
(ctf_name, file_sum, file_input, file_output, settings, name)[source]¶ Create the Gctf v1.06 command
-
transphire.transphire_ctf.
find_logfiles
(root_path, file_name, settings, queue_com, name)[source]¶ Find logfiles related to the produced CTF files.
root_path - Root path of the file file_name - File name of the ctf file. settings - TranSPHIRE settings queue_com - Queue for communication name - Name of process
Returns: list of log files
-
transphire.transphire_ctf.
get_constant_value
(key, ctf_settings, row, project_folder, ctf_name, ctf_folder, pixel_size_adjust)[source]¶
-
transphire.transphire_ctf.
get_ctf_command
(file_sum, file_input, new_name, settings, queue_com, set_name, name)[source]¶ Create the ctf command based on the ctf software.
file_input - Input name of the file for ctf estimation new_name - Output file settings - TranSPHIRE settings queue_com - Queue for communication name - Name of process
Returns: CTF command File to check vor validation if the process was successful
-
transphire.transphire_ctf.
get_relion_header
(names)[source]¶ Create a relion star file header.
names - Header names as list
Returns: header string
-
transphire.transphire_ctf.
recursive_file_search
(directory, files)[source]¶ Recursive file search function.
-
transphire.transphire_ctf.
shift_to_contrast
(phase_shift)[source]¶ Convert phase shift to amplitud contrast.
phase_shift - Phase shift in degrees.
Returns: Amplitude contrast in percent.
-
transphire.transphire_ctf.
to_partres_file
(data, ctf_name, ctf_settings, project_folder, ctf_folder, sum_file, pixel_size_adjust)[source]¶ Create a CTF partres file from data
data - Array containing ctf information. ctf_name - Name of the ctf program. ctf_settings - Settings for this ctf estimation run. project_folder - Name of the project folder. ctf_folder - Name of the ctf output folder. sum_file - Name of the summed micrograph image
Returns: None
-
transphire.transphire_ctf.
to_star_file
(data, ctf_name, ctf_settings, project_folder, ctf_folder, sum_file, dw_file, pixel_size_adjust)[source]¶ Create a CTF star file from data
data - Array containing ctf information. ctf_name - Name of the ctf program. ctf_settings - Settings for this ctf estimation run. project_folder - Name of the project folder. ctf_folder - Name of the ctf output folder. sum_file - Name of the sum file
Returns: None
transphire.transphire_extract module¶
TranSPHIRE is supposed to help with the cryo-EM data collection Copyright (C) 2017 Markus Stabrin
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
-
transphire.transphire_extract.
create_window_1_2_command
(extract_name, file_sum, file_box, file_ctf, output_dir, settings)[source]¶ Create the WINDOW v1.2 command
-
transphire.transphire_extract.
find_logfiles
(root_path, settings, queue_com, name)[source]¶ Find logfiles related to the produced Extract files.
root_path - Root path of the file settings - TranSPHIRE settings queue_com - Queue for communication name - Name of process
Returns: list of log files
-
transphire.transphire_extract.
get_extract_command
(file_sum, file_box, file_ctf, output_dir, settings, queue_com, name)[source]¶ Create the ctf command based on the ctf software.
file_input - Input name of the file for ctf estimation new_name - Output file settings - TranSPHIRE settings queue_com - Queue for communication name - Name of process
Returns: CTF command File to check vor validation if the process was successful
transphire.transphire_import module¶
TranSPHIRE is supposed to help with the cryo-EM data collection Copyright (C) 2017 Markus Stabrin
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
-
transphire.transphire_import.
dummy
(name, name_no_feedback, settings, directory_name, import_name='', send_data=None)[source]¶
-
transphire.transphire_import.
get_dtype_dict
()[source]¶ Dtype of the data plot array.
Arguments: None
Return: Dtype dict
-
transphire.transphire_import.
get_dtype_import_dict
()[source]¶ Dtype of the file to import.
Arguments: None
Return: Dtype dict
-
transphire.transphire_import.
get_header
(input_file)[source]¶ Extract header information from a relion star file.
Arguments: input_file - Input star file
Return: Color string
-
transphire.transphire_import.
get_relion_dict
()[source]¶ Translate relion star file information to dtype dict.
Arguments: None
Return: Dtype dict
-
transphire.transphire_import.
get_transphire_dict
()[source]¶ Translate transphire ctf dict into relion star file information.
Arguments: None
Return: Dtype dict
-
transphire.transphire_import.
import_auto_sphire_v1_3
(name, name_no_feedback, settings, directory_name, import_name='', send_data=None)[source]¶ Import motion information for auto_sphire.py version 1.3
Arguments: name - Name of motion program directory_name - Name of the directory to search for files
Return: Imported data
-
transphire.transphire_import.
import_cinderella_v0_3_1
(name, name_no_feedback, settings, directory_name, import_name='', send_data=None)[source]¶
-
transphire.transphire_import.
import_cryolo_v1_0_4
(name, name_no_feedback, settings, directory_name, import_name='', send_data=None, sub_directory=None)[source]¶ Import picking information for crYOLO v1.0.4.
Arguments: name - Name of picking program directory_name - Name of the directory to search for files
Return: Imported data
-
transphire.transphire_import.
import_cryolo_v1_2_2
(name, name_no_feedback, settings, directory_name, import_name='', send_data=None)[source]¶ Import picking information for crYOLO v1.2.2.
Arguments: name - Name of picking program directory_name - Name of the directory to search for files
Return: Imported data
-
transphire.transphire_import.
import_cryolo_v1_8_0
(name, name_no_feedback, settings, directory_name, import_name='', send_data=None, sub_directory=None)[source]¶ Import picking information for crYOLO v1.8.0.
Arguments: name - Name of picking program directory_name - Name of the directory to search for files
Return: Imported data
-
transphire.transphire_import.
import_cter_v1_0
(name, name_no_feedback, settings, directory_name, import_name='', send_data=None)[source]¶ Import ctf information for CTER v1.0. Defocus in angstrom, phase shift in degree.
Arguments: name - Name of ctf program directory_name - Name of the directory to search for files
Return: Imported data
-
transphire.transphire_import.
import_ctffind_v4_1_8
(name, name_no_feedback, settings, directory_name, import_name='', send_data=None)[source]¶ Import ctf information for CTFFIND v4.1.8. Defocus in angstrom, phase shift in degree.
Arguments: name - Name of ctf program directory_name - Name of the directory to search for files
Return: Imported data
-
transphire.transphire_import.
import_gctf_v1_06
(name, name_no_feedback, settings, directory_name, import_name='', send_data=None)[source]¶ Import ctf information for Gctf v1.06. Defocus in angstrom, phase shift in degree.
Arguments: name - Name of ctf program directory_name - Name of the directory to search for files
Return: Imported data
-
transphire.transphire_import.
import_isac_v1_2
(name, name_no_feedback, settings, directory_name, import_name='', send_data=None)[source]¶
-
transphire.transphire_import.
import_motion_cor_2_v1_0_0
(name, name_no_feedback, settings, directory_name, import_name='', send_data=None)[source]¶ Import motion information for MotionCor2 v1.0.0.
Arguments: name - Name of motion program directory_name - Name of the directory to search for files
Return: Imported data
-
transphire.transphire_import.
import_unblur_v1_0_0
(name, name_no_feedback, settings, directory_name, import_name='', send_data=None)[source]¶ Import motion information for cisTEM Unblur v1.0.0.
Arguments: name - Name of motion program directory_name - Name of the directory to search for files
Return: Imported data
transphire.transphire_motion module¶
TranSPHIRE is supposed to help with the cryo-EM data collection Copyright (C) 2017 Markus Stabrin
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
-
transphire.transphire_motion.
combine_motion_outputs
(data, data_original, settings, queue_com, shared_dict, name, log_file, sum_file, dw_file, stack_file, set_name)[source]¶ Combine the motion outputs to one micrograph and one relion star file.
root_path - Root path of the file file_name - File name of the ctf file. settings - TranSPHIRE settings queue_com - Queue for communication name - Name of process sum_file - Name of the dose uncorrected sum file
Returns: None
-
transphire.transphire_motion.
create_export_data
(export_data, lines)[source]¶ Write export data to file.
export_data - Data to export. file_name - Name of the file to write to.
Returns: In place modificaion of lines
-
transphire.transphire_motion.
create_motion_cor_2_v1_0_0_command
(motion_name, file_input, file_output, file_log, settings, queue_com, name, set_name, do_subsum)[source]¶ Create the MotionCor2 v1.0.0 command
file_input - Input file for motion correction. file_output - Output filename file_log - Logfile name settings - TranSPHIRE settings. queue_com - Queue for communication. name - Name of the process.
Returns: Command for MotionCor2 v1.0.0
-
transphire.transphire_motion.
create_sum_movie_command
(motion_frames, file_input, file_output, file_shift, file_frc, settings, queue_com, name)[source]¶ Create the SumMovie command.
motion_frames - Sub frames settings dictionary file_input - File to sum. file_output - Output file name file_shift - Output shift file name file_frc - Output frc file name settings - TranSPHIRE settings queue_com - Queue for communication name - Name of the process
Returns: Command for SumMovie
-
transphire.transphire_motion.
create_sum_movie_v1_0_2_command
(motion_frames, file_input, file_output, file_shift, file_frc, settings, queue_com, name)[source]¶ Create the SumMovie v1.0.2 command.
motion_frames - Sub frames settings dictionary file_input - File to sum. file_output - Output file name file_shift - Output shift file name file_frc - Output frc file name settings - TranSPHIRE settings queue_com - Queue for communication name - Name of the process
Returns: Command for Summovie v1.0.2
-
transphire.transphire_motion.
create_unblur_v1_0_0_command
(motion_name, file_input, file_output, file_log, settings, queue_com, name, set_name, do_subsum)[source]¶ Create the SumMovie v1.0.2 command.
motion_frames - Sub frames settings dictionary file_input - File to sum. file_output - Output file name file_shift - Output shift file name file_frc - Output frc file name settings - TranSPHIRE settings queue_com - Queue for communication name - Name of the process
Returns: Command for Summovie v1.0.2
-
transphire.transphire_motion.
get_dw_file_name
(output_transfer_scratch, file_name, settings, queue_com, name)[source]¶ Get the name of the dose weighted file directly after the program finished.
output_transfer - Name of the folder in the scratch directory. file_name - File name of the root_name path. settings - TranSPHIRE settings. queue_com - Queue for communication. name - Name of the process.
Returns: File path of the DW file.
-
transphire.transphire_motion.
get_dws_file_name
(output_transfer_scratch, file_name, settings, queue_com, name)[source]¶ Get the name of the dose weighted file directly after the program finished.
output_transfer - Name of the folder in the scratch directory. file_name - File name of the root_name path. settings - TranSPHIRE settings. queue_com - Queue for communication. name - Name of the process.
Returns: File path of the DW file.
-
transphire.transphire_motion.
get_motion_command
(file_input, file_output_scratch, file_log_scratch, settings, queue_com, name, set_name, do_subsum)[source]¶ Get the command for the selected motion software.
file_input - Input file for motion correction. file_output_scratch - Output file name file_log_scratch - Logfile path on the scratch disc settings - TranSPHIRE settings. queue_com - Queue for communication. name - Name of the process.
Returns: Motion command
-
transphire.transphire_motion.
get_motion_default
(settings, motion_frames, queue_com, name)[source]¶ Set the default values for the motion correction software.
settings - TranSPHIRE settings. motion_frames - Sub frame settings. queue_com - Queue for communication. name - Name of the process.
Returns: True, if dose weighting will be applied.
transphire.transphire_picking module¶
TranSPHIRE is supposed to help with the cryo-EM data collection Copyright (C) 2017 Markus Stabrin
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
-
transphire.transphire_picking.
create_circle
(jpg_data, maskcenters, radius)[source]¶ Create a circle in a numpy array
Arguments: jpg_data - Data that needs to be changed maskcenters - center of mask radius - Radius of the circle
Returns: None, jpg_data will be changed in-place
-
transphire.transphire_picking.
create_cryolo_v1_0_4_command
(picking_name, file_input, file_output, settings, name)[source]¶ Create the crYOLO v1.0.4 command
-
transphire.transphire_picking.
create_cryolo_v1_1_0_command
(picking_name, file_input, file_output, settings, name)[source]¶ Create the crYOLO v1.1.0 command
-
transphire.transphire_picking.
create_cryolo_v1_4_1_command
(picking_name, file_input, file_output, settings, name)[source]¶ Create the crYOLO v1.1.0 command
-
transphire.transphire_picking.
find_logfiles
(root_path, file_name, settings, queue_com, name)[source]¶ Find logfiles related to the produced CTF files.
root_path - Root path of the file file_name - File name of the ctf file. settings - TranSPHIRE settings queue_com - Queue for communication name - Name of process
Returns: list of log files
-
transphire.transphire_picking.
get_picking_command
(file_input, new_name, settings, queue_com, name)[source]¶ Create the picking command based on the picking software.
file_input - Input name of the file for ctf estimation new_name - Output file settings - TranSPHIRE settings queue_com - Queue for communication name - Name of process
Returns: Picking command File to check vor validation if the process was successful
transphire.transphire_plot module¶
TranSPHIRE is supposed to help with the cryo-EM data collection Copyright (C) 2017 Markus Stabrin
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
-
transphire.transphire_plot.
get_mic_number
(array, settings, as_int=True)[source]¶ Identify the micrograph number out of the name string.
Arguments: array - Array containing information settings - User provided settings
Return: Array of micrograph numbers
-
transphire.transphire_plot.
update_batch
(data, settings, label)[source]¶ Update the plot for crYOLO v1.0.4.
Arguments: data - Data to plot settings - User provided settings label - Label of the plot
Return: x values, y values, label, title
-
transphire.transphire_plot.
update_cryolo_v1_0_4
(data, settings, label)[source]¶ Update the plot for crYOLO v1.0.4.
Arguments: data - Data to plot settings - User provided settings label - Label of the plot
Return: x values, y values, label, title
-
transphire.transphire_plot.
update_ctf
(data, settings, label)[source]¶ Update the plot for CTFFIND v4.1.8.
Arguments: data - Data to plot settings - User provided settings label - Label of the plot
Return: x values, y values, label, title
transphire.transphire_select2d module¶
TranSPHIRE is supposed to help with the cryo-EM data collection Copyright (C) 2017 Markus Stabrin
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
-
transphire.transphire_select2d.
create_cinderella_0_3_1_command
(prog_name, file_input, file_output, settings, name)[source]¶ Create the Cinderella >=v0.3.1 command
-
transphire.transphire_select2d.
get_select2d_command
(file_input, output_dir, settings, queue_com, name)[source]¶ Create the picking command based on the picking software.
file_input - Input name of the file for ctf estimation output_dir - Output file settings - TranSPHIRE settings queue_com - Queue for communication name - Name of process
Returns: Picking command File to check vor validation if the process was successful
transphire.transphire_software module¶
TranSPHIRE is supposed to help with the cryo-EM data collection Copyright (C) 2017 Markus Stabrin
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
-
transphire.transphire_software.
check_nr_frames
(frames, settings, force=False)[source]¶ Check if the nr of frames of the stack match the given nr of frames
Arguments: frames - List of found frames settings - TranSPHIRE settings
-
transphire.transphire_software.
check_outputs
(zero_list, non_zero_list, exists_list, folder, command)[source]¶ Check, if the output files are present and have the proper size.
zero_list - List of files that should be zero non_zero_list - List of files that should not be zero
Returns: None
-
transphire.transphire_software.
extract_time_and_grid_information
(root_name, settings, queue_com, name)[source]¶ Extract the time and grid information from the micrograph names.
Arguments: root_name - Name to extract information from. settings - TranSPHIRE settings. queue_com - Queue for communication. name - Name of the process.
Returns: hole_number, spot1_number, spot2_number, date, time
-
transphire.transphire_software.
find_all_files
(root_name, compare_name_frames, compare_name_meta, settings, queue_com, name)[source]¶ Find other files that relate to root_name.
root_name - Root name of files to find. compare_name_meta - Name of the meta data to find. queue_com - Queue for communication. name - Name of the process
Returns: list of files related to root_name.
-
transphire.transphire_software.
find_frames
(frames_root, compare_name, settings, queue_com, name, write_error)[source]¶ Find frames based on Software, Type and camera used.
frames_root - Root name of the frames. compare_name - Name to compare jpg and frames as time might differ. settings - TranSPHIRE settings used. queue_com - Queue for communication name - Name of process write_error - Write error function
Returns: None if the number of frames does not match user input. False if an error occured and the file needs to be skipped. True if the function was successful.
Find related frames to the jpg file based on the used software.
Arguments: frames_root - Root name to search for related files root_name - Root name of the jpg file settings - TranSPHIRE settings queue_com - Queue for communication name - Name of the process
-
transphire.transphire_software.
get_copy_command_for_frames
(settings, queue_com, name)[source]¶ Copy the frames based on stack or frames type.
settings - TranSPHIRE settings. queue_com - Queue for communication. name - Name of the process.
Returns: Command to use for copy.
transphire.transphire_train2d module¶
TranSPHIRE is supposed to help with the cryo-EM data collection Copyright (C) 2017 Markus Stabrin
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
-
transphire.transphire_train2d.
create_eval_command
(config_file, weight_file, log_file, settings, name)[source]¶
transphire.transphire_utils module¶
TranSPHIRE is supposed to help with the cryo-EM data collection Copyright (C) 2017 Markus Stabrin
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
-
transphire.transphire_utils.
check_instance
(value, typ)[source]¶ Check typ of value
Arguments: value - Value to check typ - Type to check
Return: Bool
-
transphire.transphire_utils.
copy
(file_in, file_out)[source]¶ Copy file_in to a new location.
Arguments: file_in - Input file file_out - Output file
Return: None
-
transphire.transphire_utils.
create_log
(*args)[source]¶ Add a time string to print statement.
args - Args to print
Returns: String with added time stemp.
-
transphire.transphire_utils.
find_best_match
(name, dictionary)[source]¶ Find the best matching version key in a dictionary. Raises an assertion error it the return_key is not valid.
name - Name of the current version. dictionary - Dictionary to find the best matching version.
Returns: The best matching version Key.
-
transphire.transphire_utils.
find_latest_version
(name, dictionary)[source]¶ Find the latest matching version key in a dictionary. Raises an assertion error it the return_key is not valid.
name - Name of the program dictionary - Dictionary to find the best matching version.
Returns: The best matching version Key.
-
transphire.transphire_utils.
get_color
(typ)[source]¶ Color defined for the type
Arguments: typ - Typ of color
Return: Color string
-
transphire.transphire_utils.
get_content_gui
(content, template_name, n_feedbacks)[source]¶ Create content lists to load the GUI.
Arguments: content - Content as dictionary. template_name = Name of the template!
Return: Content as list
-
transphire.transphire_utils.
get_exclude_set_path
(content)[source]¶ Check the widget_2 variable, if the program should be loaded or not.
Argument: content - Content as dictionary.
Return: List of names to exclude
-
transphire.transphire_utils.
get_function_dict
()[source]¶ Return a dictionary containing the function to use for specific plots.
Arguments: None
Return: None
-
transphire.transphire_utils.
get_key_names
(settings_folder, name)[source]¶ Extract mount names from related settings file.
Arguments: None
Return: List of mount names
-
transphire.transphire_utils.
get_name
(name)[source]¶ Remove the extension of a file and return the basename without the PATH
name - Name to remove the extension from
Returns: The name of the file without PATH and extension.
-
transphire.transphire_utils.
get_style
(typ)[source]¶ Style colores for the content of widgets.
Arguments: typ - Typ of color
Return: Color string
-
transphire.transphire_utils.
is_higher_version
(name, version_ref)[source]¶ Compare the versions of software. The versions do not need to match in digits. v1 > v0, v0.0, v0.0.0 v1 >= v1 v1 < v1.0.1
name - Name of the Software containing the version string, e.g. v1, v1.1, v1.1.1, v1.1.1rc2 version_ref - reference version as string, e.g. 1, 1.1, 1.1.1
Returns: True if the version is larger than the reference version
-
transphire.transphire_utils.
look_and_feel
(app, font=None, adjust_width=None, adjust_height=None, default=None)[source]¶ Look and feel.
Arguments: app - QApplication. font - User provided font size (default None) adjust_width - User provided width adjustment (default None) adjust_height - User provided height adjustment (default None) default - Default values (default None)
Return: Style sheet
-
transphire.transphire_utils.
look_and_feel_small
(app, font=None)[source]¶ Look and feel for the default settings dialog.
Arguments: app - QApplication. font - User provided font size (default None)
Return: Style sheet
-
transphire.transphire_utils.
message
(text)[source]¶ Show a text in a message box.
Arguments: text - Text shown in the message box
Return: None
-
transphire.transphire_utils.
mkdir_p
(path)[source]¶ Create output directories recursively.
Arguments: path - Directory path to create
Return: None
-
transphire.transphire_utils.
question
(head, text)[source]¶ Show a questions message box dialog.
Arguments: head - Header of the window text - Text with the questions
Return: True if No, False if Yes
-
transphire.transphire_utils.
reduce_copy_entries
(exclude_set, content)[source]¶ Reduce the number of options based on the exclude_set
Arguments: exclude_set - Set of names to not consider content - Content of the widgets
Return: None
-
transphire.transphire_utils.
reduce_path_widget
(exclude_set, content)[source]¶ Reduce the number of paths based on the exclude_set
Arguments: exclude_set - Set of names to not consider content - Content of the widgets
Return: None
-
transphire.transphire_utils.
reduce_programs
(exclude_set=None)[source]¶ Reduce the number of programs to the users preferences.
Arguments: exclude_set - Set of names to not consider
Return: List of content for motion, List of content for ctf