Skip to main content

dynamotable

Build Status PyPI version PyPI pyversions

dynamotable is a Python package to facilitate reading and writing of table files from the Dynamo subtomogram averaging package

Features

  • Read table files created by Dynamo as pandas DataFrames
  • Write table files compatible with Dynamo subtomogram averaging from minimal data
  • Supports reading and writing of table map files with tables to keep track of tomogram files
  • clean API

Installation

Installation is available directly from the Python package index

pip install dynamotable

Usage

Reading table files

Simple

import dynamotable
df = dynamotable.read('t_double.tbl')
>>> df = dynamotable.read('t_double.tbl')
>>> df
     tag  aligned_value  averaged_value        dx  ...  npar  undefined1  ref  sref
0      1              1               0  2.517800  ...     0           0    0     5
1      2              1               0  3.246300  ...     0           0    0     4
2      3              1               0 -2.984100  ...     0           0    0     4
3      4              1               0  3.307000  ...     0           0    0     4
4      5              1               0  1.058900  ...     0           0    0     2
..   ...            ...             ...       ...  ...   ...         ...  ...   ...
295  296              1               0 -2.656600  ...     0           0    0     5
296  297              1               0  3.829400  ...     0           0    0     1
297  298              1               0  1.701600  ...     0           0    0     5
298  299              1               0  0.003773  ...     0           0    0     2
299  300              1               0 -0.231290  ...     0           0    0     3

[300 rows x 35 columns]

With table map file

table map files are two column text files containing the tomogram index (found in column 20 of a table file) and the file path of the tomogram.

>>> df = dynamotable.read('t_complex.tbl', 'tmap_complex.doc')
>>> df
>>> df
        tag  aligned_value  ...  eig1                   tomo_file
0         2              1  ...     0  tomo_ts01.mrc_15.00Apx.mrc
1         4              1  ...     0  tomo_ts01.mrc_15.00Apx.mrc
2         6              1  ...     0  tomo_ts01.mrc_15.00Apx.mrc
3         8              1  ...     0  tomo_ts01.mrc_15.00Apx.mrc
4        10              1  ...     0  tomo_ts01.mrc_15.00Apx.mrc
     ...            ...  ...   ...                         ...
8737  18064              1  ...     0  tomo_ts99.mrc_15.00Apx.mrc
8738  18066              1  ...     0  tomo_ts99.mrc_15.00Apx.mrc
8739  18068              1  ...     0  tomo_ts99.mrc_15.00Apx.mrc
8740  18070              1  ...     0  tomo_ts99.mrc_15.00Apx.mrc
8741  18072              1  ...     0  tomo_ts99.mrc_15.00Apx.mrc

[8742 rows x 42 columns]

An extra column called tomo_file is added to the dataframe which contains the filepath of the tomogram you wish the particle to be linked to

Writing table files

Table files are written with dynamotable.write

>>> dynamotable.write(df, 'table_out.tbl')

Note that

  • if tag is not a column in the dataframet then tags will be generated automatically
  • if tomo_file is a column in the dataframe then a corresponding table map file will be generated
  • if tomo_file is provided but no tomogram table indices are present these will be generated automatically
  • if the aligned_value column is not present it will be set to 1 to mark particles for alignment in subtomogram averaging projects

License

The project is released under the BSD 3-Clause License

Metadata

Release files for dynamotable 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dynamotable 0.3.0
File Size Uploaded
dynamotable-0.3.0.tar.gz 359.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for dynamotable 0.3.0
File Interpreter ABI Platform
dynamotable-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 365.0 kB

Release files / dynamotable-0.3.0.tar.gz

Download URL dynamotable-0.3.0.tar.gz
Size 359.0 kB
Tags Source
SHA-256 checksum
How to use checksums
e88b9419404f3ca32537b02a2a2b25e57127d36b11180937bfac702a7bac9f58
BLAKE2b-256 checksum
How to use checksums
7f0832caf193f06ee56f6fe5a9b51b7741cbe1dba21f46fa6d52aed44738a9af
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 2, 2026.

Transparency log

Release files / dynamotable-0.3.0-py3-none-any.whl

Download URL dynamotable-0.3.0-py3-none-any.whl
Size 6.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
378c2536e09594d06ca7a0d6b48cb78e3af480d5e5a96bcfdd8b83360c808ba0
BLAKE2b-256 checksum
How to use checksums
d122661c0e01f4fc96f48f28699c509aaf0a1c15ab31c3aee838fa8fdc530d2e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 2, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files

0.2.4

1 release file

0.2.3

1 release file

0.2.2

1 release file

0.2.1

1 release file

0.2

1 release file

0.1

1 release file

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page