<commit_before>/* Shows the SEED functional category hierarchy as a 
 * collapsable/expandable bar chart
 *
 */

 (function( $, undefined ) {
    $.KBWidget({
        name: "KBaseSEEDFunctions",
        parent: "kbaseWidget",
        version: "1.0.0",

        wsUrl:"https://kbase.us/services/ws",

        options: {
            objNameOrId: null,
            wsNameOrId: null,
            objVer: null,
            loadingImage: "assets/img/loading.gif",
            kbCache:{},         
            width:900           
        },
        
        objName:"",
        wsName:"",

        /**
         * Initialize the widget.
         */

        init: function(options) {
            this._super(options);
            var self = this;            


/*
            var obj = {"ref" : this.options.wsNameOrId + "/" + this.options.objNameOrId };

            var prom = this.options.kbCache.req('ws', 'get_objects', [obj]);
          
            $.when(prom).fail($.proxy(function(error) {
                this.renderError(error);
                console.log(error);
            }, this));

            var genomeObj;
            $.when(prom).done($.proxy(function(genome) {
                genomeObj = genome[0].data;
                console.log("hey " + genome.data.features.length);
            }, this));

            console.log(genomeObj.features.length);
*/
            self.$elem.append('<div id="loading-mssg"><p class="muted loader-table"><center><img src="assets/img/ajax-loader.gif"><br><br>Finding SEED functions for this genome...</center></p></div>');
            self.$elem.append('<div id="mainview">')



            
            //self.$elem.find('#loading-mssg').remove();
            return this;
        },


        getData: function() {
            return {title:"SEED Functional Categories :",id:this.objName, workspace:this.wsName};
        }

    });
})( jQuery );<commit_msg>Card can now read genome object from kbcache<commit_after>/* Shows the SEED functional category hierarchy as a 
 * collapsable/expandable bar chart
 *
 */

 (function( $, undefined ) {
    $.KBWidget({
        name: "KBaseSEEDFunctions",
        parent: "kbaseWidget",
        version: "1.0.0",

        wsUrl:"https://kbase.us/services/ws",

        options: {
            objNameOrId: null,
            wsNameOrId: null,
            objVer: null,
            loadingImage: "assets/img/loading.gif",
            kbCache:{},         
            width:900           
        },
        
        objName:"",
        wsName:"",

        /**
         * Initialize the widget.
         */

        init: function(options) {
            this._super(options);
            var self = this;            

            var obj = {"ref" : this.options.wsNameOrId + "/" + this.options.objNameOrId };
            

            var prom = this.options.kbCache.req('ws', 'get_objects', [obj]);
        
            $.when(prom).fail($.proxy(function(error) {
                this.renderError(error);
                console.log(error);
            }, this));

            var genomeObj;
            $.when(prom).done($.proxy(function(genome) {
                genomeObj = genome[0].data;
                console.log("Num Features: " + genomeObj.features.length);
            }, this));

            self.$elem.append('<div id="loading-mssg"><p class="muted loader-table"><center><img src="assets/img/ajax-loader.gif"><br><br>Finding SEED functions for this genome...</center></p></div>');
            self.$elem.append('<div id="mainview">');


            //self.$elem.find('#loading-mssg').remove();
            return this;
        },


        getData: function() {
            return {title:"SEED Functional Categories :",id:this.objName, workspace:this.wsName};
        }

    });
})( jQuery );
{'fraction_non_alphanumeric': 0.15224274406332453, 'fraction_numerical': 0.0036939313984168864, 'mean_word_length': 1.6436541143654115, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 23, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5095973', 'n_tokens_mistral': 1111, 'n_tokens_neox': 1038, 'n_words': 189}