scripts/aiv_ui.js
/**
     * @function highlightNodes - Functionality for search bar to search for particular AGI protein nodes by adding a class to them; also has the clear functionality
     * @param {object} AIVObj - reference to global namespace AIV object, with access to cytoscape methods
     */
@function highlightNodes - Functionality for search bar to search for particular AGI protein nodes by adding a class to them; also has the clear functionality
@param {object} AIVObj - reference to global namespace AIV object, with access to cytoscape methods
@function highlightNodes - Functionality for search bar to search for particular AGI protein nodes by adding a class to them ; also has the clear functionality @param { object } AIVObj - reference to global namespace AIV object with access to cytoscape methods
function highlightNodes(AIVObj){
        document.getElementById('highlightNodes').addEventListener('click', function(event) {
            let genes = AIVObj.formatAGI($.trim(document.getElementById('highlightNodesAGIs').value.split(" ").join(""))); 
            genes = "#Protein_" + genes.split(',').join(',#Protein_');
            console.log(genes);
            AIVObj.cy.$(genes).addClass('highlighted');
        });
        document.getElementById('cancelHighlight').addEventListener('click', function(event) {
            AIVObj.cy.$('.highlighted').removeClass('highlighted');
            document.getElementById('highlightNodesAGIs').value = "";
        });
    }
function highlightNodes ( AIVObj ) { document . getElementById ( 'highlightNodes' ) . addEventListener ( 'click' , function ( event ) { let genes = AIVObj . formatAGI ( $ . trim ( document . getElementById ( 'highlightNodesAGIs' ) . value . split ( " " ) . join ( "" ) ) ) ; genes = "#Protein_" + genes . split ( ',' ) . join ( ',#Protein_' ) ; console . log ( genes ) ; AIVObj . cy . $ ( genes ) . addClass ( 'highlighted' ) ; } ) ; document . getElementById ( 'cancelHighlight' ) . addEventListener ( 'click' , function ( event ) { AIVObj . cy . $ ( '.highlighted' ) . removeClass ( 'highlighted' ) ; document . getElementById ( 'highlightNodesAGIs' ) . value = "" ; } ) ; }
@function highlightNodes - Functionality for search bar to search for particular AGI protein nodes by adding a class to them; also has the clear functionality
 @param {object} AIVObj - reference to global namespace AIV object, with access to cytoscape methods
@function highlightNodes - Functionality for search bar to search for particular AGI protein nodes by adding a class to them ; also has the clear functionality @param { object } AIVObj - reference to global namespace AIV object with access to cytoscape methods
// format to exclude whitespaces between and outside of string