Nodes

class pipeliner.nodes.AtomCoordsGroupMetadataNode(node: Node)

Bases: NodeDataLoader

toplevel_description = 'Metadata about a set of atomic coordinates files, a list of atomic models for example'
toplevel_type = 'AtomCoordsGroupMetadata'
class pipeliner.nodes.AtomCoordsNode(node: Node)

Bases: NodeDataLoader

default_results_display(output_dir) → ResultsDisplayObject

Generate a ResultsDisplayObject for the node

This method will be used for every node in Process if there is no ‘create_results_display’ function defined

get_summary_string(output_dir: str | None = None) → str

Generate a summary file for the node

This method should be overridden by every node where a summary needs to be generated

toplevel_description = 'An atomic model file'
toplevel_type = 'AtomCoords'
class pipeliner.nodes.DensityMapGroupMetadataNode(node: Node)

Bases: NodeDataLoader

get_image_metadata(image_name: str = '') → Mapping[str, float | int | str | dict | list]

Get metadata about a specific image associated with this node

Simple default implementation to get basic metadata assuming image_name is a path to a file. For richer metadata, or if image_name refers to an item in a STAR file that is not a simple image path, the node-specific class should override this method.

If image_name does not exist or is not an image, this will raise an exception.

toplevel_description = 'Metadata about multiple density maps'
toplevel_type = 'DensityMapGroupMetadata'
class pipeliner.nodes.DensityMapMetadataNode(node: Node)

Bases: NodeDataLoader

get_image_metadata(image_name: str = '') → Mapping[str, float | int | str | dict | list]

Get metadata about a specific image associated with this node

Simple default implementation to get basic metadata assuming image_name is a path to a file. For richer metadata, or if image_name refers to an item in a STAR file that is not a simple image path, the node-specific class should override this method.

If image_name does not exist or is not an image, this will raise an exception.

toplevel_description = 'Metadata about a single density map'
toplevel_type = 'DensityMapMetadata'
class pipeliner.nodes.DensityMapNode(node: Node)

Bases: NodeDataLoader

default_results_display(output_dir) → ResultsDisplayObject

Generate a ResultsDisplayObject for the node

This method will be used for every node in Process if there is no ‘create_results_display’ function defined

get_image_metadata(image_name: str = '') → Mapping[str, float | int | str | dict | list]

Get metadata about a specific image associated with this node

Simple default implementation to get basic metadata assuming image_name is a path to a file. For richer metadata, or if image_name refers to an item in a STAR file that is not a simple image path, the node-specific class should override this method.

If image_name does not exist or is not an image, this will raise an exception.

get_summary_string(output_dir: str | None = None) → str

Generate a summary file for the node

This method should be overridden by every node where a summary needs to be generated

toplevel_description = 'A 3D cryoEM density map (could be half map, full map, sharpened etc)'
toplevel_type = 'DensityMap'
class pipeliner.nodes.EulerAnglesNode(node: Node)

Bases: NodeDataLoader

toplevel_description = 'Data about Euler angles'
toplevel_type = 'EulerAngles'
class pipeliner.nodes.EvaluationMetricNode(node: Node)

Bases: NodeDataLoader

toplevel_description = 'A file containing evaluation metrics'
toplevel_type = 'EvaluationMetric'
class pipeliner.nodes.Image2DGroupMetadataNode(node: Node)

Bases: NodeDataLoader

default_results_display(output_dir) → ResultsDisplayObject

Generate a ResultsDisplayObject for the node

This method will be used for every node in Process if there is no ‘create_results_display’ function defined

toplevel_description = 'Metadata about a group of 2D images or stacks'
toplevel_type = 'Image2DGroupMetadata'
class pipeliner.nodes.Image2DMetadataNode(node: Node)

Bases: NodeDataLoader

toplevel_description = 'Metadata about a single 2D image or stack'
toplevel_type = 'Image2DMetadata'
class pipeliner.nodes.Image2DNode(node: Node)

