π Application Programming Interface#
Burmeister Data reader.
- class BurmeisterDataReader#
Bases:
object
ΜBurmeister
Data reader.Example
>>> from galactic.io.data.burmeister import BurmeisterDataReader >>> reader = BurmeisterDataReader() >>> import io >>> data = '''B ... ... 2 ... 2 ... ... 1 ... 2 ... a ... b ... .X ... XX ... ''' >>> individuals = reader.read(io.StringIO(data)) >>> [ ... (key, sorted(list(values))) ... for key, values in individuals.items() ... ] [('1', ['b']), ('2', ['a', 'b'])]
Notes
See also https://upriss.github.io/fca/fcafileformats.html#Burmeister
- classmethod extensions()#
Get an iterator over the supported extensions.
- Returns:
An iterator over the supported extensions
- Return type:
Iterator[str]
- classmethod read(data_file)#
Read a
Burmeister
data file.- Parameters:
data_file (
TextIO
) β A readable text file.- Returns:
The data.
- Return type:
- Raises:
RuntimeError β If the
Burmeister
HEADER is not detected