Data in BYOR are formatted at two points: 1. on completion of the data load, 2. at the point of rendering the loaded data to the data table.
Data formatting at the first point can be done with a configuration in the 'data convert' section. Options for 'data convert' are:
- Join: Joins two columns to a new column (ex. {"type":"join","field name":"locus","fields to join":["#chr","pos"],"join by":":"})
- Join multi: Joins multiple columns to a new column (ex. {"type":"join multi","field name":"Variant ID","fields to join":["chromosome","position","reference","alt"],"join by":[":","_","/"]})
- Calculate: Converts the values in designated column to a calculated values (ex. {"type":"calculate","field name":"-log10(P-Value)","raw field":"pValue","calculation type":"-log10"})
- -l0g10: Returns -log10 values of the raw values in the designated column
- Score columns: Calculates given columns to score column (ex. {
"type": "score columns",
"field name": "Score",
"fields to score": ["DEPICT", "MAGMA", "PoPS", "OMIM", "Gene_nearest_COJO", "eQTL_COJO", "Functional_COJO"],
"score by": {
"DEPICT": { "type": "boolean", "value to score": { "yes": 1, "no": 0} },
"MAGMA": { "type": "boolean", "value to score": { "yes": 1, "no": 0} },
"PoPS": { "type": "boolean", "value to score": { "yes": 1, "no": 0} },
"OMIM": { "type": "boolean", "value to score": { "yes": 1, "no": 0} },
"Gene_nearest_COJO": { "type": "boolean", "value to score": { "yes": 1, "no": 0} },
"eQTL_COJO": { "type": "boolean", "value to score": { "yes": 1, "no": 0} },
"Functional_COJO": { "type": "boolean", "value to score": { "yes": 1, "no": 0} }}} - Raw: Convert a column header to a new one (ex., { "type": "raw", "field name": "Ensembl ID", "raw field": "ensembl_id" })
- Array to string(json or BioIndex only): Converts array data to string (ex., {"type":"array to string","field name":"Nearest Genes","raw field":"nearest","separate by":","})
Data formatting at the second point can be done with a configuration in the 'column formatting' section. Options for 'column formatting' are:
- Link: Format the values in a column to links (ex. "Gene": { "type": ["link"], "link to": "/gene.html?gene=","new tab":"true"}
- Scientific notation: Format the values in a column to scientific notation (ex. "P-Value": { "type":["scientific notation"] }
- Render background percent: Render bar charts to the background of cells of a column (ex. "obs_cppa": { "type":["render background percent"],"percent if empty":0})