Bases: NodeDataLoader

default_results_display(output_dir) → ResultsDisplayObject

Generate a ResultsDisplayObject for the node

This method will be used for every node in Process if there is no ‘create_results_display’ function defined

get_summary_string(output_dir: str | None = None) → str

Generate a summary file for the node

This method should be overridden by every node where a summary needs to be generated

toplevel_description = 'A single 2D image'
toplevel_type = 'Image2D'
class pipeliner.nodes.Image2DStackNode(node: Node)

Bases: NodeDataLoader

default_results_display(output_dir) → ResultsDisplayObject

Generate a ResultsDisplayObject for the node

This method will be used for every node in Process if there is no ‘create_results_display’ function defined

get_summary_string(output_dir: str | None = None) → str

Generate a summary file for the node

This method should be overridden by every node where a summary needs to be generated

toplevel_description = 'A single file containing a stack of 2D images'
toplevel_type = 'Image2DStack'
class pipeliner.nodes.Image3DGroupMetadataNode(node: Node)

Bases: NodeDataLoader

toplevel_description = 'Metadata about a group of 3D images (but not masks or density maps, which have their own specific types)'
toplevel_type = 'Image3DGroupMetadata'
class pipeliner.nodes.Image3DMetadataNode(node: Node)

Bases: NodeDataLoader

toplevel_description = 'Metadata about a single 3D image, except density maps, which have their own specific node type (DensityMap)'
toplevel_type = 'Image3DMetadata'
class pipeliner.nodes.Image3DNode(node: Node)

Bases: NodeDataLoader

default_results_display(output_dir) → ResultsDisplayObject

Generate a ResultsDisplayObject for the node

This method will be used for every node in Process if there is no ‘create_results_display’ function defined

get_summary_string(output_dir: str | None = None) → str

Generate a summary file for the node

This method should be overridden by every node where a summary needs to be generated

toplevel_description = 'Any 3D image that is not a density map or mask, for example a local resolution map, 3D FSC or cryoEF 3D transfer function'
toplevel_type = 'Image3D'
class pipeliner.nodes.LigandDescriptionNode(node: Node)

Bases: NodeDataLoader

toplevel_description = 'The stereochemical description of a ligand molecule'
toplevel_type = 'LigandDescription'
class pipeliner.nodes.LogFileNode(node: Node)

Bases: NodeDataLoader

default_results_display(output_dir) → ResultsDisplayObject

Generate a ResultsDisplayObject for the node

This method will be used for every node in Process if there is no ‘create_results_display’ function defined

toplevel_description = 'A log file from a process. Could be PDF, text or another format'
toplevel_type = 'LogFile'
class pipeliner.nodes.Mask2DNode(node: Node)

Bases: NodeDataLoader

default_results_display(output_dir) → ResultsDisplayObject

Generate a ResultsDisplayObject for the node

This method will be used for every node in Process if there is no ‘create_results_display’ function defined

get_summary_string(output_dir: str | None = None) → str

Generate a summary file for the node

This method should be overridden by every node where a summary needs to be generated

toplevel_description = 'A mask for use with 2D images'
toplevel_type = 'Mask2D'
class pipeliner.nodes.Mask3DNode(node: Node)

Bases: NodeDataLoader

default_results_display(output_dir) → ResultsDisplayObject

Generate a ResultsDisplayObject for the node

This method will be used for every node in Process if there is no ‘create_results_display’ function defined

get_summary_string(output_dir: str | None = None) → str

Generate a summary file for the node

This method should be overridden by every node where a summary needs to be generated

toplevel_description = 'A mask for use with 3D volumes'
toplevel_type = 'Mask3D'
class pipeliner.nodes.MicrographCoordsGroupNode(node: Node)

Bases: NodeDataLoader

default_results_display(output_dir) → ResultsDisplayObject

Generate a ResultsDisplayObject for the node

