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);

                            // disease
                            row.push(item.disease.efo_info.label);    // or item.disease.efo_info.label ???

                            // human
                            row.push('<ul>' + item.evidence.disease_model_association.human_phenotypes.map(function (hp) { return '<li>' + hp.label + '</li>'; }).join('') + '</ul>');

                            // mouse
                            row.push('<ul>' + item.evidence.disease_model_association.model_phenotypes.map(function (hp) { return '<li>' + hp.label + '</li>'; }).join('') + '</ul>');

                            // mouse model
                            var mousemodel = processMouseModelLinks(item.evidence.biological_model.allelic_composition, item.evidence.biological_model.allele_ids)
                                                + '<br/ >'
                                                + '<span class=\'small text-lowlight\'>' + item.evidence.biological_model.genetic_background + '</span>';
                            row.push(mousemodel);


                            // evidence source
                            row.push(otConsts.datasources.PHENODIGM.label);

                            // score -- hidden column now
                            row.push((item.scores.association_score).toFixed(2));


                            newdata.push(row); // push, so we don't end up with empty rows
                        } catch (e) {
                            scope.ext.hasError = true;
                            $log.error('Error parsing mouse 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.efo_info.label);    
                            row.push('<ul>' + item.evidence.disease_model_association.human_phenotypes.map(function (hp) { return '<li>' + hp.label + '</li>'; }).join('') + '</ul>');
                            row.push('<ul>' + item.evidence.disease_model_association.model_phenotypes.map(function (hp) { return '<li>' + hp.label + '</li>'; }).join('') + '</ul>');
                             model
                            var mousemodel = processMouseModelLinks(item.evidence.biological_model.allelic_composition, item.evidence.biological_model.allele_ids)
                                                + '<br/ >'
                                                + '<span class=\'small text-lowlight\'>' + item.evidence.biological_model.genetic_background + '</span>';
                            row.push(mousemodel);
                            row.push(otConsts.datasources.PHENODIGM.label);
                            row.push((item.scores.association_score).toFixed(2));
                            newdata.push(row); 
                        } catch (e) {
                            scope.ext.hasError = true;
                            $log.error('Error parsing mouse 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 . efo_info . label ) ; row . push ( '<ul>' + item . evidence . disease_model_association . human_phenotypes . map ( function ( hp ) { return '<li>' + hp . label + '</li>' ; } ) . join ( '' ) + '</ul>' ) ; row . push ( '<ul>' + item . evidence . disease_model_association . model_phenotypes . map ( function ( hp ) { return '<li>' + hp . label + '</li>' ; } ) . join ( '' ) + '</ul>' ) ; var mousemodel = processMouseModelLinks ( item . evidence . biological_model . allelic_composition , item . evidence . biological_model . allele_ids ) + '<br/ >' + '<span class=\'small text-lowlight\'>' + item . evidence . biological_model . genetic_background + '</span>' ; row . push ( mousemodel ) ; row . push ( otConsts . datasources . PHENODIGM . label ) ; row . push ( ( item . scores . association_score ) . toFixed ( 2 ) ) ; newdata . push ( row ) ; } catch ( e ) { scope . ext . hasError = true ; $log . error ( 'Error parsing mouse 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 // disease // or item.disease.efo_info.label ??? // human // mouse // mouse model // evidence source // score -- hidden column now // push, so we don't end up with empty rows