Important
We are no longer actively maintaining this repository. All active work by the Allen Institute for Cell Science is located under the AllenCell organization.
This workflow is used to align images across different rounds of imaging on data acquired on ZSD microscopes. This workflow can be run in several ways. (1) In a manual sequence where we run a set of python scripts, (2) In a hybrid sequential/parrelilized setup where we can parralize the most time consuming parts of this workflow across different nodes via slurm, (3) In a modular setup where we can perform round alignment for just a specific desired position, (4) Using Snakemake for automation of running most of these steps(See multiplex_immuno_processing/batch_processing/ReadMe.md for instructions)
This workflow has 4 main steps:
This yaml specifies what data can be used for round alignment. Examples of yaml configuration files are provided in config_files/ We also provide a script that can generate an initial config which can then be manually modified. This may or may not work depending on the folder and naming structure of the input data
python multiplex_immuno_processing/generate_initial_config.py --input_dirs {} --output_dirs {}
This specifies which position/scenes correspond to which position/scenes across different rounds of imaging
python multiplex_immuno_processing/find_matched_positions_across_rounds.py --input_yaml {} --refrence_round {}
The output of this is a directory called matched_datasets which contains a csv for each position with the corresponding position/scenes across each round
This step finds the alignment parameters for each position in the matched position dataframe
python multiplex_immuno_processing/find_alignment_parameters.py --input_yaml ../../config_files/{} --matched_position_csv_dir {}
The argument matched_position_csv_dir is optional and if specified, this will only run the single position that is desired, otherwise this will find the alignment parameters for each position sequentially
or to parrallize on slurm:
cd multiplex_immuno_processing/batch_processing
python tempelate_batch_run.py --input_yaml ../../config_files/{} --matched_position_csv_parent_dir {}
The output of this is a directory called alignment_parameters which contains csvs for each position with the calculated alignment parameters
This step performs a rigid registration according to the alignment parameters calculated in the previous step
python multiplex_immuno_processing/apply_registration.py --input_yaml ../../config_files/{} --matched_position_w_align_params_csv {}
The argument matched_position_w_align_params_csv is optional and if specified, this will only run the single position that is desired, otherwise this will allign each position sequentially
or to parrallize on slurm:
cd multiplex_immuno_processing/batch_processing
python tempelate_batch_run.py --input_yaml ../../config_files/{} --matched_position_w_align_params_csv_parent_dir {}
The output of this is a directory called round_aligned_images which contains all the aligned positions for each round. This step also outputs gif overlays for each position. This can be used for quick validation of the alignments