This method will be used for every node in Process if there is no ‘create_results_display’ function defined

get_image_metadata(image_name: str = '') → Mapping[str, float | int | str | dict | list]

Get metadata about a specific image associated with this node

Simple default implementation to get basic metadata assuming image_name is a path to a file. For richer metadata, or if image_name refers to an item in a STAR file that is not a simple image path, the node-specific class should override this method.

If image_name does not exist or is not an image, this will raise an exception.

toplevel_description = 'A file containing coordinate info for multiple micrographs, e.g. a STAR file with a list of coordinate files as created by a RELION picking job'
toplevel_type = 'MicrographCoordsGroup'
class pipeliner.nodes.MicrographCoordsNode(node: Node)

Bases: NodeDataLoader

toplevel_description = 'A file containing coordinate info for a single micrograph, e.g. a .star or .box file produced from picking'
toplevel_type = 'MicrographCoords'
class pipeliner.nodes.MicrographGroupMetadataNode(node: Node)

Bases: NodeDataLoader

default_results_display(output_dir) → ResultsDisplayObject

Generate a ResultsDisplayObject for the node

This method will be used for every node in Process if there is no ‘create_results_display’ function defined

get_image_metadata(image_name: str = '') → Mapping[str, float | int | str | dict | list]

Get metadata about a specific image associated with this node

Simple default implementation to get basic metadata assuming image_name is a path to a file. For richer metadata, or if image_name refers to an item in a STAR file that is not a simple image path, the node-specific class should override this method.

If image_name does not exist or is not an image, this will raise an exception.

toplevel_description = 'Metadata about a set of micrographs, for example a RELION corrected_micrographs.star file'
toplevel_type = 'MicrographGroupMetadata'
class pipeliner.nodes.MicrographMetadataNode(node: Node)

Bases: NodeDataLoader

toplevel_description = 'Metadata about a single micrograph'
toplevel_type = 'MicrographMetadata'
class pipeliner.nodes.MicrographMovieGroupMetadataNode(node: Node)

Bases: NodeDataLoader

default_results_display(output_dir) → ResultsDisplayObject

Generate a ResultsDisplayObject for the node

This method will be used for every node in Process if there is no ‘create_results_display’ function defined

get_image_metadata(image_name: str = '') → Mapping[str, float | int | str | dict | list]

Get metadata about a specific image associated with this node

Simple default implementation to get basic metadata assuming image_name is a path to a file. For richer metadata, or if image_name refers to an item in a STAR file that is not a simple image path, the node-specific class should override this method.

If image_name does not exist or is not an image, this will raise an exception.

toplevel_description = 'Metadata about multiple micrograph movies, e.g. movies.star'
toplevel_type = 'MicrographMovieGroupMetadata'
class pipeliner.nodes.MicrographMovieMetadataNode(node: Node)

Bases: NodeDataLoader

toplevel_description = 'Metadata about a single multi-frame micrograph movie'
toplevel_type = 'MicrographMovieMetadata'
class pipeliner.nodes.MicrographMovieNode(node: Node)

Bases: NodeDataLoader

default_results_display(output_dir) → ResultsDisplayObject

Generate a ResultsDisplayObject for the node

This method will be used for every node in Process if there is no ‘create_results_display’ function defined

get_summary_string(output_dir: str | None = None) → str

Generate a summary file for the node

This method should be overridden by every node where a summary needs to be generated

toplevel_description = 'A single multi-frame micrograph movie'
toplevel_type = 'MicrographMovie'
class pipeliner.nodes.MicrographNode(node: Node)

Bases: NodeDataLoader

default_results_display(output_dir) → ResultsDisplayObject

Generate a ResultsDisplayObject for the node

This method will be used for every node in Process if there is no ‘create_results_display’ function defined

get_summary_string(output_dir: str | None = None) → str

Generate a summary file for the node

This method should be overridden by every node where a summary needs to be generated

toplevel_description = 'A single micrograph'
toplevel_type = 'Micrograph'
class pipeliner.nodes.MicroscopeDataNode(node: Node)

Bases: NodeDataLoader

toplevel_description = 'A node type for files associated with characterising the microscope and detector. EG: defect files, gain references, or MTF curves'
toplevel_type = 'MicroscopeData'
class pipeliner.nodes.MlModelNode(node: Node)

Bases: NodeDataLoader

default_results_display(output_dir) → ResultsDisplayObject

Generate a ResultsDisplayObject for the node

This method will be used for every node in Process if there is no ‘create_results_display’ function defined

toplevel_description = 'A machine learning model'
toplevel_type = 'MlModel'
class pipeliner.nodes.Node(filename: str, nodetype: str, kwds: List[str] | None = None, override_format: str = '')

Bases: object

Nodes store info about input and output files of jobs that have been run

name

The name of the file the node represents

Type:

str

toplevel_type

The toplevel node type

Type:

str

format

The node’s generalised file type IE (‘mrc’ for mrc, ‘mrcs’ or ‘map’)

Type:

str

kwds

Keywords associated with the node

Type:

list[str]

output_from_process

The Process object for process that created the file

Type:

Process

input_for_processes_list

A list of Process objects for processes that use the node as an input

Type:

list

type

The full node type

Type:

str

property exists: bool

Returns True if the file in self.name exists

get_dataloader() → NodeDataLoader

Returns this node’s handle

Returns:

the node data loader object

Return type:

NodeDataLoader

class pipeliner.nodes.NodeDataLoader(node: Node)

Bases: object

Superclass to handle results display and validation for specific node types

Subclassed for each node type

Attrs:

toplevel_type (str): The toplevel type of the node toplevel_description (str): The description of the node

custom_validation() → bool | None

Allows for subclasses to customise validation

default_results_display(output_dir) → ResultsDisplayObject

Generate a ResultsDisplayObject for the node

This method will be used for every node in Process if there is no ‘create_results_display’ function defined

find_summary_file() → str | None

Get this node’s summary file name from the summary list.

If there is no summary file yet, None is returned.

Returns:

Summary file path

classmethod from_node(node: Node) → NodeDataLoader

Create a NodeDataLoader instance from a node

Parameters:

node (Node) – The node

Returns:

The specific node handler subclass for this node type

Return type:

NodeDataLoader

get_image_metadata(image_name: str = '') → Mapping[str, float | int | str | dict | list]

Get metadata about a specific image associated with this node

Simple default implementation to get basic metadata assuming image_name is a path to a file. For richer metadata, or if image_name refers to an item in a STAR file that is not a simple image path, the node-specific class should override this method.

If image_name does not exist or is not an image, this will raise an exception.

get_result_display_object() → ResultsDisplayObject

Get the default results display object for the node.

This method loads the results display object from a saved file on disk if there is one. If not, a new results display object is generated and saved.

Returns:

The default results display object for the node

Return type:

ResultsDisplayObject

get_summary_file_name(output_dir: str | None, tag: str | None = None) → str

Get the summary file name

Parameters:
  • output_dir (Optional[str]) – The output directory of the node

  • tag (Optional[str]) – Tag to add to the end of the file name

Returns:

The file name

Return type:

str

get_summary_string(output_dir: str | None = None) → str

Generate a summary file for the node

This method should be overridden by every node where a summary needs to be generated

load_results_display_file() → ResultsDisplayObject | None

Load the node’s results display object from a file on disk.

This method must be fast because it is used by the GUI to load node results. Therefore, if the display object fails to load properly, no attempt is made to recalculate it and a ResultsDisplayPending object is returned instead.

If there is no results display file yet, None is returned.

Returns:

A ResultsDisplayObject, or None.

not_compatible_with_default_output() → ResultsDisplayObject

Return a ResultsDisplayText object for jobs with no default display object

Returns:

The default display object

Return type:

