_scripts to_dataframe_tree

Usage

Run using mc_script _scripts to_dataframe_tree after installation or using ~ndcn0236/bin/mc_script _scripts to_dataframe_tree on jalapeno.

Import in python using from mcot.core._scripts import to_dataframe_tree

Documentation

Converts related files loaded from a tree into a pandas dataframe.

Each short name in the table will become a different column. Additional columns will be added to store the voxel/vertex indices and the variable values in the tree template.

For each greyordinate (i.e., voxel or vertex) in the mask a row will be added for each filename matching the short name

The output dataframe will be stored in the feather format, which is a language agnostic format for storing tables (https://blog.rstudio.com/2016/03/29/feather/) Warning: the resulting dataframe can be very large

Functions

run(tree, names, vol_mask, surf_mask[, …]) Extracts the information from the files matching the named templates into a dataframe

CLI interface

add_to_parser(parser) Creates the parser of the command line arguments
run_from_args(args) Runs the script based on a Namespace containing the command line arguments