to_dataframe¶
Usage
Run using mc_script to_dataframe after installation or using ~ndcn0236/bin/mc_script to_dataframe on jalapeno.
Import in python using from mcutils.scripts import to_dataframe
Documentation
Converts a NIFTI/GIFTI/CIFTI file into a pandas dataframe
Each non-masked greyordinate (i.e., voxel or vertex) becomes one line in the resulting dataframe. Each file becomes a column.
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/)
Functions
|
Converts the list of filenames into a single pandas dataframe |
|
Writes a dataframe back to disc |
|
Converts a cifti file into a pandas dataframe |
|
Converts a GIFTI image into a pandas dataframe |
|
Converts a NIFTI image into a pandas dataframe |
|
Writes the data from a pandas dataframe to a NIFTI file on disc |
CLI interface
|
Creates the parser of the command line arguments |
|
Runs the script based on a Namespace containing the command line arguments |