ResultsDisplayText

registry: dict[str, Callable] = {'AtomCoords': <class 'pipeliner.nodes.AtomCoordsNode'>, 'AtomCoordsGroupMetadata': <class 'pipeliner.nodes.AtomCoordsGroupMetadataNode'>, 'DensityMap': <class 'pipeliner.nodes.DensityMapNode'>, 'DensityMapGroupMetadata': <class 'pipeliner.nodes.DensityMapGroupMetadataNode'>, 'DensityMapMetadata': <class 'pipeliner.nodes.DensityMapMetadataNode'>, 'EulerAngles': <class 'pipeliner.nodes.EulerAnglesNode'>, 'EvaluationMetric': <class 'pipeliner.nodes.EvaluationMetricNode'>, 'Image2D': <class 'pipeliner.nodes.Image2DNode'>, 'Image2DGroupMetadata': <class 'pipeliner.nodes.Image2DGroupMetadataNode'>, 'Image2DMetadata': <class 'pipeliner.nodes.Image2DMetadataNode'>, 'Image2DStack': <class 'pipeliner.nodes.Image2DStackNode'>, 'Image3D': <class 'pipeliner.nodes.Image3DNode'>, 'Image3DGroupMetadata': <class 'pipeliner.nodes.Image3DGroupMetadataNode'>, 'Image3DMetadata': <class 'pipeliner.nodes.Image3DMetadataNode'>, 'LigandDescription': <class 'pipeliner.nodes.LigandDescriptionNode'>, 'LogFile': <class 'pipeliner.nodes.LogFileNode'>, 'Mask2D': <class 'pipeliner.nodes.Mask2DNode'>, 'Mask3D': <class 'pipeliner.nodes.Mask3DNode'>, 'Micrograph': <class 'pipeliner.nodes.MicrographNode'>, 'MicrographCoords': <class 'pipeliner.nodes.MicrographCoordsNode'>, 'MicrographCoordsGroup': <class 'pipeliner.nodes.MicrographCoordsGroupNode'>, 'MicrographGroupMetadata': <class 'pipeliner.nodes.MicrographGroupMetadataNode'>, 'MicrographMetadata': <class 'pipeliner.nodes.MicrographMetadataNode'>, 'MicrographMovie': <class 'pipeliner.nodes.MicrographMovieNode'>, 'MicrographMovieGroupMetadata': <class 'pipeliner.nodes.MicrographMovieGroupMetadataNode'>, 'MicrographMovieMetadata': <class 'pipeliner.nodes.MicrographMovieMetadataNode'>, 'MicroscopeData': <class 'pipeliner.nodes.MicroscopeDataNode'>, 'MlModel': <class 'pipeliner.nodes.MlModelNode'>, 'OptimiserData': <class 'pipeliner.nodes.OptimiserDataNode'>, 'ParamsData': <class 'pipeliner.nodes.ParamsDataNode'>, 'ParticleGroupMetadata': <class 'pipeliner.nodes.ParticleGroupMetadataNode'>, 'ProcessData': <class 'pipeliner.nodes.ProcessDataNode'>, 'ProjectMetadata': <class 'pipeliner.nodes.ProjectMetadataNode'>, 'Restraints': <class 'pipeliner.nodes.RestraintsNode'>, 'RigidBodies': <class 'pipeliner.nodes.RigidBodiesNode'>, 'Sequence': <class 'pipeliner.nodes.SequenceNode'>, 'SequenceAlignment': <class 'pipeliner.nodes.SequenceAlignmentNode'>, 'SequenceGroup': <class 'pipeliner.nodes.SequenceGroupNode'>, 'StructureFactors': <class 'pipeliner.nodes.StructureFactorsNode'>, 'TiltSeries': <class 'pipeliner.nodes.TiltSeriesNode'>, 'TiltSeriesGroupMetadata': <class 'pipeliner.nodes.TiltSeriesGroupMetadataNode'>, 'TiltSeriesMetadata': <class 'pipeliner.nodes.TiltSeriesMetadataNode'>, 'TiltSeriesMovie': <class 'pipeliner.nodes.TiltSeriesMovieNode'>, 'TiltSeriesMovieGroupMetadata': <class 'pipeliner.nodes.TiltSeriesMovieGroupMetadataNode'>, 'TiltSeriesMovieMetadata': <class 'pipeliner.nodes.TiltSeriesMovieMetadataNode'>, 'TomoManifoldData': <class 'pipeliner.nodes.TomoManifoldDataNode'>, 'TomoOptimisationSet': <class 'pipeliner.nodes.TomoOptimisationSetNode'>, 'TomoTrajectoryData': <class 'pipeliner.nodes.TomoTrajectoryDataNode'>, 'Tomogram': <class 'pipeliner.nodes.TomogramNode'>, 'TomogramGroupMetadata': <class 'pipeliner.nodes.TomogramGroupMetadataNode'>, 'TomogramMetadata': <class 'pipeliner.nodes.TomogramMetadataNode'>, 'VisualisationScript': <class 'pipeliner.nodes.VisualisationScriptNode'>}
toplevel_description = 'Nonstandard node type'
toplevel_type = ''
validate(must_exist: bool = False) → bool

