function formatDataToArray (data) {
                    var newdata = [];

                    data.forEach(function (item) {
                        // create rows:
                        var row = [];

                        try {
                            // col 0: data origin: public / private
                            row.push((item.access_level === otConsts.ACCESS_LEVEL_PUBLIC) ? otConsts.ACCESS_LEVEL_PUBLIC_DIR : otConsts.ACCESS_LEVEL_PRIVATE_DIR);

                            // 1,2: disease
                            row.push(item.disease.name);
                            row.push(item.disease.id);

                            // 3: gene set
                            row.push(item.unique_association_fields.gene_set);

                            // 4: method description
                            row.push(item.evidence.resource_score.method.description);

                            // 5,6: pmid
                            row.push(item.evidence.resource_score.method.reference);
                            row.push(item.evidence.resource_score.method.reference); // hidden column, used for downloads info

                            newdata.push(row);
                        } catch (e) {
                            scope.ext.hasError = true;
                            $log.error('Error parsing pathways data:');
                            $log.error(e);
                        }
                    });
                    return newdata;
                }
/*
                 * Takes the data object returned by the API and formats it
                 * to an array of arrays to be displayed by the dataTable widget.
                 */
Takes the data object returned by the API and formats it
to an array of arrays to be displayed by the dataTable widget.
Takes the data object returned by the API and formats it to an array of arrays to be displayed by the dataTable widget .
function formatDataToArray (data) {
                    var newdata = [];
                    data.forEach(function (item) {
                        var row = [];
                        try {
                            row.push((item.access_level === otConsts.ACCESS_LEVEL_PUBLIC) ? otConsts.ACCESS_LEVEL_PUBLIC_DIR : otConsts.ACCESS_LEVEL_PRIVATE_DIR);
                            row.push(item.disease.name);
                            row.push(item.disease.id);
                            row.push(item.unique_association_fields.gene_set);
                            row.push(item.evidence.resource_score.method.description);
                            row.push(item.evidence.resource_score.method.reference);
                            row.push(item.evidence.resource_score.method.reference); 
                            newdata.push(row);
                        } catch (e) {
                            scope.ext.hasError = true;
                            $log.error('Error parsing pathways data:');
                            $log.error(e);
                        }
                    });
                    return newdata;
                }
function formatDataToArray ( data ) { var newdata = [ ] ; data . forEach ( function ( item ) { var row = [ ] ; try { row . push ( ( item . access_level === otConsts . ACCESS_LEVEL_PUBLIC ) ? otConsts . ACCESS_LEVEL_PUBLIC_DIR : otConsts . ACCESS_LEVEL_PRIVATE_DIR ) ; row . push ( item . disease . name ) ; row . push ( item . disease . id ) ; row . push ( item . unique_association_fields . gene_set ) ; row . push ( item . evidence . resource_score . method . description ) ; row . push ( item . evidence . resource_score . method . reference ) ; row . push ( item . evidence . resource_score . method . reference ) ; newdata . push ( row ) ; } catch ( e ) { scope . ext . hasError = true ; $log . error ( 'Error parsing pathways data:' ) ; $log . error ( e ) ; } } ) ; return newdata ; }
Takes the data object returned by the API and formats it
 to an array of arrays to be displayed by the dataTable widget.
Takes the data object returned by the API and formats it to an array of arrays to be displayed by the dataTable widget .
// create rows: // col 0: data origin: public / private // 1,2: disease // 3: gene set // 4: method description // 5,6: pmid // hidden column, used for downloads info