Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time


Software for spatial tissue profiling by imaging-free molecular tomography.




Tutorials. Documentation and tutorials explaining the step-by-step usage of Tomographer can be found here:
Example Notebooks. Step-by-step notebooks to be found here:
Tomographer Data Viewer. Tomographer data-set browser of mouse and lizard brains:
Original Article.


The installation of the tomographer package and all requirements is achieved in the following steps.

If you don't have conda, you might find it helpful to install Miniconda before beginning:


First, configure your environment containing some dependencies:

conda create -n tomographer-env python=3.7 numpy=1.19.0 scipy=1.2.0 pandas=0.24.1 scikit-learn=0.20.2 scikit-image=0.14.2 matplotlib=3.0.2 --channel bioconda --channel conda-forge
conda activate tomographer-env

Second, install required libraries

pip install PyWavelets GPy GPyopt
git clone
cd gp_extras
[sudo] python install

For some tutorial notebooks you will also need BrainMap:

git clone
cd brainmap
[sudo] python install

Third, clone tomographer locally

git clone

Lastly, install in development mode

pip install -e ./tomographer

To update you can simply pull (you don't need to reinstall):

cd tomographer
git pull


Please refer to for a detailed tutorial

The package requires 3 input files and 2 output directories.


  • Config File : This is an .hdf5 formatted file which contains the following keys and values

    • angles _ names : array of angle names like ['angle9', 'angle117']
    • angles _ values : array of angle values in radians like [3.65, 5.096]
    • first _ points : array specifying the starting point to begin considering values within projection for each angle
    • mask _ g : 2D image array of mask (binary)
    • mask _ thrs : threshold used to create mask from reference image
    • masked _ formulation : Boolean indicating if design matrix should be recalculated using the masked formulation
    • proj _ len : array indicating the lengths of projections for each angle
    • reference _ mask : image array of reference image
    • symmetry : Boolean indicating if design matrix should be recalculated assuming axis of symmetry in tissue
    • widths : array indicating the estimated widths of the secondary slices in each angle
    • A : Specified design matrix. Note that this matrix is recalculated if the symmetry value is True or if the masked formulation value is True
  • Input File : This is an .hdf5 formatted file which contains a dictionary of dictionaries. It can be created with the ReconstructionConfig Class

    • The key genes is further queried by
      • The gene name, which itself contains the keys containing
        • The angle names that match those in the config file
          • Values inside input_file['genes'][gene_name][angle_name] correspond to the projection values
  • Gene File: Is a .txt formatted file which contains the individual gene names separated by lines (\n). These are queried by the tomographer one by one


  • Output Reconstruction File : This is an .hdf5 formatted file which contains all the reconstructed genes
  • Output Alpha-Beta File : This is an .hdf5 formatted file which contains all the selected alpha and beta values that were selected for a given reconstruction. This may be useful for filtering out poorly reconstructed genes.

Example Usage

From tomographer, one can run the following command:

python3 tomography/ -c path_to_config.hdf5 -i path_to_inputs.hdf5 -g /list_of_genes.txt -o /path_to_output.hdf5 -a /path_to_/alpha_beta_output.hdf5


The Tomographer package implements the mathematical spatial image reconstruction of any set of read counts as described in the following article:








No releases published


No packages published