Attempt to validate the file for the node

Returns:

0 if the file exists but is invalid, -1 if the file doesn’t exist, 1 if the file exists and is valid

Return type:

int

write_default_result_file() → None

Write the default display file for this node

write_summary_file() → None

Write the summary file for this node and add it to the summary list.

static write_summary_string_as_text_file(text_str: str, summary_file: str) → None

Write a summary text file with input summary string

Parameters:
  • text_str (str) – The input summary string

  • summary_file (str) – The name of the file to write to

class pipeliner.nodes.OptimiserDataNode(node: Node)

Bases: NodeDataLoader

toplevel_description = 'Specific type for RELION optimiser data from a refinement or classification job'
toplevel_type = 'OptimiserData'
class pipeliner.nodes.ParamsDataNode(node: Node)

Bases: NodeDataLoader

toplevel_description = 'Contains parameters for running an external program'
toplevel_type = 'ParamsData'
class pipeliner.nodes.ParticleGroupMetadataNode(node: Node)

Bases: NodeDataLoader

default_results_display(output_dir) → ResultsDisplayObject

Generate a ResultsDisplayObject for the node

This method will be used for every node in Process if there is no ‘create_results_display’ function defined

toplevel_description = 'Metadata for a set of particles, e.g particles.star from RELION'
toplevel_type = 'ParticleGroupMetadata'
class pipeliner.nodes.ProcessDataNode(node: Node)

Bases: NodeDataLoader

toplevel_description = 'Other data resulting from a process that might be of use for other processes, for example an optimiser STAR file, postprocess STAR file or particle polishing parameters'
toplevel_type = 'ProcessData'
class pipeliner.nodes.ProjectMetadataNode(node: Node)

Bases: NodeDataLoader

toplevel_description = 'A node type for additional metadata about the project. Might  contain data about imaging parameters or external processing performed outside of ccpem-pipeliner'
toplevel_type = 'ProjectMetadata'
class pipeliner.nodes.RestraintsNode(node: Node)

Bases: NodeDataLoader

toplevel_description = 'Distance and angle restraints for atomic model refinement'
toplevel_type = 'Restraints'
class pipeliner.nodes.RigidBodiesNode(node: Node)

Bases: NodeDataLoader

toplevel_description = 'A description of rigid bodies in an atomic model'
toplevel_type = 'RigidBodies'
class pipeliner.nodes.SequenceAlignmentNode(node: Node)

Bases: NodeDataLoader

toplevel_description = 'Files that contain or are used to generate multi sequence alignments'
toplevel_type = 'SequenceAlignment'
class pipeliner.nodes.SequenceGroupNode(node: Node)

