<commit_before>'use strict'
var React = require('react');
var $script = require('scriptjs');

module.exports.GenomeBrowser = React.createClass({
    componentDidMount: function () {
        $script('dalliance', function() {
            var Dalliance = require('dalliance').browser;
            var browser = new Dalliance({
                chr:          '22',
                viewStart:    29890000,
                viewEnd:      30050000,
                cookieKey:    'human-grc_h37-fp',
                coordSystem: {
                    speciesName: 'Human',
                    taxon: 9606,
                    auth: 'GRCh',
                    version: '37',
                    ucscName: 'hg19',
                },
                sources: [],
                noTitle: true,
                disablePoweredBy: true
            });
            var files = this.props.files;
            browser.sources = [];
            var assembly = this.props.assembly;
            if(assembly[0] == 'hg19') {
                browser.sources = [
                    {
                        name: 'Genome',
                        twoBitURI: 'https://s3-us-west-1.amazonaws.com/encoded-build/browser/hg19/hg19.2bit',
                        tier_type: 'sequence',
                        provides_entrypoints: true,
                        pinned: true
                    },
                    {
                        name: 'GENCODE',
                        bwgURI: 'https://s3-us-west-1.amazonaws.com/encoded-build/browser/hg19/gencode.bb',
                        stylesheet_uri: 'https://s3-us-west-1.amazonaws.com/encoded-build/browser/hg19/gencode.xml',
                        collapseSuperGroups: true,
                        trixURI: 'https://s3-us-west-1.amazonaws.com/encoded-build/browser/hg19/geneIndex.ix'
                    },
                    {
                        name: 'Repeats',
                        desc: 'Repeat annotation from RepeatMasker',
                        bwgURI: 'https://s3-us-west-1.amazonaws.com/encoded-build/browser/hg19/repeats.bb',
                        stylesheet_uri: 'https://s3-us-west-1.amazonaws.com/encoded-build/browser/hg19/bb-repeats.xml',
                        forceReduction: -1
                    }
                ];
            }
            else if(assembly[0] == 'mm10') {
                browser.chr = '19';
                browser.viewStart = 30000000;
                browser.viewEnd = 30100000;
                browser.cookieKey = 'mouse38';
                browser.coordSystem = {speciesName: 'Mouse', taxon: 10090, auth: 'GRCm', version: 38, ucscName: 'mm10'};
                browser.sources = [
                    {
                        name: 'Genome',
                        twoBitURI: 'https://s3-us-west-1.amazonaws.com/encoded-build/browser/mm10/mm10.2bit',
                        desc: 'Mouse reference genome build GRCm38',
                        tier_type: 'sequence',
                        provides_entrypoints: true
                    },
                    {
                        name: 'Genes',
                        desc: 'Gene structures from GENCODE M2',
                        bwgURI: 'https://s3-us-west-1.amazonaws.com/encoded-build/browser/mm10/gencodeM2.bb',
                        stylesheet_uri: 'https://s3-us-west-1.amazonaws.com/encoded-build/browser/mm10/gencode.xml',
                        collapseSuperGroups: true,
                        trixURI: 'https://s3-us-west-1.amazonaws.com/encoded-build/browser/mm10/gencodeM2.ix'
                    },
                    {
                        name: 'Repeats',
                        desc: 'Repeat annotation from UCSC',
                        bwgURI: 'https://s3-us-west-1.amazonaws.com/encoded-build/browser/mm10/repeats.bb',
                        stylesheet_uri: 'https://s3-us-west-1.amazonaws.com/encoded-build/browser/mm10/bb-repeats2.xml'
                    }
                ];
            } else if(assembly[0] == 'mm9') {
                browser.chr = '19';
                browser.viewStart = 30000000;
                browser.viewEnd = 30030000;
                browser.cookieKey = 'mouse';
                browser.coordSystem = {speciesName: 'Mouse', taxon: 10090, auth: 'NCBIM', version: 37};
                browser.sources = [
                    {
                        name: 'Genome',
                        twoBitURI:  'https://s3-us-west-1.amazonaws.com/encoded-build/browser/mm9/mm9.2bit',
                        desc: 'Mouse reference genome build NCBIm37',
                        tier_type: 'sequence',
                        provides_entrypoints: true
                    }
                ];
            } else if(assembly[0] == 'dm3') {
                  browser.chr = '3L';
                  browser.viewStart = 15940000;
                  browser.viewEnd = 15985000;
                  browser.cookieKey = 'drosophila';
                  browser.coordSystem = {speciesName: 'Drosophila', taxon: 7227, auth: 'BDGP', version: 5};
                  browser.sources = [
                      {
                          name: 'Genome',
                          twoBitURI:  'https://s3-us-west-1.amazonaws.com/encoded-build/browser/dm3/dm3.2bit',
                          desc: 'D. melanogaster reference genome build BDGP R5',
                          tier_type: 'sequence',
                          provides_entrypoints: true
                      }
                  ];

            }
            files.forEach(function (file) {
                if(file.file_format == 'bigWig') {
                    browser.sources.push({
                        name: file.output_type,
                        desc: file.accession,
                        bwgURI: 'https://www.encodeproject.org' + file.href,
                        style: [
                            {
                                type: 'default',
                                style: {
                                    glyph: 'HISTOGRAM',
                                    HEIGHT: 30,
                                    BGCOLOR: 'rgb(166,71,71)'
                                }
                            }
                        ]
                    });
                }
                else if(file.file_format == 'bigBed') {
                    browser.sources.push({
                        name: file.output_type,
                        desc: file.accession,
                        bwgURI: 'https://www.encodeproject.org' + file.href,
                        style: [
                            {
                                style: {
                                    HEIGHT: 10
                                }
                            }
                        ]
                    });
                }
            });
        }.bind(this));
    },
    render: function() {
        return (
            <div id="svgHolder" className="trackhub-element">
            </div>
        );
    }
});
<commit_msg>set maximum height of the browser to be 1000px<commit_after>'use strict'
var React = require('react');
var $script = require('scriptjs');

module.exports.GenomeBrowser = React.createClass({
    componentDidMount: function () {
        $script('dalliance', function() {
            var Dalliance = require('dalliance').browser;
            var browser = new Dalliance({
                maxHeight: 1000,
                chr:          '22',
                viewStart:    29890000,
                viewEnd:      30050000,
                cookieKey:    'human-grc_h37-fp',
                coordSystem: {
                    speciesName: 'Human',
                    taxon: 9606,
                    auth: 'GRCh',
                    version: '37',
                    ucscName: 'hg19',
                },
                sources: [],
                noTitle: true,
                disablePoweredBy: true
            });
            var files = this.props.files;
            browser.sources = [];
            var assembly = this.props.assembly;
            if(assembly[0] == 'hg19') {
                browser.sources = [
                    {
                        name: 'Genome',
                        twoBitURI: 'https://s3-us-west-1.amazonaws.com/encoded-build/browser/hg19/hg19.2bit',
                        tier_type: 'sequence',
                        provides_entrypoints: true,
                        pinned: true
                    },
                    {
                        name: 'GENCODE',
                        bwgURI: 'https://s3-us-west-1.amazonaws.com/encoded-build/browser/hg19/gencode.bb',
                        stylesheet_uri: 'https://s3-us-west-1.amazonaws.com/encoded-build/browser/hg19/gencode.xml',
                        collapseSuperGroups: true,
                        trixURI: 'https://s3-us-west-1.amazonaws.com/encoded-build/browser/hg19/geneIndex.ix'
                    },
                    {
                        name: 'Repeats',
                        desc: 'Repeat annotation from RepeatMasker',
                        bwgURI: 'https://s3-us-west-1.amazonaws.com/encoded-build/browser/hg19/repeats.bb',
                        stylesheet_uri: 'https://s3-us-west-1.amazonaws.com/encoded-build/browser/hg19/bb-repeats.xml',
                        forceReduction: -1
                    }
                ];
            }
            else if(assembly[0] == 'mm10') {
                browser.chr = '19';
                browser.viewStart = 30000000;
                browser.viewEnd = 30100000;
                browser.cookieKey = 'mouse38';
                browser.coordSystem = {speciesName: 'Mouse', taxon: 10090, auth: 'GRCm', version: 38, ucscName: 'mm10'};
                browser.sources = [
                    {
                        name: 'Genome',
                        twoBitURI: 'https://s3-us-west-1.amazonaws.com/encoded-build/browser/mm10/mm10.2bit',
                        desc: 'Mouse reference genome build GRCm38',
                        tier_type: 'sequence',
                        provides_entrypoints: true
                    },
                    {
                        name: 'Genes',
                        desc: 'Gene structures from GENCODE M2',
                        bwgURI: 'https://s3-us-west-1.amazonaws.com/encoded-build/browser/mm10/gencodeM2.bb',
                        stylesheet_uri: 'https://s3-us-west-1.amazonaws.com/encoded-build/browser/mm10/gencode.xml',
                        collapseSuperGroups: true,
                        trixURI: 'https://s3-us-west-1.amazonaws.com/encoded-build/browser/mm10/gencodeM2.ix'
                    },
                    {
                        name: 'Repeats',
                        desc: 'Repeat annotation from UCSC',
                        bwgURI: 'https://s3-us-west-1.amazonaws.com/encoded-build/browser/mm10/repeats.bb',
                        stylesheet_uri: 'https://s3-us-west-1.amazonaws.com/encoded-build/browser/mm10/bb-repeats2.xml'
                    }
                ];
            } else if(assembly[0] == 'mm9') {
                browser.chr = '19';
                browser.viewStart = 30000000;
                browser.viewEnd = 30030000;
                browser.cookieKey = 'mouse';
                browser.coordSystem = {speciesName: 'Mouse', taxon: 10090, auth: 'NCBIM', version: 37};
                browser.sources = [
                    {
                        name: 'Genome',
                        twoBitURI:  'https://s3-us-west-1.amazonaws.com/encoded-build/browser/mm9/mm9.2bit',
                        desc: 'Mouse reference genome build NCBIm37',
                        tier_type: 'sequence',
                        provides_entrypoints: true
                    }
                ];
            } else if(assembly[0] == 'dm3') {
                  browser.chr = '3L';
                  browser.viewStart = 15940000;
                  browser.viewEnd = 15985000;
                  browser.cookieKey = 'drosophila';
                  browser.coordSystem = {speciesName: 'Drosophila', taxon: 7227, auth: 'BDGP', version: 5};
                  browser.sources = [
                      {
                          name: 'Genome',
                          twoBitURI:  'https://s3-us-west-1.amazonaws.com/encoded-build/browser/dm3/dm3.2bit',
                          desc: 'D. melanogaster reference genome build BDGP R5',
                          tier_type: 'sequence',
                          provides_entrypoints: true
                      }
                  ];

            }
            files.forEach(function (file) {
                if(file.file_format == 'bigWig') {
                    browser.sources.push({
                        name: file.output_type,
                        desc: file.accession,
                        bwgURI: 'https://www.encodeproject.org' + file.href,
                        style: [
                            {
                                type: 'default',
                                style: {
                                    glyph: 'HISTOGRAM',
                                    HEIGHT: 30,
                                    BGCOLOR: 'rgb(166,71,71)'
                                }
                            }
                        ]
                    });
                }
                else if(file.file_format == 'bigBed') {
                    browser.sources.push({
                        name: file.output_type,
                        desc: file.accession,
                        bwgURI: 'https://www.encodeproject.org' + file.href,
                        style: [
                            {
                                style: {
                                    HEIGHT: 10
                                }
                            }
                        ]
                    });
                }
            });
        }.bind(this));
    },
    render: function() {
        return (
            <div id="svgHolder" className="trackhub-element">
            </div>
        );
    }
});

{'fraction_non_alphanumeric': 0.10798921526890876, 'fraction_numerical': 0.02880658436213992, 'mean_word_length': 0.9535689535689535, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 32, 'lorem ipsum': 0, 'www.': 4, 'xml': 8}, 'pii_count': 0, 'substrings_counts': 4, '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': '4998939', 'n_tokens_mistral': 3952, 'n_tokens_neox': 3464, 'n_words': 548}