m2m_experiments_finder

Find experiments in the Allen Mouse Brain Connectivity Atlas (AMBCA) dataset giving a set of User Data Space (UDS) voxel coordinates [x, y, z].

The script then saves the experiment identifiers in a .csv file, which can be used as input for the “m2m_import_proj_density.py” script.

Important: Select the same resolution as your matrix We higly recommend to work with high resolution (starting from 50) in order to search experiments more precisely.

  1. Find experiments identifiers (a or b):

    a. Injection coordinate search: (–injection) >>> m2m_experiments_finder.py resolution path/to/.mat path/to/ref.nii.gz

    path/to/output.csv x y z –injection –nb_of_exps n

    b.Spatial search: (–spatial): >>> m2m_experiments_finder.py resolution path/to/.mat path/to/ref.nii.gz

    path/to/output.csv x y z –spatial –nb_of_exps n

  2. Call m2m_import_proj_density.py with theses indentifiers as an input: (see m2m_import_proj_density.py documentation)

usage: m2m_experiments_finder.py [-h] (--injection | --spatial)
                                 [--nb_of_exps NB_OF_EXPS] [-d DIR] [-c] [-f]
                                 {10,25,50,100} file_mat reference out_csv x y
                                 z

Positional Arguments

res

Possible choices: 10, 25, 50, 100

Resolution (in micron) of the Allen files Please use the same resolution as the transformation matrix.

file_mat

Path to transform matrix (.mat)

reference

Path to reference volume (.nii.gz)

out_csv

Path to output csv (.csv)

x

X-component of UDS voxel coordinates

y

Y-component of UDS voxel coordinates

z

Y-component of UDS voxel coordinates

Named Arguments

--injection

Use experiment_injection_coordinate_search to find experiments. https://allensdk.readthedocs.io/en/latest/allensdk.api.queries.mouse_connectivity_api.html

Default: False

--spatial

Use experiment_spatial_search to find experiments. https://allensdk.readthedocs.io/en/latest/allensdk.api.queries.mouse_connectivity_api.html

Default: False

--nb_of_exps

Number of experiments needed. 1 by default.

Default: 1

-d, --dir

Path of the ouptut file directory is . by default. Using –dir <dir> will change the output file’s directory or create a new one if does not exits.

Default: “.”

-c, --nocache

Update the Allen Mouse Brain Connectivity Cache

Default: False

-f

Force overwriting of the output files.

Default: False

Author : Mahdi