vampire.quickstart.transform_datasets#
- vampire.quickstart.transform_datasets(img_info_df, write_csv=True, savefig=True)[source]#
Applies all models from the input info of image sets.
- Parameters:
- img_info_dfDataFrame
Contains all information about image sets to be analyzed. See notes.
- write_csvbool, optional
Whether write transformed data to csv. Could be time-consuming if csv is large.
- savefigbool, optional
Whether save distribution contour dendrogram.
Notes
Learn more about basics and advanced input requirement and examples. Below is a general description.
Required columns of
img_info_df(col 1-4)The input DataFrame
img_info_dfmust contain, in order, the 4 required columns of- img_set_pathstr
Path to the directory containing the image set(s) used to transform data.
- model_pathstr
Path to the pickle file that stores model information.
- output_pathstr
Path of the directory used to output model and figures. Defaults to
img_set_path.- img_set_namestr, default
Name of the image set being applied to. Defaults to time of function call.
in the first 4 columns. The default values are used in default columns when (1) the space is left blank in
csv/excelfile before converting to DataFrame, or (2) the space isNone/np.NaNin the DataFrame.Warning
The required columns must appear in order in the first 4 columns, even when defaults are used.
Optional columns of
img_info_df(col 5-)The input DataFrame
img_info_dfcould also contain any number (none to many) of optional columns at the right of the required columns. These optional columns serve as filters to the image filenames. The images with filenames containing values of all filters are used in analysis.- filter1str, optional
Regex filter of image filenames to be analyzed. E.g. “c1” for channel 1.
- filter2str, optional
Regex filter of image filenames to be analyzed. E.g. “cortex” for sample region.
- …str, optional
Regex filter of image filenames to be analyzed. E.g. “40x” for magnification.
Tip
The column names of optional columns does not affect the analysis. The values in the columns only serves as filters to images to be analyzed.