Skip to main content

Overengineered batch processing script for tomography data with Warp and aretomo.

Project description

waretomo

License PyPI Python Version CI codecov

Overengineered batch processing script for tomography data with Warp and aretomo.

NOTE: This was tested with AreTomo 1.3.4, i's recommended to use the same version.

Installation and usage

pip install waretomo
waretomo -h

Every time you run waretomo, a log will be appended to an waretomo.log file in the output directory.

Walkthrough

Here's a short summary of how I recommend using this script:

  • pre-process your dataset in Warp, up to Create stack for imod. Make sure to deselect bad tilts from the warp interface; they will be skipped in subsequent steps
  • run waretomo in dry-run mode (-d), to make sure everything is set up correctly. Pass any other options you'd like (see waretomo -h for a complete list and shorthands):
waretomo . --mdoc-dir ./mdocs  -b 8 -t 800 -d
  • follow error messages if any arise (you may have to provide the path to the AreTomo executable with --aretomo, for example)
  • once the above command works, it will give you a summary of inputs and of the upcoming pipeline. It's time to try to run it on a single tomogram, using -j (--just). Note that the name to provide to -j is the tomogram name given at the top of the mdoc file (ImageFile = <something>), and not the input file (this is because warp actually uses this value for all subsequent outputs).
waretomo . --mdoc-dir ./mdocs  -b 8 -t 800 -j tiltseries_23.mrc
  • this will run the full pipeline on that tomogram. Keep an eye out for error messages, they might give you tips for solving them.
  • if everything works, you will now have a few outputs to check out:
    • ./waretomo_processing/tiltseries_23.mrc: raw aretomo reconstruction.
    • ./waretomo_processing/denoised/tiltseries_23.mrc: same as above, denoised with topaz for better annotation
    • <mdoc-dir>/mdoc_tilted/tiltseries_23.mrc.mdoc: mdoc file updated with skipped tilt and with adjusted tilt angles from aretomo's TiltAlign option (e.g: to align lamellae to the XY plane)
    • ./waretomo_processing/tiltseries_23.xf: alignment metadata, used by warp together with above mdocs for reconstruction.
  • check out the reconstructions and make sure everything looks as you want. If anything is wrong, adjust parameters as you see fit. You can also run only parts of the script by using the --start-from and --stop-at options (both are inclusive). Use -f if you want to overwrite existing outputs.
  • once you're happy, remove the -j option to process the full dataset.

At this point, you're ready to go back to Warp. Here, you can simply import tilt series from IMOD. Don't forget to provide the mdoc_tilted directory instead of the original mdocs. Set waretomo_processing as the Root folder with IMOD processing results, and Warp will find the xf files located there. Provide the pixel size of the binned aretomo reconstructions (find out with e.g: header waretomo_processing/tiltseries_23.mrc.mrc). You might have to provide the dose per tilt, depending on the origin/correctness of your mdocs.

You can now proceed with reconstructing with Warp, use M, and so on, while having matching AreTomo reconstructions with their local patch alignments and subsequent denoising to maximize readability for picking and annotation.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

waretomo-0.1.4.tar.gz (27.7 kB view details)

Uploaded Source

Built Distribution

waretomo-0.1.4-py3-none-any.whl (27.0 kB view details)

Uploaded Python 3

File details

Details for the file waretomo-0.1.4.tar.gz.

File metadata

  • Download URL: waretomo-0.1.4.tar.gz
  • Upload date:
  • Size: 27.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for waretomo-0.1.4.tar.gz
Algorithm Hash digest
SHA256 0ef698413e676d6960d4ad7ac6e3123e23109ffb2744cecbf67787bb029c2af0
MD5 04b7d1b37dd9d086286c6261e0fd4e9b
BLAKE2b-256 2a5a45b3b9e8d24338b072683ca30b9425cfcf3fe23f016fe2fd179d6a679d1c

See more details on using hashes here.

File details

Details for the file waretomo-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: waretomo-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 27.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for waretomo-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 90b220fdc7f50087ce63971bce978570a36da2f1dffd0e514c502b42d508d141
MD5 f450ebc967698ecddcff9753ba86c7c3
BLAKE2b-256 a7955ad9612f9a17ffd6242939a587c6ef08d0b042b5923564eb6e3269108761

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page