Bases: NodeDataLoader

toplevel_description = 'A group of protein or nucleic acid sequences'
toplevel_type = 'SequenceGroup'
class pipeliner.nodes.SequenceNode(node: Node)

Bases: NodeDataLoader

toplevel_description = 'A protein or nucleic acid sequence file'
toplevel_type = 'Sequence'
class pipeliner.nodes.StructureFactorsNode(node: Node)

Bases: NodeDataLoader

toplevel_description = 'A set of structure factors in reciprocal space, usually corresponding to a real space density map'
toplevel_type = 'StructureFactors'
class pipeliner.nodes.TiltSeriesGroupMetadataNode(node: Node)

Bases: NodeDataLoader

get_image_metadata(image_name: str = '') → Mapping[str, float | int | str | dict | list]

Get metadata about a specific image associated with this node

Simple default implementation to get basic metadata assuming image_name is a path to a file. For richer metadata, or if image_name refers to an item in a STAR file that is not a simple image path, the node-specific class should override this method.

If image_name does not exist or is not an image, this will raise an exception.

toplevel_description = 'Metadata about a group of multiple tomographic tilt series'
toplevel_type = 'TiltSeriesGroupMetadata'
class pipeliner.nodes.TiltSeriesMetadataNode(node: Node)

Bases: NodeDataLoader

toplevel_description = 'Metadata about a single tomographic tilt series'
toplevel_type = 'TiltSeriesMetadata'
class pipeliner.nodes.TiltSeriesMovieGroupMetadataNode(node: Node)

Bases: NodeDataLoader

toplevel_description = 'Metadata about multi-frame movies for multiple tomographic tilt series'
toplevel_type = 'TiltSeriesMovieGroupMetadata'
class pipeliner.nodes.TiltSeriesMovieMetadataNode(node: Node)

Bases: NodeDataLoader

default_results_display(output_dir) → ResultsDisplayObject

Generate a ResultsDisplayObject for the node

This method will be used for every node in Process if there is no ‘create_results_display’ function defined

toplevel_description = 'Metadata about multi-frame movies for a single tomographic tilt series'
toplevel_type = 'TiltSeriesMovieMetadata'
class pipeliner.nodes.TiltSeriesMovieNode(node: Node)

Bases: NodeDataLoader

get_image_metadata(image_name: str = '') → Mapping[str, float | int | str | dict | list]

Get metadata about a specific image associated with this node

Simple default implementation to get basic metadata assuming image_name is a path to a file. For richer metadata, or if image_name refers to an item in a STAR file that is not a simple image path, the node-specific class should override this method.

If image_name does not exist or is not an image, this will raise an exception.

toplevel_description = 'A file containing a multi-frame movie for a single tomographic tilt series'
toplevel_type = 'TiltSeriesMovie'
class pipeliner.nodes.TiltSeriesNode(node: Node)

Bases: NodeDataLoader

toplevel_description = 'A single tomographic tilt series'
toplevel_type = 'TiltSeries'
class pipeliner.nodes.TomoManifoldDataNode(node: Node)

Bases: NodeDataLoader

toplevel_description = 'Data about a RELION tomography manifold'
toplevel_type = 'TomoManifoldData'
class pipeliner.nodes.TomoOptimisationSetNode(node: Node)

Bases: NodeDataLoader

toplevel_description = 'Data about a RELION tomography optimisation set'
toplevel_type = 'TomoOptimisationSet'
class pipeliner.nodes.TomoTrajectoryDataNode(node: Node)

Bases: NodeDataLoader

toplevel_description = 'Data about a RELION tomography trajectory'
toplevel_type = 'TomoTrajectoryData'
class pipeliner.nodes.TomogramGroupMetadataNode(node: Node)

Bases: NodeDataLoader

default_results_display(output_dir) → ResultsDisplayObject

Generate a ResultsDisplayObject for the node

