EMD File¶
This module defines functions for parsing and writing EMD map files.
-
class
TRNET
(n_nodes)[source]¶ Class for building topology representing networks using EM density maps. It uses the algorithm described in [TM94].
[TM94] Martinetz T, Schulten K, Topology Representing Networks. Neural Networks 1994 7(3):507-552.
-
class
EMDMAP
(stream, min_cutoff, max_cutoff)[source]¶ Class for handling EM density maps in EMD/MRC2014 format.
Parameters: - stream – a file stream containing data from an EMD/MRC file.
- min_cutoff (None, float) – minimum cutoff for thresholding
- max_cutoff (None, float) – maximum cutoff for thresholding
-
coordinate
(sec, row, col)[source]¶ Given a position as sec, row and col, it will return its coordinate in Angstroms.
-
numidx2matidx
(numidx)[source]¶ Given index of the position, it will return the numbers of section, row and column.
-
thresholdMap
(min_cutoff=None, max_cutoff=None)[source]¶ Thresholds a map and returns a new map like the equivalent function in TEMPy
-
apix
¶
-
filename
¶
-
origin
¶
-
parseEMDStream
(stream, **kwargs)[source]¶ Parse lines of data stream from an EMD/MRC2014 file and optionally return an
AtomGroup
containing TRN nodes based on it.Parameters: stream – Any object with the method readlines
(e.g.file
, buffer, stdin)
-
parseEMD
(emd, **kwargs)[source]¶ Parses an EM density map in EMD/MRC2015 format and optionally returns an
AtomGroup
containing beads built in the density using the TRN algorithm [_TM94].This function extends
parseEMDStream()
.See Cryo-EM Dynamics (CryoDy) for a usage example.
Parameters: - emd (str) – an EMD identifier or a file name. A 4-digit EMDataBank identifier can be provided to download it via FTP.
- min_cutoff (float) – minimum density cutoff to read EMD map. The regions with lower density than this cutoff are discarded. This corresponds to the previous cutoff and take values from it.
- max_cutoff (float) – maximum density cutoff to read EMD map. The regions with higher density than this cutoff are discarded.
- n_nodes (int) – A bead based network will be constructed into the provided density map. This parameter will set the number of beads to fit to density map. Default is 0. Please change it to some number to run the TRN algorithm.
- num_iter (int) – After reading density map, coordinates are predicted with the topology representing network method. This parameter is the total number of iterations of this algorithm.
- map (bool) – Return the density map itself. Default is False in line with previous behaviour. This value is reset to True if n_nodes is 0 or less.