Skip to content

write_invalid_reasons

genie.write_invalid_reasons

Write invalid reasons

Attributes

logger = logging.getLogger(__name__) module-attribute

Functions

write(syn, center_mapping_synid, error_tracker_synid)

Write center errors to a file called {center}_validation_errors.txt and save it to the errors folder in the center's folder

PARAMETER DESCRIPTION
syn

Synapse connection

TYPE: Synapse

center_mapping_synid

Center mapping table's synapse id

TYPE: str

error_tracker_synid

Error tracking table's synapse id

TYPE: str

_combine_center_file_errors(syn, center_errorsdf)

Combine all center errors into one printable string

PARAMETER DESCRIPTION
syn

Synapse connection

TYPE: Synapse

center_errorsdf

Center errors dataframe

TYPE: DataFrame

RETURNS DESCRIPTION
str

Center errors in a pretty formatted string

TYPE: str

get_center_invalid_errors(syn, error_tracker_synid)

Get all invalid errors per center

PARAMETER DESCRIPTION
syn

Synapse connection

TYPE: Synapse

error_tracker_synid

Synapse id of invalid error database table

TYPE: str

RETURNS DESCRIPTION
dict

{center: file error string}

TYPE: dict