This method will be used for every node in Process if there is no ‘create_results_display’ function defined

toplevel_description = 'Metadata about multiple tomograms'
toplevel_type = 'TomogramGroupMetadata'
class pipeliner.nodes.TomogramMetadataNode(node: Node)

Bases: NodeDataLoader

toplevel_description = 'Metadata about a single tomogram'
toplevel_type = 'TomogramMetadata'
class pipeliner.nodes.TomogramNode(node: Node)

Bases: NodeDataLoader

toplevel_description = 'A single tomogram'
toplevel_type = 'Tomogram'
class pipeliner.nodes.VisualisationScriptNode(node: Node)

Bases: NodeDataLoader

default_results_display(output_dir) → ResultsDisplayObject

Generate a ResultsDisplayObject for the node

This method will be used for every node in Process if there is no ‘create_results_display’ function defined

get_summary_string(output_dir: str | None = None) → str

Generate a summary file for the node

This method should be overridden by every node where a summary needs to be generated

toplevel_description: str = 'Scripts that can be opened with Doppio viewers'
toplevel_type = 'VisualisationScript'
pipeliner.nodes.add_to_node_display_file(node_name: str, display_file: str) → None

Add an entry to the node display file

Parameters:
  • node_name (str) – The name of the node file

  • display_file (str) – Path to the display file

pipeliner.nodes.add_to_node_summary_list(node_name: str, summary_file: str) → None

Add an entry to the node summary list

Parameters:
  • node_name (str) – The name of the node

  • summary_file (str) – Path to the summary file

pipeliner.nodes.all_node_toplevel_types(add_new: bool = False, new_pos: int = -1) → List[str]

Get a list of all available node top level types

Parameters:
  • add_new (bool) – If True, add an option to add a new node type to the list

  • new_pos (int) – What position in the list to add the new node option

Returns:

The list of node top level types

Return type:

List[str]

pipeliner.nodes.check_file_is_cif(file: str) → bool

Validate that a file is a cif or STAR file

Parameters:

file (str) – The file to check

Returns:

True if the file looks like a cif file, False otherwise

Return type:

bool

pipeliner.nodes.check_file_is_fasta(file: str, max_lines=100) → bool

Check if a file lookslike it is in the fasta format Should start with a header starting with > sequence lines should only have FASTA AA/nucleotide characters

Parameters:
  • file (str) – The file to check

  • max_lines (int) – The maximum number of lines to check - to prevent getting bogged down by massive files

Returns:

True if the file looks like a fasta file, False otherwise

Return type:

bool

pipeliner.nodes.check_file_is_json(file: str) → bool

Validate if a file is json format

Parameters:

file (str) – The file to check

Returns:

True if the file looks like a json file, False otherwise

Return type:

bool

pipeliner.nodes.check_file_is_text(file: str) → bool

Validate that a file is a text file

Parameters:

file (str) – The file to check

Returns:

True if the file looks like a text file, False otherwise

Return type:

bool

pipeliner.nodes.get_node_results_display_file_name(node_name: str) → str | None

Get the results display file name for a node from the node display file.

Returns: the name of the node results display file, or None if there is no entry

for this node name in the node display file.

pipeliner.nodes.get_node_summary_file_from_list(node_name: str) → str | None

Get the summary file for a node from the node summary list.

Returns: the name of the node summary file, or None if there is no entry

for this node name in the summary list.

pipeliner.nodes.identify_format(file_name: str) → str

Get the generalized format of a node from file extension

EG: .map or .mrcs -> mrc

Parameters:

file_name (str) – file name

Returns:

generalized format, or the ext if no generalized format is found

Return type:

str

pipeliner.nodes.remove_from_node_display_file(node_name: str) → None

Remove an entry from the node display file

Parameters:

node_name (str) – The file to remove

pipeliner.nodes.remove_from_node_summary_list(node_name: str) → None

Remove an entry from the node summary list

Parameters:

node_name (str) – The file to remove