relion.convert package

Module contents

class relion.convert.ClassesLoader(protocol, alignType)[source]

Bases: object

Helper class to read classes information from star files produced by Relion classification runs (2D or 3D).

fillClassesFromIter(clsSet, iteration)[source]

Create the SetOfClasses3D from a given iteration.

class relion.convert.DefocusGroups[source]

Bases: object

Helper class to create defocus groups for particles.

class Group(id)[source]

Bases: object

Single CTF group.

addDefocus(defocus)[source]
getGroup(defocus)[source]

Return the group that this defocus belong.

splitByDiff(inputParts, defocusDiff=1000, minGroupSize=10)[source]
relion.convert.createReader(**kwargs)[source]

Create a new Reader instance. By default it will create the new version (3.1 or newer) of STAR file. It can also be forced to use old format by passing the format=‘30’ argument

relion.convert.createWriter(**kwargs)[source]

Create a new Writer instance. By default it will create the new version (3.1 or newer) of STAR file.

relion.convert.readSetOfParticles(starFile, partsSet, **kwargs)[source]

Convert a star file into a set of particles.

Params:

starFile: the filename of the star file partsSet: output particles set

Keyword Arguments:

blockName: The name of the data block (default particles) alignType: removeDisabled: format: string value to specify STAR format, if ‘30’ it will use

Relion3.0 format

relion.convert.writeSetOfParticles(imgSet, starFile, **kwargs)[source]

Convenience function to a SetOfImages as Relion metadata using a Writer.

Params:

imgSet: the SetOfImages instance. starFile: the filename where to write the meta

Keyword Arguments:

outputDir: where binary files will be converted or linked. blockName: The name of the data block (default particles) fillMagnification: If True set magnification values (default False) alignType: extraLabels: postprocessImageRow: