relion.convert.convert_base module

New conversion functions dealing with Relion3.1 new star files format.

class relion.convert.convert_base.ReaderBase(**kwargs)[source]

Bases: object

Helper class to grab information from star file rows and fill the required values in Scipion objects (e.g particles, micrographs, etc)

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:
setParticleTransform(particle, row)[source]

Set the transform values from the row.

class relion.convert.convert_base.WriterBase(**kwargs)[source]

Bases: object

Helper class to convert from Scipion SetOfImages subclasses into Relion>3.1 star files (and binaries if conversion needed).

update(attrsList, **kwargs)[source]

Update the some attributes with values from kwargs.

writeSetOfMicrographs(micsIterable, starFile, **kwargs)[source]
writeSetOfMovies(moviesIterable, starFile, **kwargs)[source]
writeSetOfParticles(partsSet, starFile, **kwargs)[source]

Convert a set of particles into a star file and maybe binary files.

Params:
partsSet: input particles set starFile: the filename of the star file that will be written.
Keyword Arguments:

blockName: The name of the data block (default particles) fillMagnification: If True set magnification values (default False)

outputStack: A file name to write all particles. If this option is
passed, then the outputDir will be ignored.