<commit_before>define(['marionette', 
    'uglymol', 'gzip', 
    'modules/dc/collections/downstreams', 
    'modules/dc/collections/dimplepeaks', 
    'modules/dc/views/dimplepeaktable', 
    'templates/dc/mapmodelview.html'], function(Marionette, Uglymol, zlib,
        DownStreams, DIMPLEPeaks, DIMPLEPeakTable,  template) {

    return Marionette.LayoutView.extend({
        template: template,
        className: 'content',
        
        regions: {
            peaks: 'div.peaks',
        },
        
        events: {
            'change @ui.res': 'gotoResidue',
        },

        ui: {
            viewer: '#viewer',
            res: 'select[name=residue]',
            hud: '#hud',
        },
        
        
        
        // /*
        //   Download Maps
        // */
        loadMaps: function() {
            var xhr = this.xhrWithStatus('Downloading Map 1')
            var self = this
            
            xhr.onload = function() {
                var gunzip = new zlib.Zlib.Gunzip(new Uint8Array(this.response))
                var plain = gunzip.decompress()
                self.viewer.load_map_from_buffer(plain.buffer, { format: 'ccp4' })
          
                if (self.getOption('ty') == 'dimple' || self.getOption('ty') == 'mrbump') {
                    var xhr2 = self.xhrWithStatus('Downloading Map 2')
                    xhr2.onload = function() {
                        var gunzip = new Zlib.Zlib.Gunzip(new Uint8Array(this.response))
                        var plain = gunzip.decompress()
                        self.viewer.load_map_from_buffer(plain.buffer, { format: 'ccp4', diff_map: true, })
          
                        self.onMapsLoaded()
                    }
          
                    xhr2.open('GET', app.apiurl+'/download/map/ty/'+self.getOption('ty')+'/id/'+self.model.get('ID')+'/map/2')<commit_msg>Fixed typo in model viewer for zlib<commit_after>define(['marionette', 
    'uglymol', 'gzip', 
    'modules/dc/collections/downstreams', 
    'modules/dc/collections/dimplepeaks', 
    'modules/dc/views/dimplepeaktable', 
    'templates/dc/mapmodelview.html'], function(Marionette, Uglymol, zlib,
        DownStreams, DIMPLEPeaks, DIMPLEPeakTable,  template) {

    return Marionette.LayoutView.extend({
        template: template,
        className: 'content',
        
        regions: {
            peaks: 'div.peaks',
        },
        
        events: {
            'change @ui.res': 'gotoResidue',
        },

        ui: {
            viewer: '#viewer',
            res: 'select[name=residue]',
            hud: '#hud',
        },
        
        
        
        // /*
        //   Download Maps
        // */
        loadMaps: function() {
            var xhr = this.xhrWithStatus('Downloading Map 1')
            var self = this
            
            xhr.onload = function() {
                var gunzip = new zlib.Zlib.Gunzip(new Uint8Array(this.response))
                var plain = gunzip.decompress()
                self.viewer.load_map_from_buffer(plain.buffer, { format: 'ccp4' })
          
                if (self.getOption('ty') == 'dimple' || self.getOption('ty') == 'mrbump') {
                    var xhr2 = self.xhrWithStatus('Downloading Map 2')
                    xhr2.onload = function() {
                        var gunzip = new zlib.Zlib.Gunzip(new Uint8Array(this.response))
                        var plain = gunzip.decompress()
                        self.viewer.load_map_from_buffer(plain.buffer, { format: 'ccp4', diff_map: true, })
          
                        self.onMapsLoaded()
                    }
          
                    xhr2.open('GET', app.apiurl+'/download/map/ty/'+self.getOption('ty')+'/id/'+self.model.get('ID')+'/map/2')
{'fraction_non_alphanumeric': 0.1327668613913967, 'fraction_numerical': 0.0053106744556558685, 'mean_word_length': 1.5264922870556674, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5620287', 'n_tokens_mistral': 1180, 'n_tokens_neox': 1130, 'n_words': 179}