Database QC table

Display a table with present and missing data in a database

Description

A table with present and missing data is built for the given data types. Data filters can be provided for each. Data are sorted according to the given keys.

This is a generic process, which can (should) be derived for some specific pipelines. See for instance Morphologist QC table in the Morphologist toolbox, or Freesurfer / BrainVISA QC table in the Freesurfer toolbox.

In the table, each present data can be clicked to display the data file name, and a double-click will trigger a viewer process (when available). In some cases multiple data will reside within a single table cell. In such a case, a menu will popup when clicking on it, and will allow to display the filename or view each of the data here.

Parameters

database: Choice ( input )
Database to be displayed
data_types: ListOf( Choice ) ( input )
List of data types which should be displayed in the table. Data types are "exact" data types (inherited types are not displayed). It is possible to specify several times the same type, which can be useful when used with different filters (see the data_filters parameter).
data_filters: String ( optional, input )

For each data type to display, a selection filter can be specified.

Since axon 6.0.15, the filters are given as a string, which will be parsed as a python or JSON object. The filters sting may have 2 shapes: a list or a dictionary.

List of filters

Each filter is a python dictionary, for instance: {"acquisition": "timepoint_0"}.

The number of filters should normally match the number of data types. However if only one filter is present, it will apply to all data types (specify a second empty filter if you need to avoid this behaviour), and "missing" filters are empty otherwise.

Dictionary of filters

Keys of the dict are regular exprtessions matching column names (type_labels parameter). The filter will then apply any columns matching it. Thus the kay may be a strict column name (ex: Head Mesh), or a pattern, ex: .* Hemisphere Mesh). Each filter value is also a dictionary (thus, a sub-dict) specifying attributes filters, as in the list mode above. See also below for a description.

Attributes filters

A filter specifies attributes values to march, ex: {"acquisition": "baseline", "sucli_recognition_session": "deep_cnn"}

A special attribute, file_status also allows to filter by status. The file status is normally the presence of the file: present, absent for most file types.
However some QC types may specify a QC status. For them allowed values may include ok, warning, suspicious, failed, undefined, and also absent.
Ex: {"QC": {"file_status": "failed", "analysis": "ana-0"}}

keys: ListOf( String ) ( input )
Keys are used to sort and display data. One data line will be created for a single keys values combination.
type_labels: ListOf( String ) ( input )
Labels dispmlayed for each data type on the top header of the table. If not specified, use the data types names.
output_file: Text file ( optional, output )

Allows to save the QC table as a HTML file. If this parameter is filled, then the process will not open the Qt GUI and will run in batch mode.

PDF export is also possible, if the program wkhtmltopdf is installad on the system and available in the PATH.

Technical information

Toolbox : Data Management

User level : 2

Identifier : database_qc_table

File name : brainvisa/toolboxes/data management/processes/database_qc_table.py

Supported file formats :

output_file :
HTML, CSV file, HTML, PDF File