Advertisement
Guest User

Untitled

a guest
Nov 16th, 2018
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 5 1.69 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4.     <meta charset="UTF-8">
  5.     <script src="https://d3js.org/d3.v3.js"></script>
  6.     <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"></script>
  7.     <link rel="stylesheet" href="iHam.css" type="text/css"/>
  8.     <link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet">
  9.     <link rel="stylesheet" href="http://tntvis.github.io/tnt/build/tnt.css" type="text/css" />
  10.     <script src="http://tntvis.github.io/tnt/build/tnt.js" charset="utf-8"></script>
  11.     <script src="https://dessimozlab.github.io/iHam/iHam.js"></script>
  12.     <link rel="stylesheet" href="https://dessimozlab.github.io/iHam/iHam.css" type="text/css"/>
  13. </head>
  14. <body>
  15.  
  16. <div style="width: 1500px; min-width: 500px;" id="iham"></div>
  17.  
  18. <script>
  19.   (function (div) {
  20.  
  21.     const data = {
  22.       "tree": '(Mus musculus,Homo sapiens)Root',
  23.       "orthoxml": `<orthoXML xmlns="http://orthoXML.org/2011/" version="0.3" origin="orthoXML.org" originVersion="1"><species name="Homo sapiens" NCBITaxId="9606"><database name="someDB" version="42"><genes><gene id="1" geneId="hsa1" protId="hsa1" /></genes></database></species><species name="Mus musculus" NCBITaxId="10090"><database name="someDB" version="42"><genes><gene id="2" geneId="mmu1"/></genes></database></species><groups><orthologGroup><geneRef id="1" /><geneRef id="2" /></orthologGroup></groups></orthoXML>`,
  24.       "fam_data": []
  25.     }
  26.  
  27.     var theme = iHam()
  28.       .orthoxml(data.orthoxml)
  29.       .show_oma_link(false)
  30.       .newick(data.tree)
  31.       .fam_data(data.fam_data)
  32.       .tree_width(330)
  33.       .board_width(530);
  34.  
  35.     theme(div);
  36.   })(document.getElementById('iham'));
  37. </script>
  38. </body>
  39. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement