<commit_before><!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <meta name="description" content="">
    <meta name="author" content="">
    <link rel="shortcut icon" href=../img/favicon.ico>
    <title>IGV - Dev</title>


    <!-- IGV CSS -->
    <link rel="stylesheet" type="text/css" href="../css/igv.css">

    <!-- Dev CSS -->
    <link rel="stylesheet" type="text/css" href="css/dev.css">

    <!-- Vendor CSS -->
    <link rel="stylesheet" type="text/css" href="../vendor/fa-svg-with-js.css"/>

    <!-- Vendor JS -->
    <script src="../vendor/jquery-1.12.4.js"></script>
    <script src="../vendor/jquery-ui.js"></script>
    <script src="../vendor/jquery.mousewheel.js"></script>
    <script src="../vendor/underscore.js"></script>

    <script src="../vendor/zlib_and_gzip.js"></script>
    <script src="../vendor/inflate.js"></script>

    <!-- IGV JS -->
    <script src="../js/igv-icons.js"></script>
    <script src="../js/session/igvXmlSession.js"></script>
    <script src="../js/feature/mergedTrack.js"></script>


    <script src="../js/bam/coverageMap.js"></script>
    <script src="../js/bam/bamReader.js"></script>
    <script src="../js/bam/bamReaderNonIndexed.js"></script>
    <script src="../js/bam/bgzf.js"></script>
    <script src="../js/bam/bamSource.js"></script>
    <script src="../js/bam/bamTrack.js"></script>
    <script src="../js/bam/bamAlignment.js"></script>
    <script src="../js/bam/bamAlignmentRow.js"></script>
    <script src="../js/bam/bamIndex.js"></script>
    <script src="../js/bam/alignmentContainer.js"></script>
    <script src="../js/bam/pairedAlignment.js"></script>
    <script src="../js/bam/bamUtils.js"></script>
    <script src="../js/bam/bamWebserviceReader.js"></script>
    <script src="../js/bam/htsgetReader.js"></script>
    <script src="../js/bam/alignmentBlock.js"></script>

    <script src="../js/bigQuery/ccp.js"></script>

    <script src="../js/bigwig/bufferedReader.js"></script>
    <script src="../js/bigwig/bwReader.js"></script>
    <script src="../js/bigwig/bwSource.js"></script>



    <script src="../js/feature/featureCache.js"></script>
    <script src="../js/feature/gffHelper.js"></script>
    <script src="../js/feature/featureSource.js"></script>
    <script src="../js/feature/featureParsers.js"></script>
    <script src="../js/feature/tribble.js"></script>
    <script src="../js/feature/featureFileReader.js"></script>
    <script src="../js/feature/customServiceReader.js"></script>


    <script src="../js/feature/featureTrack.js"></script>
    <script src="../js/feature/wigTrack.js"></script>
    <script src="../js/feature/featureUtils.js"></script>
    <script src="../js/feature/segParser.js"></script>
    <script src="../js/feature/segTrack.js"></script>
    <script src="../js/feature/dataWrapper.js"></script>

    <script src="../js/ga4gh/ga4ghAlignmentReader.js"></script>
    <script src="../js/ga4gh/ga4ghVariantReader.js"></script>
    <script src="../js/ga4gh/ga4ghHelper.js"></script>
    <script src="../js/ga4gh/googleUtils.js"></script>

    <script src="../js/gtex/eqtlTrack.js"></script>
    <script src="../js/gtex/gtexFileReader.js"></script>
    <script src="../js/gtex/gtexReader.js"></script>
    <script src="../js/gtex/gtex.js"></script>
    <script src="../js/gtex/immvarReader.js"></script>

    <script src="../js/gwas/t2dVariantSource.js"></script>
    <script src="../js/gwas/gwasTrack.js"></script>

    <script src="../js/karyo/karyo.js"></script>

    <script src="../js/tdf/tdfReader.js"></script>
    <script src="../js/tdf/tdfSource.js"></script>

    <script src="../js/ui/trackMenuPopupDialog.js"></script>
    <script src="../js/ui/dataRangeDialog.js"></script>
    <script src="../js/ui/inputDialog.js"></script>
    <script src="../js/ui/trackRemovalDialog.js"></script>
    <script src="../js/ui/alertDialog.js"></script>
    <script src="../js/ui/cursorGuide.js"></script>
    <script src="../js/ui/centerGuide.js"></script>
    <script src="../js/ui/trackLabelControl.js"></script>
    <script src="../js/ui/userFeedback.js"></script>
    <script src="../js/ui/alertDialog.js"></script>
    <script src="../js/ui/popover.js"></script>
    <script src="../js/ui/chromosomeSelectWidget.js"></script>

    <script src="../js/variant/vcfParser.js"></script>
    <script src="../js/variant/variant.js"></script>
    <script src="../js/variant/variantTrack.js"></script>

    <script src="../js/sampleInformation.js"></script>
    <script src="../js/igv-create.js"></script>
    <script src="../js/browser.js"></script>
    <script src="../js/ideogram.js"></script>
    <script src="../js/windowSizePanel.js"></script>
    <script src="../js/referenceFrame.js"></script>
    <script src="../js/igv-canvas.js"></script>
    <script src="../js/genome.js"></script>
    <script src="../js/trackView.js"></script>
    <script src="../js/viewport.js"></script>

    <script src="../js/rulerTrack.js"></script>
    <script src="../js/rulerSweeper.js"></script>

    <script src="../js/igv-math.js"></script>
    <script src="../js/igv-color.js"></script>
    <script src="../js/igv-utils.js"></script>
    <script src="../js/parseUtils.js"></script>
    <script src="../js/fasta.js"></script>
    <script src="../js/sequenceTrack.js"></script>


    <script src="../js/igvxhr.js"></script>
    <script src="../js/binary.js"></script>

    <script src="../js/intervalTree.js"></script>

    <script src="../js/trackCore.js"></script>



    <script src="../js/roi.js"></script>
    <script src="../js/roiSource.js"></script>
    <script src="../vendor/tdigest.js"></script>
    <script src="../vendor/rbtree.js"></script>

</head>

<body>

<div>
    <label>Fasta file: <input id="fasta" type="file"/></label>
    <label>Index file: <input id="index" type="file"/></label>
    <button onclick="submitGenome()">Load genome</button>
</div>

<div>
    <select id="select" onchange="selectGenome()">
        <option value="hg19">hg19</option>
        <option value="danRer10">danRer10</option>
    </select>

</div>

<div id="myDiv" style="padding-top: 50px;padding-bottom: 20px; height: auto">
</div>


<script type="text/javascript">

    function submitGenome() {
        let fasta,
            index,
            fileOrObject;

        fasta = document.getElementById('fasta').files[0];
        index = document.getElementById('index').files[0];

        if (true === igv.isFilePath(fasta) && 'json' === igv.getExtension({ url:fasta })) {
            fileOrObject = fasta;
        } else {
            fileOrObject =
                {
                    fastaURL: fasta,
                    indexURL: index
                }
        }

        igv.browser.loadGenome(fileOrObject);
    }

    function selectGenome() {
        console.log(document.getElementById("select").value);
        igv.browser.loadGenome(document.getElementById("select").value)
                .then(function (genome) {
                   console.log("genome " + genome.id + " loaded");
                })
    }

    document.addEventListener("DOMContentLoaded", function () {
<commit_msg>Revert "Genome JSON Loading Bug"<commit_after><!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <meta name="description" content="">
    <meta name="author" content="">
    <link rel="shortcut icon" href=../img/favicon.ico>
    <title>IGV - Dev</title>


    <!-- IGV CSS -->
    <link rel="stylesheet" type="text/css" href="../css/igv.css">

    <!-- Dev CSS -->
    <link rel="stylesheet" type="text/css" href="css/dev.css">

    <!-- Vendor CSS -->
    <link rel="stylesheet" type="text/css" href="../vendor/fa-svg-with-js.css"/>

    <!-- Vendor JS -->
    <script src="../vendor/jquery-1.12.4.js"></script>
    <script src="../vendor/jquery-ui.js"></script>
    <script src="../vendor/jquery.mousewheel.js"></script>
    <script src="../vendor/underscore.js"></script>

    <script src="../vendor/zlib_and_gzip.js"></script>
    <script src="../vendor/inflate.js"></script>

    <!-- IGV JS -->
    <script src="../js/igv-icons.js"></script>
    <script src="../js/session/igvXmlSession.js"></script>
    <script src="../js/feature/mergedTrack.js"></script>


    <script src="../js/bam/coverageMap.js"></script>
    <script src="../js/bam/bamReader.js"></script>
    <script src="../js/bam/bamReaderNonIndexed.js"></script>
    <script src="../js/bam/bgzf.js"></script>
    <script src="../js/bam/bamSource.js"></script>
    <script src="../js/bam/bamTrack.js"></script>
    <script src="../js/bam/bamAlignment.js"></script>
    <script src="../js/bam/bamAlignmentRow.js"></script>
    <script src="../js/bam/bamIndex.js"></script>
    <script src="../js/bam/alignmentContainer.js"></script>
    <script src="../js/bam/pairedAlignment.js"></script>
    <script src="../js/bam/bamUtils.js"></script>
    <script src="../js/bam/bamWebserviceReader.js"></script>
    <script src="../js/bam/htsgetReader.js"></script>
    <script src="../js/bam/alignmentBlock.js"></script>

    <script src="../js/bigQuery/ccp.js"></script>

    <script src="../js/bigwig/bufferedReader.js"></script>
    <script src="../js/bigwig/bwReader.js"></script>
    <script src="../js/bigwig/bwSource.js"></script>



    <script src="../js/feature/featureCache.js"></script>
    <script src="../js/feature/gffHelper.js"></script>
    <script src="../js/feature/featureSource.js"></script>
    <script src="../js/feature/featureParsers.js"></script>
    <script src="../js/feature/tribble.js"></script>
    <script src="../js/feature/featureFileReader.js"></script>
    <script src="../js/feature/customServiceReader.js"></script>


    <script src="../js/feature/featureTrack.js"></script>
    <script src="../js/feature/wigTrack.js"></script>
    <script src="../js/feature/featureUtils.js"></script>
    <script src="../js/feature/segParser.js"></script>
    <script src="../js/feature/segTrack.js"></script>
    <script src="../js/feature/dataWrapper.js"></script>

    <script src="../js/ga4gh/ga4ghAlignmentReader.js"></script>
    <script src="../js/ga4gh/ga4ghVariantReader.js"></script>
    <script src="../js/ga4gh/ga4ghHelper.js"></script>
    <script src="../js/ga4gh/googleUtils.js"></script>

    <script src="../js/gtex/eqtlTrack.js"></script>
    <script src="../js/gtex/gtexFileReader.js"></script>
    <script src="../js/gtex/gtexReader.js"></script>
    <script src="../js/gtex/gtex.js"></script>
    <script src="../js/gtex/immvarReader.js"></script>

    <script src="../js/gwas/t2dVariantSource.js"></script>
    <script src="../js/gwas/gwasTrack.js"></script>

    <script src="../js/karyo/karyo.js"></script>

    <script src="../js/tdf/tdfReader.js"></script>
    <script src="../js/tdf/tdfSource.js"></script>

    <script src="../js/ui/trackMenuPopupDialog.js"></script>
    <script src="../js/ui/dataRangeDialog.js"></script>
    <script src="../js/ui/inputDialog.js"></script>
    <script src="../js/ui/trackRemovalDialog.js"></script>
    <script src="../js/ui/alertDialog.js"></script>
    <script src="../js/ui/cursorGuide.js"></script>
    <script src="../js/ui/centerGuide.js"></script>
    <script src="../js/ui/trackLabelControl.js"></script>
    <script src="../js/ui/userFeedback.js"></script>
    <script src="../js/ui/alertDialog.js"></script>
    <script src="../js/ui/popover.js"></script>
    <script src="../js/ui/chromosomeSelectWidget.js"></script>

    <script src="../js/variant/vcfParser.js"></script>
    <script src="../js/variant/variant.js"></script>
    <script src="../js/variant/variantTrack.js"></script>

    <script src="../js/sampleInformation.js"></script>
    <script src="../js/igv-create.js"></script>
    <script src="../js/browser.js"></script>
    <script src="../js/ideogram.js"></script>
    <script src="../js/windowSizePanel.js"></script>
    <script src="../js/referenceFrame.js"></script>
    <script src="../js/igv-canvas.js"></script>
    <script src="../js/genome.js"></script>
    <script src="../js/trackView.js"></script>
    <script src="../js/viewport.js"></script>

    <script src="../js/rulerTrack.js"></script>
    <script src="../js/rulerSweeper.js"></script>

    <script src="../js/igv-math.js"></script>
    <script src="../js/igv-color.js"></script>
    <script src="../js/igv-utils.js"></script>
    <script src="../js/parseUtils.js"></script>
    <script src="../js/fasta.js"></script>
    <script src="../js/sequenceTrack.js"></script>


    <script src="../js/igvxhr.js"></script>
    <script src="../js/binary.js"></script>

    <script src="../js/intervalTree.js"></script>

    <script src="../js/trackCore.js"></script>



    <script src="../js/roi.js"></script>
    <script src="../js/roiSource.js"></script>
    <script src="../vendor/tdigest.js"></script>
    <script src="../vendor/rbtree.js"></script>

</head>

<body>

<div>
    <label>Fasta file: <input id="fasta" type="file"/></label>
    <label>Index file: <input id="index" type="file"/></label>
    <button onclick="submitGenome()">Load genome</button>
</div>

<div>
    <select id="select" onchange="selectGenome()">
        <option value="hg19">hg19</option>
        <option value="danRer10">danRer10</option>
    </select>

</div>

<div id="myDiv" style="padding-top: 50px;padding-bottom: 20px; height: auto">
</div>


<script type="text/javascript">

    function submitGenome() {

        var fasta = document.getElementById('fasta').files[0];
        var index = document.getElementById('index').files[0];

        igv.browser.loadGenome({
            fastaURL: fasta,
            indexURL: index
        });
    }

    function selectGenome() {
        console.log(document.getElementById("select").value);
        igv.browser.loadGenome(document.getElementById("select").value)
                .then(function (genome) {
                   console.log("genome " + genome.id + " loaded");
                })
    }

    document.addEventListener("DOMContentLoaded", function () {

{'fraction_non_alphanumeric': 0.23794864619044287, 'fraction_numerical': 0.004057930455467712, 'mean_word_length': 2.9497098646034816, 'pattern_counts': {'":': 0, '<': 471, '<?xml version=': 0, '>': 471, 'https://': 0, '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': '3700881', 'n_tokens_mistral': 4813, 'n_tokens_neox': 4650, 'n_words': 622}