<!doctype html>
<html>
  <head>
    <meta charset="UTF-8">
    <title>Centrimo</title>
    <script type="text/javascript">
      //@JSON_VAR data
      var data = {
        "version": "4.11.2",
        "revision": "4898e0907d161db4041c7e01536ae57feb300b24",
        "release": "Thu Sep 08 11:34:04 2016 -0400",
        "program": "CentriMo",
        "cmd": [
          "centrimo-neg", "-seqlen", "500", "-verbosity", "1", "-oc",
          "/mnt/work1/users/home2/ddenisko/workDir/2019-02-14-peaKO/GATA3/without-de-novo///centrimo-1/",
          "-bfile",
          "KOIN-SRR260079-GATA3-WT-SRR279901-GATA3-KO--forMEMEChIP-KOIN-q0.05_peaks/background",
          "KOIN-SRR260079-GATA3-WT-SRR279901-GATA3-KO--forMEMEChIP-KOIN-q0.05_peaks/SRR260079-GATA3-WT-SRR279901-GATA3-KO--forMEMEChIP-KOIN-q0.05_peaks.fa",
          "/mnt/work1/users/home2/ddenisko/motif_databases/JASPAR/JASPAR_CORE_2016_vertebrates.meme"
        ],
        "options": {
          "motif-pseudo": 0.1,
          "score": 5,
          "optimize_score": false,
          "ethresh": 10,
          "minbin": 0,
          "maxbin": 0,
          "local": false,
          "norc": false,
          "sep": true,
          "flip": false,
          "noseq": false,
          "neg_sequences": false,
          "disc": false,
          "mcc": false
        },
        "seqlen": 500,
        "tested": 519,
        "alphabet": {
          "name": "DNA",
          "like": "dna",
          "ncore": 4,
          "symbols": [
            {
              "symbol": "A",
              "name": "Adenine",
              "colour": "CC0000",
              "complement": "T"
            }, {
              "symbol": "C",
              "name": "Cytosine",
              "colour": "0000CC",
              "complement": "G"
            }, {
              "symbol": "G",
              "name": "Guanine",
              "colour": "FFB300",
              "complement": "C"
            }, {
              "symbol": "T",
              "aliases": "U",
              "name": "Thymine",
              "colour": "008000",
              "complement": "A"
            }, {
              "symbol": "N",
              "aliases": "X.",
              "name": "Any base",
              "equals": "ACGT"
            }, {
              "symbol": "V",
              "name": "Not T",
              "equals": "ACG"
            }, {
              "symbol": "H",
              "name": "Not G",
              "equals": "ACT"
            }, {
              "symbol": "D",
              "name": "Not C",
              "equals": "AGT"
            }, {
              "symbol": "B",
              "name": "Not A",
              "equals": "CGT"
            }, {
              "symbol": "M",
              "name": "Amino",
              "equals": "AC"
            }, {
              "symbol": "R",
              "name": "Purine",
              "equals": "AG"
            }, {
              "symbol": "W",
              "name": "Weak",
              "equals": "AT"
            }, {
              "symbol": "S",
              "name": "Strong",
              "equals": "CG"
            }, {
              "symbol": "Y",
              "name": "Pyrimidine",
              "equals": "CT"
            }, {
              "symbol": "K",
              "name": "Keto",
              "equals": "GT"
            }
          ]
        },
        "background": [0.2543, 0.2457, 0.2457, 0.2543],
        "sequence_db": {
          "source": "KOIN-SRR260079-GATA3-WT-SRR279901-GATA3-KO--forMEMEChIP-KOIN-q0.05_peaks/SRR260079-GATA3-WT-SRR279901-GATA3-KO--forMEMEChIP-KOIN-q0.05_peaks.fa",
          "count": 541,
          "skipped": 0
        },
        "motif_dbs": [
          {
            "source": "/mnt/work1/users/home2/ddenisko/motif_databases/JASPAR/JASPAR_CORE_2016_vertebrates.meme",
            "count": 519
          }
        ],
        "sequences": [
          "chr1:20912493-20912993", "chr1:36547037-36547537",
          "chr1:36591277-36591777", "chr1:51593816-51594316",
          "chr1:53795049-53795549", "chr1:55436489-55436989",
          "chr1:60888748-60889248", "chr1:60920394-60920894",
          "chr1:60990158-60990658", "chr1:69343473-69343973",
          "chr1:69513519-69514019", "chr1:80213833-80214333",
          "chr1:80408486-80408986", "chr1:85794035-85794535",
          "chr1:87899589-87900089", "chr1:106612728-106613228",
          "chr1:128478274-128478774", "chr1:128538552-128539052",
          "chr1:130902350-130902850", "chr1:131079766-131080266",
          "chr1:131204408-131204908", "chr1:133797922-133798422",
          "chr1:134065320-134065820", "chr1:135131013-135131513",
          "chr1:136579399-136579899", "chr1:136600494-136600994",
          "chr1:144006494-144006994", "chr1:164072959-164073459",
          "chr1:164073765-164074265", "chr1:164082839-164083339",
          "chr1:164135396-164135896", "chr1:164136674-164137174",
          "chr1:172015167-172015667", "chr1:184853890-184854390",
          "chr1:191102635-191103135", "chr1:191193756-191194256",
          "chr10:7662328-7662828", "chr10:7839410-7839910",
          "chr10:19504395-19504895", "chr10:19939172-19939672",
          "chr10:21100571-21101071", "chr10:26358794-26359294",
          "chr10:40451830-40452330", "chr10:44609161-44609661",
          "chr10:44821489-44821989", "chr10:53621458-53621958",
          "chr10:54117676-54118176", "chr10:59430598-59431098",
          "chr10:59948648-59949148", "chr10:68035898-68036398",
          "chr10:70133116-70133616", "chr10:71399315-71399815",
          "chr10:80433753-80434253", "chr10:81510200-81510700",
          "chr10:93124261-93124761", "chr10:93162568-93163068",
          "chr10:96724764-96725264", "chr10:117860941-117861441",
          "chr10:118412680-118413180", "chr10:121455584-121456084",
          "chr10:128344874-128345374", "chr10:128504543-128505043",
          "chr11:3201742-3202242", "chr11:4203109-4203609",
          "chr11:4339230-4339730", "chr11:5509533-5510033",
          "chr11:11521961-11522461", "chr11:11564146-11564646",
          "chr11:11711649-11712149", "chr11:11725517-11726017",
          "chr11:19919256-19919756", "chr11:21102623-21103123",
          "chr11:22692605-22693105", "chr11:34111844-34112344",
          "chr11:46389304-46389804", "chr11:52314274-52314774",
          "chr11:53636108-53636608", "chr11:53726546-53727046",
          "chr11:54226591-54227091", "chr11:54866695-54867195",
          "chr11:60046333-60046833", "chr11:60418422-60418922",
          "chr11:65794801-65795301", "chr11:67048640-67049140",
          "chr11:69366399-69366899", "chr11:69990820-69991320",
          "chr11:73095456-73095956", "chr11:75195280-75195780",
          "chr11:76179798-76180298", "chr11:76807234-76807734",
          "chr11:78536135-78536635", "chr11:79254482-79254982",
          "chr11:83529564-83530064", "chr11:83550059-83550559",
          "chr11:85453898-85454398", "chr11:87751574-87752074",
          "chr11:87759554-87760054", "chr11:97130698-97131198",
          "chr11:97159022-97159522", "chr11:97532245-97532745",
          "chr11:98470078-98470578", "chr11:98510010-98510510",
          "chr11:101196196-101196696", "chr11:106688434-106688934",
          "chr11:106752189-106752689", "chr11:107124411-107124911",
          "chr11:108910876-108911376", "chr11:109433246-109433746",
          "chr11:115746667-115747167", "chr11:117599014-117599514",
          "chr11:120149505-120150005", "chr12:8659818-8660318",
          "chr12:21451262-21451762", "chr12:25164606-25165106",
          "chr12:36155641-36156141", "chr12:54187824-54188324",
          "chr12:54293211-54293711", "chr12:54313431-54313931",
          "chr12:70078647-70079147", "chr12:73598196-73598696",
          "chr12:73692274-73692774", "chr12:73720351-73720851",
          "chr12:73842335-73842835", "chr12:76765268-76765768",
          "chr12:84876824-84877324", "chr12:85632310-85632810",
          "chr12:86945059-86945559", "chr12:99633661-99634161",
          "chr12:100994124-100994624", "chr12:103331362-103331862",
          "chr12:106310963-106311463", "chr12:108275900-108276400",
          "chr12:110497424-110497924", "chr12:116254572-116255072",
          "chr13:5767781-5768281", "chr13:5844991-5845491",
          "chr13:30604081-30604581", "chr13:30654350-30654850",
          "chr13:30796024-30796524", "chr13:34864357-34864857",
          "chr13:36807961-36808461", "chr13:43774807-43775307",
          "chr13:51767449-51767949", "chr13:51814479-51814979",
          "chr13:51970100-51970600", "chr13:52807511-52808011",
          "chr13:53096535-53097035", "chr13:55190138-55190638",
          "chr13:56703703-56704203", "chr13:66991465-66991965",
          "chr13:75709421-75709921", "chr13:95987140-95987640",
          "chr13:101547804-101548304", "chr13:101707547-101708047",
          "chr13:104622331-104622831", "chr13:106946516-106947016",
          "chr13:113569506-113570006", "chr13:113579925-113580425",
          "chr13:114845861-114846361", "chr14:18820544-18821044",
          "chr14:20785496-20785996", "chr14:21106539-21107039",
          "chr14:29946880-29947380", "chr14:41005506-41006006",
          "chr14:51892325-51892825", "chr14:54227336-54227836",
          "chr14:55603722-55604222", "chr14:71120405-71120905",
          "chr14:72886957-72887457", "chr14:72887792-72888292",
          "chr14:86869469-86869969", "chr14:87140988-87141488",
          "chr14:122852436-122852936", "chr15:25301752-25302252",
          "chr15:25884910-25885410", "chr15:55547094-55547594",
          "chr15:59010663-59011163", "chr15:62778863-62779363",
          "chr15:64211486-64211986", "chr15:64235519-64236019",
          "chr15:66815445-66815945", "chr15:67128818-67129318",
          "chr15:73599476-73599976", "chr15:77970925-77971425",
          "chr15:78494939-78495439", "chr15:78923557-78924057",
          "chr15:82016151-82016651", "chr15:85389910-85390410",
          "chr15:85456381-85456881", "chr15:97373133-97373633",
          "chr15:97790031-97790531", "chr15:98156009-98156509",
          "chr15:98992340-98992840", "chr16:4583763-4584263",
          "chr16:10639120-10639620", "chr16:10719962-10720462",
          "chr16:10774818-10775318", "chr16:22431757-22432257",
          "chr16:23274554-23275054", "chr16:32163186-32163686",
          "chr16:33343506-33344006", "chr16:33687909-33688409",
          "chr16:38250450-38250950", "chr16:38379068-38379568",
          "chr16:43190213-43190713", "chr16:49774503-49775003",
          "chr16:52081771-52082271", "chr16:59469814-59470314",
          "chr16:75909000-75909500", "chr16:78236815-78237315",
          "chr16:89849151-89849651", "chr16:89973047-89973547",
          "chr16:91072961-91073461", "chr16:91448042-91448542",
          "chr16:91470306-91470806", "chr16:91490726-91491226",
          "chr16:92653824-92654324", "chr16:95750208-95750708",
          "chr17:5125131-5125631", "chr17:5801837-5802337",
          "chr17:7163859-7164359", "chr17:8251588-8252088",
          "chr17:25184192-25184692", "chr17:28291292-28291792",
          "chr17:31223818-31224318", "chr17:34068873-34069373",
          "chr17:34397949-34398449", "chr17:36023599-36024099",
          "chr17:44460101-44460601", "chr17:44611933-44612433",
          "chr17:50731119-50731619", "chr17:52162506-52163006",
          "chr17:57060308-57060808", "chr17:64751153-64751653",
          "chr17:70973124-70973624", "chr17:78241057-78241557",
          "chr17:84116164-84116664", "chr17:84332828-84333328",
          "chr17:86852607-86853107", "chr17:88478977-88479477",
          "chr18:4366643-4367143", "chr18:5077567-5078067",
          "chr18:20956983-20957483", "chr18:39083032-39083532",
          "chr18:39519478-39519978", "chr18:42274928-42275428",
          "chr18:54970833-54971333", "chr18:64488479-64488979",
          "chr18:65481380-65481880", "chr18:67688367-67688867",
          "chr18:75377402-75377902", "chr19:4878698-4879198",
          "chr19:11516833-11517333", "chr19:15924877-15925377",
          "chr19:25022694-25023194", "chr19:29453913-29454413",
          "chr19:32275507-32276007", "chr19:32869254-32869754",
          "chr19:33081470-33081970", "chr19:38387392-38387892",
          "chr19:44284662-44285162", "chr19:45063887-45064387",
          "chr19:55316188-55316688", "chr19:58143651-58144151",
          "chr19:59402039-59402539", "chr2:6309300-6309800",
          "chr2:6720528-6721028", "chr2:11212139-11212639",
          "chr2:11616824-11617324", "chr2:26753285-26753785",
          "chr2:30594743-30595243", "chr2:31114942-31115442",
          "chr2:31239369-31239869", "chr2:32363331-32363831",
          "chr2:32495151-32495651", "chr2:32694013-32694513",
          "chr2:37771712-37772212", "chr2:38471711-38472211",
          "chr2:60774474-60774974", "chr2:68430398-68430898",
          "chr2:70875060-70875560", "chr2:72282670-72283170",
          "chr2:72493004-72493504", "chr2:72857672-72858172",
          "chr2:79965146-79965646", "chr2:80461758-80462258",
          "chr2:93471223-93471723", "chr2:94173532-94174032",
          "chr2:102986428-102986928", "chr2:117342693-117343193",
          "chr2:119250800-119251300", "chr2:124704698-124705198",
          "chr2:124732482-124732982", "chr2:128117345-128117845",
          "chr2:128499717-128500217", "chr2:128544752-128545252",
          "chr2:146416492-146416992", "chr2:151973932-151974432",
          "chr2:153525724-153526224", "chr2:163229072-163229572",
          "chr2:165321599-165322099", "chr2:166184361-166184861",
          "chr2:166656512-166657012", "chr2:166754744-166755244",
          "chr2:166758046-166758546", "chr2:167351203-167351703",
          "chr2:167805756-167806256", "chr2:167887734-167888234",
          "chr2:173229499-173229999", "chr3:8766489-8766989",
          "chr3:9826616-9827116", "chr3:21962338-21962838",
          "chr3:27285039-27285539", "chr3:51673605-51674105",
          "chr3:52197943-52198443", "chr3:52458451-52458951",
          "chr3:52498781-52499281", "chr3:52579245-52579745",
          "chr3:52878304-52878804", "chr3:60601614-60602114",
          "chr3:84092856-84093356", "chr3:84660948-84661448",
          "chr3:86837121-86837621", "chr3:89872166-89872666",
          "chr3:95385619-95386119", "chr3:96556913-96557413",
          "chr3:96580064-96580564", "chr3:123507959-123508459",
          "chr3:126660488-126660988", "chr3:131019084-131019584",
          "chr3:133389046-133389546", "chr3:135590425-135590925",
          "chr3:136742734-136743234", "chr4:6869319-6869819",
          "chr4:6902027-6902527", "chr4:11621555-11622055",
          "chr4:32149093-32149593", "chr4:32257987-32258487",
          "chr4:32287890-32288390", "chr4:32291483-32291983",
          "chr4:99947840-99948340", "chr4:111455669-111456169",
          "chr4:117478098-117478598", "chr4:119127363-119127863",
          "chr4:120986415-120986915", "chr4:122872894-122873394",
          "chr4:124752392-124752892", "chr4:126103596-126104096",
          "chr4:129049620-129050120", "chr4:134047565-134048065",
          "chr4:134059047-134059547", "chr4:134106043-134106543",
          "chr4:135103756-135104256", "chr4:140947646-140948146",
          "chr4:142127369-142127869", "chr4:145312440-145312940",
          "chr4:149469439-149469939", "chr4:150924215-150924715",
          "chr4:155150222-155150722", "chr4:156008853-156009353",
          "chr4:156022177-156022677", "chr5:8839609-8840109",
          "chr5:21411177-21411677", "chr5:23894007-23894507",
          "chr5:24683013-24683513", "chr5:25248452-25248952",
          "chr5:28071739-28072239", "chr5:29735389-29735889",
          "chr5:36722292-36722792", "chr5:53377653-53378153",
          "chr5:53393551-53394051", "chr5:53507241-53507741",
          "chr5:53566648-53567148", "chr5:64040612-64041112",
          "chr5:65921442-65921942", "chr5:105518095-105518595",
          "chr5:105684881-105685381", "chr5:107259525-107260025",
          "chr5:107264896-107265396", "chr5:107295154-107295654",
          "chr5:107698797-107699297", "chr5:110284482-110284982",
          "chr5:110839626-110840126", "chr5:112271296-112271796",
          "chr5:113830368-113830868", "chr5:124074981-124075481",
          "chr5:130203944-130204444", "chr5:136465241-136465741",
          "chr5:137584968-137585468", "chr5:137772708-137773208",
          "chr5:138657778-138658278", "chr5:139382111-139382611",
          "chr5:142439726-142440226", "chr5:147159332-147159832",
          "chr6:31080796-31081296", "chr6:38342363-38342863",
          "chr6:41554171-41554671", "chr6:48083508-48084008",
          "chr6:48679778-48680278", "chr6:48732847-48733347",
          "chr6:49046484-49046984", "chr6:50416860-50417360",
          "chr6:51580250-51580750", "chr6:57535108-57535608",
          "chr6:72512294-72512794", "chr6:72601704-72602204",
          "chr6:83568944-83569444", "chr6:83569267-83569767",
          "chr6:86599132-86599632", "chr6:86847722-86848222",
          "chr6:87040973-87041473", "chr6:87541937-87542437",
          "chr6:91054706-91055206", "chr6:91124837-91125337",
          "chr6:97523013-97523513", "chr6:98992629-98993129",
          "chr6:108338493-108338993", "chr6:108540326-108540826",
          "chr6:108606806-108607306", "chr6:108832952-108833452",
          "chr6:115501258-115501758", "chr6:115528268-115528768",
          "chr6:124750310-124750810", "chr6:125426173-125426673",
          "chr6:126848931-126849431", "chr6:140598488-140598988",
          "chr6:142571905-142572405", "chr6:142917344-142917844",
          "chr6:144670377-144670877", "chr6:146434202-146434702",
          "chr7:12910122-12910622", "chr7:19823849-19824349",
          "chr7:27933363-27933863", "chr7:28168646-28169146",
          "chr7:28382971-28383471", "chr7:28741506-28742006",
          "chr7:29134535-29135035", "chr7:29498993-29499493",
          "chr7:30373461-30373961", "chr7:30420098-30420598",
          "chr7:30490180-30490680", "chr7:43919855-43920355",
          "chr7:45510289-45510789", "chr7:45592045-45592545",
          "chr7:47031386-47031886", "chr7:58725868-58726368",
          "chr7:66233093-66233593", "chr7:68271733-68272233",
          "chr7:80178197-80178697", "chr7:89171746-89172246",
          "chr7:90007130-90007630", "chr7:98562880-98563380",
          "chr7:99316684-99317184", "chr7:114161048-114161548",
          "chr7:114213561-114214061", "chr7:115494588-115495088",
          "chr7:116484019-116484519", "chr7:125472179-125472679",
          "chr7:125511787-125512287", "chr7:125638719-125639219",
          "chr7:127919214-127919714", "chr7:132402588-132403088",
          "chr7:140206875-140207375", "chr7:140374349-140374849",
          "chr7:140981727-140982227", "chr7:143712645-143713145",
          "chr8:13601120-13601620", "chr8:15014255-15014755",
          "chr8:15019068-15019568", "chr8:25274056-25274556",
          "chr8:25653866-25654366", "chr8:27136926-27137426",
          "chr8:34736193-34736693", "chr8:35596972-35597472",
          "chr8:35633825-35634325", "chr8:70549738-70550238",
          "chr8:70673450-70673950", "chr8:72239382-72239882",
          "chr8:75082365-75082865", "chr8:84703358-84703858",
          "chr8:86838800-86839300", "chr8:105266611-105267111",
          "chr8:105566810-105567310", "chr8:111566303-111566803",
          "chr8:111595731-111596231", "chr8:116590487-116590987",
          "chr8:121602769-121603269", "chr8:121848319-121848819",
          "chr8:121908321-121908821", "chr8:122282601-122283101",
          "chr8:122283813-122284313", "chr8:122284297-122284797",
          "chr8:124722050-124722550", "chr8:125649392-125649892",
          "chr8:126867723-126868223", "chr8:127962816-127963316",
          "chr8:128391053-128391553", "chr9:32501321-32501821",
          "chr9:32503360-32503860", "chr9:32537696-32538196",
          "chr9:33060882-33061382", "chr9:40449885-40450385",
          "chr9:44012594-44013094", "chr9:44537786-44538286",
          "chr9:57340327-57340827", "chr9:57643647-57644147",
          "chr9:60998997-60999497", "chr9:61377709-61378209",
          "chr9:61707852-61708352", "chr9:63281964-63282464",
          "chr9:63720766-63721266", "chr9:63738274-63738774",
          "chr9:69034549-69035049", "chr9:71092007-71092507",
          "chr9:75410043-75410543", "chr9:78447834-78448334",
          "chr9:95311676-95312176", "chr9:107278527-107279027",
          "chr9:107295590-107296090", "chr9:107986338-107986838",
          "chr9:109059105-109059605", "chr9:113859329-113859829",
          "chr9:114417595-114418095", "chr9:114421682-114422182",
          "chr9:114426328-114426828", "chr9:114440536-114441036",
          "chr9:114471828-114472328", "chr9:120091151-120091651",
          "chr9:120091680-120092180", "chr9:120158075-120158575",
          "chr9:120961517-120962017", "chr9:122188607-122189107",
          "chr9:123756737-123757237", "chr9:123807647-123808147",
          "chr9:123933039-123933539", "chrX:42343493-42343993",
          "chrX:48439055-48439555", "chrX:71479176-71479676",
          "chrX:73988950-73989450", "chrX:101766904-101767404",
          "chrX:166229672-166230172"
        ],
        "motifs": [
          {
            "db": 0,
            "id": "MA0002.2",
            "alt": "RUNX1",
            "len": 11,
            "motif_evalue": "0.0e+000",
            "motif_nsites": 2000,
            "n_tested": 244,
            "score_threshold": 5,
            "url": "http://jaspar.genereg.net?ID=MA0002.2&rm=present&collection=CORE",
            "pwm": [
              [0.143506, 0.248, 0.347995, 0.2605], 
              [0.117007, 0.2425, 0.233501, 0.406992], 
              [0.0615096, 0.535985, 0.0745086, 0.327996], 
              [0.0285113, 1.22844e-05, 0.00351211, 0.967964], 
              [1.27144e-05, 0.0375104, 0.935965, 0.0265114], 
              [0.0435105, 0.0635091, 0.0350105, 0.85797], 
              [1.27144e-05, 1.22844e-05, 0.993463, 0.00651239], 
              [0.00851229, 0.0210112, 0.923966, 0.0465104], 
              [0.00501246, 0.200002, 0.125506, 0.669479], 
              [0.0655094, 0.231501, 0.0405103, 0.66248], 
              [0.25, 0.0790083, 0.144505, 0.526486]
            ],
            "total_sites": 527,
            "sites": [
              1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 1, 1, 1, 0, 1, 2,
              1, 4, 0, 1, 1, 1, 0, 1, 1, 1, 0, 2, 1, 0, 1, 1, 1, 1, 0, 2, 0,
              0, 1, 2, 1, 2, 2, 0, 0, 0, 1, 2, 0, 1, 0, 2, 1, 1, 0, 4, 0, 1,
              0, 2, 3, 1, 1, 2, 0, 0, 0, 0, 1, 1, 1, 0, 2, 2, 0, 0, 0, 0, 1,
              5, 1, 1, 1.5, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 1, 0, 3, 1,
              1, 2, 1, 1, 1, 0, 2, 0, 0, 2, 1, 4, 2, 1, 2, 1, 1, 1, 2, 1, 1,
              1, 0, 1, 0, 1, 0, 0, 1, 2, 0, 0, 0, 0, 1, 2, 0, 1, 1, 0, 0, 1,
              0, 0, 0, 1, 2, 1, 1, 2, 1, 1, 1, 1, 2, 1, 0, 2, 1, 0, 0, 4, 0,
              2, 3, 0, 0, 2, 2, 1, 1, 2, 1, 1, 1, 1, 1, 0, 1, 1, 0, 3, 1, 1,
              1, 1, 4, 1.5, 2, 1, 0, 1, 3, 1, 0, 3, 3, 3, 0, 3, 1, 2, 1, 0, 2,
              2, 1, 1, 2, 0, 0, 1, 4, 2, 3, 1, 1, 0, 3, 1, 1, 1, 2, 1, 2, 0,
              0, 1, 1, 4, 2, 4, 3, 0, 2, 2, 1, 3, 1, 3, 1, 0, 2, 4, 3, 2, 2,
              0, 2, 0, 0, 1, 0, 1, 1, 4, 0, 3, 2, 2, 1, 2, 2, 0, 1, 0, 1, 0,
              3, 2, 2, 0, 2, 1, 1, 1, 2, 0, 2, 1, 0, 2, 1, 0, 2, 1, 0, 0, 1,
              1, 2, 1, 3, 0, 2, 2, 0, 2, 2, 1, 3, 1, 1, 2, 2, 2, 2, 0, 0, 2,
              1, 4, 3, 0, 0, 1, 0, 1, 2, 2, 1, 1, 3, 1, 1, 3, 1, 1, 1, 0, 2,
              3, 0, 2, 1, 3, 2, 1, 1, 2, 1, 0, 0, 0, 3, 0, 0, 0, 0, 1, 0, 1,
              0, 2, 0, 0, 1, 3, 1, 0, 0, 2, 0, 1, 0, 0, 3, 0, 0, 0, 0, 0, 1,
              0, 3, 1, 0, 2, 0, 1, 0, 1, 2, 2, 2, 1, 0, 2, 1, 2, 2, 0, 1, 0,
              2, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 2, 0, 0, 0, 0, 0, 0, 2, 1, 2,
              1, 1, 0, 1, 2, 2, 1, 1, 0, 1, 0, 2, 2, 3, 1, 0, 2, 1, 1, 2, 0,
              3, 0, 1, 1, 0, 1, 2, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 2, 2, 0, 0,
              0, 2, 0, 2, 2, 0, 3, 1, 0, 2, 1, 3, 2, 1, 2, 1, 0, 1, 0, 0, 1,
              0, 0, 0, 0, 1, 0, 1
            ],
            "seqs": [
              1, 2, 4, 8, 11, 15, 16, 21, 23, 25, 26, 27, 33, 34, 37, 38, 39,
              43, 44, 46, 48, 49, 50, 51, 53, 60, 61, 64, 66, 67, 68, 69, 74,
              75, 78, 81, 83, 85, 86, 88, 89, 92, 93, 94, 95, 96, 98, 102,
              103, 106, 111, 112, 113, 114, 116, 119, 120, 122, 123, 125, 127,
              128, 134, 137, 138, 144, 145, 147, 148, 149, 150, 151, 155, 156,
              158, 159, 163, 165, 166, 167, 168, 169, 171, 172, 174, 175, 178,
              180, 182, 183, 184, 185, 186, 190, 193, 196, 197, 198, 200, 201,
              205, 206, 207, 208, 209, 210, 216, 219, 220, 221, 223, 225, 228,
              230, 231, 232, 234, 235, 237, 239, 242, 244, 245, 246, 250, 252,
              254, 256, 257, 258, 259, 260, 263, 264, 268, 269, 272, 273, 274,
              278, 285, 286, 288, 289, 301, 303, 304, 306, 308, 309, 311, 316,
              317, 320, 324, 326, 328, 329, 331, 332, 333, 334, 335, 336, 337,
              339, 341, 342, 346, 347, 351, 354, 355, 356, 357, 359, 360, 361,
              363, 364, 366, 367, 368, 369, 370, 372, 373, 374, 379, 381, 384,
              385, 387, 389, 391, 395, 396, 397, 402, 403, 405, 406, 409, 410,
              412, 413, 415, 418, 421, 422, 423, 425, 426, 431, 432, 436, 437,
              438, 445, 447, 449, 457, 459, 460, 461, 462, 464, 466, 467, 468,
              470, 472, 476, 477, 481, 482, 484, 485, 487, 488, 492, 493, 495,
              498, 500, 501, 502, 504, 505, 511, 512, 513, 515, 516, 517, 518,
              521, 524, 525, 531, 532, 534, 536, 537, 538, 539
            ],
            "peaks": [
              {
                "center": 0,
                "spread": 192,
                "sites": 265.5,
                "log_adj_pvalue": -10.4062
              }
            ]
          }, {
            "db": 0,
            "id": "MA0028.2",
            "alt": "ELK1",
            "len": 10,
            "motif_evalue": "0.0e+000",
            "motif_nsites": 50057,
            "n_tested": 245,
            "score_threshold": 5,
            "url": "http://jaspar.genereg.net?ID=MA0028.2&rm=present&collection=CORE",
            "pwm": [
              [0.681306, 0.0409024, 0.192745, 0.0850463], 
              [0.0249705, 0.939861, 0.0303254, 0.0048425], 
              [0.00776349, 0.990506, 0.00127649, 0.000454507], 
              [5.0802e-07, 0.00045849, 0.998973, 0.000567507], 
              [8.65078e-05, 0.000880489, 0.983721, 0.0153125], 
              [0.993062, 0.00505148, 0.00134449, 0.000542507], 
              [0.94711, 0.00688548, 0.00124149, 0.0447644], 
              [0.0585884, 0.0458644, 0.889835, 0.0057115], 
              [0.0169145, 0.116499, 0.0207374, 0.845849], 
              [0.289781, 0.145676, 0.377082, 0.18746]
            ],
            "total_sites": 213,
            "sites": [
              0, 0, 1, 0, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0,
              0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0,
              1.5, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0.5, 0, 0, 1, 0, 0, 1, 0,
              1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 2, 0,
              0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 0, 1, 1, 0, 0, 0, 0,
              0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1,
              0, 0, 0, 2, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 2, 1, 1, 2, 2, 0,
              0, 1, 0, 1, 1, 1, 0, 1, 0, 2, 1, 1, 1, 0, 0, 0, 2, 1, 0, 1, 0,
              1, 0, 1, 1, 1, 2, 0, 1, 1, 0, 1, 2, 1, 1, 0, 0, 0, 1, 0, 0, 0,
              0, 0, 0, 0, 0, 0, 1, 2, 2, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1.5, 0,
              1, 0, 2, 0, 0, 0, 1, 0, 2, 5, 0, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1,
              1, 0, 0, 1, 0, 1, 1, 0, 2.5, 0, 0, 0, 0, 1, 0, 1, 1, 0, 1, 1, 0,
              0, 0, 0, 0, 0, 2, 0, 0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0,
              0, 1, 0, 0, 3, 1, 0, 0, 0, 1, 1, 1, 0, 1, 1.5, 1, 0, 0, 0, 1, 1,
              0, 1, 1, 2, 0, 0, 0, 1, 0, 0, 0, 0, 2, 1, 0, 0, 0, 0, 1, 0, 2,
              0, 0, 1, 0, 1, 2, 2, 0, 1, 1, 1, 1, 0, 2, 0, 0, 0, 1, 1, 1, 0,
              1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 0,
              0, 1, 0.5, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,
              0, 0, 0, 1, 0, 0, 0, 1, 1.5, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1,
              1, 0, 0, 1.5, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 0, 1,
              1, 0, 0, 0, 0, 0, 0, 0, 0, 2, 1, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0,
              0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0,
              0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0,
              0, 1, 0, 2, 0, 0, 0, 0, 0
            ],
            "seqs": [
              13, 22, 23, 25, 26, 27, 39, 40, 42, 45, 53, 57, 58, 61, 63, 70,
              78, 80, 81, 90, 93, 95, 98, 100, 101, 105, 108, 113, 115, 117,
              118, 121, 123, 124, 128, 130, 133, 137, 142, 152, 160, 164, 182,
              184, 188, 197, 202, 222, 224, 228, 239, 242, 243, 254, 257, 259,
              263, 271, 273, 274, 280, 281, 284, 285, 286, 298, 299, 300, 303,
              306, 312, 314, 316, 318, 320, 321, 323, 325, 326, 332, 334, 339,
              352, 356, 360, 362, 366, 367, 376, 377, 378, 379, 380, 381, 388,
              393, 396, 397, 401, 404, 407, 409, 411, 424, 428, 430, 432, 435,
              436, 437, 439, 442, 450, 459, 460, 462, 465, 466, 472, 475, 476,
              482, 484, 487, 489, 493, 495, 505, 508, 517, 519, 521, 524, 528
            ],
            "peaks": [
              {
                "center": 0,
                "spread": 219,
                "sites": 132.5,
                "log_adj_pvalue": -10.0226
              }
            ]
          }, {
            "db": 0,
            "id": "MA0029.1",
            "alt": "Mecom",
            "len": 14,
            "motif_evalue": "0.0e+000",
            "motif_nsites": 27,
            "n_tested": 243,
            "score_threshold": 5,
            "url": "http://jaspar.genereg.net?ID=MA0029.1&rm=present&collection=CORE",
            "pwm": [
              [0.517544, 0.0747073, 0.222309, 0.18544], 
              [0.738946, 0.037807, 0.0747073, 0.14854], 
              [0.000938376, 0.037807, 0.923416, 0.0378387], 
              [0.997248, 0.000906642, 0.000906642, 0.000938376], 
              [0.0378387, 0.36991, 0.000906642, 0.591345], 
              [0.997248, 0.000906642, 0.000906642, 0.000938376], 
              [0.960348, 0.000906642, 0.037807, 0.000938376], 
              [0.000938376, 0.000906642, 0.997217, 0.000938376], 
              [0.997248, 0.000906642, 0.000906642, 0.000938376], 
              [0.000938376, 0.111608, 0.000906642, 0.886547], 
              [0.886547, 0.037807, 0.000906642, 0.074739], 
              [0.849647, 0.000906642, 0.148508, 0.000938376], 
              [0.22234, 0.259209, 0.259209, 0.259241], 
              [0.554444, 0.222309, 0.111608, 0.111639]
            ],
            "total_sites": 142,
            "sites": [
              1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0,
              1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0,
              0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0,
              0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0,
              0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 2, 0, 0, 0, 1, 0,
              0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
              0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1,
              0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1,
              0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0,
              1, 1, 2, 0, 0, 1, 1, 1, 0, 1, 0, 0, 1, 0, 0, 0, 2, 0, 0, 1, 0,
              2, 0, 1, 0, 1, 0, 0, 0, 1, 2, 0, 1, 0, 1, 1, 1, 2, 0, 1, 0, 0,
              1, 0, 1, 2, 1, 3, 0, 1, 0, 0, 1, 0, 0, 0, 0, 2, 2, 0, 2, 1, 1,
              2, 3, 1, 1, 0, 2, 1, 2, 3, 0, 3, 1, 1, 1, 0, 1, 0, 2, 0, 0, 2,
              0, 0, 0, 1, 1, 0, 1, 1, 1, 0, 1, 0, 0, 2, 1, 0, 0, 0, 2, 0, 1,
              2, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0,
              0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1,
              1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0,
              0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1,
              0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0,
              0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 2, 0, 1, 0, 0, 0,
              0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
              0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,
              0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
              0, 0, 0, 0
            ],
            "seqs": [
              3, 4, 8, 13, 17, 20, 25, 41, 44, 51, 57, 58, 65, 66, 74, 91, 93,
              109, 120, 122, 129, 139, 141, 149, 164, 167, 168, 169, 196, 205,
              212, 215, 220, 233, 252, 257, 258, 259, 264, 265, 266, 269, 270,
              272, 277, 287, 300, 302, 320, 336, 345, 347, 362, 374, 377, 386,
              391, 394, 395, 398, 410, 412, 416, 417, 425, 426, 437, 441, 443,
              448, 457, 458, 462, 468, 470, 471, 499, 500, 502, 510, 512, 522,
              528, 530
            ],
            "peaks": [
              {
                "center": 0,
                "spread": 109,
                "sites": 84,
                "log_adj_pvalue": -41.3813
              }
            ]
          }, {
            "db": 0,
            "id": "MA0035.3",
            "alt": "Gata1",
            "len": 11,
            "motif_evalue": "0.0e+000",
            "motif_nsites": 17955,
            "n_tested": 244,
            "score_threshold": 5,
            "url": "http://jaspar.genereg.net?ID=MA0035.3&rm=present&collection=CORE",
            "pwm": [
              [0.11334, 0.240657, 0.140909, 0.505095], 
              [0.0281833, 0.35678, 0.155501, 0.459537], 
              [1.41631e-06, 0.828123, 0.0243402, 0.147537], 
              [1.41631e-06, 0.0388202, 1.36841e-06, 0.961177], 
              [1.41631e-06, 1.36841e-06, 1.36841e-06, 0.999996], 
              [0.999996, 1.36841e-06, 1.36841e-06, 1.41631e-06], 
              [1.41631e-06, 1.36841e-06, 1.36841e-06, 0.999996], 
              [1.41631e-06, 0.999996, 1.36841e-06, 1.41631e-06], 
              [0.120636, 1.36841e-06, 1.36841e-06, 0.879362], 
              [0.139349, 0.343413, 0.37243, 0.144807], 
              [0.105041, 0.282484, 0.0890009, 0.523474]
            ],
            "total_sites": 418,
            "sites": [
              0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0,
              1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1,
              0, 0, 1, 1, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 2,
              0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 2, 0, 1, 0, 0,
              0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0,
              0, 0, 1, 0, 0, 2, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0, 2, 0, 0, 2, 0,
              1, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0,
              0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0,
              1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 2, 1, 1, 0, 0,
              2, 1, 1, 2, 1, 0, 3, 0, 0, 2, 1, 0, 1, 0, 3, 2, 0, 0, 4, 1, 1,
              1, 0, 0, 2, 3, 1, 3, 1, 2, 2, 0, 1, 2, 5, 2, 3, 7, 4, 5, 3, 2,
              4, 3, 4, 3, 4, 5, 4, 5, 6, 7, 6, 5, 5, 8, 3, 3, 3, 4, 2, 8, 4,
              2, 4, 6, 2, 4, 4, 1, 2, 6, 7, 5, 4, 7, 3, 7, 2, 6, 2, 4, 2, 3,
              2, 1, 2, 2, 3, 4, 0, 2, 3, 0, 1, 3, 2, 3, 1, 1, 0, 1, 0, 1, 2,
              3, 1, 1, 3, 2, 1, 1, 1, 2, 1, 0, 0, 1, 0, 0, 1, 1, 0, 2, 0, 1,
              1, 1, 1, 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1,
              1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0,
              0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1,
              1, 1, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 1, 1, 0, 1, 0,
              0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0,
              0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0,
              1, 0, 0, 0, 1, 1, 2, 1, 1, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0,
              0, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,
              0, 1, 0, 2, 0, 0, 3
            ],
            "seqs": [
              0, 6, 7, 8, 9, 10, 13, 14, 19, 20, 21, 25, 27, 29, 31, 32, 33,
              34, 37, 41, 44, 52, 54, 55, 56, 57, 58, 60, 61, 63, 64, 65, 66,
              67, 68, 74, 75, 77, 81, 83, 85, 87, 88, 89, 94, 96, 99, 100,
              101, 102, 104, 106, 107, 109, 111, 112, 113, 114, 115, 117, 119,
              120, 122, 125, 128, 131, 132, 133, 136, 137, 139, 140, 141, 142,
              144, 145, 146, 149, 150, 153, 158, 161, 165, 166, 167, 168, 170,
              172, 173, 176, 177, 181, 183, 184, 187, 189, 190, 191, 192, 193,
              194, 196, 197, 198, 199, 200, 201, 202, 204, 206, 207, 210, 212,
              213, 216, 217, 219, 224, 228, 229, 231, 232, 235, 236, 240, 244,
              246, 250, 251, 256, 258, 260, 266, 267, 268, 269, 271, 272, 273,
              274, 275, 276, 277, 280, 281, 282, 284, 287, 288, 290, 292, 297,
              298, 299, 303, 304, 309, 310, 311, 313, 318, 319, 320, 322, 323,
              326, 331, 332, 333, 334, 338, 339, 340, 342, 344, 345, 346, 347,
              350, 351, 353, 354, 358, 359, 361, 363, 364, 365, 367, 368, 376,
              377, 379, 383, 384, 386, 387, 392, 393, 394, 396, 397, 398, 399,
              406, 409, 410, 413, 414, 419, 420, 423, 425, 426, 428, 430, 431,
              432, 433, 435, 438, 440, 441, 442, 443, 450, 451, 452, 455, 457,
              460, 462, 468, 470, 471, 476, 477, 478, 480, 481, 483, 484, 486,
              490, 491, 492, 497, 498, 499, 500, 502, 503, 507, 510, 513, 514,
              516, 518, 522, 523, 526, 527, 528, 529, 533, 535, 538
            ],
            "peaks": [
              {
                "center": 0,
                "spread": 84,
                "sites": 267,
                "log_adj_pvalue": -223.431
              }
            ]
          }, {
            "db": 0,
            "id": "MA0036.2",
            "alt": "GATA2",
            "len": 14,
            "motif_evalue": "0.0e+000",
            "motif_nsites": 4380,
            "n_tested": 243,
            "score_threshold": 5,
            "url": "http://jaspar.genereg.net?ID=MA0036.2&rm=present&collection=CORE",
            "pwm": [
              [0.358217, 0.129455, 0.172148, 0.340181], 
              [0.256849, 0.175344, 0.39018, 0.177628], 
              [0.355021, 0.16644, 0.278538, 0.200001], 
              [0.239954, 0.119866, 0.0974924, 0.542687], 
              [0.00731164, 0.241324, 0.17466, 0.576705], 
              [0.00206076, 0.688346, 0.208677, 0.100917], 
              [5.8058e-06, 0.0438406, 5.60946e-06, 0.956148], 
              [0.0116495, 5.60946e-06, 5.60946e-06, 0.988339], 
              [0.999983, 5.60946e-06, 5.60946e-06, 5.8058e-06], 
              [5.8058e-06, 5.60946e-06, 5.60946e-06, 0.999983], 
              [5.8058e-06, 0.999983, 5.60946e-06, 5.8058e-06], 
              [0.279679, 5.60946e-06, 5.60946e-06, 0.720309], 
              [0.0237493, 0.402964, 0.449082, 0.124204], 
              [0.286757, 0.270547, 0.0511464, 0.39155]
            ],
            "total_sites": 442,
            "sites": [
              0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0,
              0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 2, 0, 0, 1,
              1, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0,
              0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0,
              0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 2, 0, 0, 0, 1,
              0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0,
              0, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
              0, 0, 0, 0, 0, 0, 1, 0, 0, 2, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0,
              1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 2, 1, 1, 0, 1, 0, 1, 0,
              1, 2, 1, 4, 1, 0, 2, 0, 0, 1, 1, 3, 2, 0, 0, 4, 1, 0, 3, 1, 0,
              2, 2, 1, 3, 2, 3, 0, 0, 3, 3, 3, 1, 4, 6, 4, 3, 4, 4, 7, 3, 4,
              4, 6, 5, 1, 5, 5, 6, 6, 4, 9, 6, 7, 7, 5, 5, 5, 3, 5, 5, 7, 2,
              1, 5, 9, 1, 2, 3, 2, 4, 10, 8, 3, 6, 7, 6, 4, 3, 5, 2, 3, 2, 4,
              1, 1, 3, 2, 4, 4, 1, 0, 2, 2, 2, 5, 2, 2, 1, 0, 1, 3, 2, 0, 2,
              2, 2, 0, 3, 2, 2, 0, 1, 0, 2, 0, 0, 1, 0, 0, 2, 0, 1, 0, 2, 0,
              3, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 2, 0, 1,
              0, 0, 0, 0, 0, 1, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
              0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1,
              0, 1, 0, 0, 2, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0,
              0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
              0, 0, 0, 0, 1, 0, 0, 2, 1, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,
              1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
              0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
              0, 1, 0, 3
            ],
            "seqs": [
              0, 4, 6, 7, 8, 9, 10, 12, 13, 14, 19, 20, 21, 28, 30, 31, 32,
              33, 34, 36, 37, 38, 39, 41, 43, 44, 47, 49, 50, 51, 52, 54, 55,
              56, 57, 58, 60, 61, 62, 63, 65, 66, 67, 68, 74, 75, 77, 81, 82,
              83, 85, 87, 88, 89, 92, 94, 96, 99, 100, 102, 104, 106, 107,
              108, 109, 110, 111, 112, 113, 114, 115, 117, 119, 120, 121, 122,
              124, 125, 128, 129, 130, 131, 132, 133, 135, 136, 137, 139, 140,
              141, 142, 143, 144, 145, 146, 149, 150, 151, 152, 153, 154, 156,
              157, 158, 161, 162, 164, 165, 166, 167, 168, 169, 170, 172, 173,
              176, 177, 181, 182, 183, 184, 185, 187, 189, 190, 191, 192, 193,
              194, 196, 197, 198, 199, 200, 201, 202, 205, 206, 207, 208, 209,
              210, 212, 213, 215, 217, 218, 219, 223, 224, 228, 229, 231, 232,
              233, 235, 236, 237, 238, 239, 240, 241, 244, 248, 249, 250, 251,
              256, 258, 259, 260, 263, 264, 265, 266, 267, 268, 269, 271, 272,
              273, 274, 275, 276, 277, 279, 280, 281, 282, 283, 284, 288, 289,
              290, 298, 299, 303, 304, 305, 309, 310, 311, 312, 313, 315, 318,
              319, 320, 322, 323, 326, 330, 331, 332, 333, 334, 338, 339, 340,
              342, 344, 345, 346, 347, 348, 349, 350, 351, 353, 354, 358, 359,
              361, 363, 364, 365, 367, 368, 369, 376, 378, 379, 380, 381, 383,
              384, 386, 387, 389, 391, 392, 393, 394, 395, 396, 397, 398, 399,
              406, 409, 410, 412, 413, 414, 415, 416, 417, 419, 420, 423, 425,
              426, 428, 430, 432, 433, 435, 438, 440, 441, 442, 443, 449, 450,
              451, 452, 453, 455, 457, 458, 460, 461, 462, 468, 469, 470, 471,
              472, 476, 477, 478, 480, 481, 483, 484, 485, 486, 489, 490, 491,
              492, 494, 495, 497, 498, 499, 500, 502, 504, 507, 510, 513, 514,
              516, 517, 518, 521, 522, 523, 526, 527, 528, 529, 530, 532, 534,
              535, 537, 538
            ],
            "peaks": [
              {
                "center": 0,
                "spread": 113,
                "sites": 339,
                "log_adj_pvalue": -279.978
              }
            ]
          }, {
            "db": 0,
            "id": "MA0037.2",
            "alt": "GATA3",
            "len": 8,
            "motif_evalue": "0.0e+000",
            "motif_nsites": 4628,
            "n_tested": 246,
            "score_threshold": 5,
            "url": "http://jaspar.genereg.net?ID=MA0037.2&rm=present&collection=CORE",
            "pwm": [
              [0.999984, 5.30887e-06, 5.30887e-06, 5.4947e-06], 
              [5.4947e-06, 5.30887e-06, 0.999984, 5.4947e-06], 
              [0.999984, 5.30887e-06, 5.30887e-06, 5.4947e-06], 
              [5.4947e-06, 5.30887e-06, 5.30887e-06, 0.999984], 
              [0.999984, 5.30887e-06, 5.30887e-06, 5.4947e-06], 
              [0.999984, 5.30887e-06, 5.30887e-06, 5.4947e-06], 
              [0.278737, 5.30887e-06, 0.721252, 5.4947e-06], 
              [0.604141, 0.153848, 0.242005, 5.4947e-06]
            ],
            "total_sites": 200,
            "sites": [
              0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
              0, 0, 0, 0, 0, 0, 0, 0, 0.5, 0, 0, 0, 0, 1, 0, 0, 0, 0.5, 0, 0,
              0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0,
              0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0,
              0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0.5, 0,
              0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0,
              0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0,
              0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0,
              0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.5, 0, 1, 3, 0, 0,
              0, 0, 0.5, 1, 1, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0.5, 1, 1, 0, 0,
              1, 1, 0, 1.5, 0, 0, 2, 2, 1, 2, 0, 2, 0, 0, 0, 0, 2, 1, 3, 1.5,
              4, 1, 3, 3, 4, 0, 3, 3, 0, 0, 2.5, 3, 1, 2, 6, 1, 2, 5, 1, 0, 1,
              1, 1, 1, 4, 1, 1, 1, 4.5, 1, 3, 1, 0, 2, 3, 4, 3, 1, 1, 5, 2,
              3.5, 0, 1, 1, 1, 2, 0.5, 1, 2, 1, 1, 1, 1, 2, 0, 0, 0, 1, 0, 1,
              2, 0, 0, 1, 2, 1, 2, 1, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0,
              0, 0, 1, 2, 0, 1, 0, 2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
              0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0,
              0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
              0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
              0.5, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
              0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 0, 0,
              0.5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.5,
              0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0,
              0.5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0
            ],
            "seqs": [
              0, 6, 8, 10, 13, 14, 20, 21, 27, 31, 32, 34, 41, 47, 50, 51, 52,
              55, 57, 65, 66, 67, 74, 75, 85, 87, 88, 89, 93, 94, 96, 99, 102,
              106, 109, 113, 114, 120, 122, 129, 131, 132, 141, 146, 148, 149,
              150, 156, 165, 167, 176, 181, 189, 191, 194, 196, 200, 201, 202,
              206, 207, 210, 217, 235, 246, 267, 268, 272, 273, 276, 277, 280,
              281, 287, 288, 290, 299, 304, 310, 311, 315, 318, 320, 331, 338,
              339, 340, 342, 344, 345, 346, 347, 353, 359, 361, 367, 368, 377,
              381, 386, 387, 389, 394, 395, 396, 398, 410, 412, 414, 419, 428,
              430, 432, 441, 442, 443, 450, 451, 452, 457, 462, 468, 470, 476,
              478, 481, 486, 494, 498, 499, 500, 507, 510, 512, 513, 514, 518,
              522, 528, 529, 530, 535, 537
            ],
            "peaks": [
              {
                "center": 0,
                "spread": 101,
                "sites": 139.5,
                "log_adj_pvalue": -109.607
              }
            ]
          }, {
            "db": 0,
            "id": "MA0048.2",
            "alt": "NHLH1",
            "len": 10,
            "motif_evalue": "0.0e+000",
            "motif_nsites": 2746,
            "n_tested": 245,
            "score_threshold": 5,
            "url": "http://jaspar.genereg.net?ID=MA0048.2&rm=present&collection=CORE",
            "pwm": [
              [0.24276, 0.667268, 0.0557679, 0.034204], 
              [0.156381, 0.0607257, 0.734717, 0.0481755], 
              [0.00139221, 0.99859, 8.94723e-06, 9.26041e-06], 
              [0.99813, 0.0013909, 0.00046993, 9.26041e-06], 
              [9.26041e-06, 0.116626, 0.839188, 0.0441767], 
              [0.0402428, 0.907771, 0.0519771, 9.26041e-06], 
              [9.26041e-06, 0.00184888, 0.00184888, 0.996293], 
              [0.000929227, 0.00184988, 0.996752, 0.000469244], 
              [0.101585, 0.74329, 0.0350107, 0.120115], 
              [0.0655529, 0.156632, 0.460941, 0.316874]
            ],
            "total_sites": 333,
            "sites": [
              0, 0, 1, 2, 0, 0, 1, 0, 1, 0, 4, 1, 1, 1, 0, 0, 2, 2, 1, 0, 2,
              0, 0, 2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 2, 0, 1, 1, 2, 0,
              0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 1, 1, 0, 0, 3,
              0, 0, 0, 0, 1, 1, 0, 1, 1, 2, 1, 0, 0, 0, 2, 1, 0, 0, 0, 2, 0,
              0, 0, 0, 0, 1, 0, 1, 0, 1, 2, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0,
              0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0,
              0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 2, 0, 0, 1, 0, 0, 2, 1,
              2, 1, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1,
              4, 1, 0, 1, 2, 0, 1, 0, 0, 0, 0, 0, 1, 2, 0, 1, 1, 1, 1, 1, 1,
              0, 2, 2, 1, 2, 0, 0, 1, 1, 1, 0, 0, 1, 1, 0, 2, 0, 1, 1, 1, 0,
              4, 2, 1, 1, 1, 1, 0, 0, 1, 2, 0, 1, 1, 2, 2, 1, 1, 0, 1, 1, 1,
              0, 1, 0, 0, 3, 1, 0, 0, 0, 0, 1, 1, 2, 0, 1, 0, 3, 1, 4, 0, 2,
              3, 1, 1, 0, 1, 1, 0, 1, 1, 0, 2, 1, 1, 0, 2, 0, 2, 2, 1, 1, 1,
              0, 0, 0, 1, 1, 1, 0, 2, 0, 0, 1, 0, 2, 2, 1, 1, 1, 1, 0, 0, 2,
              2, 3, 2, 3, 1, 0, 0, 0, 1, 0, 2, 0, 0, 0, 1, 1, 0, 1, 4, 1, 1,
              1, 1, 2, 0, 0, 0, 0, 4, 0, 1, 1, 1, 0, 2, 0, 0, 0, 0, 1, 0, 0,
              1, 1, 3, 1, 3, 0, 1, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0, 2, 0,
              2, 0, 1, 0, 0, 3, 0, 2, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0,
              1, 1, 0, 2, 1, 1, 0, 0, 2, 0, 0, 0, 2, 0, 2, 0, 1, 1, 1, 0, 0,
              1, 0, 0, 2, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 0, 1, 1, 0, 0, 0,
              3, 0, 0, 0, 1, 2, 0, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 0, 0, 1, 0,
              0, 1, 0, 2, 2, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 2, 1, 0, 1, 0, 1,
              1, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0,
              1, 2, 2, 1, 0, 1, 0, 0
            ],
            "seqs": [
              14, 20, 23, 35, 41, 42, 49, 50, 54, 56, 61, 65, 68, 69, 77, 81,
              83, 88, 95, 98, 113, 117, 123, 125, 130, 135, 144, 145, 146,
              147, 148, 149, 152, 153, 156, 157, 161, 162, 164, 167, 173, 175,
              176, 180, 188, 192, 195, 200, 202, 203, 208, 210, 212, 224, 225,
              232, 238, 239, 241, 242, 243, 244, 248, 251, 254, 255, 256, 260,
              265, 270, 273, 291, 292, 295, 307, 308, 309, 315, 316, 320, 326,
              328, 330, 335, 336, 339, 343, 345, 346, 348, 352, 354, 355, 356,
              357, 359, 366, 368, 372, 375, 388, 393, 396, 397, 399, 400, 405,
              409, 410, 411, 412, 420, 425, 426, 428, 431, 432, 440, 444, 447,
              449, 451, 458, 459, 460, 461, 468, 469, 473, 475, 476, 477, 483,
              484, 485, 486, 492, 497, 499, 502, 503, 507, 516, 517, 521, 522,
              524, 530
            ],
            "peaks": [
              {
                "center": 0,
                "spread": 155,
                "sites": 148,
                "log_adj_pvalue": -8.85774
              }
            ]
          }, {
            "db": 0,
            "id": "MA0062.2",
            "alt": "Gabpa",
            "len": 11,
            "motif_evalue": "0.0e+000",
            "motif_nsites": 991,
            "n_tested": 244,
            "score_threshold": 5,
            "url": "http://jaspar.genereg.net?ID=MA0062.2&rm=present&collection=CORE",
            "pwm": [
              [0.0323784, 0.776488, 0.190097, 0.00103656], 
              [0.0707975, 0.924098, 0.00406838, 0.00103656], 
              [2.56584e-05, 2.47906e-05, 0.998915, 0.00103456], 
              [2.56584e-05, 2.47906e-05, 0.999924, 2.56584e-05], 
              [0.997911, 0.00103169, 0.00103169, 2.56584e-05], 
              [0.995897, 0.00203859, 2.47906e-05, 0.00203946], 
              [0.0947741, 0.0322795, 0.872921, 2.56584e-05], 
              [0.056529, 0.263368, 0.037357, 0.642746], 
              [0.155566, 0.138395, 0.609054, 0.0969859], 
              [0.266666, 0.264644, 0.419174, 0.0495157], 
              [0.235356, 0.360594, 0.226265, 0.177786]
            ],
            "total_sites": 345,
            "sites": [
              1, 0, 1, 3, 1, 1, 2, 0, 1, 1, 0, 0, 2, 0, 0, 1, 1, 2, 0, 0, 1,
              0, 0, 2, 0, 0, 0, 0, 2, 1, 0, 0, 1, 1, 0, 0, 0, 0, 2, 0, 0, 0,
              1, 1, 1, 0, 1, 0, 0, 0, 1, 0, 2, 0, 1, 0, 0, 0, 0, 1, 1, 1, 0,
              0, 1, 0, 2, 1, 0, 0.5, 0, 1, 0, 1, 1, 0, 0, 0, 1.5, 0, 0, 0, 1,
              0, 1, 2, 0, 1, 0, 0, 0, 0, 0, 0, 2, 1, 4, 0, 0, 1, 0, 0, 0, 0,
              1, 0, 0, 1, 3, 0, 0, 2, 0, 1, 1, 1, 0, 0, 1, 1, 0, 1, 0, 1, 0,
              0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 4, 1, 0, 0, 4, 1, 0, 1,
              0, 0, 0, 2, 0, 2, 0, 1, 2, 0, 2, 0, 3, 0, 2, 0, 0, 2, 1, 1, 2,
              1, 1, 0, 2, 2, 2, 1, 0, 1, 2, 0, 0, 1, 1, 1, 0, 0, 1, 2, 0, 1,
              0, 1, 0, 0, 0, 1, 1, 1, 0, 2, 1, 4, 0, 0, 2, 1, 1, 2, 1, 1, 0,
              0, 0, 0, 1, 1, 0, 2, 2, 0, 0, 6, 0, 0, 1, 2, 2, 0, 1, 1, 1, 0,
              0, 0, 2, 1, 1, 0, 2, 2, 0, 1, 0, 0, 0, 1, 2, 0, 1, 0, 0, 1, 1,
              0, 0, 0, 1, 1, 0, 0, 0, 1, 2, 2, 1, 1, 1, 0, 0, 0, 0, 1, 1, 2,
              0, 0, 3, 1, 2, 2, 1, 0, 1, 3, 0, 2, 1, 0, 1, 1, 1.5, 0, 1, 3, 0,
              1, 4, 1, 2, 1, 1, 0, 0, 2, 1, 2, 1, 1.5, 0, 0, 1, 0, 0, 1, 1, 0,
              1, 1, 1, 1, 0, 0, 1, 2, 2, 1, 0, 3, 1, 0, 0, 0, 1, 3, 0, 1, 0,
              0, 1, 2, 1, 1, 0, 0, 1, 0, 0, 2, 2, 0, 1, 1, 1, 1, 3, 0, 2, 1,
              0, 1, 0, 0, 0, 3, 0, 1, 2, 0, 0, 1, 0, 0, 1, 1, 1, 2, 1, 0, 0,
              0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 2, 1, 0, 0, 0, 1, 1, 0, 0,
              0, 2, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0,
              0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 0, 2, 0, 2, 1, 0, 0, 1,
              0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0,
              0, 0, 0, 0, 0, 0, 2, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0,
              0, 1, 1, 0, 1, 0, 0, 0
            ],
            "seqs": [
              3, 4, 10, 11, 17, 19, 23, 25, 26, 27, 28, 32, 33, 35, 37, 39,
              42, 46, 48, 53, 56, 58, 61, 63, 66, 68, 70, 71, 76, 78, 80, 81,
              84, 90, 93, 94, 95, 98, 101, 106, 109, 113, 115, 116, 117, 118,
              121, 123, 124, 128, 129, 130, 131, 133, 136, 137, 142, 144, 146,
              148, 150, 151, 152, 154, 157, 158, 161, 164, 171, 172, 177, 179,
              182, 184, 185, 188, 189, 191, 194, 197, 198, 202, 206, 208, 214,
              215, 217, 220, 222, 224, 227, 228, 239, 243, 250, 254, 256, 257,
              258, 259, 268, 269, 271, 273, 276, 277, 280, 281, 282, 284, 290,
              291, 292, 293, 298, 300, 303, 306, 311, 312, 313, 314, 315, 316,
              318, 321, 323, 325, 326, 334, 336, 339, 346, 349, 352, 356, 360,
              366, 367, 369, 376, 377, 378, 380, 381, 393, 396, 397, 399, 401,
              405, 406, 409, 410, 411, 417, 421, 424, 428, 429, 430, 432, 435,
              436, 437, 442, 446, 448, 450, 453, 459, 462, 465, 466, 472, 474,
              475, 476, 481, 482, 483, 484, 486, 487, 488, 489, 493, 494, 495,
              498, 501, 505, 508, 514, 517, 519, 520, 521, 524, 528, 531, 539
            ],
            "peaks": [
              {
                "center": 0,
                "spread": 220,
                "sites": 202,
                "log_adj_pvalue": -9.71957
              }
            ]
          }, {
            "db": 0,
            "id": "MA0076.2",
            "alt": "ELK4",
            "len": 11,
            "motif_evalue": "0.0e+000",
            "motif_nsites": 3427,
            "n_tested": 244,
            "score_threshold": 5,
            "url": "http://jaspar.genereg.net?ID=MA0076.2&rm=present&collection=CORE",
            "pwm": [
              [0.0869619, 0.42544, 0.258535, 0.229064], 
              [0.114098, 0.555871, 0.166328, 0.163703], 
              [0.593512, 0.0423169, 0.302887, 0.0612836], 
              [7.42027e-06, 0.784343, 0.00467603, 0.210973], 
              [0.00234135, 7.16933e-06, 7.16933e-06, 0.997644], 
              [7.42027e-06, 7.16933e-06, 7.16933e-06, 0.999978], 
              [7.42027e-06, 0.999978, 7.16933e-06, 7.42027e-06], 
              [7.42027e-06, 0.999978, 7.16933e-06, 7.42027e-06], 
              [7.42027e-06, 7.16933e-06, 0.85058, 0.149405], 
              [7.42027e-06, 0.146195, 0.829572, 0.0242257], 
              [0.084627, 0.365623, 0.194924, 0.354826]
            ],
            "total_sites": 376,
            "sites": [
              0, 3, 3, 0, 2, 3, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 1, 1, 1, 1, 0,
              0, 1, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 0, 1, 0, 0, 2, 1, 0, 0, 0,
              2, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1,
              0, 0, 1, 0, 2, 1.5, 0, 1, 0, 1, 1, 1, 0, 0, 1.5, 0, 0, 0, 2, 1,
              0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 4, 0, 1, 1, 0, 0, 0, 0, 2,
              0, 0, 1, 3, 0, 1, 1, 0, 0, 1, 2, 1, 0, 1, 1, 0, 1, 0, 2, 0, 0,
              0, 0, 2, 1, 0, 1, 2, 0, 0, 0, 0, 2, 3, 1, 2, 0, 3, 1, 3, 0, 0,
              2, 2, 2, 0, 3, 0, 2, 1, 0, 3, 0, 2, 0, 1, 1, 1, 2, 1, 1, 0, 1,
              3, 1, 0, 1, 3, 0, 1, 1, 2, 1, 0, 0, 1, 2, 0, 0, 0, 1, 2, 2, 0,
              0, 0, 1, 1, 0, 0, 2, 1, 2, 0, 1, 1, 2, 2, 0, 0, 2, 2, 2, 0, 1,
              0, 1, 2, 1, 0, 1, 1, 0, 1, 5, 0, 1, 1, 2, 1, 1, 1, 1, 1, 1, 0,
              0, 0, 1, 2, 0, 1, 2, 2, 0, 0, 1, 0, 0, 2, 0, 1, 0, 0, 1, 1, 0,
              0, 1, 0, 0, 2, 1, 0, 0, 0, 3, 2, 3, 1, 0, 1, 0, 0, 2, 0, 1, 1,
              1, 1, 0, 3, 4, 1, 1, 1, 2, 2, 4, 0, 2, 3, 0.5, 1, 1, 1, 1, 0, 2,
              1, 1, 3, 0, 1, 0, 1, 1, 0, 1, 1, 2, 1, 2, 0, 0, 2, 0, 1, 1, 0,
              0, 1, 1, 1, 1, 0, 1, 1, 2, 2, 1, 1, 2, 1, 0, 0, 0, 1, 2, 1, 0,
              0, 1, 1, 2, 1, 0, 1, 0, 0, 2, 0, 0, 3, 1, 0, 2, 1, 0, 2, 0, 2,
              1, 0, 0, 0, 1, 1, 1, 0, 2, 2, 1, 0, 0, 1, 1, 1, 1, 0, 1, 1, 0,
              0, 0, 0, 1, 1, 1, 0, 0.5, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 0,
              1, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 2, 1, 0, 1, 1,
              1, 0, 2, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 4, 0, 1, 1, 0, 0,
              1, 0, 0, 0, 0, 2, 1, 0, 1, 0, 0, 0, 1, 1, 0, 1, 1, 1, 0, 1, 0,
              0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1,
              0, 1, 1, 2, 0, 0, 0, 0
            ],
            "seqs": [
              2, 3, 8, 10, 11, 17, 19, 22, 23, 25, 26, 27, 28, 32, 33, 37, 39,
              40, 42, 45, 46, 48, 53, 54, 56, 58, 61, 63, 66, 68, 70, 71, 75,
              80, 81, 85, 90, 93, 94, 95, 101, 102, 105, 106, 109, 112, 113,
              115, 116, 117, 118, 121, 123, 124, 125, 128, 129, 130, 131, 133,
              135, 136, 137, 142, 144, 148, 149, 150, 151, 152, 154, 155, 157,
              158, 164, 171, 172, 177, 179, 182, 184, 185, 188, 189, 191, 194,
              197, 198, 200, 202, 206, 208, 214, 215, 217, 220, 222, 224, 227,
              228, 231, 239, 243, 250, 254, 256, 257, 258, 259, 263, 269, 271,
              273, 277, 280, 282, 284, 286, 289, 290, 291, 293, 298, 300, 302,
              303, 306, 312, 313, 314, 315, 316, 318, 321, 323, 325, 326, 328,
              334, 336, 339, 346, 347, 351, 352, 355, 356, 360, 361, 364, 366,
              367, 369, 372, 376, 377, 378, 380, 393, 396, 397, 399, 401, 406,
              409, 410, 411, 413, 417, 418, 421, 424, 428, 429, 430, 432, 435,
              436, 437, 438, 442, 446, 448, 450, 453, 459, 462, 465, 466, 472,
              474, 475, 476, 477, 481, 482, 483, 484, 486, 487, 488, 489, 493,
              494, 495, 498, 501, 505, 506, 508, 514, 515, 517, 519, 520, 521,
              523, 524, 528, 530, 534, 539
            ],
            "peaks": [
              {
                "center": 0,
                "spread": 218,
                "sites": 221.5,
                "log_adj_pvalue": -12.5933
              }
            ]
          }, {
            "db": 0,
            "id": "MA0098.3",
            "alt": "ETS1",
            "len": 10,
            "motif_evalue": "0.0e+000",
            "motif_nsites": 3008,
            "n_tested": 245,
            "score_threshold": 5,
            "url": "http://jaspar.genereg.net?ID=MA0098.3&rm=present&collection=CORE",
            "pwm": [
              [0.710902, 0.0556503, 0.169584, 0.0638643], 
              [0.0565746, 0.84316, 0.0933431, 0.00692222], 
              [0.136441, 0.861296, 0.00225509, 8.45384e-06], 
              [8.45384e-06, 0.00777391, 0.992209, 8.45384e-06], 
              [8.45384e-06, 8.16795e-06, 0.995522, 0.00446131], 
              [0.999975, 8.16795e-06, 8.16795e-06, 8.45384e-06], 
              [0.738695, 0.00248609, 0.00854288, 0.250275], 
              [0.405888, 0.00774291, 0.581941, 0.00442831], 
              [0.0307504, 0.245941, 0.0428387, 0.68047], 
              [0.299291, 0.149463, 0.403648, 0.1476]
            ],
            "total_sites": 411,
            "sites": [
              1, 1, 3, 1, 2, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 2, 2, 0,
              0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 2, 0, 0, 1, 1, 2, 0, 0, 0, 0,
              1.5, 0, 1, 1, 1, 0.5, 0, 0, 0, 0, 3, 2, 0.5, 0, 0, 0, 0, 0, 0,
              0, 1, 1, 0, 1, 0, 0, 3, 2, 1, 0, 1, 2, 1, 1, 1, 1, 0, 0, 1, 2,
              1, 1, 0, 2.5, 0, 0, 0, 1, 1, 0, 0, 1, 0, 2, 2, 0, 2, 1, 1, 0, 0,
              1, 0, 0, 3, 3, 0, 0, 2, 0, 0, 0, 0, 0, 1, 2, 1, 0, 0, 1, 1, 0,
              1, 0, 1, 1, 2, 0, 0, 1, 0, 1, 0, 0, 1, 3, 2, 0, 2, 2, 1, 1, 4,
              0, 1, 2, 1, 1, 4, 1, 0, 2, 0, 2, 1, 1, 1, 2, 1, 0, 3, 1, 1, 1,
              0, 2, 2, 0, 1, 1, 2, 1, 0, 3, 0, 1, 1, 1, 3, 2, 0, 1, 1, 1, 2,
              2, 0, 0, 0, 1, 2, 0, 1, 1, 3, 1, 1, 0, 1, 4, 1, 0, 1, 2, 1, 2,
              0, 1, 1, 2, 0, 1, 0, 2, 0, 0, 6, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1,
              2, 1, 0, 1, 1, 0, 1, 2, 0, 4, 0, 0, 1, 1, 2, 0, 1, 2, 0, 1, 1,
              0, 0, 0, 2, 2, 2, 2, 0, 0, 0, 1, 0, 2, 2, 1, 0, 1, 0, 1, 0, 2,
              0, 2, 2, 1, 2, 3, 1, 0, 0, 3, 1, 1, 2, 0, 2, 2.5, 1, 0, 2, 1, 0,
              1, 2, 1, 2, 3, 0, 1, 0, 2, 0, 0, 0, 0, 2, 2, 0, 0, 1, 1, 1, 0,
              1, 0, 0, 1, 2, 1, 1, 1, 0, 2, 1, 4, 2, 0, 2, 1, 1, 0, 1, 2, 2,
              0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 2, 0, 0, 1, 2, 1, 1, 1, 1, 2, 2,
              0, 1, 3, 1, 0, 2, 1, 0, 1, 0, 0, 4, 0, 0, 0, 0, 1, 1, 0, 0, 2,
              0, 0, 0, 1, 1, 1, 2, 0, 0, 2.5, 0, 0, 1, 0, 0, 0, 2, 2, 0, 0, 2,
              1, 1, 1, 0, 2, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0,
              2, 2, 0, 1, 0, 0, 0, 0, 2, 0, 3, 1, 0, 1, 2, 0, 1, 2, 1, 1, 0,
              0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 2, 1, 0, 0,
              0, 0, 0, 0, 0, 1, 1, 0, 2, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0,
              1, 0, 1, 0, 2, 0, 0, 0, 0, 0
            ],
            "seqs": [
              2, 3, 10, 11, 14, 15, 17, 18, 19, 22, 23, 24, 25, 26, 27, 28,
              32, 37, 39, 40, 42, 45, 46, 48, 53, 54, 56, 57, 58, 61, 63, 66,
              68, 70, 71, 74, 77, 79, 80, 81, 86, 87, 90, 92, 93, 94, 95, 101,
              102, 103, 106, 108, 110, 113, 115, 116, 117, 118, 121, 123, 124,
              128, 129, 130, 131, 133, 136, 137, 142, 144, 148, 150, 151, 152,
              155, 157, 158, 160, 161, 163, 171, 177, 182, 184, 185, 188, 189,
              191, 193, 197, 198, 200, 202, 203, 206, 208, 214, 215, 217, 220,
              222, 223, 224, 227, 228, 230, 231, 232, 235, 239, 240, 242, 243,
              244, 250, 254, 256, 257, 258, 259, 263, 270, 271, 272, 273, 274,
              275, 276, 277, 278, 279, 280, 281, 284, 285, 286, 289, 291, 292,
              293, 294, 295, 298, 299, 300, 302, 303, 306, 309, 310, 311, 312,
              314, 315, 316, 318, 320, 321, 323, 325, 326, 328, 332, 334, 336,
              337, 339, 342, 344, 346, 347, 352, 354, 356, 359, 360, 361, 362,
              364, 366, 367, 369, 372, 376, 377, 378, 379, 381, 383, 396, 397,
              399, 401, 404, 406, 409, 410, 411, 413, 417, 419, 424, 428, 429,
              430, 432, 435, 436, 437, 442, 443, 446, 450, 451, 454, 456, 459,
              460, 461, 462, 464, 465, 466, 471, 472, 474, 475, 476, 477, 482,
              483, 484, 486, 487, 488, 489, 493, 495, 500, 501, 505, 506, 508,
              511, 514, 516, 517, 518, 519, 520, 521, 523, 524, 525, 528, 534,
              536, 539
            ],
            "peaks": [
              {
                "center": 0,
                "spread": 243,
                "sites": 257.5,
                "log_adj_pvalue": -11.2307
              }
            ]
          }, {
            "db": 0,
            "id": "MA0099.2",
            "alt": "FOS::JUN",
            "len": 7,
            "motif_evalue": "0.0e+000",
            "motif_nsites": 18,
            "n_tested": 246,
            "score_threshold": 5,
            "url": "http://jaspar.genereg.net?ID=MA0099.2&rm=present&collection=CORE",
            "pwm": [
              [0.00140497, 0.0566065, 0.00135746, 0.940631], 
              [0.00140497, 0.00135746, 0.830086, 0.167151], 
              [0.885383, 0.111855, 0.00135746, 0.00140497], 
              [0.277648, 0.664341, 0.0566065, 0.00140497], 
              [0.167151, 0.00135746, 0.0566065, 0.774886], 
              [0.00140497, 0.830086, 0.167104, 0.00140497], 
              [0.885383, 0.00135746, 0.0566065, 0.056654]
            ],
            "total_sites": 522,
            "sites": [
              2, 0, 4, 1, 2, 2, 1, 0, 1, 2, 3, 1, 0, 4, 0, 0, 1, 0, 0, 1, 0,
              1, 1, 0, 1, 1, 2, 1, 0, 0, 1, 2, 1, 0, 0, 0, 0, 1, 2, 1.5, 3, 1,
              1, 2, 1, 0.5, 1, 0.333333, 0, 2, 3, 3, 3, 1, 0, 2, 0, 0, 0, 1,
              0, 1, 2, 1.5, 0, 0, 2, 2, 2, 1, 0, 0, 1, 1, 0, 1, 0.5, 0, 0, 2,
              0, 1.5, 1, 0, 0, 3, 0, 1, 2, 1, 0, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0,
              1, 0, 0, 2, 2, 2, 4, 0, 2.5, 2.5, 0, 1, 0, 2.5, 0, 1, 0, 1, 0.5,
              0.333333, 1, 1, 2, 0.5, 0, 4, 0.333333, 1, 0, 0, 4, 1, 2, 2, 0,
              1, 1.5, 2, 0, 3, 1, 0, 1, 1, 0, 0.5, 0, 1, 2, 0, 1, 1, 1, 0, 0,
              1, 0, 0, 0, 2, 2, 0, 0.5, 0, 0, 1, 3, 0, 1, 1, 1, 0, 0, 2, 1, 2,
              0, 1, 2, 1, 0, 3, 0, 2, 0, 1, 4, 1, 1, 1.5, 0, 1, 2, 1, 2.5, 1,
              0, 1, 1, 0, 1, 0, 2, 0, 1, 1, 2, 1, 3, 3, 1, 1, 0, 1, 3, 1, 2,
              2, 1.5, 1, 1, 0, 0.333333, 1, 4, 2, 4, 1, 3, 2, 1, 0.5, 0, 1, 3,
              3.5, 1.33333, 1, 1, 1, 2.5, 1, 0, 1, 3, 3, 3, 1, 2, 0, 0, 1, 1,
              2.5, 2.33333, 0, 1, 1, 0, 3, 0, 2, 0, 0, 3, 2, 0, 3, 2.5, 0, 1,
              1.5, 0, 1.5, 1.5, 1.5, 0, 3, 0, 2, 0, 5, 4, 2, 2.5, 2, 1, 1,
              1.5, 0, 0, 1, 2, 1, 0, 0, 1.5, 2, 1, 0, 2, 3, 1, 2.5, 2, 1, 1,
              0, 1, 1, 1, 0, 0, 2, 1, 2, 1.5, 1, 1, 2.5, 3, 2, 0.5, 0.5, 2,
              0.5, 1, 2, 3.5, 1, 0, 2, 1, 1, 0, 1, 1, 0, 0, 2, 1, 3, 2, 0,
              1.5, 2, 0, 0, 2, 2, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0.5, 1, 2,
              1, 0, 0, 0, 2, 1.5, 2, 0, 0, 0, 1, 0, 1, 0.5, 1, 0.5, 1.5, 2, 2,
              0, 1, 1, 2, 1, 1, 1, 1, 1, 0, 0, 1.5, 0, 0, 1.5, 0, 3, 0, 1, 0,
              2, 0, 4, 2, 1, 0, 2, 1, 0, 1, 2, 0.5, 0, 1, 0.5, 1.5, 4, 1, 2,
              1, 0, 1, 0, 2, 1, 1, 1, 3, 0.5, 3.5, 0, 0, 0, 2, 0, 0, 0, 0, 0,
              0, 1, 0, 0, 1, 1.5, 1, 1, 1, 1, 1.5, 1, 0, 0, 1, 0, 2, 0, 0, 2,
              0, 1, 0, 0, 2, 0, 2, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 3, 1, 0, 1,
              1, 0, 2, 1, 0, 0, 2, 0, 0, 1
            ],
            "seqs": [
              3, 7, 15, 17, 28, 29, 33, 39, 40, 49, 52, 54, 58, 60, 61, 62,
              63, 69, 70, 71, 78, 80, 86, 90, 93, 116, 121, 128, 133, 134,
              135, 142, 144, 145, 147, 150, 152, 155, 156, 158, 159, 179, 181,
              182, 186, 192, 193, 195, 196, 198, 202, 210, 217, 219, 222, 223,
              225, 233, 236, 237, 238, 243, 248, 249, 252, 254, 257, 260, 264,
              268, 270, 274, 277, 278, 280, 285, 295, 300, 309, 314, 332, 333,
              334, 341, 342, 349, 352, 353, 354, 361, 362, 364, 367, 375, 376,
              377, 379, 398, 400, 405, 406, 408, 410, 411, 415, 416, 417, 425,
              426, 429, 434, 436, 457, 461, 465, 470, 474, 484, 491, 495, 500,
              506, 507, 518, 521, 522, 527, 537, 540
            ],
            "peaks": [
              {
                "center": 0,
                "spread": 80,
                "sites": 122.5,
                "log_adj_pvalue": -5.90435
              }
            ]
          }, {
            "db": 0,
            "id": "MA0136.2",
            "alt": "ELF5",
            "len": 11,
            "motif_evalue": "0.0e+000",
            "motif_nsites": 3756,
            "n_tested": 244,
            "score_threshold": 5,
            "url": "http://jaspar.genereg.net?ID=MA0136.2&rm=present&collection=CORE",
            "pwm": [
              [0.642202, 0.0669908, 0.0800154, 0.210793], 
              [0.228653, 0.430332, 0.178841, 0.162174], 
              [0.205498, 0.510715, 0.263585, 0.0202022], 
              [0.335093, 0.581007, 0.0710227, 0.0128774], 
              [0.000907746, 6.54136e-06, 0.993073, 0.00601261], 
              [0.00150173, 6.54136e-06, 0.991011, 0.00748057], 
              [0.994087, 0.00405843, 0.000374532, 0.00147973], 
              [0.896324, 0.02067, 6.54136e-06, 0.0829996], 
              [0.223282, 0.0388915, 0.716746, 0.0210802], 
              [0.120004, 0.180128, 0.0784955, 0.621374], 
              [0.348092, 0.134667, 0.276587, 0.240653]
            ],
            "total_sites": 505,
            "sites": [
              3, 3, 0, 1, 1, 1, 1, 0, 0, 2, 1, 0, 0, 0, 1, 1, 2, 1, 1, 2, 0,
              1, 1, 1, 0, 1, 1, 2, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 1,
              0, 1, 1, 0, 1, 1, 1, 0, 0, 0, 2, 0, 0, 1, 1, 3, 1, 2, 1, 0, 2,
              2, 1, 0, 0, 0.5, 2, 0, 0, 0, 2, 2, 0, 2, 3.5, 0, 1, 1, 1, 0, 1,
              1, 1, 1, 2, 0, 1, 2, 0, 0, 0, 0, 1, 0, 3, 0, 3, 1, 0, 3, 2, 0,
              2, 3, 3, 0, 1, 2, 3, 1, 1, 3, 0, 1, 2, 1, 1, 0, 0, 2, 0, 1, 0,
              0, 1, 2, 1, 0, 4, 1, 1, 0, 0, 2, 4, 1, 1, 0, 6, 1, 1, 2, 2, 3,
              1, 2, 1, 3, 1, 1, 0, 1, 2, 0, 1, 0, 3, 1, 1, 3, 3, 1, 1, 1, 1,
              2, 2, 2, 2, 0, 2, 1, 3, 1, 1, 2, 1, 1, 1, 2, 0, 1, 0, 1, 1, 0,
              0, 0, 0, 1, 2, 2, 0, 5, 1, 1, 0, 0, 2, 2, 0, 1, 1, 2, 2, 1, 0,
              1, 2, 4, 4, 1, 0, 1, 1, 5, 1, 2, 1, 3, 1, 1, 1, 2, 2, 1, 1, 1,
              2, 1, 1, 1, 1, 2, 0, 0, 2, 0, 0, 1, 1, 0, 1, 0, 1, 1, 0, 0, 0,
              0, 0, 3, 1, 0, 3, 3, 3, 1, 1, 1, 1, 0, 1, 1, 2, 3, 0, 1, 1, 1,
              3, 0, 1, 1, 1, 1, 0, 0, 0, 4, 1, 3, 1, 3, 2, 0, 2, 2, 2, 0, 1,
              2, 1, 2, 2, 1, 2, 2, 1, 0, 1, 1, 1, 1, 1, 2, 1, 1, 2, 0, 0, 1,
              0, 0, 1, 2, 0, 2, 0, 1, 2, 3, 3, 1, 1, 3, 1, 1, 0, 1, 1, 3, 0,
              0, 2, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 2, 2, 0, 3, 1, 0, 1, 0,
              2, 1, 2, 1, 0, 1, 1, 3, 1, 1, 2, 0, 0, 1, 0, 2, 0, 0, 0, 1, 2,
              0, 2, 0, 1, 1, 0, 0, 1, 2, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1, 2,
              0, 0, 1, 0, 1, 0, 2, 2, 2, 2, 0, 0, 0, 0, 0, 1, 2, 0, 1, 0, 2,
              0, 1, 1, 0, 1, 0, 1, 1, 2, 1, 1, 0, 0, 1, 2, 0, 2, 2, 2, 0, 0,
              0, 1, 1, 0, 1, 0, 1, 2, 0, 1, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0,
              0, 0, 0, 2, 0, 0, 2, 0, 2, 1, 2, 0, 3, 0, 0, 1, 0, 1, 1, 1, 0,
              3, 1, 1, 2, 0, 0, 0, 0
            ],
            "seqs": [
              1, 2, 3, 8, 9, 10, 11, 12, 13, 15, 16, 17, 18, 19, 22, 23, 26,
              28, 30, 32, 33, 36, 37, 39, 40, 41, 42, 45, 46, 48, 49, 52, 53,
              54, 56, 57, 58, 59, 60, 61, 63, 68, 70, 71, 73, 75, 80, 81, 84,
              85, 86, 87, 89, 90, 92, 93, 94, 95, 97, 98, 100, 101, 102, 103,
              104, 106, 107, 109, 112, 113, 114, 115, 116, 117, 118, 121, 123,
              124, 128, 129, 130, 131, 133, 135, 136, 137, 139, 141, 142, 144,
              147, 149, 150, 151, 152, 154, 155, 157, 158, 160, 161, 162, 164,
              168, 171, 172, 173, 176, 177, 181, 182, 184, 185, 186, 187, 188,
              189, 191, 194, 195, 196, 197, 198, 200, 201, 202, 203, 204, 205,
              206, 207, 208, 214, 215, 216, 217, 220, 221, 222, 223, 224, 227,
              228, 230, 231, 232, 233, 235, 237, 238, 239, 240, 241, 242, 243,
              245, 248, 250, 254, 256, 257, 259, 260, 262, 263, 264, 265, 268,
              269, 270, 271, 272, 273, 274, 275, 276, 277, 280, 281, 282, 284,
              286, 287, 288, 289, 290, 291, 292, 294, 298, 299, 300, 302, 303,
              304, 306, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 320,
              321, 322, 323, 325, 326, 329, 332, 334, 336, 337, 338, 339, 342,
              344, 345, 346, 347, 348, 351, 352, 353, 354, 355, 356, 359, 360,
              361, 364, 366, 367, 368, 369, 371, 372, 373, 376, 377, 378, 380,
              381, 382, 383, 384, 386, 391, 393, 396, 397, 398, 401, 404, 405,
              406, 408, 409, 410, 411, 413, 417, 418, 419, 420, 421, 422, 423,
              425, 427, 428, 429, 430, 432, 435, 437, 438, 440, 442, 443, 446,
              448, 449, 450, 451, 452, 453, 454, 456, 458, 459, 460, 461, 462,
              463, 464, 465, 466, 470, 471, 472, 473, 474, 475, 476, 477, 482,
              483, 484, 486, 487, 488, 489, 491, 492, 493, 494, 495, 496, 500,
              501, 504, 505, 506, 508, 511, 513, 514, 516, 517, 519, 520, 521,
              523, 524, 528, 530, 531, 532, 534, 535, 536, 537, 538, 539, 540
            ],
            "peaks": [
              {
                "center": 0,
                "spread": 294,
                "sites": 350,
                "log_adj_pvalue": -6.12727
              }
            ]
          }, {
            "db": 0,
            "id": "MA0140.2",
            "alt": "GATA1::TAL1",
            "len": 18,
            "motif_evalue": "0.0e+000",
            "motif_nsites": 4955,
            "n_tested": 241,
            "score_threshold": 5,
            "url": "http://jaspar.genereg.net?ID=MA0140.2&rm=present&collection=CORE",
            "pwm": [
              [0.224824, 0.411299, 0.195157, 0.16872], 
              [0.0415783, 0.162868, 0.0320933, 0.763461], 
              [0.0641818, 4.95853e-06, 4.95853e-06, 0.935808], 
              [0.999985, 4.95853e-06, 4.95853e-06, 5.13209e-06], 
              [5.13209e-06, 4.95853e-06, 4.95853e-06, 0.999985], 
              [5.13209e-06, 0.999985, 4.95853e-06, 5.13209e-06], 
              [0.413519, 0.0127187, 0.0111047, 0.562658], 
              [0.132797, 0.268618, 0.446817, 0.151768], 
              [0.19435, 0.245005, 0.25106, 0.309585], 
              [0.240363, 0.227447, 0.30676, 0.22543], 
              [0.358827, 0.228052, 0.199799, 0.213321], 
              [0.209486, 0.249647, 0.345508, 0.195359], 
              [0.272856, 0.230474, 0.295862, 0.200808], 
              [0.380421, 0.208477, 0.165491, 0.24561], 
              [0.278708, 0.249647, 0.380219, 0.0914263], 
              [0.0222047, 0.973143, 0.00464686, 5.13209e-06], 
              [0.940248, 4.95853e-06, 4.95853e-06, 0.0597419], 
              [0.0322955, 0.179618, 0.715228, 0.0728597]
            ],
            "total_sites": 259,
            "sites": [
              0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0,
              0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0,
              1, 0, 0, 3, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1,
              0, 0, 0, 1, 0, 0, 0, 0, 2, 0, 2, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0,
              1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 1, 0, 2, 1, 0,
              1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0,
              0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0,
              0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 2, 1, 2, 1, 0, 0, 0, 0, 0, 1, 0,
              0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0,
              0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 1, 3, 0, 0, 0, 2, 1, 2, 0, 0,
              1, 1, 3, 1, 1, 3, 1, 2, 4, 2, 1, 2, 3, 2, 0, 0, 1, 3, 4, 2, 3,
              1, 2, 5, 1, 3, 1, 3, 2, 1, 2, 1, 2, 2, 2, 3, 3, 0, 3, 0, 2, 3,
              3, 2, 4, 1, 0, 3, 1, 0, 1, 1, 2, 2, 1, 0, 2, 0, 1, 1, 1, 0, 0,
              1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 5, 1, 0, 1, 0,
              1, 0, 1, 0, 1, 0, 2, 1, 1, 0, 2, 0, 0, 1, 2, 0, 0, 1, 0, 1, 0,
              0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 2, 0, 1,
              0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
              1, 1, 0, 1, 0, 1, 0, 0, 0, 0, 2, 0, 0, 1, 0, 1, 1, 1, 0, 1, 0,
              0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
              0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 2, 1, 0,
              0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0,
              0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 2, 0, 1, 0, 0, 0, 0, 0,
              0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0
            ],
            "seqs": [
              2, 3, 6, 7, 9, 11, 17, 18, 25, 26, 34, 36, 37, 45, 51, 52, 53,
              54, 58, 60, 64, 65, 66, 68, 71, 74, 75, 85, 86, 87, 94, 96, 99,
              100, 101, 107, 108, 114, 119, 131, 133, 136, 137, 139, 145, 146,
              154, 155, 158, 164, 166, 169, 171, 172, 173, 176, 180, 187, 190,
              191, 193, 197, 200, 211, 220, 224, 226, 228, 229, 233, 243, 250,
              256, 261, 263, 266, 267, 278, 282, 288, 289, 290, 304, 305, 326,
              331, 337, 338, 339, 340, 351, 359, 361, 362, 363, 365, 368, 374,
              380, 381, 384, 386, 387, 389, 392, 394, 396, 398, 400, 408, 412,
              420, 430, 435, 442, 447, 451, 453, 468, 470, 480, 483, 484, 485,
              486, 490, 491, 494, 495, 499, 504, 507, 522, 527, 528, 529, 532,
              534, 537
            ],
            "peaks": [
              {
                "center": 0,
                "spread": 97,
                "sites": 139,
                "log_adj_pvalue": -68.4877
              }
            ]
          }, {
            "db": 0,
            "id": "MA0156.2",
            "alt": "FEV",
            "len": 10,
            "motif_evalue": "0.0e+000",
            "motif_nsites": 8812,
            "n_tested": 245,
            "score_threshold": 5,
            "url": "http://jaspar.genereg.net?ID=MA0156.2&rm=present&collection=CORE",
            "pwm": [
              [0.658576, 0.0521512, 0.141275, 0.147998], 
              [0.124268, 0.773221, 0.0765889, 0.0259226], 
              [0.077557, 0.915617, 0.00644472, 0.000381882], 
              [0.00179287, 2.78821e-06, 0.997926, 0.000277883], 
              [0.000277883, 0.000140787, 0.998338, 0.00124187], 
              [0.995597, 0.00151377, 0.000414784, 0.00247486], 
              [0.754705, 0.0160356, 0.000627781, 0.228631], 
              [0.300951, 0.0331994, 0.657501, 0.00834779], 
              [0.0437984, 0.179622, 0.0615531, 0.715028], 
              [0.294426, 0.187363, 0.311395, 0.206817]
            ],
            "total_sites": 417,
            "sites": [
              1, 1, 4, 2, 1, 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 3, 1,
              0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 2, 0, 0, 0, 2, 1, 0, 1, 0, 0,
              2.5, 0, 1, 1, 1, 0.5, 0, 0, 0, 1, 2, 2, 0.5, 0, 0, 2, 0, 0, 1,
              0, 1, 2, 1, 1, 0, 0, 2, 2, 0, 0, 0, 3, 1, 1, 1, 1, 0, 1, 1, 1,
              0.5, 1, 0, 1.5, 0, 0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 0, 3, 2, 0, 0,
              0, 1, 0, 0, 2, 0, 0, 0, 3, 0, 0, 0, 1, 0, 1, 2, 0, 0, 0, 1, 1,
              0, 1, 0, 0, 1, 3, 0, 1, 2, 0, 0, 0, 1, 1, 2, 2, 0, 2, 2, 1, 1,
              4, 0, 0, 2, 1, 1, 3, 1, 0, 2, 0, 2, 1, 1.5, 1, 1, 2, 0, 3, 1, 1,
              1, 0, 2, 1, 0, 1, 2, 2, 1, 1, 3, 0, 1, 2, 1, 3, 3, 0, 1, 1, 0,
              1, 2, 1, 0, 0, 1, 2, 0, 1, 1, 3, 2, 1, 0, 1, 4, 0, 0, 1, 2, 1,
              2, 0, 1, 1, 2, 1, 1, 0, 2, 0, 1, 6, 1, 0, 1, 0, 2, 0, 2, 0, 1,
              1, 2, 1, 1, 2, 1, 0, 1, 2, 0, 2, 0, 0, 1, 1, 2, 0, 1, 1, 1, 1,
              1, 0, 0, 0, 1, 2, 2, 2, 0, 0, 0, 1, 2, 3, 2, 1, 0, 1, 0, 0, 0,
              1.5, 0, 2, 2, 0, 0, 2, 1, 0, 0, 3, 1, 1, 3, 0, 2, 2.5, 1, 0, 3,
              2, 0, 1, 1, 2, 2, 3, 0, 1, 0, 2, 0, 0, 0, 0, 3, 1, 0, 0, 1, 1,
              1, 0, 2, 0, 0, 1, 2, 1, 1, 2, 0, 2, 1, 4, 2, 0, 3, 1, 0, 1, 1,
              1, 2, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 2, 0, 0, 1, 2, 2, 1, 2, 1,
              2, 2, 0, 1, 2, 0, 0, 2, 2, 0, 0, 0, 0, 3, 0, 0, 1, 0, 1, 1, 0,
              0, 1, 0, 0, 0, 1, 1, 0, 2, 0, 0, 1.5, 1, 0, 1, 0, 0, 0, 1, 2, 0,
              1, 1, 1, 1, 1, 0, 2, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1,
              0, 0, 1, 2.5, 0, 1, 0, 0, 1, 0, 1, 0, 2, 0, 0, 1, 2, 0, 1, 2, 0,
              1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 2, 0, 1, 0, 0, 1, 1, 0, 0, 2, 2,
              0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0,
              0, 0, 0, 0, 2, 0, 2, 0, 1, 0, 0, 1
            ],
            "seqs": [
              2, 3, 10, 13, 14, 19, 20, 22, 23, 25, 26, 27, 28, 32, 37, 39,
              40, 42, 45, 46, 53, 54, 56, 57, 58, 61, 63, 66, 67, 68, 70, 71,
              74, 77, 78, 79, 80, 81, 84, 86, 90, 92, 93, 95, 98, 100, 101,
              102, 103, 104, 105, 106, 108, 109, 112, 113, 115, 116, 117, 118,
              121, 123, 124, 128, 129, 130, 131, 133, 136, 137, 142, 148, 150,
              151, 152, 154, 157, 158, 160, 161, 163, 171, 177, 179, 182, 184,
              185, 186, 188, 189, 191, 193, 195, 197, 198, 200, 202, 206, 208,
              214, 215, 217, 220, 222, 223, 224, 227, 228, 230, 231, 235, 237,
              239, 240, 242, 243, 244, 250, 254, 256, 257, 258, 259, 263, 268,
              270, 271, 272, 273, 274, 276, 277, 278, 279, 280, 281, 284, 285,
              286, 290, 291, 292, 293, 294, 295, 298, 299, 300, 302, 303, 306,
              311, 312, 314, 315, 316, 318, 320, 321, 323, 325, 326, 328, 334,
              336, 339, 342, 346, 347, 350, 352, 354, 356, 360, 361, 362, 366,
              367, 369, 372, 376, 377, 378, 380, 382, 386, 387, 390, 396, 397,
              399, 401, 406, 409, 410, 411, 413, 417, 418, 419, 424, 428, 429,
              430, 431, 432, 435, 436, 437, 440, 442, 443, 446, 450, 451, 456,
              459, 460, 461, 462, 465, 466, 471, 472, 474, 475, 476, 477, 482,
              483, 484, 486, 487, 488, 489, 493, 495, 500, 501, 505, 506, 508,
              514, 516, 517, 518, 519, 520, 521, 523, 524, 525, 528, 534, 536,
              539
            ],
            "peaks": [
              {
                "center": 0,
                "spread": 235,
                "sites": 255.5,
                "log_adj_pvalue": -11.9613
              }
            ]
          }, {
            "db": 0,
            "id": "MA0462.1",
            "alt": "BATF::JUN",
            "len": 11,
            "motif_evalue": "0.0e+000",
            "motif_nsites": 10522,
            "n_tested": 244,
            "score_threshold": 5,
            "url": "http://jaspar.genereg.net?ID=MA0462.1&rm=present&collection=CORE",
            "pwm": [
              [0.29291, 0.0457159, 0.488118, 0.173257], 
              [0.454474, 0.0525588, 0.274568, 0.2184], 
              [0.429479, 0.0161592, 0.210891, 0.34347], 
              [0.784827, 0.140469, 2.33509e-06, 0.0747027], 
              [2.41682e-06, 2.33509e-06, 2.33509e-06, 0.999993], 
              [2.41682e-06, 2.33509e-06, 0.985927, 0.0140683], 
              [0.999993, 2.33509e-06, 2.33509e-06, 2.41682e-06], 
              [0.0556949, 0.477664, 0.466639, 2.41682e-06], 
              [2.41682e-06, 2.33509e-06, 2.33509e-06, 0.999993], 
              [0.122696, 0.81638, 0.0609218, 2.41682e-06], 
              [0.975473, 2.33509e-06, 2.33509e-06, 0.0245222]
            ],
            "total_sites": 278,
            "sites": [
              1, 0, 1, 0, 1, 0, 0, 1, 1, 3, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0,
              0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0,
              0, 0, 0, 0, 1, 2, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 2,
              1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1,
              0, 1, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 1, 3, 0,
              1, 1, 0, 1, 1, 1, 0, 0, 1, 1, 0, 1, 0, 1, 2, 0, 0, 1, 1, 1, 0,
              0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 1, 0,
              0, 2, 0, 0, 1, 0, 2, 0, 0, 2, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0, 1,
              0, 0, 2, 0, 0, 0, 0, 1, 0, 0, 2, 1, 1, 0, 0, 1, 2, 0, 1, 2, 0,
              1, 1, 1, 2, 2, 1, 1, 1, 2, 0, 0, 0, 0, 0, 3, 0, 1, 2, 0, 0, 1,
              1, 0, 0, 1, 1, 1, 0, 1, 0, 0, 2, 2, 1, 1, 0, 1, 0, 2, 0, 0, 2,
              2, 1, 2, 1, 3, 1, 3, 0, 0, 0, 1, 0, 1, 2, 1, 1, 1, 0, 1, 1, 1,
              0, 0, 2, 0, 2, 1, 0, 0, 0, 2, 0, 0, 1, 0, 0, 0, 1, 1, 1, 2, 0,
              1, 0, 0, 3, 0, 5, 0, 1, 0, 3, 1, 0, 3, 1, 0, 0, 1, 0, 1, 0, 0,
              2, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 0, 0, 1, 0,
              1, 2, 0, 0, 1, 1, 3, 0, 2, 2, 2, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0,
              2, 0, 2, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 1, 0, 2, 0,
              0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1,
              1, 1, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0,
              1, 0, 0, 2, 0, 3, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1,
              1, 0, 1, 1, 1, 1, 0, 1, 0, 2, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0,
              0, 0, 0, 1, 2, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 1, 2, 0, 0,
              0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1, 2, 0,
              1, 0, 1, 0, 0, 0, 1
            ],
            "seqs": [
              3, 7, 25, 27, 28, 30, 33, 35, 39, 40, 46, 51, 58, 60, 62, 70,
              71, 78, 82, 86, 93, 98, 100, 108, 111, 114, 115, 116, 120, 121,
              126, 128, 135, 138, 142, 144, 145, 156, 159, 162, 173, 175, 180,
              182, 187, 193, 195, 196, 198, 202, 205, 210, 211, 212, 216, 220,
              221, 229, 233, 236, 237, 243, 246, 248, 249, 252, 254, 255, 264,
              277, 285, 287, 300, 302, 309, 317, 318, 319, 320, 323, 324, 336,
              337, 338, 341, 348, 353, 364, 365, 367, 379, 387, 391, 397, 400,
              402, 406, 407, 409, 411, 415, 416, 418, 425, 426, 427, 428, 434,
              443, 444, 450, 455, 461, 465, 470, 483, 486, 493, 495, 500, 506,
              508, 511, 517, 525, 533, 534, 535, 537, 538, 540
            ],
            "peaks": [
              {
                "center": 0,
                "spread": 162,
                "sites": 131,
                "log_adj_pvalue": -8.52497
              }
            ]
          }, {
            "db": 0,
            "id": "MA0473.2",
            "alt": "ELF1",
            "len": 12,
            "motif_evalue": "0.0e+000",
            "motif_nsites": 3960,
            "n_tested": 244,
            "score_threshold": 5,
            "url": "http://jaspar.genereg.net?ID=MA0473.2&rm=present&collection=CORE",
            "pwm": [
              [0.585818, 0.087529, 0.14956, 0.177092], 
              [0.763442, 0.0757523, 0.0354423, 0.125363], 
              [0.133351, 0.735426, 0.0642246, 0.0669987], 
              [0.0257818, 0.906611, 0.0676005, 6.42156e-06], 
              [0.0325626, 0.967425, 6.20439e-06, 6.42156e-06], 
              [6.42156e-06, 6.20439e-06, 0.999981, 6.42156e-06], 
              [6.42156e-06, 6.20439e-06, 0.999981, 6.42156e-06], 
              [0.998243, 6.20439e-06, 0.00174416, 6.42156e-06], 
              [0.982873, 0.000291197, 6.20439e-06, 0.016829], 
              [0.135192, 6.20439e-06, 0.864544, 0.000257415], 
              [0.00900119, 0.0791052, 6.20439e-06, 0.911888], 
              [0.302379, 0.190367, 0.392915, 0.114339]
            ],
            "total_sites": 175,
            "sites": [
              0.5, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0,
              0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,
              0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1,
              1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1,
              0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 3, 0, 0, 0, 0, 1, 0, 0, 2,
              0, 0, 0, 2, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0,
              1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 1, 1, 0,
              0, 1, 0, 0, 0, 0, 2, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 1, 0, 1,
              1, 1, 0, 0, 2, 2, 0, 0, 0, 2, 2, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0,
              0, 0, 0, 1, 0, 1, 1, 2, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 2, 0, 2,
              0, 2, 1, 1, 0, 0, 4, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1,
              1, 1, 1, 1, 0, 0, 0, 2, 0, 0, 2, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0,
              0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0,
              0, 0, 0, 2, 0, 1, 0, 0, 1, 0, 2, 0, 2, 0, 0, 0, 0, 1, 0, 1, 1,
              0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0,
              0, 0, 0, 2, 0, 0, 0, 0, 1, 1, 2, 0, 1, 0, 1, 0, 0, 1, 2, 0, 0,
              0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 1, 0, 0, 0, 0,
              1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0,
              0, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0,
              0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0,
              0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0.5, 0, 0, 0, 0,
              1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
              0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0,
              1, 0, 1, 0, 0, 0
            ],
            "seqs": [
              15, 17, 22, 23, 28, 37, 40, 42, 46, 56, 58, 61, 63, 90, 93, 95,
              117, 118, 121, 128, 130, 133, 135, 136, 137, 142, 152, 157, 158,
              164, 171, 182, 184, 185, 188, 189, 197, 198, 202, 208, 220, 222,
              224, 239, 243, 254, 256, 257, 263, 271, 273, 274, 280, 284, 286,
              291, 298, 303, 312, 313, 316, 318, 323, 326, 329, 334, 352, 356,
              360, 362, 366, 367, 372, 376, 378, 380, 387, 388, 393, 397, 409,
              411, 417, 428, 430, 432, 436, 442, 443, 450, 459, 462, 465, 466,
              475, 476, 481, 482, 487, 488, 493, 495, 498, 505, 506, 508, 516,
              521
            ],
            "peaks": [
              {
                "center": 0,
                "spread": 213,
                "sites": 108,
                "log_adj_pvalue": -8.28303
              }
            ]
          }, {
            "db": 0,
            "id": "MA0474.2",
            "alt": "ERG",
            "len": 10,
            "motif_evalue": "0.0e+000",
            "motif_nsites": 5314,
            "n_tested": 245,
            "score_threshold": 5,
            "url": "http://jaspar.genereg.net?ID=MA0474.2&rm=present&collection=CORE",
            "pwm": [
              [0.690764, 0.0405489, 0.128292, 0.140395], 
              [0.113197, 0.80006, 0.0697423, 0.0170015], 
              [0.121441, 0.873195, 0.00421154, 0.00115176], 
              [0.000223781, 4.62355e-06, 0.999767, 4.78538e-06], 
              [4.78538e-06, 0.000222619, 0.993459, 0.00631467], 
              [0.994107, 0.00435854, 4.62355e-06, 0.00152876], 
              [0.769065, 0.0200482, 0.0011836, 0.209703], 
              [0.423942, 0.0213082, 0.54878, 0.00596967], 
              [0.0206244, 0.238712, 0.0534356, 0.687229], 
              [0.220325, 0.240911, 0.365307, 0.173458]
            ],
            "total_sites": 424,
            "sites": [
              1, 1, 4, 1, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1,
              0, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 2, 0, 0, 0, 2, 2, 0, 1, 0, 1,
              2.5, 0, 1, 1, 1, 0.5, 0, 0, 0, 1, 2, 1, 0.5, 0, 0, 1, 0, 0, 0,
              0, 1, 2, 1, 0, 0, 0, 1, 2, 1, 0, 0, 2, 1, 1, 1, 1, 0, 1, 2, 1,
              1, 1, 0, 2.5, 0, 0, 0, 1, 1, 0, 0, 1, 1, 2, 1, 0, 1, 2, 0, 0, 0,
              1, 0, 0, 3, 2, 0, 0, 3, 0, 0, 0, 0, 0, 1, 2, 1, 0, 0, 1, 1, 0,
              1, 0, 0, 1, 2, 0, 0, 1, 0, 0, 0, 0, 1, 2, 2, 0, 2, 2, 1, 1, 4,
              0, 1, 2, 1, 1, 3, 1, 0, 2, 0, 2, 1, 2, 1, 1, 1, 0, 3, 1, 1, 2,
              0, 2, 1, 0, 2, 2, 2, 2, 1, 2, 0, 1, 1, 1, 4, 2, 0, 1, 1, 1, 2,
              2, 0, 0, 0, 1, 2, 0, 1, 1, 3, 1, 1, 0, 1, 4, 1, 0, 1, 2, 2, 2,
              0, 1, 1, 3, 1, 1, 0, 2, 0, 1, 6, 1, 0, 1, 1, 2, 0, 2, 0, 2, 0,
              3, 1, 1, 1, 1, 1, 1, 2, 0, 2, 0, 0, 1, 1, 1, 0, 1, 2, 1, 1, 1,
              0, 0, 0, 2, 2, 2, 2, 0, 1, 0, 1, 1, 3, 2, 1, 0, 1, 0, 1, 0, 1,
              0, 2, 2, 0, 0, 3, 1, 0, 1, 3, 1, 1, 3, 0, 3, 2.5, 1, 0, 3, 2, 1,
              1, 0, 1, 2, 3, 0, 1, 0, 2, 0, 0, 0, 0, 2, 2, 0, 0, 1, 1, 1, 0,
              1, 0, 0, 1, 2, 0, 1, 1, 0, 2, 1, 4, 2, 0, 2, 1, 1, 1, 1, 2, 2,
              0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 2, 0, 0, 1, 2, 2, 1, 1, 1, 2, 3,
              0, 2, 2, 1, 0, 2, 1, 0, 1, 0, 1, 3, 0, 0, 0, 0, 1, 1, 0, 0, 2,
              0, 0, 0, 1, 1, 0, 2, 0, 0, 2.5, 1, 0, 1, 0, 0, 0, 1, 2, 0, 0, 2,
              1, 1, 1, 0, 2, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 0,
              1, 2, 0, 1, 0, 0, 1, 0, 2, 0, 2, 0, 0, 1, 2, 0, 1, 2, 0, 0, 0,
              0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 2, 1, 0, 0,
              0, 0, 0, 0, 0, 1, 1, 0, 2, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 0, 1,
              0, 0, 1, 0, 2, 1, 1, 0, 0, 0
            ],
            "seqs": [
              2, 3, 10, 11, 14, 19, 20, 22, 23, 24, 25, 26, 27, 28, 32, 37,
              39, 40, 42, 45, 46, 53, 54, 56, 58, 61, 63, 66, 67, 68, 70, 71,
              74, 77, 79, 80, 81, 86, 90, 92, 93, 95, 101, 102, 103, 105, 106,
              108, 109, 112, 113, 115, 116, 117, 118, 121, 123, 124, 128, 129,
              130, 131, 133, 136, 137, 142, 146, 148, 150, 151, 152, 155, 157,
              158, 160, 161, 163, 171, 177, 179, 182, 184, 185, 186, 188, 189,
              191, 193, 197, 198, 200, 202, 203, 206, 207, 208, 214, 215, 217,
              220, 222, 223, 224, 227, 228, 230, 231, 237, 239, 240, 242, 243,
              244, 250, 254, 256, 257, 258, 259, 263, 268, 271, 272, 273, 274,
              276, 277, 278, 279, 280, 281, 284, 285, 286, 289, 290, 291, 292,
              293, 295, 298, 299, 300, 302, 303, 306, 312, 314, 315, 316, 318,
              320, 321, 323, 325, 326, 328, 332, 334, 336, 339, 342, 344, 346,
              350, 352, 356, 360, 361, 362, 364, 366, 367, 368, 369, 372, 376,
              377, 378, 381, 382, 386, 390, 396, 397, 399, 401, 406, 407, 409,
              410, 411, 413, 417, 419, 424, 426, 428, 429, 430, 432, 435, 436,
              437, 440, 442, 443, 446, 450, 451, 456, 459, 460, 461, 462, 464,
              465, 466, 471, 472, 474, 475, 476, 477, 482, 483, 484, 486, 487,
              488, 489, 493, 495, 496, 499, 501, 505, 506, 508, 511, 513, 514,
              516, 517, 518, 519, 520, 521, 523, 524, 528, 534, 539
            ],
            "peaks": [
              {
                "center": 0,
                "spread": 219,
                "sites": 252.5,
                "log_adj_pvalue": -16.0047
              }
            ]
          }, {
            "db": 0,
            "id": "MA0475.2",
            "alt": "FLI1",
            "len": 10,
            "motif_evalue": "0.0e+000",
            "motif_nsites": 46487,
            "n_tested": 245,
            "score_threshold": 5,
            "url": "http://jaspar.genereg.net?ID=MA0475.2&rm=present&collection=CORE",
            "pwm": [
              [0.797387, 0.0267105, 0.0938883, 0.0820154], 
              [0.0601294, 0.895688, 0.0381824, 0.00600153], 
              [0.0603674, 0.937695, 0.00193652, 5.47033e-07], 
              [0.000115547, 5.28534e-07, 0.999837, 4.65469e-05], 
              [5.47033e-07, 5.28534e-07, 0.998623, 0.00137554], 
              [0.998829, 0.000481527, 0.000435528, 0.000252546], 
              [0.873378, 0.00460952, 0.000481527, 0.121531], 
              [0.431859, 0.0127285, 0.553535, 0.00187654], 
              [0.0193035, 0.24044, 0.0427384, 0.697518], 
              [0.244161, 0.177029, 0.425825, 0.152985]
            ],
            "total_sites": 339,
            "sites": [
              1, 1, 3, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0,
              0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 2, 0, 0, 0, 1, 2, 0, 0, 0, 0,
              1.5, 0, 1, 1, 1, 0.5, 0, 0, 0, 0, 2, 1, 0.5, 0, 0, 0, 0, 0, 0,
              0, 1, 1, 0, 0, 0, 0, 0, 2, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1,
              1, 1, 0, 2.5, 0, 0, 0, 1, 1, 0, 0, 1, 0, 2, 2, 0, 1, 2, 0, 0, 0,
              1, 0, 0, 2, 2, 0, 0, 3, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0,
              1, 0, 0, 1, 2, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 0, 2, 2, 1, 0, 4,
              0, 0, 2, 1, 1, 3, 2, 0, 2, 0, 2, 1, 2, 1, 1, 0, 0, 3, 1, 1, 2,
              0, 2, 1, 0, 1, 1, 2, 2, 0, 2, 0, 1, 2, 1, 4, 2, 0, 1, 1, 0, 1,
              1, 0, 0, 0, 0, 2, 0, 1, 1, 4, 1, 0, 0, 1, 2, 1, 0, 1, 1, 1, 2,
              0, 1, 1, 3, 1, 0, 0, 2, 0, 1, 6, 1, 0, 1, 1, 2, 0, 1, 0, 1, 0,
              2, 1, 0, 1, 1, 1, 1, 2, 0, 2, 0, 0, 1, 0, 2, 0, 1, 2, 1, 1, 1,
              0, 0, 0, 1, 1.5, 2, 2, 0, 0, 0, 1, 0, 2, 2, 1, 0, 1, 0, 0, 0, 1,
              0, 2, 2, 0, 0, 3, 1.5, 0, 0, 3, 1, 1, 1, 0, 2, 1.5, 1, 0, 2, 1,
              0, 1, 1, 1, 2, 3, 0, 1, 0, 1, 0, 0, 0, 0, 2, 1, 1, 0, 1, 1, 1,
              0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 2, 1, 2, 2, 0, 2, 1, 0, 0, 1, 2,
              1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 2, 0, 0, 1, 2, 1, 1, 1, 1, 1,
              1, 0, 1, 2, 0, 0, 1, 1, 0, 0, 0, 0, 2, 0, 0, 1, 0, 1, 1, 0, 0,
              2, 0, 0, 0, 1, 1, 0, 1, 0, 0, 2.5, 0, 0, 1, 0, 0, 0, 1, 2, 0, 0,
              1, 1, 1, 0, 0, 2, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 0,
              0, 1, 2, 0, 1, 0, 0, 0, 0, 2, 0, 3, 0, 0, 1, 2, 0, 1, 2, 0, 0,
              0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 2, 1, 0,
              0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0,
              0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0
            ],
            "seqs": [
              2, 3, 11, 14, 19, 20, 22, 23, 25, 26, 27, 28, 37, 39, 40, 42,
              46, 53, 54, 56, 57, 58, 61, 63, 66, 68, 70, 71, 74, 77, 78, 79,
              80, 81, 86, 90, 93, 95, 101, 102, 103, 106, 108, 112, 113, 115,
              116, 117, 118, 121, 123, 124, 128, 129, 130, 131, 133, 137, 142,
              144, 148, 152, 157, 158, 160, 161, 171, 177, 182, 184, 188, 191,
              193, 197, 198, 200, 202, 206, 208, 214, 215, 217, 220, 222, 223,
              224, 227, 228, 231, 237, 239, 240, 242, 243, 250, 254, 256, 257,
              258, 259, 263, 271, 273, 274, 277, 278, 279, 280, 281, 284, 285,
              286, 292, 293, 298, 299, 300, 302, 303, 306, 312, 314, 315, 316,
              318, 320, 321, 323, 325, 326, 328, 332, 334, 339, 342, 352, 356,
              360, 361, 362, 366, 367, 369, 372, 376, 377, 378, 396, 397, 401,
              409, 410, 411, 413, 417, 419, 421, 424, 428, 429, 430, 432, 435,
              436, 437, 441, 442, 443, 446, 450, 451, 456, 459, 460, 461, 462,
              464, 465, 466, 471, 472, 474, 475, 476, 477, 482, 483, 484, 486,
              487, 489, 493, 495, 496, 501, 505, 506, 508, 514, 517, 518, 519,
              521, 523, 524, 528, 534
            ],
            "peaks": [
              {
                "center": 0,
                "spread": 219,
                "sites": 206.5,
                "log_adj_pvalue": -15.0527
              }
            ]
          }, {
            "db": 0,
            "id": "MA0476.1",
            "alt": "FOS",
            "len": 11,
            "motif_evalue": "0.0e+000",
            "motif_nsites": 29396,
            "n_tested": 244,
            "score_threshold": 5,
            "url": "http://jaspar.genereg.net?ID=MA0476.1&rm=present&collection=CORE",
            "pwm": [
              [0.26803, 0.0242218, 0.329501, 0.378249], 
              [0.254286, 0.346204, 0.368792, 0.0307188], 
              [8.65081e-07, 8.35825e-07, 8.35825e-07, 0.999997], 
              [8.65081e-07, 8.35825e-07, 0.922164, 0.0778346], 
              [0.999997, 8.35825e-07, 8.35825e-07, 8.65081e-07], 
              [0.0339507, 0.478942, 0.381208, 0.1059], 
              [8.65081e-07, 8.35825e-07, 8.35825e-07, 0.999997], 
              [8.65081e-07, 0.999997, 8.35825e-07, 8.65081e-07], 
              [0.999997, 8.35825e-07, 8.35825e-07, 8.65081e-07], 
              [0.00877784, 0.198088, 0.0523207, 0.740813], 
              [0.136277, 0.280174, 0.268642, 0.314907]
            ],
            "total_sites": 216,
            "sites": [
              1, 0, 1, 0, 0, 0, 0, 2, 1, 1, 0, 2, 0, 0, 0, 1, 0, 0, 0, 0, 0,
              0, 1, 0, 0, 0, 0, 0, 2, 0, 1, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0,
              0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 2, 1, 0,
              0, 0, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 2, 1,
              0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 1,
              0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 1, 0, 0, 2, 0,
              1, 0, 0, 2, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
              0, 0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 2, 1, 0, 0, 0, 0, 0, 2, 0, 0,
              0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 2, 0, 1, 0, 0, 0, 0, 1, 1, 0, 1,
              0, 1, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 2, 0, 1, 0, 1, 0, 0, 3, 0,
              0, 0, 1, 1, 0, 2, 0, 0, 1, 1, 0, 0, 1, 0, 0, 2, 0, 0, 1, 2, 0,
              1, 0, 3, 2, 2, 1, 2, 0, 1, 0, 0, 1, 0, 3, 2, 2, 1, 0, 0, 0, 0,
              2, 0, 0, 1, 0, 0, 2, 0, 1, 0, 0.5, 1, 0, 0, 2, 3, 1, 1, 1, 0, 0,
              1, 2, 0, 1, 0, 1, 0, 4, 3, 1, 0, 0.5, 1, 0, 1, 0, 0, 0, 1, 0, 0,
              0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 1, 3, 1, 0, 0, 0, 0, 1,
              1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 0, 0, 0, 0, 0,
              0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0,
              0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1,
              1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 1,
              0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0,
              1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
              0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 2, 1, 0, 0, 0, 0, 2, 0, 0, 1, 1,
              1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1,
              0, 0, 0, 0, 2, 0, 0
            ],
            "seqs": [
              3, 7, 18, 22, 27, 35, 39, 40, 43, 46, 47, 51, 58, 60, 62, 69,
              70, 78, 82, 86, 89, 93, 100, 108, 115, 116, 120, 121, 128, 132,
              133, 135, 138, 144, 145, 152, 156, 159, 162, 173, 179, 182, 187,
              195, 196, 202, 203, 205, 209, 210, 211, 216, 220, 221, 229, 233,
              236, 237, 243, 244, 246, 248, 249, 252, 254, 255, 264, 268, 277,
              285, 287, 293, 300, 304, 314, 318, 323, 324, 336, 337, 338, 341,
              353, 364, 365, 367, 379, 387, 391, 400, 402, 407, 411, 415, 416,
              417, 418, 425, 432, 434, 443, 444, 455, 465, 470, 474, 493, 495,
              506, 507, 508, 525, 533, 534, 535, 537, 540
            ],
            "peaks": [
              {
                "center": 0,
                "spread": 174,
                "sites": 117,
                "log_adj_pvalue": -12.4014
              }
            ]
          }, {
            "db": 0,
            "id": "MA0477.1",
            "alt": "FOSL1",
            "len": 11,
            "motif_evalue": "0.0e+000",
            "motif_nsites": 5272,
            "n_tested": 244,
            "score_threshold": 5,
            "url": "http://jaspar.genereg.net?ID=MA0477.1&rm=present&collection=CORE",
            "pwm": [
              [0.339717, 0.0225762, 0.452196, 0.185509], 
              [0.297419, 0.0828941, 0.589712, 0.0299743], 
              [4.8235e-06, 4.66038e-06, 4.66038e-06, 0.999986], 
              [4.8235e-06, 4.66038e-06, 0.999986, 4.8235e-06], 
              [0.999986, 4.66038e-06, 4.66038e-06, 4.8235e-06], 
              [0.0235244, 0.591799, 0.384671, 4.8235e-06], 
              [4.8235e-06, 4.66038e-06, 4.66038e-06, 0.999986], 
              [0.0335782, 0.966412, 4.66038e-06, 4.8235e-06], 
              [0.999986, 4.66038e-06, 4.66038e-06, 4.8235e-06], 
              [0.00702269, 0.153834, 0.328905, 0.510238], 
              [0.224584, 0.319422, 0.355651, 0.100344]
            ],
            "total_sites": 185,
            "sites": [
              1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,
              0, 1, 0, 0, 0, 0, 0, 2, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1,
              0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0,
              0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 2, 1,
              0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1,
              0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0,
              1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
              0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 2, 0, 0,
              0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 1, 1, 0, 2,
              0, 1, 2, 0, 1, 1, 0, 0, 0, 0, 0, 0, 2, 0, 1, 0, 1, 0, 0, 2, 0,
              0, 0, 1, 1, 0, 2, 0, 0, 1, 1, 0, 0, 1, 0, 0, 2, 0, 0, 1, 1, 0,
              1, 0, 3, 2, 2, 1, 2, 0, 2, 0, 0, 1, 0, 3, 2, 1, 1, 0, 0, 0, 1,
              2, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0.5, 1, 0, 0, 2, 2, 1, 1, 0, 0, 0,
              1, 2, 0, 2, 0, 1, 0, 5, 3, 1, 0, 0.5, 0, 0, 0, 0, 0, 0, 1, 0, 0,
              0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 2, 1, 0, 0, 0, 0, 1,
              1, 0, 1, 1, 1, 0, 1, 2, 1, 1, 1, 1, 2, 0, 1, 1, 0, 0, 0, 0, 0,
              0, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0,
              1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1,
              1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1,
              0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0,
              1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
              0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 2, 0, 0, 0, 1,
              1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2,
              0, 0, 0, 0, 0, 0, 0
            ],
            "seqs": [
              3, 7, 18, 22, 27, 39, 40, 43, 46, 47, 51, 58, 60, 62, 69, 70,
              71, 78, 82, 86, 89, 93, 100, 108, 115, 116, 120, 121, 128, 132,
              133, 135, 138, 142, 144, 145, 152, 156, 159, 162, 173, 181, 182,
              187, 195, 202, 205, 209, 210, 211, 216, 220, 221, 229, 233, 236,
              237, 243, 244, 246, 248, 249, 252, 254, 255, 264, 268, 277, 285,
              287, 300, 304, 314, 318, 323, 324, 336, 338, 341, 353, 364, 365,
              367, 379, 387, 400, 402, 407, 415, 416, 417, 425, 434, 443, 444,
              445, 455, 465, 470, 474, 493, 495, 506, 508, 517, 525, 533, 534,
              535, 537, 540
            ],
            "peaks": [
              {
                "center": 0,
                "spread": 174,
                "sites": 111,
                "log_adj_pvalue": -19.7523
              }
            ]
          }, {
            "db": 0,
            "id": "MA0478.1",
            "alt": "FOSL2",
            "len": 11,
            "motif_evalue": "0.0e+000",
            "motif_nsites": 5318,
            "n_tested": 244,
            "score_threshold": 5,
            "url": "http://jaspar.genereg.net?ID=MA0478.1&rm=present&collection=CORE",
            "pwm": [
              [0.15664, 0.186913, 0.39225, 0.264197], 
              [0.286761, 0.111323, 0.509021, 0.092895], 
              [0.537979, 0.0103464, 0.437755, 0.0139195], 
              [4.78178e-06, 4.62007e-06, 4.62007e-06, 0.999986], 
              [4.78178e-06, 4.62007e-06, 0.999986, 4.78178e-06], 
              [0.954293, 0.00959444, 0.0361079, 4.78178e-06], 
              [4.78178e-06, 0.617894, 0.345617, 0.0364841], 
              [4.78178e-06, 4.62007e-06, 4.62007e-06, 0.999986], 
              [0.0385521, 0.961439, 4.62007e-06, 4.78178e-06], 
              [0.999986, 4.62007e-06, 4.62007e-06, 4.78178e-06], 
              [4.78178e-06, 0.263069, 0.363481, 0.373447]
            ],
            "total_sites": 248,
            "sites": [
              0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0,
              0.5, 1, 1, 0, 0, 0, 1, 2, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0,
              1, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 0, 2, 0, 0, 0, 0, 0, 1, 1, 1,
              0, 0, 0, 1, 0, 0, 0, 0, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 2, 1,
              0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
              2, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 2, 1, 0, 0, 1, 0, 1,
              0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0,
              0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0,
              0, 0, 0, 0, 1, 2, 1, 1, 0, 1, 0, 1, 0, 0, 0, 0, 1, 2, 0, 2, 0,
              3, 1, 1, 2, 2, 1, 0, 0, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 0, 3,
              0, 0, 1, 2, 1, 0, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 2, 0, 0, 1, 0,
              0, 1, 2, 4, 1, 2, 1, 2, 0, 0, 3, 0, 1, 1, 2, 1, 2, 1, 0, 0, 1,
              1, 0, 1, 0, 0, 2, 1, 2, 0, 0, 0, 2, 2, 2, 0, 0, 2, 1, 1, 0, 0,
              0, 1, 3, 0, 0, 1, 5, 2, 2, 0, 1, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0,
              1, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 1, 1.5, 0, 0, 1, 0,
              0, 0, 0, 1, 1, 0, 1, 1, 3, 2, 1, 1, 2, 1, 0, 1, 1, 1, 0, 0, 0,
              0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 2, 1, 0, 0, 0, 0, 1, 1,
              2, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 2, 0, 1, 1,
              0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 2, 1, 1, 0,
              0, 1, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 2,
              1, 0, 0, 0, 2, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
              1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1,
              0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 2, 0,
              0, 0, 0, 0, 0, 0, 0
            ],
            "seqs": [
              3, 7, 18, 22, 27, 39, 40, 46, 55, 58, 60, 62, 69, 70, 71, 78,
              82, 86, 93, 100, 108, 115, 116, 120, 121, 127, 128, 132, 133,
              135, 138, 142, 144, 145, 147, 152, 155, 156, 159, 162, 173, 179,
              180, 182, 191, 193, 195, 202, 203, 205, 210, 211, 216, 220, 221,
              233, 236, 237, 241, 243, 244, 246, 248, 249, 252, 254, 255, 258,
              264, 268, 277, 281, 282, 285, 287, 290, 293, 300, 307, 314, 318,
              323, 324, 326, 336, 337, 338, 341, 348, 351, 353, 354, 364, 365,
              367, 379, 387, 389, 400, 401, 404, 408, 415, 416, 417, 424, 425,
              432, 434, 443, 444, 445, 455, 460, 465, 470, 474, 475, 476, 493,
              495, 497, 506, 508, 517, 525, 533, 537, 540
            ],
            "peaks": [
              {
                "center": 0,
                "spread": 166,
                "sites": 128.5,
                "log_adj_pvalue": -13.6436
              }
            ]
          }, {
            "db": 0,
            "id": "MA0482.1",
            "alt": "Gata4",
            "len": 11,
            "motif_evalue": "0.0e+000",
            "motif_nsites": 2746,
            "n_tested": 244,
            "score_threshold": 5,
            "url": "http://jaspar.genereg.net?ID=MA0482.1&rm=present&collection=CORE",
            "pwm": [
              [0.00365113, 0.378364, 0.136202, 0.481784], 
              [9.26041e-06, 0.7884, 0.11144, 0.100152], 
              [9.26041e-06, 0.0324188, 8.94723e-06, 0.967563], 
              [9.26041e-06, 8.94723e-06, 8.94723e-06, 0.999973], 
              [0.985771, 0.0142104, 8.94723e-06, 9.26041e-06], 
              [9.26041e-06, 8.94723e-06, 8.94723e-06, 0.999973], 
              [9.26041e-06, 0.999973, 8.94723e-06, 9.26041e-06], 
              [0.199201, 8.94723e-06, 8.94723e-06, 0.800781], 
              [9.26041e-06, 0.451559, 0.342312, 0.20612], 
              [0.218865, 0.365619, 0.0571809, 0.358335], 
              [0.140572, 0.338307, 0.248361, 0.272759]
            ],
            "total_sites": 417,
            "sites": [
              0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
              0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0,
              1, 0, 1, 2, 0, 0, 1, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 2, 0, 0,
              1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,
              0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 1, 0, 0,
              0, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1,
              1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
              0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 2, 0, 0, 0, 1,
              0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 2, 1, 0, 3, 0, 0, 1,
              1, 2, 2, 0, 0, 2, 0, 3, 1, 2, 1, 1, 0, 0, 0, 2, 1, 1, 0, 3, 0,
              1, 1, 1, 1, 3, 2, 1, 5, 3, 2, 0, 0, 3, 2, 3, 2, 5, 7, 5, 2, 3,
              3, 7, 1, 4, 5, 6, 3, 5, 7, 4, 8, 9, 4, 4, 5, 2, 2, 3, 5, 1, 2,
              5, 8, 3, 2, 3, 2, 6, 4, 6, 5, 2, 7, 8, 5, 2, 5, 1, 5, 1, 3, 1,
              0, 2, 1, 2, 2, 3, 3, 1, 2, 3, 3, 0, 1, 4, 1, 2, 4, 1, 0, 1, 3,
              2, 1, 2, 1, 1, 1, 1, 0, 0, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 2, 0,
              1, 0, 1, 0, 2, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0,
              0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0,
              0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0,
              1, 2, 0, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0,
              0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0,
              0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0,
              0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1.5, 0, 0, 0, 0, 0, 0,
              1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0,
              1, 0, 2, 0, 0, 0, 1
            ],
            "seqs": [
              0, 6, 7, 8, 9, 10, 13, 14, 19, 20, 28, 29, 30, 31, 32, 34, 36,
              37, 38, 41, 43, 44, 47, 49, 50, 52, 54, 55, 57, 58, 60, 63, 65,
              66, 67, 68, 74, 75, 77, 81, 82, 83, 85, 87, 89, 94, 96, 99, 100,
              104, 106, 107, 108, 109, 111, 112, 113, 114, 115, 119, 120, 121,
              122, 125, 128, 129, 131, 132, 133, 136, 137, 139, 140, 141, 143,
              145, 146, 149, 150, 152, 153, 155, 156, 158, 161, 162, 163, 164,
              165, 166, 167, 168, 170, 172, 173, 176, 177, 181, 183, 184, 185,
              187, 189, 190, 191, 192, 194, 197, 199, 200, 202, 207, 209, 210,
              212, 213, 217, 219, 224, 228, 229, 231, 232, 233, 235, 236, 237,
              238, 244, 246, 248, 251, 252, 258, 260, 263, 266, 268, 269, 271,
              272, 273, 274, 275, 276, 277, 282, 283, 284, 285, 288, 289, 290,
              298, 299, 304, 305, 309, 310, 311, 315, 318, 319, 320, 322, 323,
              326, 330, 331, 332, 333, 334, 339, 340, 342, 344, 345, 346, 347,
              348, 349, 350, 351, 353, 354, 359, 361, 362, 363, 367, 368, 371,
              374, 376, 379, 381, 383, 384, 386, 387, 389, 391, 392, 393, 394,
              395, 396, 397, 398, 399, 403, 406, 409, 410, 412, 413, 414, 415,
              419, 420, 423, 425, 426, 428, 430, 431, 432, 433, 438, 441, 442,
              443, 450, 451, 452, 455, 457, 460, 462, 464, 466, 468, 469, 470,
              471, 472, 476, 477, 478, 480, 481, 483, 484, 485, 486, 490, 491,
              492, 494, 495, 497, 498, 499, 500, 502, 504, 507, 513, 514, 516,
              518, 521, 522, 523, 525, 526, 527, 528, 529, 530, 532, 535, 536,
              537, 538
            ],
            "peaks": [
              {
                "center": 0,
                "spread": 102,
                "sites": 285,
                "log_adj_pvalue": -215.334
              }
            ]
          }, {
            "db": 0,
            "id": "MA0489.1",
            "alt": "JUN(var.2)",
            "len": 14,
            "motif_evalue": "0.0e+000",
            "motif_nsites": 10956,
            "n_tested": 243,
            "score_threshold": 5,
            "url": "http://jaspar.genereg.net?ID=MA0489.1&rm=present&collection=CORE",
            "pwm": [
              [0.44286, 0.114094, 0.257211, 0.185835], 
              [0.358433, 0.120848, 0.375136, 0.145583], 
              [0.340087, 0.102867, 0.395216, 0.16183], 
              [0.40124, 0.102411, 0.315899, 0.18045], 
              [0.378422, 0.0541277, 0.384537, 0.182914], 
              [0.541253, 0.0906364, 0.368108, 2.32108e-06], 
              [2.32108e-06, 2.24259e-06, 2.24259e-06, 0.999993], 
              [2.32108e-06, 2.24259e-06, 0.999993, 2.32108e-06], 
              [0.999719, 2.24259e-06, 2.24259e-06, 0.000276319], 
              [0.034869, 0.520625, 0.37331, 0.0711957], 
              [0.0181662, 2.24259e-06, 2.24259e-06, 0.981829], 
              [0.0872595, 0.912736, 2.24259e-06, 2.32108e-06], 
              [0.999993, 2.24259e-06, 2.24259e-06, 2.32108e-06], 
              [0.034321, 0.229007, 0.24142, 0.495252]
            ],
            "total_sites": 253,
            "sites": [
              1, 0, 0, 2, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0,
              0, 0, 0, 1, 0, 0, 0, 0, 2, 0, 2, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1,
              1, 0, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 3, 0,
              0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 3,
              2, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 2,
              1, 0, 0, 2, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 3,
              0, 0, 0, 1, 4, 1, 1, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
              0, 0, 0, 0, 1, 1, 0, 1, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0,
              1, 1, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 1,
              2, 1, 1, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 2, 0, 4, 0, 1, 0, 1, 0,
              0, 1, 0, 1, 1, 1, 1, 0, 0, 1, 0, 0, 0, 1, 1, 1, 2, 0, 0, 2, 1,
              0, 2, 1, 2, 2, 2, 0, 0, 0, 2, 1, 0, 3, 0, 2, 1, 2, 1, 1, 0, 2,
              1, 0, 0, 0, 1, 0, 0, 3, 0, 0, 2, 1, 0, 0, 0, 0, 1, 1, 2, 0, 0,
              0, 0, 1, 4, 3, 0, 1, 0, 2, 0, 1, 0, 1, 1, 1, 1, 0, 0, 0, 2, 0,
              1, 0, 0, 0, 0, 2, 0, 3, 1, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 1,
              2, 1, 0, 2, 0, 0, 1, 0, 2, 1, 1, 2, 1, 2, 0, 1, 0, 0, 0, 0, 0,
              2, 0, 0, 0, 1, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1,
              0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 1, 0,
              1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 2, 1, 1, 0, 1,
              0, 0, 1, 1, 2, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 2, 1, 0, 1,
              0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
              0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 1, 2, 0, 0, 2, 2, 0, 0, 0, 0,
              0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 1, 2, 1, 1, 0, 0, 1, 1, 0, 0, 0,
              0, 0, 0, 0
            ],
            "seqs": [
              3, 7, 18, 22, 27, 39, 40, 43, 46, 53, 58, 60, 62, 65, 69, 70,
              71, 74, 78, 82, 86, 93, 100, 108, 115, 116, 120, 121, 128, 130,
              132, 133, 135, 138, 144, 145, 152, 156, 159, 162, 173, 182, 187,
              195, 202, 203, 206, 210, 211, 216, 219, 220, 221, 228, 233, 234,
              236, 237, 243, 244, 246, 248, 249, 254, 255, 264, 268, 277, 283,
              285, 287, 300, 314, 318, 323, 324, 335, 336, 337, 338, 341, 353,
              362, 364, 365, 367, 376, 379, 387, 391, 400, 402, 407, 415, 416,
              417, 418, 419, 425, 428, 432, 434, 442, 443, 444, 445, 455, 457,
              458, 461, 465, 470, 474, 493, 495, 504, 506, 508, 517, 521, 525,
              533, 537, 540
            ],
            "peaks": [
              {
                "center": 0,
                "spread": 171,
                "sites": 124,
                "log_adj_pvalue": -6.96267
              }
            ]
          }, {
            "db": 0,
            "id": "MA0490.1",
            "alt": "JUNB",
            "len": 11,
            "motif_evalue": "0.0e+000",
            "motif_nsites": 16992,
            "n_tested": 244,
            "score_threshold": 5,
            "url": "http://jaspar.genereg.net?ID=MA0490.1&rm=present&collection=CORE",
            "pwm": [
              [0.212159, 0.198093, 0.352106, 0.237641], 
              [0.297493, 0.0622071, 0.495938, 0.144363], 
              [0.493408, 0.0342522, 0.472339, 1.49658e-06], 
              [1.49658e-06, 1.44597e-06, 1.44597e-06, 0.999996], 
              [1.49658e-06, 1.44597e-06, 0.999996, 1.49658e-06], 
              [0.999996, 1.44597e-06, 1.44597e-06, 1.49658e-06], 
              [1.49658e-06, 0.580212, 0.369644, 0.0501422], 
              [1.49658e-06, 1.44597e-06, 1.44597e-06, 0.999996], 
              [0.0739181, 0.926079, 1.44597e-06, 1.49658e-06], 
              [0.999996, 1.44597e-06, 1.44597e-06, 1.49658e-06], 
              [0.0433162, 0.174317, 0.359992, 0.422374]
            ],
            "total_sites": 198,
            "sites": [
              0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0,
              0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0,
              1, 1, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0,
              0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1,
              0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
              2, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 3,
              0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0,
              0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0,
              0, 0, 0, 0, 1, 2, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0,
              1, 0, 1, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 2, 0, 0, 2, 0, 1,
              0, 0, 1, 1, 0, 0, 2, 0, 1, 1, 0, 1, 0, 0, 0, 0, 2, 1, 1, 0, 0,
              0, 4, 1, 0, 1, 3, 1, 3, 0, 1, 1, 0, 1, 1, 2, 2, 2, 0, 0, 0, 2,
              2, 0, 1, 0, 0, 0, 0, 2, 0, 0, 0, 1, 1, 2, 1, 0, 2, 1, 0, 0, 1,
              0, 0, 3, 0, 0, 0, 5, 2, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0,
              0, 1, 0, 0, 0, 0, 0, 1, 2, 0, 1, 0, 0, 1, 2, 1, 0, 0, 0, 1, 0,
              0, 1, 1, 1, 0, 0, 1, 0.5, 1, 1.5, 0, 1, 1, 1, 0, 1, 1, 0, 0, 0,
              0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0,
              1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0,
              1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1,
              0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0,
              1, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
              0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1.5, 0, 0.5, 1,
              1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0,
              2, 0, 0, 0, 0, 0, 0, 0, 0
            ],
            "seqs": [
              3, 7, 18, 22, 27, 39, 40, 43, 46, 51, 58, 60, 62, 69, 70, 71,
              78, 82, 86, 93, 100, 108, 115, 116, 120, 121, 128, 132, 133,
              135, 138, 142, 144, 145, 152, 156, 159, 162, 173, 182, 187, 195,
              202, 203, 205, 209, 210, 211, 216, 220, 221, 233, 236, 237, 243,
              244, 246, 248, 249, 254, 255, 264, 268, 277, 285, 287, 300, 304,
              314, 318, 323, 324, 336, 337, 338, 341, 353, 364, 365, 367, 379,
              387, 391, 400, 402, 407, 415, 416, 417, 418, 419, 425, 428, 432,
              434, 443, 444, 445, 455, 465, 470, 474, 493, 495, 506, 508, 517,
              525, 533, 534, 537, 540
            ],
            "peaks": [
              {
                "center": 0,
                "spread": 174,
                "sites": 112,
                "log_adj_pvalue": -14.9853
              }
            ]
          }, {
            "db": 0,
            "id": "MA0491.1",
            "alt": "JUND",
            "len": 11,
            "motif_evalue": "0.0e+000",
            "motif_nsites": 38710,
            "n_tested": 244,
            "score_threshold": 5,
            "url": "http://jaspar.genereg.net?ID=MA0491.1&rm=present&collection=CORE",
            "pwm": [
              [0.320046, 0.0196076, 0.352364, 0.307982], 
              [0.391708, 0.124619, 0.483672, 6.56934e-07], 
              [6.56934e-07, 6.34718e-07, 6.34718e-07, 0.999998], 
              [6.56934e-07, 6.34718e-07, 0.999998, 6.56934e-07], 
              [0.999998, 6.34718e-07, 6.34718e-07, 6.56934e-07], 
              [6.56934e-07, 0.590467, 0.363679, 0.0458545], 
              [6.56934e-07, 6.34718e-07, 6.34718e-07, 0.999998], 
              [0.0399646, 0.960034, 6.34718e-07, 6.56934e-07], 
              [0.999998, 6.34718e-07, 6.34718e-07, 6.56934e-07], 
              [6.56934e-07, 0.132679, 0.0594425, 0.807878], 
              [0.14947, 0.38636, 0.32108, 0.14309]
            ],
            "total_sites": 148,
            "sites": [
              1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,
              0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1,
              0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
              0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1,
              0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1,
              1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0,
              1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
              0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0,
              0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1,
              0, 1, 2, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0,
              0, 0, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 2, 0, 0, 1, 0, 0,
              1, 0, 1, 2, 1, 1, 2, 0, 1, 0, 0, 1, 0, 2, 2, 2, 0, 0, 0, 0, 1,
              2, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0.5, 1, 0, 0, 2, 2, 1, 1, 0, 0, 0,
              1, 2, 0, 2, 0, 1, 0, 5, 2, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, 1, 0, 0,
              0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 1, 2, 0, 0, 0, 0, 0, 1,
              1, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 2, 0, 0, 1, 0, 0, 0, 0, 0,
              0, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0,
              0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1,
              0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 1,
              0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0,
              1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
              0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1,
              0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1,
              0, 0, 0, 0, 0, 0, 0
            ],
            "seqs": [
              3, 7, 18, 22, 27, 39, 40, 43, 46, 51, 58, 60, 62, 69, 70, 71,
              78, 82, 108, 116, 120, 128, 132, 133, 135, 138, 144, 145, 152,
              156, 162, 173, 181, 182, 195, 202, 205, 211, 220, 221, 233, 236,
              237, 243, 244, 246, 248, 249, 254, 255, 264, 277, 285, 287, 300,
              304, 314, 318, 324, 336, 337, 338, 341, 353, 364, 365, 367, 379,
              387, 400, 402, 407, 415, 417, 432, 434, 443, 444, 445, 455, 470,
              474, 495, 506, 508, 517, 534, 537, 540
            ],
            "peaks": [
              {
                "center": 0,
                "spread": 172,
                "sites": 89,
                "log_adj_pvalue": -15.938
              }
            ]
          }, {
            "db": 0,
            "id": "MA0492.1",
            "alt": "JUND(var.2)",
            "len": 15,
            "motif_evalue": "0.0e+000",
            "motif_nsites": 33631,
            "n_tested": 242,
            "score_threshold": 5,
            "url": "http://jaspar.genereg.net?ID=MA0492.1&rm=present&collection=CORE",
            "pwm": [
              [0.3404, 0.128631, 0.237757, 0.293212], 
              [0.399512, 0.0959834, 0.259314, 0.24519], 
              [0.33484, 0.143796, 0.241147, 0.280218], 
              [0.404865, 0.0729095, 0.468644, 0.0535826], 
              [0.753679, 0.00502572, 0.241295, 7.56145e-07], 
              [7.56145e-07, 7.30574e-07, 7.30574e-07, 0.999998], 
              [7.56145e-07, 7.30574e-07, 0.99643, 0.00356875], 
              [0.999998, 7.30574e-07, 7.30574e-07, 7.56145e-07], 
              [7.56145e-07, 0.309417, 0.24641, 0.444173], 
              [0.152359, 0.0542366, 0.793403, 7.56145e-07], 
              [7.56145e-07, 0.117005, 7.30574e-07, 0.882993], 
              [0.261455, 0.734351, 0.00419372, 7.56145e-07], 
              [0.999998, 7.30574e-07, 7.30574e-07, 7.56145e-07], 
              [0.00793973, 0.162648, 0.0715715, 0.757841], 
              [0.304927, 0.322351, 0.188844, 0.183878]
            ],
            "total_sites": 151,
            "sites": [
              0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0,
              1, 0, 0, 0, 3, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 2, 1, 0, 1, 0,
              0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 1, 1,
              0, 0, 0, 0, 0, 1, 0, 0, 2, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1,
              0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
              0, 1, 0, 0, 0, 0, 0, 1, 1, 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
              0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0,
              0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0,
              0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 1, 2, 0, 0, 0, 0, 0, 0, 1, 1, 0,
              0, 1, 1, 1, 0, 0, 2, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1,
              1, 1, 1, 1, 3, 0, 1, 0, 1, 2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
              0, 1, 0, 0, 1, 0, 0, 3, 0, 1, 1, 1, 0, 3, 0, 0, 1, 0, 0, 0, 0,
              0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 2, 1, 1, 1, 0, 0, 0, 0, 0, 0,
              0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 1, 1, 2, 1, 0,
              1, 1, 1, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 2, 0,
              0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 2, 0, 0, 1, 0, 0, 0, 0,
              0, 1, 2, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0,
              0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0,
              0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 2, 0, 0,
              0, 0, 1, 0, 0, 0, 0, 0, 0, 2, 0, 2, 0, 0, 0, 0, 1, 1, 0, 0, 0,
              0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2,
              0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0,
              0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0,
              1, 0, 0
            ],
            "seqs": [
              14, 22, 30, 35, 51, 54, 64, 67, 73, 85, 88, 91, 101, 102, 105,
              110, 111, 119, 125, 132, 150, 157, 159, 167, 177, 181, 186, 187,
              188, 189, 191, 196, 199, 200, 231, 236, 239, 244, 262, 263, 268,
              282, 287, 296, 304, 316, 328, 360, 366, 369, 373, 386, 387, 393,
              407, 411, 421, 441, 448, 459, 465, 470, 472, 476, 479, 482, 487,
              494, 499, 535, 540
            ],
            "peaks": [
              {
                "center": 0,
                "spread": 144,
                "sites": 71,
                "log_adj_pvalue": -6.71235
              }
            ]
          }, {
            "db": 0,
            "id": "MA0499.1",
            "alt": "Myod1",
            "len": 13,
            "motif_evalue": "0.0e+000",
            "motif_nsites": 24514,
            "n_tested": 243,
            "score_threshold": 5,
            "url": "http://jaspar.genereg.net?ID=MA0499.1&rm=present&collection=CORE",
            "pwm": [
              [0.279922, 0.227992, 0.204087, 0.287999], 
              [0.168965, 0.265685, 0.448722, 0.116628], 
              [1.03736e-06, 0.999997, 1.00228e-06, 1.03736e-06], 
              [0.993429, 1.00228e-06, 1.00228e-06, 0.00656901], 
              [1.03736e-06, 0.262014, 0.737209, 0.000776034], 
              [1.03736e-06, 0.999997, 1.00228e-06, 1.03736e-06], 
              [1.03736e-06, 1.00228e-06, 1.00228e-06, 0.999997], 
              [1.03736e-06, 1.00228e-06, 0.999997, 1.03736e-06], 
              [0.000368036, 0.370685, 0.0266799, 0.602267], 
              [0.000654035, 0.44913, 0.118505, 0.431711], 
              [0.239088, 0.30966, 0.242514, 0.208738], 
              [0.0780377, 0.474095, 0.176185, 0.271681], 
              [0.168434, 0.312352, 0.180428, 0.338786]
            ],
            "total_sites": 288,
            "sites": [
              1, 0, 2, 1, 0, 0, 0, 3, 2, 0, 1, 0, 1, 2, 1, 0, 1, 1, 1, 0, 1,
              0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 1, 1, 0, 1, 1, 0, 0,
              0, 0, 1, 0, 1, 0, 2, 0, 1, 0, 0, 1, 1, 0, 0, 2, 1, 2, 0, 0, 0,
              0, 0, 0, 0, 1, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0,
              1, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1,
              1, 1, 0, 0, 1, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 2, 0,
              1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 2, 1,
              1, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0,
              3, 1, 0, 0, 1, 0, 2, 1, 0, 1, 2, 0, 0, 1, 0, 0, 1, 1, 0, 2, 2,
              0, 1, 3, 2, 2, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 2, 0, 1,
              0, 1, 0, 1, 0, 1, 3, 0, 1, 2, 0, 1, 2, 1, 0, 0, 1, 0, 1, 0, 0,
              0, 1, 1, 0, 1, 0, 0, 0, 1, 2, 1, 1, 0, 3, 1, 3, 0, 0, 2, 1, 2,
              2, 2, 0, 0, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0,
              1, 0, 2, 0, 0, 0, 0, 2, 0, 1, 2, 0, 0, 1, 2, 0, 0, 3, 0, 1, 0,
              2, 2, 2, 2, 0, 2, 0, 2, 0, 1, 1, 0, 0, 0, 2, 2, 1, 0, 2, 0, 2,
              0, 1, 1, 0, 2, 0, 1, 0, 1, 0, 3, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1,
              0, 0, 1, 1, 2, 0, 1, 1, 1, 1, 0, 1, 0, 0, 0, 1, 1, 2, 1, 0, 0,
              2, 0, 2, 0, 2, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 1, 0,
              0, 1, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0,
              2, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 2, 1, 0, 0, 1, 1, 0, 0, 1,
              4, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 2, 0, 1, 1, 0, 0, 1, 0,
              0, 2, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 2, 1, 1,
              0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 3, 0, 0, 0, 2,
              1, 0, 0, 0, 2
            ],
            "seqs": [
              5, 11, 14, 23, 35, 41, 44, 56, 61, 68, 69, 77, 81, 83, 87, 88,
              95, 98, 103, 105, 113, 116, 117, 123, 125, 130, 131, 135, 136,
              144, 146, 148, 149, 152, 156, 157, 164, 173, 175, 176, 178, 180,
              181, 185, 186, 192, 195, 199, 200, 201, 202, 203, 208, 212, 213,
              218, 219, 225, 227, 232, 242, 251, 254, 255, 256, 260, 265, 270,
              273, 279, 308, 316, 323, 326, 328, 336, 337, 339, 345, 346, 352,
              356, 357, 359, 366, 368, 376, 388, 389, 392, 396, 397, 399, 400,
              401, 409, 410, 411, 412, 414, 420, 426, 428, 444, 447, 449, 451,
              456, 459, 460, 461, 463, 468, 476, 478, 485, 486, 491, 502, 503,
              516, 517, 520, 521, 522, 526, 530, 531, 532
            ],
            "peaks": [
              {
                "center": 0,
                "spread": 164,
                "sites": 129,
                "log_adj_pvalue": -4.36167
              }
            ]
          }, {
            "db": 0,
            "id": "MA0500.1",
            "alt": "Myog",
            "len": 11,
            "motif_evalue": "0.0e+000",
            "motif_nsites": 19356,
            "n_tested": 244,
            "score_threshold": 5,
            "url": "http://jaspar.genereg.net?ID=MA0500.1&rm=present&collection=CORE",
            "pwm": [
              [0.404938, 0.148275, 0.446786, 1.3138e-06], 
              [0.597849, 0.0171022, 0.385048, 1.3138e-06], 
              [1.3138e-06, 0.999996, 1.26937e-06, 1.3138e-06], 
              [0.999996, 1.26937e-06, 1.26937e-06, 1.3138e-06], 
              [1.3138e-06, 1.26937e-06, 0.999996, 1.3138e-06], 
              [0.0034623, 0.840098, 0.156437, 1.3138e-06], 
              [1.3138e-06, 1.26937e-06, 1.26937e-06, 0.999996], 
              [1.3138e-06, 1.26937e-06, 0.999996, 1.3138e-06], 
              [0.146312, 0.440379, 0.303833, 0.109476], 
              [0.276038, 0.194462, 0.266997, 0.262503], 
              [0.210219, 0.246435, 0.388457, 0.154888]
            ],
            "total_sites": 244,
            "sites": [
              0, 0, 2, 0, 0, 1, 0, 1, 0, 0.5, 3.5, 1, 1, 1, 0, 0, 1, 2, 0, 1,
              1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 0, 0,
              0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1,
              2, 0, 0, 0, 0, 0, 0, 0, 2, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 1,
              0, 1, 0, 0, 1, 0, 0, 0, 0, 3, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1,
              0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0,
              0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 0,
              0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0,
              3, 1, 1, 0, 2, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 2,
              0, 0, 4, 2, 1, 0, 0, 1, 2, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0,
              1, 1, 0, 1, 0, 1, 2, 1, 0, 2, 1, 0, 0, 3, 0, 1, 1, 0, 1, 0, 1,
              0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 3, 1, 1, 0, 2, 2, 3, 0,
              2, 2, 0, 1, 0, 1, 0, 0, 0, 0, 2, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0,
              0, 0, 0, 0, 2, 0, 0, 1, 0, 0, 0, 1, 0, 1, 3, 0, 0, 2, 0, 1, 0,
              3, 0, 3, 1, 0, 0, 0, 0, 0, 2, 1, 2, 0, 1, 1, 1, 0, 0, 3, 1, 2,
              0, 2, 1, 1, 0, 0, 0, 0, 1, 0, 2, 0, 1, 0, 2, 0, 0, 0, 1, 0, 0,
              0, 0, 2, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 2, 0, 0, 1,
              2, 0, 1, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0,
              0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0,
              1, 0, 0, 0, 1, 2, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0,
              2, 0, 0, 1, 2, 0, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 2, 1, 0, 0, 0,
              0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1,
              0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1,
              0, 0, 0, 2, 0, 1, 0, 0
            ],
            "seqs": [
              14, 23, 35, 49, 56, 68, 69, 77, 87, 88, 95, 98, 113, 116, 117,
              123, 125, 130, 135, 136, 144, 145, 146, 148, 149, 152, 156, 157,
              164, 167, 173, 175, 176, 180, 192, 195, 200, 201, 202, 203, 213,
              219, 225, 227, 232, 239, 241, 242, 251, 254, 255, 256, 260, 265,
              270, 273, 282, 292, 308, 316, 323, 328, 330, 335, 336, 339, 345,
              346, 352, 356, 357, 359, 366, 368, 375, 388, 389, 392, 396, 397,
              399, 400, 401, 409, 410, 411, 412, 414, 420, 421, 426, 428, 444,
              447, 449, 451, 457, 459, 460, 461, 468, 476, 485, 486, 491, 502,
              503, 516, 517, 521, 522, 524, 532
            ],
            "peaks": [
              {
                "center": 0,
                "spread": 160,
                "sites": 113,
                "log_adj_pvalue": -6.48058
              }
            ]
          }, {
            "db": 0,
            "id": "MA0501.1",
            "alt": "MAF::NFE2",
            "len": 15,
            "motif_evalue": "0.0e+000",
            "motif_nsites": 1090,
            "n_tested": 242,
            "score_threshold": 5,
            "url": "http://jaspar.genereg.net?ID=MA0501.1&rm=present&collection=CORE",
            "pwm": [
              [0.666017, 0.0238734, 0.306416, 0.00369299], 
              [2.33281e-05, 2.25392e-05, 2.25392e-05, 0.999932], 
              [2.33281e-05, 2.25392e-05, 0.992592, 0.00736165], 
              [0.999932, 2.25392e-05, 2.25392e-05, 2.33281e-05], 
              [0.014701, 0.799032, 0.152303, 0.0339652], 
              [0.100931, 0.000939455, 0.0110305, 0.887098], 
              [0.0734106, 0.859577, 0.0202037, 0.046808], 
              [0.897189, 2.25392e-05, 0.0468072, 0.0559812], 
              [0.00736165, 0.0036922, 0.954981, 0.0339652], 
              [2.33281e-05, 0.975162, 0.0202037, 0.00460991], 
              [0.854073, 0.0156171, 0.0669884, 0.0633205], 
              [0.351367, 0.186244, 0.259632, 0.202757], 
              [0.331186, 0.0917571, 0.119278, 0.457779], 
              [0.267889, 0.093592, 0.0835009, 0.555018], 
              [0.193584, 0.259632, 0.0972616, 0.449523]
            ],
            "total_sites": 194,
            "sites": [
              0, 3, 0, 2, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1,
              0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 3, 0, 0, 1, 0, 0,
              0, 0, 2, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0,
              0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0,
              0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0,
              1, 0, 0, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0,
              1, 1, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1,
              0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0,
              0, 0, 0, 0, 0, 0, 1, 2, 0, 1, 1, 1, 1, 0, 0, 1, 0, 0, 2, 0, 1,
              0, 0, 2, 0, 0, 0, 0, 2, 0, 1, 0, 0, 0, 0, 2, 0, 0, 1, 0, 1, 0,
              1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 2, 0, 0, 3, 2, 0, 1, 1, 2, 1, 0,
              1, 1, 1, 2, 0, 0, 0, 1, 0, 0, 1, 0, 4, 1, 1, 2, 1, 2, 0, 1, 0,
              0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 2, 1, 2, 0, 0, 0,
              0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
              0, 2, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0,
              0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0,
              0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1,
              0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 2, 1, 1, 0, 0, 1, 1,
              0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0,
              3, 1, 0, 1, 2, 0, 0, 0, 3, 0, 0, 1, 0, 0, 0, 1, 0, 2, 1, 0, 0,
              0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0,
              2, 0, 1, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 1, 1, 1, 2, 0, 0, 0, 1,
              0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0,
              1, 0, 0
            ],
            "seqs": [
              7, 29, 38, 39, 40, 58, 60, 66, 73, 107, 129, 135, 151, 156, 167,
              182, 189, 195, 210, 236, 239, 243, 249, 274, 277, 280, 305, 309,
              314, 364, 365, 379, 398, 405, 434, 461, 465, 467, 497, 500, 540
            ],
            "peaks": [
              {
                "center": 0,
                "spread": 54,
                "sites": 41,
                "log_adj_pvalue": -4.64182
              }
            ]
          }, {
            "db": 0,
            "id": "MA0511.2",
            "alt": "RUNX2",
            "len": 9,
            "motif_evalue": "0.0e+000",
            "motif_nsites": 7218,
            "n_tested": 245,
            "score_threshold": 5,
            "url": "http://jaspar.genereg.net?ID=MA0511.2&rm=present&collection=CORE",
            "pwm": [
              [0.481709, 0.135857, 0.0405598, 0.341875], 
              [0.737791, 0.0619595, 0.135393, 0.0648566], 
              [0.9532, 0.0467928, 3.40394e-06, 3.52309e-06], 
              [3.52309e-06, 0.99999, 3.40394e-06, 3.52309e-06], 
              [3.52309e-06, 0.99999, 3.40394e-06, 3.52309e-06], 
              [0.282426, 0.00531533, 0.694549, 0.0177103], 
              [3.52309e-06, 0.99999, 3.40394e-06, 3.52309e-06], 
              [0.854756, 0.0614536, 0.0591296, 0.0246612], 
              [0.634738, 0.102268, 0.1713, 0.0916943]
            ],
            "total_sites": 437,
            "sites": [
              0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 2, 0, 1, 0,
              0, 0, 0, 4, 1, 0, 1, 0, 2, 0, 0.333333, 1, 0, 1, 2, 0, 1, 1, 1,
              0, 0, 0, 1, 1, 2, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1,
              0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 3, 1, 0, 1, 1,
              0, 1, 0, 2, 0, 0, 0, 2, 3, 0, 0, 1, 2, 1, 1, 0, 1, 2, 0, 0, 0,
              1, 0, 1.5, 3, 3, 0, 0, 0, 1, 0, 0, 1, 0, 7, 1, 2, 0, 1, 0, 0, 2,
              0, 0, 1, 1, 0, 2, 2, 0, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 2, 0, 0,
              2, 0, 1, 0, 1, 1, 0, 1, 2, 3, 2, 0, 1, 0, 4, 0, 0, 1, 0, 1, 1,
              4, 1, 1, 2.5, 2, 1, 2, 2, 0, 0, 1, 1, 2, 0, 0, 4, 0, 0, 1, 0, 0,
              1, 2, 1, 0, 3, 3, 5, 1, 0, 1, 0, 1, 2, 1, 2, 1, 0, 3.5, 1, 2, 1,
              1, 2, 0, 2, 3, 1, 1, 1, 2.5, 1, 2, 3, 3, 0, 1, 1, 1, 2, 0, 1, 1,
              2, 0, 1, 0, 0, 2, 1, 4, 2, 2, 1, 2, 0, 1, 1, 2, 1, 0, 2, 3, 2,
              1, 3, 1, 1, 1, 0, 0, 0, 2, 2, 1, 0, 4.5, 1, 1, 0.5, 1, 2, 0, 1,
              0, 1, 1, 0, 1, 0, 2, 1, 0, 1, 1, 2, 1, 2, 1, 1, 2, 0, 1, 1, 1,
              1, 0, 0, 0, 2, 0, 4, 0, 0, 3, 0, 3.33333, 1, 1, 0, 2, 2, 0, 2,
              3, 1, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 2, 1, 2, 1, 1, 3, 2,
              0, 2, 1, 2, 0, 1, 0, 1, 1, 1, 1, 1, 2, 1, 1, 0, 0, 2, 2, 3, 0,
              0, 0, 0, 1, 0, 1, 1, 0, 1, 1, 2, 1, 2, 0, 0, 0, 2, 2, 2, 0, 0,
              1, 0, 1, 0, 0, 1, 1, 1, 1, 2, 0, 1, 1, 0, 1, 1, 3, 1, 0, 0, 0,
              3, 0, 0, 0, 1, 3, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 0, 0,
              1, 0, 2, 0, 0, 0, 1, 1, 0, 1, 2, 0, 1, 0, 2, 2, 0, 2, 2, 1, 0,
              1, 1, 0, 4, 0, 3, 0, 1, 0, 0, 3, 1, 1, 3, 0.333333, 0, 0, 1, 0,
              1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 2, 0, 2, 1, 0, 0, 0, 1,
              1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 1, 0, 1, 3
            ],
            "seqs": [
              4, 8, 11, 15, 21, 23, 26, 30, 34, 35, 36, 38, 42, 43, 44, 45,
              46, 48, 49, 50, 51, 53, 57, 59, 63, 64, 67, 70, 74, 75, 78, 85,
              86, 88, 90, 91, 93, 94, 102, 104, 107, 112, 113, 114, 116, 117,
              119, 121, 123, 125, 127, 137, 138, 145, 147, 149, 150, 151, 152,
              155, 156, 158, 159, 161, 163, 165, 170, 171, 172, 175, 176, 177,
              179, 180, 182, 184, 185, 186, 188, 190, 193, 197, 200, 204, 205,
              206, 207, 209, 212, 213, 216, 219, 220, 221, 223, 225, 226, 228,
              230, 231, 232, 234, 235, 237, 239, 242, 245, 246, 247, 249, 250,
              252, 253, 254, 256, 257, 258, 259, 260, 263, 264, 269, 270, 272,
              274, 278, 280, 281, 283, 285, 287, 288, 289, 290, 291, 298, 299,
              300, 303, 306, 309, 316, 320, 321, 326, 327, 329, 331, 333, 334,
              335, 341, 342, 343, 344, 346, 348, 349, 351, 353, 354, 355, 356,
              357, 359, 360, 361, 363, 364, 365, 366, 367, 368, 369, 370, 372,
              373, 374, 377, 378, 381, 384, 387, 389, 391, 393, 396, 397, 399,
              400, 403, 406, 409, 414, 415, 419, 420, 427, 429, 432, 434, 435,
              436, 437, 440, 445, 447, 448, 449, 450, 455, 457, 460, 461, 466,
              467, 473, 475, 479, 480, 481, 484, 485, 488, 490, 492, 493, 495,
              500, 501, 504, 505, 506, 507, 508, 512, 515, 521, 523, 525, 531,
              532, 534, 535, 536, 538
            ],
            "peaks": [
              {
                "center": 0,
                "spread": 210,
                "sites": 244.833,
                "log_adj_pvalue": -12.5765
              }
            ]
          }, {
            "db": 0,
            "id": "MA0521.1",
            "alt": "Tcf12",
            "len": 11,
            "motif_evalue": "0.0e+000",
            "motif_nsites": 12895,
            "n_tested": 244,
            "score_threshold": 5,
            "url": "http://jaspar.genereg.net?ID=MA0521.1&rm=present&collection=CORE",
            "pwm": [
              [0.478478, 0.122917, 0.397285, 0.00131996], 
              [0.683983, 0.00961783, 0.306398, 1.97207e-06], 
              [1.97207e-06, 0.999994, 1.90537e-06, 1.97207e-06], 
              [0.999994, 1.90537e-06, 1.90537e-06, 1.97207e-06], 
              [0.000621967, 1.90537e-06, 0.999374, 1.97207e-06], 
              [0.0142709, 0.839235, 0.146492, 1.97207e-06], 
              [1.97207e-06, 1.90537e-06, 1.90537e-06, 0.999994], 
              [1.97207e-06, 1.90537e-06, 0.999994, 1.97207e-06], 
              [0.145406, 0.428615, 0.295541, 0.130439], 
              [0.303373, 0.187359, 0.226832, 0.282435], 
              [0.222024, 0.233036, 0.375028, 0.169912]
            ],
            "total_sites": 266,
            "sites": [
              0, 0, 2, 0, 0, 1, 0, 1, 0, 0.5, 3.5, 2, 2, 0, 0, 0.5, 1, 2, 0,
              1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 0,
              0, 0, 1, 2, 0, 1, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1,
              1, 2, 0, 0, 0, 0, 0, 0, 0, 3, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1,
              1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 3, 1, 1, 0, 1, 0, 1, 0, 0, 0, 0,
              0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1,
              0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1,
              0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
              0, 3, 2, 0, 0, 2, 0, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 1, 0, 0,
              2, 0, 0, 4, 1, 1, 0, 0, 1, 2, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0,
              0, 1, 1, 0, 1, 0, 1, 2, 1, 0, 1, 0, 0, 0, 3, 1, 1, 1, 0, 1, 0,
              1, 1, 0, 1, 0, 1, 1, 2, 0, 0, 0, 0, 1, 1, 3, 1, 1, 0, 2, 2, 3,
              0, 2, 1, 1, 1, 1, 1, 0, 0, 0, 0, 2, 0, 1, 1, 1, 0, 0, 1, 2, 1,
              0, 0, 0, 0, 0, 2, 0, 0, 1, 1, 0, 1, 1, 0, 1, 3, 0, 0, 2, 0, 1,
              0, 3, 1, 3, 1, 0, 0, 0, 0, 0, 2, 1, 2, 0, 1, 1, 1, 0, 0, 3, 1,
              3, 0, 2, 1, 1, 0, 0, 0, 0, 1, 0, 2, 0, 1, 0, 3, 0, 0, 0, 1, 0,
              0, 0, 0, 2, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 2, 1, 1, 0, 2, 1, 0,
              1, 2, 0, 1, 0, 0, 2, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 2, 0, 0, 0,
              0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 1,
              0, 1, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0,
              0, 2, 0, 0, 1, 2, 1, 1, 0, 1, 1, 0, 0, 1, 1, 0, 0, 2, 1, 0, 0,
              0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1.5, 0, 1, 0,
              1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,
              1, 0, 0, 0, 2, 0, 1, 0, 0
            ],
            "seqs": [
              14, 23, 35, 46, 49, 56, 68, 69, 77, 87, 88, 95, 98, 113, 116,
              117, 122, 123, 125, 130, 135, 136, 143, 144, 145, 146, 148, 149,
              152, 156, 157, 164, 167, 173, 175, 176, 180, 192, 195, 200, 201,
              202, 203, 210, 213, 219, 225, 227, 232, 239, 241, 242, 248, 251,
              254, 255, 256, 260, 265, 270, 273, 282, 292, 295, 308, 316, 323,
              328, 330, 335, 336, 339, 345, 346, 352, 354, 355, 356, 357, 359,
              366, 368, 375, 388, 392, 396, 397, 399, 400, 401, 409, 410, 411,
              412, 414, 420, 421, 426, 428, 444, 447, 449, 451, 457, 459, 460,
              461, 468, 476, 485, 486, 491, 492, 502, 503, 505, 507, 516, 517,
              521, 522, 524, 539
            ],
            "peaks": [
              {
                "center": 0,
                "spread": 160,
                "sites": 123,
                "log_adj_pvalue": -7.29212
              }
            ]
          }, {
            "db": 0,
            "id": "MA0522.2",
            "alt": "TCF3",
            "len": 10,
            "motif_evalue": "0.0e+000",
            "motif_nsites": 8019,
            "n_tested": 245,
            "score_threshold": 5,
            "url": "http://jaspar.genereg.net?ID=MA0522.2&rm=present&collection=CORE",
            "pwm": [
              [0.361968, 0.272214, 0.130018, 0.235799], 
              [0.4389, 0.169382, 0.364405, 0.0273138], 
              [3.17118e-06, 0.999991, 3.06393e-06, 3.17118e-06], 
              [0.996923, 0.000642056, 3.06393e-06, 0.00243214], 
              [3.17118e-06, 0.832597, 0.133555, 0.0338447], 
              [3.17118e-06, 0.943723, 0.0562704, 3.17118e-06], 
              [0.0054571, 0.00444201, 0.000891053, 0.98921], 
              [0.00344213, 0.00267703, 0.993241, 0.000640163], 
              [0.0324428, 0.386458, 0.253622, 0.327477], 
              [0.264906, 0.178614, 0.268368, 0.288114]
            ],
            "total_sites": 389,
            "sites": [
              0, 1, 1, 4, 1, 1, 0, 0, 1, 0, 4, 2, 0, 0, 0, 2, 4, 1, 1, 1, 1,
              0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 1, 0,
              0, 2, 1, 0, 2, 0, 0, 0, 0, 1, 0, 2, 1, 0, 0, 1, 0, 0, 0, 1, 4,
              0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 2, 0, 1, 0, 1, 1, 0, 0, 0, 1, 1,
              0, 0, 0, 1, 0, 0, 0, 0, 1, 3, 1, 1, 0, 1, 0, 0, 0, 0, 0, 1, 1,
              1, 0, 1, 1, 2, 0, 1, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 2, 1, 2, 0,
              0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 2, 1, 0,
              1, 1, 0, 2, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 1, 0, 3, 0, 1, 0, 0,
              4, 2, 0, 0, 1, 1, 2, 0, 0, 1, 2, 1, 1, 2, 2, 0, 0, 0, 1, 0, 1,
              1, 2, 4, 0, 1, 2, 0, 0, 3, 1, 0, 1, 0, 1, 0, 1, 2, 0, 2, 0, 0,
              1, 1, 0, 0, 1, 0, 1, 1, 1, 3, 0, 1, 2, 1, 2, 2, 0, 2, 1, 1, 1,
              0, 0, 0, 2, 3, 1, 0, 0, 0, 0, 1, 1, 2, 1, 1, 1, 2, 1, 2, 2, 1,
              3, 1, 1, 0, 1, 1, 0, 1, 0, 0, 2, 1, 0, 2, 1, 2, 2, 3, 2, 2, 0,
              0, 1, 0, 1, 2, 1, 0, 1, 1, 1, 0, 0, 2, 0, 1, 0, 2, 1, 1, 0, 2,
              1, 3, 1, 1, 1, 0, 1, 0, 2, 1, 1, 0, 1, 0, 0, 2, 0, 1, 3, 0, 2,
              2, 1, 4, 0, 1, 1, 0, 4, 0, 1, 1, 1, 0, 2, 1, 0, 1, 0, 1, 0, 0,
              0, 1, 2, 2, 2, 0, 0, 0, 1, 1, 1, 1, 2, 0, 1, 0, 0, 3, 1, 1, 0,
              1, 1, 1, 0, 0, 3, 1, 2, 0, 0, 1, 0, 0, 1, 1, 1, 2, 0, 0, 0, 0,
              1, 2, 0, 2, 0, 3, 1, 0, 2, 0, 0, 0, 1, 0, 1, 0, 0, 0, 3, 0, 0,
              1, 0, 0, 1, 3, 1, 2, 0, 1, 0, 1, 1, 1, 1, 0, 0, 1, 0, 0, 1, 0,
              3, 0, 0, 1, 2, 2, 0, 0, 1, 0, 0, 1, 1, 1, 0, 1, 2, 0, 0, 1, 1,
              0, 1, 0, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 2, 0, 1, 0, 1, 2, 1, 1,
              2, 0, 0, 2, 0, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 2, 0, 0, 1, 0,
              0, 1, 2, 1, 0, 1, 0, 1
            ],
            "seqs": [
              14, 20, 23, 27, 35, 40, 41, 49, 50, 56, 63, 65, 68, 69, 77, 86,
              87, 88, 90, 95, 98, 109, 113, 116, 117, 122, 123, 125, 130, 131,
              133, 135, 136, 141, 143, 144, 145, 147, 148, 149, 150, 152, 156,
              157, 159, 161, 162, 164, 167, 169, 173, 177, 180, 192, 195, 200,
              202, 203, 208, 212, 219, 224, 225, 229, 232, 238, 239, 242, 244,
              246, 247, 248, 251, 255, 256, 260, 263, 265, 270, 281, 282, 289,
              291, 295, 296, 307, 308, 311, 315, 316, 322, 323, 329, 335, 336,
              339, 345, 346, 354, 355, 357, 359, 366, 368, 376, 388, 389, 391,
              392, 393, 394, 396, 397, 399, 400, 401, 402, 406, 407, 409, 410,
              411, 412, 414, 420, 426, 427, 428, 429, 431, 432, 439, 440, 444,
              446, 449, 451, 452, 457, 459, 460, 465, 468, 475, 476, 477, 478,
              483, 485, 486, 503, 504, 507, 508, 516, 521, 522, 524, 526, 532,
              536
            ],
            "peaks": [
              {
                "center": 0,
                "spread": 155,
                "sites": 161,
                "log_adj_pvalue": -4.9679
              }
            ]
          }, {
            "db": 0,
            "id": "MA0591.1",
            "alt": "Bach1::Mafk",
            "len": 15,
            "motif_evalue": "0.0e+000",
            "motif_nsites": 114,
            "n_tested": 242,
            "score_threshold": 5,
            "url": "http://jaspar.genereg.net?ID=MA0591.1&rm=present&collection=CORE",
            "pwm": [
              [0.394614, 0.122915, 0.359549, 0.122922], 
              [0.122922, 0.315728, 0.403371, 0.157979], 
              [0.131687, 0.359549, 0.473484, 0.0352801], 
              [0.578662, 0.140443, 0.280671, 0.000222875], 
              [0.0177515, 0.00897965, 0.000215337, 0.973054], 
              [0.000222875, 0.000215337, 0.937989, 0.0615731], 
              [0.990582, 0.000215337, 0.000215337, 0.00898719], 
              [0.000222875, 0.824054, 0.175501, 0.000222875], 
              [0.00898719, 0.000215337, 0.0352726, 0.955525], 
              [0.0440444, 0.937989, 0.017744, 0.000222875], 
              [0.946761, 0.00897965, 0.0265083, 0.0177515], 
              [0.000222875, 0.00897965, 0.990575, 0.000222875], 
              [0.000222875, 0.999339, 0.000215337, 0.000222875], 
              [0.859118, 0.0352726, 0.0528012, 0.0528087], 
              [0.105394, 0.368313, 0.333256, 0.193036]
            ],
            "total_sites": 142,
            "sites": [
              1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1,
              0, 0, 0, 1, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1,
              1, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0,
              1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,
              0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0,
              1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2,
              0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,
              0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0,
              0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1,
              1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 2, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0,
              1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 2, 0, 0, 1, 0,
              2, 1, 1, 1, 0, 1, 2, 0, 0, 1, 0, 1, 2, 1, 1, 0, 1, 0, 0, 0, 0,
              1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 2, 2, 0, 0, 1, 0, 0, 0, 2,
              0, 1, 0, 0, 1, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
              0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,
              1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0,
              1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0,
              0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0,
              1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1,
              2, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2,
              0, 0, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
              0, 0, 0, 2, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 0,
              0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
              1, 1, 0
            ],
            "seqs": [
              3, 22, 39, 40, 60, 70, 93, 135, 144, 145, 156, 182, 195, 202,
              207, 234, 236, 237, 249, 254, 264, 274, 290, 302, 314, 326, 344,
              348, 365, 379, 405, 425, 434, 450, 465, 467, 475, 497, 504, 540
            ],
            "peaks": [
              {
                "center": 0,
                "spread": 74,
                "sites": 40,
                "log_adj_pvalue": -4.25521
              }
            ]
          }, {
            "db": 0,
            "id": "MA0595.1",
            "alt": "SREBF1",
            "len": 10,
            "motif_evalue": "0.0e+000",
            "motif_nsites": 58,
            "n_tested": 245,
            "score_threshold": 5,
            "url": "http://jaspar.genereg.net?ID=MA0595.1&rm=present&collection=CORE",
            "pwm": [
              [0.482366, 0.241386, 0.27581, 0.000437694], 
              [0.000437694, 0.000422892, 0.000422892, 0.998717], 
              [0.000437694, 0.998702, 0.000422892, 0.000437694], 
              [0.998717, 0.000422892, 0.000422892, 0.000437694], 
              [0.000437694, 0.878219, 0.120905, 0.000437694], 
              [0.103708, 0.654467, 0.224175, 0.017649], 
              [0.000437694, 0.757738, 0.000422892, 0.241401], 
              [0.0348613, 0.77495, 0.189751, 0.000437694], 
              [0.998717, 0.000422892, 0.000422892, 0.000437694], 
              [0.000437694, 0.447927, 0.120905, 0.43073]
            ],
            "total_sites": 197,
            "sites": [
              0, 0, 0, 0, 2, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2,
              0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0,
              0, 0, 0, 1, 1, 0, 1, 2, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
              0, 0, 1, 2, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0,
              0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1,
              0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0,
              0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 1, 2, 0, 2, 2, 1, 0, 1, 0,
              0, 0, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1,
              0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0,
              2, 1, 0, 0, 0, 0, 1, 0, 2, 1, 0, 0, 2, 2, 0, 1, 0, 1, 0, 1, 0,
              2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 2, 1, 1, 0, 2, 1,
              2, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 2, 0, 1, 2, 3, 2, 2, 1, 1,
              1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 0, 0, 1, 2, 0, 1, 0, 0, 0, 0, 0,
              0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 0, 2, 1, 0, 1,
              1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0,
              3, 0, 2, 1, 1, 0, 1, 0, 0, 0, 2, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0,
              0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 2, 0,
              1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0,
              0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1,
              0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0,
              1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1,
              1, 0, 0, 0, 0, 2, 0, 1, 1, 0, 0, 2, 0, 2, 0, 1, 1, 0, 0, 0, 0,
              0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 0, 0, 2, 0, 0, 1, 0, 0, 0, 0, 0,
              0, 1, 2, 0, 1, 0, 1, 0
            ],
            "seqs": [
              5, 13, 30, 32, 34, 83, 85, 86, 91, 94, 102, 122, 154, 156, 158,
              164, 169, 171, 185, 226, 228, 231, 306, 310, 333, 337, 348, 356,
              372, 377, 407, 418, 433, 434, 457, 461, 465, 501, 518, 519, 536
            ],
            "peaks": [
              {
                "center": 0,
                "spread": 45,
                "sites": 41,
                "log_adj_pvalue": -8.91961
              }
            ]
          }, {
            "db": 0,
            "id": "MA0596.1",
            "alt": "SREBF2",
            "len": 10,
            "motif_evalue": "0.0e+000",
            "motif_nsites": 47,
            "n_tested": 245,
            "score_threshold": 5,
            "url": "http://jaspar.genereg.net?ID=MA0596.1&rm=present&collection=CORE",
            "pwm": [
              [0.510094, 0.191604, 0.297761, 0.000539915], 
              [0.000539915, 0.000521656, 0.000521656, 0.998417], 
              [0.000539915, 0.0642161, 0.934704, 0.000539915], 
              [0.212854, 0.000521656, 0.786084, 0.000539915], 
              [0.0430026, 0.212836, 0.57377, 0.170392], 
              [0.0430026, 0.191604, 0.764852, 0.000539915], 
              [0.000539915, 0.000521656, 0.000521656, 0.998417], 
              [0.000539915, 0.000521656, 0.998399, 0.000539915], 
              [0.998417, 0.000521656, 0.000521656, 0.000539915], 
              [0.0430026, 0.340225, 0.0429843, 0.573788]
            ],
            "total_sites": 238,
            "sites": [
              0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 1,
              0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1,
              0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
              0, 3, 1, 2, 0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0,
              0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0,
              0, 0, 1, 0, 0, 2, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0,
              0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 0, 1, 2, 0, 0, 1, 0,
              0, 0, 1, 0, 1, 2, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 1,
              0, 2, 0, 0, 0, 2, 0, 0, 0, 0, 2, 0, 1, 0, 0, 0, 0, 0, 2, 0, 0,
              3, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 2, 2, 0, 2, 0, 1, 0, 2, 0,
              1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 2, 1, 1, 0, 2, 2,
              2, 0, 0, 2, 1, 1, 1, 0, 1, 0, 0, 0, 3, 1, 2, 2, 3, 3, 2, 1, 1,
              0, 0, 2, 0, 1, 0, 3, 0, 0, 0, 1, 0, 0, 1, 0, 2, 0, 1, 1, 2, 1,
              0, 0, 0, 1, 2, 0, 1, 0, 0, 1, 1, 0, 1, 0, 0, 2, 0, 1, 1, 0, 1,
              0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 2, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0,
              2, 1, 4, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 1, 0, 0, 1,
              0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0,
              0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0,
              0, 1, 0, 1, 0, 0, 0, 0, 2, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 1, 1,
              0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0,
              1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 1, 0, 0, 0, 2,
              1, 0, 0, 0, 0, 2, 1, 1, 1, 0, 1, 1, 1, 3, 0, 1, 0, 0, 0, 0, 0,
              0, 0, 0, 1, 0, 0, 2, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0,
              0, 2, 3, 0, 1, 1, 1, 0
            ],
            "seqs": [
              5, 13, 30, 32, 34, 71, 83, 85, 86, 91, 94, 102, 122, 154, 156,
              158, 164, 185, 226, 228, 231, 257, 306, 310, 333, 337, 348, 350,
              356, 362, 372, 412, 418, 433, 434, 457, 461, 465, 479, 501, 518,
              519, 528, 538, 540
            ],
            "peaks": [
              {
                "center": 0,
                "spread": 45,
                "sites": 45,
                "log_adj_pvalue": -7.37186
              }
            ]
          }, {
            "db": 0,
            "id": "MA0598.2",
            "alt": "EHF",
            "len": 12,
            "motif_evalue": "0.0e+000",
            "motif_nsites": 1348,
            "n_tested": 244,
            "score_threshold": 5,
            "url": "http://jaspar.genereg.net?ID=MA0598.2&rm=present&collection=CORE",
            "pwm": [
              [0.425656, 0.161594, 0.132049, 0.2807], 
              [0.826366, 0.0314099, 0.030487, 0.111738], 
              [0.0970607, 0.694632, 0.125435, 0.0828727], 
              [0.0733704, 0.751137, 0.170781, 0.00471352], 
              [0.112401, 0.871992, 0.0108504, 0.00475751], 
              [0.00138776, 0.000702175, 0.997891, 1.88636e-05], 
              [1.88636e-05, 1.82257e-05, 0.999944, 1.88636e-05], 
              [0.992569, 0.00423291, 0.00107215, 0.00212571], 
              [0.976112, 0.0103805, 0.00934353, 0.00416356], 
              [0.125648, 0.0185119, 0.847532, 0.00830925], 
              [0.0281418, 0.057045, 0.0226725, 0.892141], 
              [0.512653, 0.0861808, 0.238958, 0.162208]
            ],
            "total_sites": 292,
            "sites": [
              1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 2, 0, 1, 1, 0, 2, 0,
              0, 0, 0, 0, 2, 1, 0, 0, 0, 1, 0, 1, 2, 0, 1, 0, 0, 0, 0, 0, 0,
              0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2,
              2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 1, 0, 1,
              0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 3, 0, 0, 0, 0, 2, 0, 0, 2,
              1, 0, 0, 2, 0, 1, 1, 2, 0, 0, 1, 3, 0, 0, 0, 2, 1, 0, 1, 0, 0,
              2, 0, 1, 1, 2, 0, 0, 0, 0, 3, 0, 0, 1, 3, 3, 1, 0, 0, 1, 1, 0,
              0, 2, 1, 0, 1, 0, 2, 0, 1, 0, 0, 2, 0, 2, 1, 1, 0, 0, 1, 1, 1,
              3, 2, 0, 0, 2, 3, 0, 0, 1, 2, 1, 0, 0, 1, 1, 0, 1, 0, 1, 1, 0,
              0, 0, 0, 2, 0, 3, 1, 2, 0, 0, 2, 0, 0, 1, 0, 1, 1, 1, 1, 0, 2,
              1, 3, 2, 1, 0, 0, 4, 0, 0, 2, 1, 1, 1, 0, 1, 1, 1, 0, 0, 2, 2,
              1, 0, 1, 1, 0, 1, 0, 2, 0, 1, 2, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0,
              0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 2,
              0, 1, 0, 2, 0, 1, 0, 0, 0, 2, 1, 0, 2, 1, 0, 0, 2, 1, 0, 0, 2,
              1, 0, 1, 1, 1, 0, 2, 0, 0, 1, 1, 1, 1, 2, 0, 1, 0, 0, 0, 1, 0,
              0, 1, 1, 2, 1, 0, 2, 2, 1, 2, 1, 0, 2, 0, 1, 0, 0, 1, 3, 0, 1,
              0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 3, 0, 1, 1, 2, 0, 1, 0, 0,
              1, 1, 0, 1, 0, 0, 1, 0, 0, 3, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 3,
              0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 2, 1, 0,
              1, 0, 0, 1, 1, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 1,
              1, 0, 0, 0, 0, 0, 3, 0, 1, 1, 0, 0, 2, 0, 0, 2, 1, 0, 0, 0, 0,
              1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0,
              0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0,
              0, 1, 1, 0, 0, 0
            ],
            "seqs": [
              1, 2, 10, 11, 12, 13, 15, 17, 19, 22, 23, 26, 28, 30, 37, 39,
              40, 42, 46, 48, 52, 56, 57, 58, 61, 63, 70, 73, 84, 86, 90, 93,
              95, 97, 98, 102, 103, 104, 112, 115, 117, 118, 121, 123, 128,
              130, 131, 133, 135, 136, 137, 142, 144, 152, 153, 154, 157, 158,
              163, 164, 168, 169, 171, 176, 181, 182, 184, 186, 187, 188, 189,
              197, 198, 201, 202, 206, 208, 216, 220, 221, 222, 224, 228, 235,
              237, 238, 239, 242, 243, 254, 256, 257, 259, 262, 265, 268, 269,
              271, 273, 274, 276, 277, 280, 284, 286, 290, 291, 298, 299, 303,
              305, 309, 312, 313, 315, 316, 317, 318, 320, 323, 325, 326, 329,
              332, 334, 336, 337, 339, 342, 343, 344, 346, 347, 351, 352, 354,
              356, 360, 366, 367, 369, 372, 376, 380, 384, 385, 388, 393, 397,
              401, 403, 404, 405, 406, 409, 411, 413, 417, 423, 427, 428, 430,
              432, 433, 435, 437, 439, 442, 449, 450, 453, 456, 459, 460, 462,
              463, 465, 466, 472, 474, 475, 476, 479, 481, 482, 484, 486, 487,
              488, 489, 493, 494, 495, 503, 505, 506, 508, 514, 519, 520, 521,
              528, 531, 535, 536, 539
            ],
            "peaks": [
              {
                "center": 0,
                "spread": 273,
                "sites": 206,
                "log_adj_pvalue": -10.0983
              }
            ]
          }, {
            "db": 0,
            "id": "MA0640.1",
            "alt": "ELF3",
            "len": 13,
            "motif_evalue": "0.0e+000",
            "motif_nsites": 1625,
            "n_tested": 243,
            "score_threshold": 5,
            "url": "http://jaspar.genereg.net?ID=MA0640.1&rm=present&collection=CORE",
            "pwm": [
              [0.465035, 0.119949, 0.105969, 0.309048], 
              [0.920219, 0.00896457, 0.00326992, 0.0675465], 
              [0.0406541, 0.781879, 0.159707, 0.0177596], 
              [0.0900631, 0.817505, 0.0924164, 1.56483e-05], 
              [0.0832905, 0.914743, 0.001952, 1.56483e-05], 
              [0.00142756, 1.51191e-05, 0.998542, 1.56483e-05], 
              [1.56483e-05, 0.00281195, 0.993893, 0.00327845], 
              [0.998282, 0.000851068, 0.000851068, 1.56483e-05], 
              [0.987619, 0.000837068, 1.51191e-05, 0.0115279], 
              [0.059914, 1.51191e-05, 0.935139, 0.00493235], 
              [0.0146137, 0.0231277, 0.00670571, 0.955553], 
              [0.580483, 0.0390067, 0.267924, 0.112588], 
              [0.486999, 0.109676, 0.258296, 0.145029]
            ],
            "total_sites": 161,
            "sites": [
              0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0,
              0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
              0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1,
              1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
              0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 2, 1, 0, 1,
              0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 0, 1,
              1, 1, 0, 3, 0, 0, 0, 0, 0, 0, 0, 1, 0, 3, 1, 0, 0, 1, 0, 1, 0,
              1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0,
              1, 1, 0, 2, 0, 2, 0, 1, 1, 1, 1, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0,
              0, 0, 0, 2, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 1, 1,
              2, 1, 0, 0, 0, 0, 4, 0, 0, 1, 3, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0,
              1, 0, 0, 1, 0, 0, 2, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0,
              0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0,
              0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 2, 0, 0, 0, 1, 0, 0, 1, 1,
              0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0,
              0, 0, 0, 2, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0,
              1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 1, 1, 0, 1, 0, 0, 1,
              1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,
              0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0,
              0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0,
              0, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 1, 0, 0, 2, 0, 0, 0, 0, 1,
              0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,
              0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
              0, 1, 0, 0, 0
            ],
            "seqs": [
              2, 10, 13, 15, 17, 22, 23, 39, 42, 52, 56, 57, 58, 61, 63, 70,
              90, 93, 95, 102, 104, 115, 118, 121, 123, 128, 137, 142, 152,
              157, 164, 171, 176, 181, 184, 187, 188, 189, 197, 198, 201, 202,
              208, 220, 222, 228, 239, 241, 245, 246, 257, 259, 262, 263, 265,
              271, 273, 274, 276, 280, 284, 291, 303, 309, 312, 313, 323, 326,
              329, 332, 336, 337, 342, 343, 347, 352, 354, 356, 366, 367, 372,
              376, 380, 384, 385, 388, 393, 397, 401, 405, 409, 411, 413, 417,
              428, 430, 432, 435, 443, 446, 449, 450, 453, 459, 461, 462, 465,
              466, 473, 475, 476, 479, 482, 487, 488, 489, 493, 494, 495, 503,
              521, 536
            ],
            "peaks": [
              {
                "center": 0,
                "spread": 286,
                "sites": 122,
                "log_adj_pvalue": -6.99652
              }
            ]
          }, {
            "db": 0,
            "id": "MA0641.1",
            "alt": "ELF4",
            "len": 12,
            "motif_evalue": "0.0e+000",
            "motif_nsites": 1069,
            "n_tested": 244,
            "score_threshold": 5,
            "url": "http://jaspar.genereg.net?ID=MA0641.1&rm=present&collection=CORE",
            "pwm": [
              [0.564655, 0.10294, 0.151095, 0.18131], 
              [0.748362, 0.0775107, 0.0159455, 0.158183], 
              [0.151271, 0.710423, 0.0573136, 0.0809942], 
              [0.0152964, 0.889428, 0.0943542, 0.000921702], 
              [0.051107, 0.943171, 0.00569845, 2.37864e-05], 
              [0.00083871, 2.29819e-05, 0.999115, 2.37864e-05], 
              [2.37864e-05, 2.29819e-05, 0.998301, 0.00165263], 
              [0.994547, 2.29819e-05, 0.00271473, 0.00271553], 
              [0.985226, 0.00670636, 0.00269673, 0.00537129], 
              [0.0337726, 0.0141507, 0.947344, 0.00473335], 
              [0.00377244, 0.0525021, 0.0262625, 0.917464], 
              [0.379461, 0.0781697, 0.435952, 0.106417]
            ],
            "total_sites": 187,
            "sites": [
              1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0,
              0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0,
              0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1,
              2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1,
              0, 0, 0, 0, 0, 1, 1, 0, 0, 2, 0, 0, 3, 0, 0, 0, 0, 2, 0, 0, 0,
              1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0,
              2, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 1, 0, 0, 1, 1, 0,
              0, 0, 1, 0, 0, 0, 2, 0, 1, 0, 0, 1, 0, 2, 1, 1, 0, 0, 1, 0, 0,
              1, 2, 0, 0, 2, 1, 0, 0, 1, 2, 2, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0,
              0, 0, 0, 1, 0, 3, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 1, 0, 2,
              0, 2, 1, 1, 0, 0, 4, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0,
              1, 0, 0, 1, 0, 1, 0, 2, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0,
              0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0,
              0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 2, 0, 1, 1, 0, 0, 2, 0, 0, 0, 2,
              1, 0, 1, 0, 1, 0, 2, 0, 0, 1, 1, 1, 1, 2, 0, 1, 0, 0, 0, 1, 0,
              0, 0, 0, 2, 0, 0, 0, 1, 1, 1, 1, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0,
              0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 2, 0, 0, 0, 1, 0, 0, 0, 0,
              1, 0, 0, 1, 0, 0, 1, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
              0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0,
              1, 0, 0, 0, 1, 0, 0, 2, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1,
              0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 2, 0, 0, 1, 0, 0, 1, 0, 0,
              1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0,
              0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,
              1, 0, 1, 0, 0, 0
            ],
            "seqs": [
              2, 15, 17, 22, 23, 26, 30, 39, 58, 61, 63, 84, 90, 93, 95, 105,
              117, 118, 121, 123, 128, 130, 135, 137, 142, 152, 157, 164, 171,
              182, 185, 188, 197, 198, 202, 208, 224, 228, 242, 243, 257, 259,
              271, 274, 280, 284, 286, 290, 298, 303, 312, 313, 316, 318, 323,
              329, 332, 336, 352, 356, 366, 367, 376, 378, 380, 385, 388, 397,
              404, 409, 411, 417, 427, 428, 430, 432, 435, 442, 450, 459, 462,
              465, 466, 474, 475, 476, 479, 481, 482, 484, 488, 489, 493, 495,
              503, 506, 516, 521
            ],
            "peaks": [
              {
                "center": 0,
                "spread": 183,
                "sites": 98,
                "log_adj_pvalue": -5.2421
              }
            ]
          }, {
            "db": 0,
            "id": "MA0645.1",
            "alt": "ETV6",
            "len": 10,
            "motif_evalue": "0.0e+000",
            "motif_nsites": 8773,
            "n_tested": 245,
            "score_threshold": 5,
            "url": "http://jaspar.genereg.net?ID=MA0645.1&rm=present&collection=CORE",
            "pwm": [
              [0.415407, 0.28956, 0.20669, 0.0883439], 
              [0.0457914, 0.320524, 0.574638, 0.0590462], 
              [0.172431, 0.745204, 0.0463813, 0.0359835], 
              [0.00104689, 2.80061e-06, 0.997009, 0.00194088], 
              [0.00312286, 2.80061e-06, 0.993602, 0.00327186], 
              [0.998946, 2.80061e-06, 0.00104879, 2.89863e-06], 
              [0.987295, 0.00192178, 0.00472775, 0.00605583], 
              [0.102307, 0.00692972, 0.890762, 2.89863e-06], 
              [0.0231826, 0.105066, 0.0293545, 0.842397], 
              [0.306414, 0.0511462, 0.479285, 0.163153]
            ],
            "total_sites": 440,
            "sites": [
              1, 0, 3, 0, 3, 3, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 2, 0, 1, 2, 0,
              0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 1, 0, 3, 0, 0, 0, 0,
              1.5, 0, 1, 1, 1, 1.5, 0, 0, 0, 1, 0, 1, 0.5, 0, 0, 0, 2, 1, 0,
              1, 1, 3, 0, 1, 0, 0, 2.5, 0, 0, 0, 0, 2, 0, 2, 1, 2.5, 0, 3, 0,
              2, 0, 2, 0, 1.5, 1, 0, 0, 3, 0, 1, 0, 0, 0, 2, 1, 1, 4, 2, 0, 0,
              1, 0, 1, 0, 1, 3, 1, 0, 1, 0, 0, 1, 1, 1, 0, 0, 2, 0, 0, 1, 1,
              2, 1, 0, 0, 1, 2, 0, 2, 1, 0, 0, 0, 1, 1, 3, 2, 0, 1, 2, 1, 0,
              2, 0, 1, 2, 2, 1, 2, 1, 0, 2, 0, 3, 1, 1, 2, 1, 2, 0, 2, 1, 1,
              1, 0, 3, 2, 2, 1, 3, 2, 0, 2, 4, 2, 1, 1, 1, 1, 2, 0, 0, 1, 0,
              3, 2, 0, 0, 0, 1, 0, 2, 1, 1, 3, 0, 0, 0, 1, 5, 0, 0, 0, 1, 3,
              1, 0, 1, 0, 2, 3, 1, 1, 1, 0, 2, 6, 1, 1, 2, 2, 1, 0, 1, 2, 1,
              0, 0, 0, 0, 1, 1, 0, 1, 2, 0, 1, 1, 0, 1, 1, 2, 0, 1, 0, 0, 0,
              0, 0, 2, 0, 2, 0, 2, 2, 1, 0, 0, 2, 2, 1, 2, 0, 0, 3, 1, 2, 0,
              1, 0, 3, 2, 1, 2, 3, 2, 1, 0, 0, 1, 6, 1, 0, 2, 0, 2, 0, 0, 2,
              1, 0, 3, 1, 3, 1, 0, 0, 2, 2, 0, 2, 1, 1, 2, 1, 1, 0, 0, 2, 3,
              0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 3, 1, 3, 3, 1, 0, 0, 1,
              3, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 3, 1, 1,
              0, 0, 1, 1, 0, 0, 0, 1, 0, 2, 0, 4, 2, 1, 0, 0, 2, 2, 1, 0, 0,
              1, 1, 1, 0, 0, 2, 1, 1, 0, 0, 2, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0,
              2, 1, 1, 0, 0, 2, 1, 2, 0, 1, 2, 1, 2, 0, 1, 1, 1, 1, 1, 1, 0,
              0, 2, 3, 0, 1, 0, 0, 0, 0, 2, 0, 1, 1, 0, 0, 1, 0, 2, 1, 1, 2,
              3, 0, 0, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 0, 1, 0,
              0, 2, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 1, 2, 0, 1, 0,
              0, 0, 0, 1, 0, 3, 0, 1, 0, 0, 1
            ],
            "seqs": [
              2, 3, 4, 5, 11, 12, 15, 17, 23, 24, 26, 28, 30, 32, 33, 35, 39,
              40, 41, 45, 49, 51, 58, 59, 61, 63, 66, 68, 71, 75, 77, 78, 80,
              84, 89, 90, 91, 93, 94, 95, 98, 101, 105, 107, 112, 113, 114,
              117, 118, 121, 124, 126, 128, 129, 130, 133, 134, 137, 142, 144,
              150, 151, 152, 154, 166, 168, 169, 171, 173, 174, 177, 179, 182,
              186, 188, 191, 194, 195, 197, 198, 200, 201, 202, 203, 206, 208,
              211, 217, 220, 221, 224, 228, 235, 238, 240, 241, 242, 243, 250,
              256, 257, 259, 263, 270, 271, 274, 275, 276, 280, 281, 284, 286,
              287, 289, 291, 294, 298, 299, 303, 310, 312, 313, 314, 315, 316,
              318, 321, 323, 325, 334, 336, 339, 344, 346, 352, 353, 356, 361,
              364, 366, 367, 369, 372, 376, 378, 380, 381, 391, 396, 397, 401,
              405, 406, 407, 409, 410, 411, 414, 417, 418, 419, 424, 428, 430,
              432, 435, 437, 438, 442, 448, 450, 451, 452, 453, 458, 462, 465,
              466, 472, 474, 477, 482, 484, 486, 488, 489, 493, 494, 495, 497,
              498, 503, 505, 506, 508, 511, 514, 515, 516, 517, 521, 523, 524,
              528, 530, 531, 534, 537, 539
            ],
            "peaks": [
              {
                "center": 0,
                "spread": 181,
                "sites": 209,
                "log_adj_pvalue": -7.13272
              }
            ]
          }, {
            "db": 0,
            "id": "MA0655.1",
            "alt": "JDP2",
            "len": 9,
            "motif_evalue": "0.0e+000",
            "motif_nsites": 1717,
            "n_tested": 245,
            "score_threshold": 5,
            "url": "http://jaspar.genereg.net?ID=MA0655.1&rm=present&collection=CORE",
            "pwm": [
              [0.907236, 0.0105637, 0.0777448, 0.00445655], 
              [0.00305263, 0.0036591, 0.000622274, 0.992667], 
              [1.48099e-05, 0.0018222, 0.984888, 0.013275], 
              [0.983111, 0.000616274, 0.00121724, 0.0150559], 
              [0.00844332, 0.722428, 0.261287, 0.00784135], 
              [0.0036596, 1.4309e-05, 0.0036591, 0.992667], 
              [0.013203, 0.979573, 0.0018132, 0.0054105], 
              [0.995691, 1.4309e-05, 1.4309e-05, 0.00428056], 
              [0.0106682, 0.195645, 0.00243517, 0.791252]
            ],
            "total_sites": 177,
            "sites": [
              0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 2, 0, 0, 0, 0, 0, 1, 0, 0,
              0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0,
              1, 0, 0, 1, 0, 0, 0, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0,
              0, 0, 0, 1, 0, 0, 0, 0, 2, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
              0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
              1, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 1,
              0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0,
              0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 2, 0,
              0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 1, 1, 0,
              2, 0, 2, 2, 0, 0, 0, 1, 1, 0, 0, 0, 0, 2, 0, 1, 1, 1, 0, 1, 1,
              0, 0, 0, 0, 2, 0, 2, 0, 0, 1, 2, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0,
              0, 0, 0, 2, 1, 0, 2, 1, 0, 1, 0, 0, 1, 0, 2, 1, 1, 1, 0, 0, 0,
              1, 1, 1, 0, 1, 0, 0, 2, 0, 2, 0, 0, 1, 1, 0, 2, 2, 0, 1, 0, 0,
              0, 0, 3, 0, 1, 1, 1, 0, 4, 2, 1, 0, 0, 1, 0, 2, 0, 0, 0, 2, 0,
              0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 2, 1, 0, 0, 0, 0,
              0, 1, 0, 0, 1, 2, 0, 0, 1, 1, 1, 1, 0, 2, 0, 0, 2, 0, 0, 0, 0,
              0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 1,
              0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1,
              0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0,
              1, 1, 0, 0, 2, 1, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0,
              0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0,
              0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 3, 0, 0, 1,
              1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0,
              1, 0, 0, 0, 0, 0, 0, 0, 0
            ],
            "seqs": [
              3, 7, 9, 18, 22, 27, 28, 40, 43, 46, 58, 60, 62, 65, 69, 71, 78,
              82, 86, 93, 100, 108, 115, 116, 120, 121, 128, 130, 132, 133,
              135, 138, 145, 152, 159, 162, 173, 182, 193, 195, 210, 211, 216,
              219, 220, 231, 233, 235, 236, 237, 243, 246, 248, 249, 254, 264,
              268, 277, 280, 285, 287, 300, 304, 314, 318, 323, 324, 335, 336,
              337, 341, 364, 367, 379, 384, 387, 400, 401, 406, 407, 408, 415,
              417, 443, 445, 461, 470, 474, 476, 482, 483, 493, 495, 506, 508,
              517, 525, 533, 537, 540
            ],
            "peaks": [
              {
                "center": 0,
                "spread": 174,
                "sites": 100,
                "log_adj_pvalue": -13.1353
              }
            ]
          }, {
            "db": 0,
            "id": "MA0684.1",
            "alt": "RUNX3",
            "len": 10,
            "motif_evalue": "0.0e+000",
            "motif_nsites": 8535,
            "n_tested": 245,
            "score_threshold": 5,
            "url": "http://jaspar.genereg.net?ID=MA0684.1&rm=present&collection=CORE",
            "pwm": [
              [0.517613, 0.198429, 0.0209586, 0.262999], 
              [0.681963, 0.0618042, 0.217112, 0.0391205], 
              [0.926691, 0.0401724, 0.0331335, 2.97946e-06], 
              [0.000395975, 0.999598, 2.8787e-06, 2.97946e-06], 
              [2.97946e-06, 0.997118, 0.00287585, 2.97946e-06], 
              [0.385784, 0.00980576, 0.599119, 0.00529092], 
              [0.00384193, 0.977211, 0.0122887, 0.0066579], 
              [0.910123, 0.0438644, 0.0240786, 0.0219337], 
              [0.670584, 0.0891388, 0.155617, 0.08466], 
              [0.541058, 0.15691, 0.112772, 0.189261]
            ],
            "total_sites": 460,
            "sites": [
              0, 2, 0, 0, 0, 0, 2, 0, 1, 0, 1, 1, 1, 1, 0, 0, 1, 2, 1, 0, 0,
              1, 0, 2, 0, 2, 1, 0, 0, 1, 0.333333, 0, 0, 1, 0, 3, 0, 2, 0, 0,
              1, 1, 0, 1, 3, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1.5,
              1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 2, 0, 1, 0, 1, 0, 2, 0, 1,
              1, 0, 1, 1, 0, 0, 1, 2, 1, 0, 0, 2, 1, 1, 0, 0, 1, 1, 0, 0.5, 0,
              1, 0.5, 1, 4, 1, 1, 0, 0, 0, 0, 0, 0, 3, 5, 0, 1, 1, 0, 0, 2, 1,
              0, 0, 1, 0, 0, 1, 2, 0, 0, 1, 2, 0, 0, 0, 1, 0, 0, 1, 1, 0, 1,
              2, 0, 1, 1, 0, 0, 2, 1, 1, 2, 0, 0, 0, 1, 1, 0, 1, 0, 1, 1, 0,
              2, 1, 0, 3.5, 1, 1, 2, 0, 0, 0, 3, 2, 1, 0, 1, 3, 0, 1, 2, 0, 1,
              3, 1, 1, 2, 2, 5, 2, 1, 0, 1, 2, 3, 0, 2, 1, 0, 2, 3, 1, 2, 3,
              1, 2, 0, 2, 2, 1, 0, 3, 1, 3, 1, 5, 0, 1, 0, 0, 1, 1, 1, 1, 2,
              1, 1, 1, 0, 0, 2, 2, 6, 1, 1, 0, 1, 0, 2, 3, 6, 2, 0, 2, 4, 1,
              2, 2, 0, 1, 2, 0, 0, 1, 0, 2, 3, 1, 0.5, 1, 0.5, 1, 1, 2, 0, 1,
              0, 2, 0, 1, 1, 1, 1, 1, 1, 2, 4, 2, 1, 1, 2, 1, 1, 1, 0, 1, 2,
              0, 1, 1, 0, 1, 1, 3.5, 0, 1, 3, 2, 0.333333, 2, 0, 1, 4, 1, 2,
              2, 0, 0, 1, 0, 2, 0, 1, 0, 0, 1, 2, 0, 0, 1, 2, 2, 0, 2, 1, 2,
              0.5, 4, 0, 2, 1, 0, 3, 2, 1, 0, 1, 2, 1, 1, 2, 0, 1, 1, 0, 4, 2,
              0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 2, 1, 0, 0, 0, 2, 2, 2, 1, 0,
              1, 0, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 5, 0, 0, 0,
              2, 0, 1, 0, 0, 1, 2, 1, 1, 0, 0, 1, 0, 2, 0, 0, 1, 1, 1, 1, 0,
              1, 0, 1, 1, 0, 0, 1, 1, 1, 0, 2, 1, 1, 0, 2, 2, 1, 0, 3, 1, 1,
              1, 2, 2, 0, 3, 1, 1, 1, 1, 0, 0, 2, 1, 2, 3, 0.333333, 0, 0, 0,
              0, 1, 2, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 1, 1, 2, 0, 1, 0, 1, 1,
              2, 1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1
            ],
            "seqs": [
              2, 11, 15, 21, 23, 26, 27, 33, 35, 36, 44, 45, 49, 50, 51, 53,
              59, 60, 61, 64, 67, 74, 85, 86, 88, 89, 94, 97, 98, 102, 106,
              107, 110, 111, 116, 117, 119, 122, 123, 128, 137, 138, 144, 145,
              149, 150, 151, 152, 158, 159, 161, 163, 165, 167, 170, 171, 175,
              180, 182, 184, 188, 193, 196, 200, 205, 207, 210, 213, 216, 221,
              223, 225, 228, 230, 231, 232, 234, 235, 237, 239, 245, 246, 247,
              249, 250, 252, 253, 254, 256, 258, 259, 260, 264, 269, 278, 280,
              283, 288, 299, 306, 309, 316, 320, 324, 326, 331, 333, 334, 335,
              337, 338, 339, 342, 346, 347, 348, 351, 354, 356, 360, 363, 365,
              367, 368, 369, 370, 373, 374, 378, 383, 384, 387, 391, 396, 397,
              399, 402, 416, 418, 419, 425, 427, 432, 434, 435, 436, 442, 449,
              458, 459, 460, 461, 462, 464, 466, 467, 473, 475, 480, 481, 484,
              488, 495, 500, 501, 504, 505, 507, 508, 511, 516, 517, 521, 522,
              523, 525, 531, 532, 534, 535, 536, 538
            ],
            "peaks": [
              {
                "center": 0,
                "spread": 129,
                "sites": 180.833,
                "log_adj_pvalue": -15.5293
              }
            ]
          }, {
            "db": 0,
            "id": "MA0686.1",
            "alt": "SPDEF",
            "len": 11,
            "motif_evalue": "0.0e+000",
            "motif_nsites": 5218,
            "n_tested": 244,
            "score_threshold": 5,
            "url": "http://jaspar.genereg.net?ID=MA0686.1&rm=present&collection=CORE",
            "pwm": [
              [0.795589, 0.0173674, 0.0302601, 0.156784], 
              [0.360685, 0.522323, 0.102293, 0.0146996], 
              [0.0109017, 0.96981, 0.0192833, 4.87342e-06], 
              [0.0486989, 0.95088, 0.000209705, 0.000209869], 
              [0.000436865, 0.0004367, 0.999122, 4.87342e-06], 
              [0.00129785, 4.70861e-06, 0.99697, 0.00172784], 
              [0.99826, 4.70861e-06, 0.00129868, 0.000435865], 
              [0.10153, 0.0131725, 0.00210367, 0.883194], 
              [0.228247, 0.0876, 0.674529, 0.00962469], 
              [0.00957769, 0.221984, 0.00462562, 0.763812], 
              [0.412918, 0.122733, 0.289325, 0.175024]
            ],
            "total_sites": 187,
            "sites": [
              0, 0, 0, 1, 2, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
              1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0,
              0, 0, 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
              1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 2, 1, 2, 1, 0, 0, 1, 1, 0, 0, 0,
              1, 2, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 2, 0, 0, 0, 0, 0, 1, 1, 0,
              2, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 1, 1, 0,
              1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 2, 1, 1, 2, 1, 1, 1,
              1, 0, 1, 1, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0,
              1, 2, 1, 0, 2, 1, 2, 0, 0, 2, 1, 1, 0, 0, 2, 1, 0, 0, 1, 0, 0,
              0, 0, 1, 1, 0, 0, 2, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 1,
              2, 1, 1, 0, 0, 0, 0, 4, 0, 0, 1, 1, 0, 0, 1, 1, 3, 0, 1, 1, 1,
              0, 1, 1, 1, 2, 0, 0, 2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
              0, 3, 0, 0, 0, 0, 0, 0, 0, 1, 2, 2, 0, 0, 0, 0, 0, 1, 1, 0, 1,
              1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 2, 1, 1, 2, 0, 0, 0, 0, 0, 0, 1,
              1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0,
              0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 0, 0,
              0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 2, 1, 1, 0, 0, 1,
              0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
              1, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0,
              0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1,
              0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0,
              1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
              0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
              0, 1, 1, 0, 0, 0, 0
            ],
            "seqs": [
              7, 11, 12, 15, 22, 24, 28, 39, 42, 46, 54, 57, 58, 61, 63, 70,
              74, 79, 86, 90, 93, 95, 103, 105, 113, 117, 121, 123, 132, 133,
              137, 142, 144, 152, 157, 160, 164, 166, 174, 176, 184, 185, 188,
              190, 198, 202, 206, 222, 227, 236, 243, 254, 260, 263, 271, 273,
              274, 279, 280, 286, 291, 299, 303, 305, 312, 320, 323, 325, 326,
              329, 332, 334, 352, 362, 366, 367, 372, 374, 376, 387, 388, 396,
              397, 401, 411, 419, 427, 428, 430, 435, 442, 443, 450, 451, 453,
              459, 460, 462, 465, 466, 468, 471, 475, 476, 482, 483, 487, 489,
              496, 499, 501, 508, 516, 528, 533, 539
            ],
            "peaks": [
              {
                "center": 0,
                "spread": 218,
                "sites": 116,
                "log_adj_pvalue": -8.25783
              }
            ]
          }, {
            "db": 0,
            "id": "MA0742.1",
            "alt": "Klf12",
            "len": 15,
            "motif_evalue": "0.0e+000",
            "motif_nsites": 946,
            "n_tested": 242,
            "score_threshold": 5,
            "url": "http://jaspar.genereg.net?ID=MA0742.1&rm=present&collection=CORE",
            "pwm": [
              [0.105379, 0.0221056, 0.730548, 0.141968], 
              [0.504996, 0.0100709, 0.484907, 2.68788e-05], 
              [0.027013, 0.94879, 0.0113888, 0.0128095], 
              [0.00727211, 0.970937, 0.0174151, 0.00437442], 
              [0.967045, 0.0306347, 0.00229373, 2.68788e-05], 
              [0.0131065, 0.981027, 2.59698e-05, 0.00584026], 
              [0.136088, 0.000658903, 0.853101, 0.0101528], 
              [2.68788e-05, 0.994132, 2.59698e-05, 0.00581527], 
              [2.68788e-05, 0.969703, 0.0123877, 0.017882], 
              [2.68788e-05, 0.982065, 2.59698e-05, 0.017882], 
              [0.404722, 0.118473, 2.59698e-05, 0.476778], 
              [0.248176, 0.228365, 0.103248, 0.420211], 
              [0.334411, 0.2595, 0.0912213, 0.314869], 
              [0.245362, 0.191759, 0.120632, 0.442248], 
              [0.284661, 0.220591, 0.148119, 0.346629]
            ],
            "total_sites": 174,
            "sites": [
              0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0,
              0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1,
              0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
              1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0,
              0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0,
              0, 1, 0, 0, 2, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0,
              0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1,
              0, 1, 1, 1, 0, 2, 0, 0, 1, 0, 2, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0,
              1, 1, 0, 2, 4, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 1, 0, 2, 1, 0, 2,
              0, 0, 2, 0, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 1,
              0, 0, 1, 0, 0, 4, 2, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0,
              0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0,
              0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0,
              1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 3, 0, 1, 2, 0, 0,
              1, 1, 1, 0, 1, 0, 0, 3, 1, 0, 0, 1, 0, 0, 0, 1, 2, 0, 0, 1, 0,
              0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1,
              0, 0, 2, 1, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0,
              0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1,
              0, 2, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 1, 1, 0,
              0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1,
              0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 1, 1, 0, 0, 0, 2, 0, 0,
              0, 0, 1, 0, 0, 0, 0, 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0,
              0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,
              0, 1, 0
            ],
            "seqs": [
              0, 1, 6, 11, 23, 26, 50, 60, 64, 69, 72, 74, 77, 79, 87, 91,
              101, 103, 106, 111, 112, 113, 122, 124, 125, 148, 150, 158, 161,
              165, 171, 185, 186, 188, 190, 191, 203, 206, 215, 225, 227, 232,
              246, 248, 252, 253, 256, 261, 263, 264, 267, 278, 295, 298, 299,
              300, 309, 325, 328, 329, 331, 343, 345, 354, 358, 359, 362, 373,
              381, 383, 384, 390, 391, 395, 409, 422, 432, 442, 446, 451, 461,
              466, 472, 473, 474, 476, 478, 480, 489, 491, 492, 494, 506, 512,
              519, 522, 525, 532, 536
            ],
            "peaks": [
              {
                "center": 0,
                "spread": 202,
                "sites": 99,
                "log_adj_pvalue": -4.838
              }
            ]
          }, {
            "db": 0,
            "id": "MA0759.1",
            "alt": "ELK3",
            "len": 10,
            "motif_evalue": "0.0e+000",
            "motif_nsites": 2664,
            "n_tested": 245,
            "score_threshold": 5,
            "url": "http://jaspar.genereg.net?ID=MA0759.1&rm=present&collection=CORE",
            "pwm": [
              [0.604582, 0.0794652, 0.192705, 0.123248], 
              [0.0958719, 0.797199, 0.0794792, 0.0274495], 
              [0.0504487, 0.940285, 0.005894, 0.00337242], 
              [0.000456529, 9.22263e-06, 0.999525, 9.54544e-06], 
              [0.000871513, 0.00173216, 0.963782, 0.0336143], 
              [0.995079, 0.00312311, 0.00134417, 0.000454529], 
              [0.849579, 0.0163396, 9.22263e-06, 0.134073], 
              [0.163927, 0.0806512, 0.736322, 0.0191008], 
              [0.0496297, 0.160042, 0.0552162, 0.735112], 
              [0.347783, 0.142159, 0.290119, 0.219938]
            ],
            "total_sites": 393,
            "sites": [
              2, 1, 4, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 0, 1, 2, 1,
              0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 2, 2, 0, 0, 2, 1, 0, 0, 0, 0,
              1.5, 0, 2, 1, 1, 0.5, 1, 0, 0, 1, 1, 1, 0.5, 0, 0, 2, 0, 0, 1,
              0, 1, 2, 0, 1, 0, 0, 1, 2, 0, 0, 0, 3, 1, 1, 1, 1, 0, 0, 1, 2,
              0, 0, 0, 1.5, 0, 0.5, 0, 2, 0, 0, 0, 1, 1, 2, 2, 0, 2, 2, 0, 0,
              0, 0, 0, 0, 2, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 1, 1,
              0, 1, 0, 0, 1, 2, 0, 1, 2, 0, 0, 0, 1, 1, 2, 1, 0, 2, 2, 2, 2,
              4, 0, 0, 2, 1, 1, 3, 1, 0, 2, 0, 2, 1, 1, 1, 1, 1, 0, 4, 1, 1,
              1, 0, 2, 2, 1, 1, 1, 2, 0, 1, 2, 0, 1, 2, 1, 2, 3, 0, 1, 1, 0,
              2, 2, 0, 0, 0, 1, 2, 0, 1, 2, 1, 1, 0, 0, 1, 4, 0, 0, 1, 1, 1,
              2, 0, 1, 1, 2, 0, 1, 0, 2, 0, 2, 5, 1, 0, 2, 2, 1, 0, 1, 1, 1,
              1, 1, 1, 0, 0, 1, 0, 1, 2, 0, 2, 0, 0, 1, 0, 1, 0, 1, 1, 0, 1,
              0, 0, 0, 0, 2, 1, 1, 2, 1, 0, 0, 1, 2, 2, 2, 1, 0, 1, 1, 0, 0,
              2, 0, 1, 3, 0, 0, 3, 1, 0, 0, 2, 0.5, 1, 3, 0, 2, 2.5, 1, 0, 0,
              0, 1, 1, 1, 2, 2, 3, 1, 1, 0, 2, 0, 1, 0, 0, 3, 1, 2, 0, 1, 1,
              1, 0, 2, 0, 0, 1, 1, 1, 1, 2, 0, 1, 1, 4, 2, 0, 4, 1, 0, 1, 1,
              1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 2, 0, 0, 0, 2, 0, 1, 2, 1,
              1, 2, 0, 1, 2, 1, 0, 1, 2, 0, 0, 0, 0, 4, 0, 0, 1, 0, 1, 0, 1,
              0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1.5, 0, 0, 1, 0, 0, 0, 0, 2, 1,
              1, 1, 1, 1, 1, 0, 2, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 1,
              0, 0, 3, 3, 0, 1, 0, 0, 1, 0, 0, 0, 2, 0, 0, 1, 2, 0, 2, 2, 0,
              0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 2, 0, 1, 0, 0, 0, 1, 0, 0, 2, 0,
              0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0,
              0, 0, 0, 0, 1, 1, 2, 0, 1, 0, 0, 1
            ],
            "seqs": [
              2, 3, 5, 13, 14, 18, 19, 22, 23, 25, 26, 27, 28, 32, 37, 39, 40,
              42, 45, 46, 53, 54, 56, 57, 58, 61, 63, 66, 68, 70, 71, 74, 77,
              78, 79, 80, 81, 84, 86, 90, 93, 95, 98, 100, 101, 102, 103, 104,
              105, 106, 108, 109, 113, 116, 117, 118, 121, 123, 124, 128, 129,
              130, 131, 133, 137, 142, 144, 148, 150, 151, 152, 154, 157, 158,
              160, 161, 171, 172, 177, 182, 184, 185, 188, 189, 191, 195, 197,
              198, 202, 206, 208, 214, 215, 220, 222, 223, 224, 227, 228, 231,
              235, 239, 240, 242, 243, 244, 250, 254, 256, 257, 258, 259, 263,
              270, 271, 273, 274, 276, 277, 279, 280, 281, 284, 285, 286, 293,
              294, 298, 299, 300, 302, 303, 306, 311, 312, 314, 316, 318, 320,
              321, 323, 325, 326, 329, 332, 334, 336, 339, 342, 346, 347, 352,
              354, 356, 360, 361, 362, 364, 366, 367, 369, 372, 376, 377, 378,
              379, 380, 381, 387, 390, 393, 396, 397, 399, 401, 406, 409, 410,
              411, 413, 417, 419, 421, 424, 428, 429, 430, 431, 432, 435, 436,
              437, 440, 442, 443, 450, 451, 453, 454, 456, 459, 460, 462, 465,
              466, 471, 472, 474, 475, 476, 477, 482, 483, 484, 486, 487, 488,
              489, 493, 495, 500, 501, 505, 506, 508, 516, 517, 519, 520, 521,
              523, 524, 528, 534, 536, 539
            ],
            "peaks": [
              {
                "center": 0,
                "spread": 235,
                "sites": 235,
                "log_adj_pvalue": -8.01085
              }
            ]
          }, {
            "db": 0,
            "id": "MA0760.1",
            "alt": "ERF",
            "len": 10,
            "motif_evalue": "0.0e+000",
            "motif_nsites": 236,
            "n_tested": 245,
            "score_threshold": 5,
            "url": "http://jaspar.genereg.net?ID=MA0760.1&rm=present&collection=CORE",
            "pwm": [
              [0.836488, 0.0164242, 0.134741, 0.0123475], 
              [0.027655, 0.806849, 0.0315867, 0.133909], 
              [0.105995, 0.86838, 0.0255173, 0.000107709], 
              [0.000107709, 0.000104066, 0.999681, 0.000107709], 
              [0.000107709, 0.014521, 0.985264, 0.000107709], 
              [0.962141, 0.0141831, 0.0141831, 0.00949373], 
              [0.872078, 0.000104066, 0.000104066, 0.127714], 
              [0.26973, 0.0560014, 0.67416, 0.000107709], 
              [0.000107709, 0.159569, 0.0428879, 0.797435], 
              [0.303901, 0.137301, 0.450893, 0.107905]
            ],
            "total_sites": 372,
            "sites": [
              1, 1, 2, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 1, 1,
              0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 2, 2, 0, 0, 0, 0,
              1, 0, 1, 1, 1, 0.5, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
              2, 0, 0, 0, 0, 1, 2, 1, 0, 0, 2, 1, 1, 2, 2, 0, 1, 0, 0, 2, 1,
              0, 2.5, 0, 2, 0, 1, 1, 0, 0, 1, 1, 3, 2, 0, 1, 2, 0, 0, 0, 0, 1,
              0, 2, 2, 0, 0, 2, 0, 0, 0, 0, 0, 0, 2, 0, 0, 1, 1, 1, 1, 1, 1,
              0, 1, 2, 0, 0, 0, 0, 0, 0, 0, 1, 3, 1, 0, 2, 2, 0, 2, 4, 0, 1,
              2, 2, 1, 3, 1, 0, 1, 0, 2, 0, 2, 0, 1, 1, 0, 2, 1, 1, 1, 0, 2,
              1, 1, 1, 2, 1, 1.5, 1, 3, 0, 1, 2, 1, 2, 2, 0, 1, 1, 0, 2, 2, 0,
              0, 0, 0, 2, 1, 1, 1, 4, 1, 0, 0, 1, 2, 1, 0, 1, 1, 1, 2, 1, 1,
              2, 2, 0.5, 1, 1, 2, 0, 1, 5, 1, 0, 2, 2, 2, 0, 1, 0, 2, 1, 2, 1,
              0, 1, 0, 0, 2, 2, 0, 2, 0, 0, 1, 1, 1, 0, 1, 0, 0, 1, 0, 0, 0,
              0, 1, 2, 1, 4, 0, 0, 0, 1, 0, 1, 2, 0, 0, 1, 0, 1, 0, 1, 0, 2,
              1, 0, 0, 3, 0, 0, 0, 1, 1, 2, 1, 0, 3, 2.5, 2, 0, 1, 2, 0, 1, 0,
              0, 2, 2, 0, 0, 0, 1, 0, 0, 1, 0, 2, 1, 1, 1, 1, 1, 0, 0, 2, 1,
              0, 1, 1, 1, 2, 2, 1, 1, 1, 4, 2, 0, 2, 0, 1, 0, 1, 1, 2, 0, 1,
              0, 0, 0, 1, 0, 1, 0, 0, 2, 2, 0, 2, 2, 1, 1, 1, 1, 2, 1, 0, 1,
              3, 0, 0, 2, 2, 0, 0, 0, 0, 2, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0,
              0, 1, 2, 0, 1, 0, 0, 1.5, 0, 0, 1, 0, 0, 0, 2, 2, 0, 0, 1, 1, 1,
              1, 0, 2, 1, 0, 0, 1, 0, 2, 1, 1, 0, 1, 1, 1, 2, 1, 0, 0, 1, 2,
              0, 1, 0, 0, 0, 0, 1, 0, 2, 0, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1,
              1, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
              1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 0,
              1, 0, 2, 0, 0, 0, 0, 1
            ],
            "seqs": [
              2, 5, 9, 11, 13, 14, 15, 20, 22, 23, 24, 25, 26, 27, 28, 29, 30,
              31, 33, 34, 38, 39, 40, 42, 43, 46, 50, 52, 53, 54, 56, 57, 58,
              61, 63, 65, 66, 67, 68, 69, 70, 74, 77, 78, 79, 80, 81, 82, 84,
              86, 90, 91, 92, 93, 95, 96, 98, 100, 101, 102, 103, 105, 106,
              107, 108, 110, 111, 113, 114, 115, 116, 117, 118, 121, 123, 124,
              127, 128, 129, 130, 131, 133, 134, 137, 138, 140, 142, 143, 144,
              145, 147, 150, 151, 152, 154, 157, 158, 159, 160, 163, 164, 165,
              169, 171, 172, 174, 175, 177, 181, 182, 184, 185, 186, 187, 188,
              189, 191, 192, 195, 197, 198, 201, 202, 206, 207, 208, 212, 213,
              214, 215, 217, 219, 220, 222, 223, 224, 226, 227, 228, 234, 235,
              236, 237, 238, 239, 240, 242, 243, 244, 245, 250, 254, 256, 257,
              258, 259, 262, 263, 265, 270, 271, 272, 273, 274, 275, 277, 279,
              280, 281, 282, 284, 286, 288, 291, 293, 294, 298, 299, 300, 301,
              303, 305, 306, 309, 312, 313, 315, 316, 318, 320, 321, 323, 325,
              328, 329, 330, 332, 334, 336, 337, 339, 342, 343, 346, 347, 348,
              352, 354, 356, 360, 361, 362, 363, 366, 367, 369, 371, 372, 374,
              376, 377, 378, 380, 383, 388, 393, 396, 397, 399, 401, 403, 404,
              405, 407, 409, 410, 411, 413, 414, 415, 417, 419, 423, 424, 425,
              428, 429, 430, 431, 432, 433, 435, 436, 437, 438, 439, 440, 441,
              442, 443, 446, 447, 448, 449, 451, 453, 454, 455, 456, 458, 459,
              460, 461, 462, 463, 464, 465, 466, 470, 471, 472, 473, 474, 475,
              476, 477, 479, 482, 484, 486, 487, 489, 492, 493, 495, 498, 500,
              501, 505, 506, 508, 511, 512, 514, 516, 517, 519, 521, 524, 526,
              528, 529, 533, 534, 535, 536, 539
            ],
            "peaks": [
              {
                "center": 0,
                "spread": 353,
                "sites": 316.5,
                "log_adj_pvalue": -14.9179
              }
            ]
          }, {
            "db": 0,
            "id": "MA0761.1",
            "alt": "ETV1",
            "len": 10,
            "motif_evalue": "0.0e+000",
            "motif_nsites": 4282,
            "n_tested": 245,
            "score_threshold": 5,
            "url": "http://jaspar.genereg.net?ID=MA0761.1&rm=present&collection=CORE",
            "pwm": [
              [0.615233, 0.0634803, 0.178549, 0.142739], 
              [0.0902508, 0.753783, 0.116243, 0.039722], 
              [0.0715053, 0.915851, 0.00809055, 0.00455383], 
              [5.93867e-06, 5.73784e-06, 0.999982, 5.93867e-06], 
              [5.93867e-06, 5.73784e-06, 0.981038, 0.0189505], 
              [0.977599, 0.00917452, 0.00216269, 0.0110627], 
              [0.682793, 0.0363579, 0.00659858, 0.274251], 
              [0.252383, 0.0800339, 0.65704, 0.0105427], 
              [0.0665124, 0.248456, 0.0722131, 0.612819], 
              [0.366894, 0.147588, 0.298758, 0.186761]
            ],
            "total_sites": 445,
            "sites": [
              1, 1, 4, 1, 2, 2, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 2, 0, 1, 2, 1,
              0, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 3, 1, 0, 1, 2, 1, 0, 1, 0, 1,
              1.5, 0, 1, 1, 1, 0.5, 0, 0, 0, 1, 2, 2, 0.5, 0, 0, 2, 0, 0, 1,
              0, 1, 2, 0, 0, 0, 0, 2, 2, 0, 0, 0, 3, 1, 1, 1, 1, 0, 0, 1, 2,
              1, 1, 0, 2.5, 0, 1, 0, 2, 1, 0, 0, 1, 1, 1, 1, 0, 3, 2, 0, 1, 0,
              1, 0, 0, 3, 2, 0, 1, 1, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 1, 1, 0,
              1, 0, 1, 1, 2, 0, 1, 2, 0, 0, 0, 1, 0, 2, 2, 0, 2, 1, 1, 2, 4,
              0, 1, 2, 1, 1, 3, 2, 0, 2, 0, 2, 1, 1, 1, 1, 1, 0, 4, 1, 1, 1,
              0, 2, 2, 1, 2, 1, 2, 1, 1, 2, 0, 1, 2, 1, 3.33333, 3, 0.333333,
              1, 1, 0, 1, 2, 1, 0, 0, 1, 2, 0, 1, 1, 3, 2, 0, 0, 1, 3, 0, 0,
              2, 1, 1, 2, 0, 1, 1, 2, 0, 1, 0, 2, 0, 2, 6, 1, 0, 1, 0, 1, 0,
              1, 0, 1, 1, 2, 1, 0, 2, 1, 0, 1, 2, 0, 2, 0, 0, 1, 1, 1, 0, 1,
              2, 0, 1, 1, 0, 0, 0, 2, 1, 1, 2, 0, 1, 0, 1, 2, 2.5, 2, 1, 0, 1,
              0, 0, 0, 2, 0, 1.5, 3, 1, 0, 3, 2, 0, 1, 3, 2, 1, 3, 0, 2, 2.5,
              1, 0, 3, 2, 1, 1, 1, 1, 1, 3, 0, 1, 0, 2, 0, 1, 0, 0, 3, 1, 1,
              0, 1, 1, 1, 0, 2, 0, 0, 1, 2, 1, 1, 2, 0, 2, 2, 4, 2, 0, 2, 1,
              0, 1, 1, 1, 3, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 2, 0, 0, 1, 2, 2,
              1, 3, 1, 2, 2, 0, 1, 2, 1, 0, 2, 2, 0, 1, 0, 0, 3.5, 0, 0, 1, 1,
              1, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 2, 0, 0, 1.5, 1, 0, 1, 0, 0, 0,
              0.333333, 2, 0.5, 1, 2, 1, 1, 1, 0, 2, 0, 0, 0, 1, 0, 0, 2, 0,
              0, 1, 0, 1, 1, 1, 0, 0, 4, 2, 0, 1, 0, 0, 0, 0, 2, 0, 3, 1, 0,
              1, 2, 0, 1, 2, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 0, 2, 0, 1, 0, 0,
              0, 1, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 0, 0,
              1, 0, 1, 1, 0, 0, 0, 0, 1, 0, 3, 0, 2, 1, 0, 0, 0, 1
            ],
            "seqs": [
              2, 3, 8, 13, 14, 19, 22, 23, 24, 25, 26, 27, 28, 32, 37, 39, 40,
              42, 45, 46, 48, 53, 54, 56, 57, 58, 61, 63, 66, 67, 68, 70, 71,
              73, 74, 77, 78, 79, 80, 81, 84, 86, 90, 92, 93, 95, 98, 100,
              101, 102, 103, 105, 106, 108, 109, 113, 115, 116, 117, 118, 121,
              123, 124, 128, 129, 130, 131, 133, 137, 142, 144, 146, 148, 150,
              151, 152, 157, 160, 161, 171, 176, 177, 182, 184, 185, 186, 188,
              189, 190, 191, 195, 197, 198, 200, 202, 204, 206, 208, 214, 215,
              217, 220, 222, 223, 224, 227, 228, 230, 231, 239, 240, 242, 243,
              244, 250, 254, 256, 257, 258, 259, 263, 269, 271, 272, 273, 274,
              275, 276, 277, 278, 279, 280, 281, 284, 285, 286, 290, 291, 293,
              295, 298, 299, 300, 302, 303, 306, 312, 314, 315, 316, 318, 319,
              320, 321, 323, 325, 326, 328, 329, 332, 334, 336, 339, 346, 349,
              350, 352, 356, 360, 361, 362, 364, 366, 367, 369, 372, 376, 377,
              378, 380, 381, 382, 386, 390, 396, 397, 401, 406, 407, 409, 410,
              411, 413, 417, 418, 419, 421, 424, 428, 429, 430, 432, 435, 436,
              437, 440, 442, 443, 450, 451, 453, 456, 459, 460, 461, 462, 464,
              465, 466, 471, 472, 474, 475, 476, 482, 483, 484, 486, 487, 488,
              489, 493, 495, 499, 501, 505, 506, 508, 514, 516, 517, 518, 519,
              520, 521, 523, 524, 528, 534, 539
            ],
            "peaks": [
              {
                "center": 0,
                "spread": 219,
                "sites": 248.167,
                "log_adj_pvalue": -7.9198
              }
            ]
          }, {
            "db": 0,
            "id": "MA0762.1",
            "alt": "ETV2",
            "len": 11,
            "motif_evalue": "0.0e+000",
            "motif_nsites": 1402,
            "n_tested": 244,
            "score_threshold": 5,
            "url": "http://jaspar.genereg.net?ID=MA0762.1&rm=present&collection=CORE",
            "pwm": [
              [0.537673, 0.113996, 0.18075, 0.167581], 
              [0.968852, 0.00819994, 0.0188382, 0.00410985], 
              [0.0422371, 0.876992, 0.0807528, 1.81371e-05], 
              [0.0890368, 0.908625, 0.00231936, 1.81371e-05], 
              [1.81371e-05, 1.75237e-05, 0.999946, 1.81371e-05], 
              [1.81371e-05, 1.75237e-05, 0.999946, 1.81371e-05], 
              [0.999947, 1.75237e-05, 1.75237e-05, 1.81371e-05], 
              [0.891521, 0.00077047, 1.75237e-05, 0.107691], 
              [0.713891, 0.0017054, 0.284385, 1.81371e-05], 
              [0.0105564, 0.25761, 0.0386568, 0.693177], 
              [0.471096, 0.102232, 0.279998, 0.146675]
            ],
            "total_sites": 275,
            "sites": [
              2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0,
              0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 1,
              0, 0, 1, 0, 0, 0.5, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1,
              1, 0, 0, 0, 1, 1, 2, 0, 0, 0, 2, 0, 1, 1, 0, 0, 0, 1, 1, 1, 1,
              1.5, 1, 2, 0, 0, 1, 0, 0, 0, 1, 2, 0, 2, 0, 0, 0, 0, 0, 1, 0, 0,
              1, 2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 2, 0, 0, 1, 0,
              1, 2, 1, 0, 2, 0, 0, 0, 0, 0, 0, 1, 1, 0, 2, 1, 1, 1, 3, 0, 0,
              3, 1, 2, 1, 1, 1, 1, 2, 0, 1, 1, 1, 1, 0, 1, 3, 1, 0, 2, 1, 0,
              0, 1, 0, 0, 3, 1, 1, 1, 0, 2, 1, 3, 1, 2, 1, 1, 1, 1, 0, 1, 0,
              0, 0, 0, 1, 0, 0, 2, 1, 1, 0, 0, 2, 1, 0, 1, 0, 2, 1, 2, 0, 2,
              2, 1, 2, 1, 1, 0, 0, 5, 1, 0, 1, 1, 1, 0, 2, 0, 2, 1, 1, 2, 0,
              0, 0, 0, 1, 2, 0, 0, 2, 0, 0, 0, 1, 0, 0, 0, 1, 2, 1, 0, 0, 0,
              0, 2, 1, 0, 2, 0, 1, 1, 0, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 1, 2,
              1, 0, 0, 2, 1, 0, 0, 0, 4, 0, 1, 0, 3, 1, 0, 1, 2, 0, 1, 0, 0,
              1, 2, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 1, 0,
              0, 1, 1, 0, 2, 0, 0, 1, 2, 1, 0, 1, 0, 2, 0, 1, 0, 1, 2, 0, 0,
              1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 2, 2, 0, 0, 1, 1, 1, 0, 2,
              1, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 2, 1, 0, 0,
              1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 2, 0,
              0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0,
              0, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0,
              1, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1,
              0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
              0, 1, 1, 0, 0, 0, 0
            ],
            "seqs": [
              2, 3, 11, 14, 19, 20, 22, 23, 25, 27, 28, 39, 40, 42, 45, 46,
              53, 54, 56, 57, 58, 61, 63, 68, 70, 74, 77, 80, 81, 86, 90, 93,
              95, 101, 102, 106, 108, 112, 113, 115, 116, 117, 121, 124, 130,
              131, 133, 137, 142, 149, 152, 155, 157, 160, 163, 177, 184, 185,
              188, 189, 191, 198, 202, 203, 206, 208, 217, 220, 222, 223, 224,
              227, 231, 235, 239, 240, 242, 243, 250, 254, 257, 258, 259, 263,
              270, 273, 274, 278, 279, 280, 286, 291, 293, 294, 297, 298, 299,
              300, 302, 303, 311, 312, 315, 316, 318, 320, 321, 323, 325, 326,
              328, 329, 332, 334, 339, 342, 344, 347, 352, 354, 356, 360, 361,
              362, 366, 367, 369, 372, 376, 377, 386, 396, 397, 399, 401, 409,
              410, 411, 419, 424, 428, 429, 430, 436, 437, 442, 443, 446, 451,
              457, 459, 461, 462, 465, 466, 472, 474, 475, 476, 477, 482, 484,
              486, 489, 493, 495, 496, 500, 501, 505, 506, 508, 511, 513, 517,
              519, 521, 524, 528, 534, 535, 536
            ],
            "peaks": [
              {
                "center": 0,
                "spread": 236,
                "sites": 182,
                "log_adj_pvalue": -14.9768
              }
            ]
          }, {
            "db": 0,
            "id": "MA0763.1",
            "alt": "ETV3",
            "len": 10,
            "motif_evalue": "0.0e+000",
            "motif_nsites": 255,
            "n_tested": 245,
            "score_threshold": 5,
            "url": "http://jaspar.genereg.net?ID=MA0763.1&rm=present&collection=CORE",
            "pwm": [
              [0.707059, 0.0888775, 0.125047, 0.0790157], 
              [0.0648223, 0.773174, 0.0504366, 0.111567], 
              [0.0380598, 0.906914, 9.63152e-05, 0.0549302], 
              [9.96864e-05, 9.63152e-05, 0.938593, 0.0612107], 
              [9.96864e-05, 9.63152e-05, 0.930467, 0.0693365], 
              [0.946865, 0.0353245, 9.63152e-05, 0.0177138], 
              [0.751553, 9.63152e-05, 9.63152e-05, 0.248254], 
              [0.202111, 0.0488572, 0.748932, 9.96864e-05], 
              [9.96864e-05, 0.126031, 0.0276445, 0.846225], 
              [0.240746, 0.189837, 0.453622, 0.115795]
            ],
            "total_sites": 428,
            "sites": [
              0, 1, 0, 1, 3, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 2, 0, 2, 1, 1,
              1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 2, 0, 0, 0, 2, 1, 0, 0, 1, 0,
              0.5, 0, 1, 1, 1, 0.5, 1, 0, 1, 4, 1, 0, 0.5, 0, 0, 1, 0, 0, 0,
              0, 1, 2, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0.5, 1, 0, 1, 1, 2,
              0, 0, 0, 2.5, 0, 1, 0, 2, 2, 2, 2, 1, 1, 1, 1, 1, 2, 1, 0, 0, 0,
              0, 0, 0, 3, 2, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1,
              1, 0, 0, 1, 2, 0, 0, 2, 0, 0, 0, 1, 1, 2, 2, 1, 3, 2, 1, 0, 3,
              0, 2, 3, 1, 0, 2, 2, 0, 1, 1, 2, 1, 1, 3, 0, 0, 0, 3.5, 1, 0, 1,
              0, 3, 0, 2, 1, 1, 3, 0.5, 2, 2, 0, 2, 1, 1, 2, 2, 1, 0, 1, 1, 2,
              0, 1, 0, 0, 0, 1, 0, 1, 1, 1, 1, 0, 0, 2, 4, 0, 0, 0, 1, 1, 2,
              0, 1, 2, 3, 0.5, 1, 1, 1, 0, 2, 5, 1, 1, 1, 1, 2, 0, 1, 1, 1, 1,
              1, 3, 0, 1, 0, 1, 2, 1, 0, 1, 1, 0, 1, 1, 1, 0, 2, 0, 1, 2, 0.5,
              0, 0, 0, 2, 2, 2, 2, 1, 0, 1, 1, 4, 2.5, 1, 0, 0, 2, 0, 1, 1, 2,
              0, 2, 3, 0, 1, 2, 1, 0, 1, 1, 0, 1, 0, 0, 1, 3.5, 1, 0, 1, 3, 1,
              1, 1, 1, 2, 2, 0, 0, 1, 2, 0, 0, 0, 1, 4, 3, 1, 0, 0, 1, 1, 0,
              2, 0, 0, 1, 2, 2, 2, 2, 2, 2, 1, 3, 3, 0, 3, 0, 0, 1, 1, 1, 1,
              0, 1, 0, 1, 1, 0, 0, 1, 0, 0, 4, 1, 0, 0, 1, 0, 1, 0, 1, 1, 1,
              0, 2, 3, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 2, 0, 0, 0, 2, 1, 0, 1,
              0, 2, 1, 1, 1, 0, 0, 1, 0, 1.5, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 2,
              1, 1, 0, 0, 3, 0.5, 1, 0, 1.5, 1, 1, 1, 0, 0, 1, 0, 1, 1, 1, 0,
              0, 1, 0, 1, 2, 1, 0, 0, 1, 0, 0, 3, 0, 0, 1, 2, 0, 1, 2, 1, 0,
              2, 0, 0, 1, 0, 0, 1, 3, 0, 3, 0, 1, 0, 2, 0, 1, 0, 0, 0, 0, 1,
              0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 4, 1, 1, 0, 1, 1, 1,
              1, 0, 0, 2, 0, 3, 1, 0, 1, 0, 1
            ],
            "seqs": [
              2, 4, 5, 11, 13, 14, 15, 18, 19, 20, 22, 23, 24, 25, 26, 27, 28,
              30, 35, 37, 42, 43, 45, 46, 48, 51, 53, 54, 56, 58, 60, 61, 62,
              63, 64, 67, 68, 70, 71, 72, 74, 78, 79, 81, 86, 90, 93, 95, 101,
              102, 103, 105, 106, 108, 109, 110, 113, 114, 115, 117, 118, 119,
              120, 121, 123, 124, 126, 128, 130, 131, 133, 137, 142, 143, 146,
              150, 152, 153, 157, 158, 160, 167, 171, 174, 176, 177, 180, 182,
              184, 188, 189, 191, 195, 197, 198, 201, 202, 203, 206, 207, 208,
              213, 221, 222, 224, 225, 228, 237, 238, 239, 240, 242, 243, 244,
              250, 254, 256, 257, 259, 263, 269, 271, 273, 274, 277, 279, 280,
              281, 284, 285, 286, 288, 298, 299, 300, 303, 306, 308, 312, 314,
              315, 316, 318, 319, 321, 322, 325, 326, 332, 334, 335, 339, 346,
              347, 348, 349, 350, 352, 355, 356, 360, 361, 362, 365, 366, 367,
              369, 372, 376, 377, 378, 380, 381, 387, 390, 394, 395, 396, 397,
              401, 407, 409, 410, 411, 417, 418, 419, 422, 424, 426, 428, 429,
              430, 432, 435, 436, 437, 439, 442, 443, 447, 450, 451, 458, 459,
              460, 461, 462, 463, 465, 466, 470, 472, 474, 475, 476, 477, 478,
              480, 482, 483, 486, 487, 488, 489, 493, 494, 495, 497, 498, 501,
              505, 506, 508, 510, 514, 517, 518, 519, 521, 522, 524, 526, 532,
              534, 537, 539
            ],
            "peaks": [
              {
                "center": 0,
                "spread": 225,
                "sites": 246,
                "log_adj_pvalue": -8.448
              }
            ]
          }, {
            "db": 0,
            "id": "MA0764.1",
            "alt": "ETV4",
            "len": 10,
            "motif_evalue": "0.0e+000",
            "motif_nsites": 2385,
            "n_tested": 245,
            "score_threshold": 5,
            "url": "http://jaspar.genereg.net?ID=MA0764.1&rm=present&collection=CORE",
            "pwm": [
              [0.567923, 0.0739782, 0.193131, 0.164968], 
              [0.129986, 0.709846, 0.130759, 0.0294094], 
              [0.0917188, 0.899924, 0.00638603, 0.00197258], 
              [1.0662e-05, 0.0048911, 0.995088, 1.0662e-05], 
              [1.0662e-05, 1.03015e-05, 0.99079, 0.00918928], 
              [0.993472, 1.03015e-05, 0.00380014, 0.00271755], 
              [0.671406, 0.0219634, 0.00513309, 0.301498], 
              [0.272508, 0.0759521, 0.630568, 0.0209718], 
              [0.0663379, 0.220876, 0.0949553, 0.61783], 
              [0.405767, 0.14434, 0.263071, 0.186822]
            ],
            "total_sites": 458,
            "sites": [
              1, 1, 4, 1, 2, 2, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 2, 0, 1, 2, 1,
              0, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 2, 1, 0, 1, 1, 1, 0, 1, 0, 0,
              3.5, 0, 2, 1, 1, 0.5, 1, 0, 0, 1, 2, 2, 0.5, 0, 0, 2, 0, 0, 1,
              0, 1, 2, 1, 1, 0, 0, 3, 2, 0, 0, 0, 3, 1, 2, 1, 1, 0, 0, 2, 2,
              1, 1, 0, 1.5, 0, 0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 0, 4, 3, 0, 1, 0,
              1, 0, 0, 3, 2, 0, 1, 2, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 1, 1, 0,
              1, 0, 1, 1, 2, 0, 1, 2, 0, 0, 0, 1, 1, 2, 2, 0, 2, 1, 2, 2, 4,
              0, 0, 2, 1, 1, 3, 1, 0, 2, 0, 2, 1, 1, 1, 1, 0, 1, 4, 1, 2, 1,
              0, 3, 2, 1, 1, 0.5, 2, 1, 1, 2.5, 0, 1, 2, 1, 3, 3, 0, 1, 1, 0,
              1, 2, 1, 0, 0, 1, 2, 0, 1, 1, 3, 2, 1, 0, 1, 4, 0, 0, 1.5, 2, 1,
              2, 0, 1, 2, 2, 0, 2, 0, 2, 0, 2, 6, 1, 0, 1, 0, 1, 0, 1, 0, 1,
              1, 2, 1, 0, 1, 1, 0, 1, 2, 0, 2, 0, 0, 1, 1, 1, 0, 1, 2, 0, 1,
              1, 0, 0, 0, 3, 1, 2, 2, 0, 0, 0, 1, 2, 3, 2, 1, 0, 1, 0, 0, 0,
              2, 0, 1, 3, 1, 2, 3, 2, 0, 1, 3, 1, 1, 3, 0, 2, 2.5, 1, 0, 3, 1,
              2, 1, 1, 2, 2, 3, 0, 1, 0, 2, 0, 1, 0, 0, 3, 1, 0, 0, 1, 1, 2,
              0, 2, 0, 0, 1, 2, 1, 1, 3, 0, 2, 2, 4, 2, 0, 3, 1, 0, 1, 1, 1,
              3, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 2, 0, 0, 1, 2, 1, 1, 2, 1, 2,
              3, 0, 3, 2, 1, 1, 2, 1, 0, 0, 0, 1, 3, 0, 0, 1, 1, 2, 1, 1, 0,
              1, 0, 0, 0, 1, 1, 1, 2, 0, 0, 1.5, 1, 0, 1, 0, 0, 0, 0, 2, 1, 1,
              1, 1, 1, 1, 0, 3, 0, 0, 0, 1, 0, 0, 2, 0, 0, 1, 0, 1, 1, 1, 0,
              0, 1.5, 2, 0, 1, 1, 0, 0, 0, 1, 0, 3, 0, 0, 1, 2, 1, 1, 2, 0, 1,
              0, 0, 0, 1, 0, 1, 0, 1, 0, 2, 0, 1, 0, 0, 1, 1, 0, 0, 3, 1, 0,
              0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 2, 1, 1, 0, 1, 0, 1, 1, 0, 0, 0,
              0, 0, 0, 3, 0, 2, 0, 0, 0, 0, 0
            ],
            "seqs": [
              2, 3, 8, 10, 13, 14, 19, 22, 23, 25, 26, 27, 28, 32, 37, 39, 40,
              42, 45, 46, 48, 53, 54, 56, 57, 58, 61, 63, 66, 67, 68, 70, 71,
              74, 75, 77, 78, 79, 80, 81, 85, 86, 90, 92, 93, 94, 95, 98, 100,
              101, 102, 103, 104, 106, 108, 109, 113, 115, 116, 117, 118, 121,
              123, 124, 128, 129, 130, 131, 133, 136, 137, 142, 143, 144, 146,
              148, 150, 151, 152, 154, 157, 160, 161, 163, 171, 177, 179, 182,
              184, 185, 188, 189, 190, 191, 193, 195, 197, 198, 200, 202, 204,
              206, 207, 208, 214, 215, 217, 220, 222, 223, 224, 227, 228, 230,
              231, 235, 239, 240, 242, 243, 244, 250, 254, 256, 257, 258, 259,
              263, 269, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281,
              284, 285, 286, 290, 291, 292, 293, 294, 295, 298, 299, 300, 302,
              303, 306, 311, 312, 314, 316, 318, 320, 321, 323, 325, 326, 329,
              332, 334, 336, 338, 339, 342, 344, 346, 347, 348, 349, 350, 352,
              356, 360, 361, 362, 364, 366, 367, 369, 372, 376, 377, 378, 380,
              381, 382, 386, 387, 390, 395, 396, 397, 399, 401, 406, 407, 409,
              410, 411, 413, 417, 418, 419, 424, 428, 429, 430, 432, 435, 436,
              437, 440, 442, 443, 446, 448, 450, 451, 454, 456, 459, 460, 461,
              462, 464, 465, 466, 471, 472, 474, 475, 476, 477, 482, 483, 484,
              486, 487, 488, 489, 493, 495, 500, 501, 505, 506, 507, 508, 513,
              516, 517, 518, 519, 520, 521, 523, 524, 525, 528, 534, 539
            ],
            "peaks": [
              {
                "center": 0,
                "spread": 231,
                "sites": 268,
                "log_adj_pvalue": -8.89635
              }
            ]
          }, {
            "db": 0,
            "id": "MA0765.1",
            "alt": "ETV5",
            "len": 10,
            "motif_evalue": "0.0e+000",
            "motif_nsites": 5509,
            "n_tested": 245,
            "score_threshold": 5,
            "url": "http://jaspar.genereg.net?ID=MA0765.1&rm=present&collection=CORE",
            "pwm": [
              [0.496212, 0.0969067, 0.236468, 0.170415], 
              [0.130171, 0.562673, 0.19584, 0.111316], 
              [0.0847061, 0.900508, 0.0124912, 0.00229357], 
              [4.616e-06, 4.45989e-06, 0.996302, 0.00368855], 
              [4.616e-06, 4.45989e-06, 0.98992, 0.0100704], 
              [0.97191, 0.00517037, 0.00449638, 0.0184233], 
              [0.548768, 0.0401947, 0.0199911, 0.391047], 
              [0.205623, 0.103883, 0.661006, 0.0294881], 
              [0.0695354, 0.297229, 0.10411, 0.529126], 
              [0.283633, 0.196719, 0.303281, 0.216367]
            ],
            "total_sites": 476,
            "sites": [
              1, 1, 4, 2, 2, 2, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 2, 0, 1, 2, 1,
              0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 1, 0, 1, 2, 0, 0, 1, 1, 0,
              1.5, 0, 1, 1, 1, 0.5, 1, 0, 0, 1, 1, 1, 0.5, 0, 0, 2, 1, 0, 1,
              0, 1, 2, 0, 0, 0, 0, 3, 1, 0, 0, 0, 3, 1, 1, 1, 1, 0, 0, 1, 2,
              1, 1, 0, 2.5, 0, 0, 0, 1, 0, 0, 0, 1, 1, 3, 1, 0, 4, 3, 0, 1, 0,
              0, 0, 0, 2, 1, 0, 1, 2, 0, 0, 0, 2, 0, 0, 1, 1, 0, 0, 1, 1, 1,
              1, 0, 1, 1, 3, 0, 1, 2, 0, 0, 0, 1, 1, 2, 2, 1, 2, 1, 2, 2, 4,
              0, 1, 0, 1, 1, 5, 2, 0, 3, 0, 2, 2, 1, 1, 1, 1, 1, 3, 1, 1, 2,
              0, 3, 2, 1, 1, 0, 2, 0, 2, 2, 0, 1, 2, 1, 2, 3, 0, 1, 1, 0, 1,
              2, 2, 0, 0, 2, 1, 1, 1, 1, 3, 2, 1, 0, 1, 2, 0, 0, 1, 1, 2, 3,
              0, 1, 2, 2, 1, 1, 0, 2, 0, 2, 7, 1, 0, 2, 2, 2, 0, 2, 2, 2, 1,
              2, 2, 0, 1, 1, 0, 2, 2, 0, 2, 1, 0, 0, 1, 1, 0, 1, 2, 0, 1, 1,
              0, 0, 0, 2, 2, 3, 2, 1, 1, 0, 1, 2, 3, 3, 1, 0, 1, 0, 1, 0, 2,
              0, 1, 3, 1, 3, 3, 2, 0, 0, 3, 2, 2, 1, 1, 2, 2.5, 1, 1, 3, 2, 0,
              1, 1, 2, 1, 3, 1, 1, 0, 2, 0, 0, 0, 0, 4, 1, 0, 0, 1, 2, 2, 0,
              1, 0, 1, 0, 2, 1, 1, 3, 0, 2, 2, 5, 2, 0, 2, 1, 0, 1, 1, 1, 3,
              0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 1, 1, 1, 2, 1, 2, 2,
              0, 2, 2, 0, 0, 2, 1, 0, 0, 0, 1, 3, 0, 0, 1, 1, 2, 0, 2, 0, 2,
              0, 1, 0, 2, 1, 1, 1, 0, 1, 1.5, 1, 0, 1, 0, 0, 0, 2, 1, 1, 1, 2,
              0, 1, 1, 0, 2, 0, 0, 0, 2, 0, 0, 2, 0, 0, 1, 0, 1, 1, 1, 0, 0,
              2, 2, 0, 1, 1, 1, 0, 0, 0, 0, 2, 2, 0, 1, 3, 0, 1, 2, 0, 1, 0,
              0, 0, 1, 0, 1, 0, 2, 1, 2, 0, 0, 0, 0, 0, 1, 1, 0, 2, 1, 0, 0,
              0, 0, 0, 0, 0, 1, 2, 0, 2, 2, 2, 0, 0, 1, 0, 2, 1, 0, 0, 0, 0,
              0, 0, 3, 0, 2, 1, 0, 0, 0, 0
            ],
            "seqs": [
              2, 3, 8, 12, 14, 19, 22, 23, 24, 25, 26, 27, 28, 30, 36, 39, 40,
              42, 45, 46, 48, 53, 54, 56, 57, 58, 61, 63, 66, 67, 68, 70, 71,
              73, 74, 77, 78, 79, 80, 85, 86, 89, 90, 91, 92, 93, 94, 95, 98,
              100, 101, 102, 103, 105, 106, 108, 109, 113, 115, 116, 117, 118,
              121, 123, 124, 128, 129, 130, 131, 133, 136, 137, 142, 144, 146,
              148, 150, 151, 152, 157, 160, 161, 163, 171, 172, 173, 174, 177,
              179, 182, 184, 188, 189, 190, 191, 193, 194, 195, 197, 198, 200,
              202, 206, 208, 214, 215, 217, 218, 220, 222, 223, 224, 227, 228,
              229, 230, 231, 237, 238, 239, 240, 242, 243, 244, 250, 254, 256,
              257, 258, 259, 261, 263, 269, 271, 272, 273, 274, 275, 276, 277,
              278, 279, 280, 281, 284, 285, 286, 289, 290, 291, 292, 293, 295,
              298, 299, 300, 303, 304, 306, 312, 314, 316, 318, 319, 320, 321,
              323, 325, 326, 327, 334, 336, 339, 344, 346, 349, 351, 352, 355,
              356, 360, 361, 362, 364, 366, 367, 368, 369, 372, 374, 376, 377,
              378, 380, 381, 382, 386, 387, 390, 393, 396, 397, 401, 406, 407,
              409, 410, 411, 413, 414, 417, 418, 419, 424, 428, 430, 431, 432,
              435, 436, 437, 440, 442, 443, 447, 448, 450, 451, 453, 455, 456,
              457, 458, 459, 460, 462, 464, 465, 466, 471, 472, 474, 475, 476,
              482, 483, 484, 486, 487, 488, 489, 490, 493, 494, 495, 498, 501,
              505, 506, 507, 508, 514, 516, 517, 518, 519, 520, 521, 523, 524,
              528, 533, 534, 539
            ],
            "peaks": [
              {
                "center": 0,
                "spread": 219,
                "sites": 273.5,
                "log_adj_pvalue": -12.7105
              }
            ]
          }, {
            "db": 0,
            "id": "MA0766.1",
            "alt": "GATA5",
            "len": 8,
            "motif_evalue": "0.0e+000",
            "motif_nsites": 2934,
            "n_tested": 246,
            "score_threshold": 5,
            "url": "http://jaspar.genereg.net?ID=MA0766.1&rm=present&collection=CORE",
            "pwm": [
              [0.446097, 0.192892, 0.0313993, 0.329611], 
              [8.66705e-06, 8.37395e-06, 0.999974, 8.66705e-06], 
              [0.99786, 8.37395e-06, 0.0021233, 8.66705e-06], 
              [8.66705e-06, 8.37395e-06, 8.37395e-06, 0.999975], 
              [0.759236, 0.0589054, 0.00966404, 0.172195], 
              [0.71985, 0.0640892, 0.108641, 0.10742], 
              [0.16999, 0.300125, 0.419239, 0.110645], 
              [0.413306, 0.181011, 0.320048, 0.0856357]
            ],
            "total_sites": 539,
            "sites": [
              1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
              0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0.5, 0, 1, 0,
              1, 0, 0, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 2, 0, 0, 0, 0, 0, 0,
              2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 2, 0, 1, 1,
              0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 1.5, 0, 0,
              0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 1, 0, 0, 1, 2, 1, 1, 1,
              1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 2, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
              2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0.5, 0, 0, 0, 0, 0, 0,
              0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1.5, 1, 1, 3, 0, 1, 0,
              0, 0.5, 1, 1, 1, 3, 0, 3, 2, 0, 1, 2, 1, 0, 0.5, 2, 2, 1, 1, 2,
              2, 0, 2, 1, 0, 3, 1, 3, 4, 2, 3, 2, 4, 1, 3, 6, 6, 3, 5.5, 5, 8,
              5, 5, 5, 4, 8, 8, 4, 4, 4.5, 8, 3.5, 7, 14, 2.5, 9, 10, 7, 4.5,
              5, 4, 3, 4.5, 11, 4, 2, 4, 7.5, 5, 6, 1, 5, 4.5, 7.5, 7, 8, 3,
              6, 10, 6, 5.5, 3, 3, 4, 3, 6, 3.5, 2, 2, 4, 2, 2, 4, 2, 3, 1, 3,
              8, 1, 6, 2, 0, 0, 2, 3, 2, 3, 2, 2, 0, 3, 1, 3, 0, 3, 0, 2, 0,
              1, 1, 0, 1, 0, 2, 2, 0, 2, 0, 2, 0, 1, 0, 1, 1, 0, 0, 0, 1, 0,
              0, 1, 0, 0, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1,
              0, 0, 0, 1, 0, 0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0,
              0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 1, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0,
              0, 0, 0, 0.5, 2, 1, 0, 0, 0, 1.5, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,
              0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1,
              1, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0,
              0, 1, 2.5, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 1,
              0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 1, 0, 0
            ],
            "seqs": [
              0, 4, 6, 7, 8, 9, 12, 13, 14, 17, 19, 20, 21, 23, 25, 27, 30,
              31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 43, 51, 52, 53, 54,
              55, 56, 57, 58, 60, 61, 63, 64, 65, 66, 67, 68, 70, 72, 73, 74,
              75, 76, 77, 81, 83, 84, 85, 86, 87, 88, 89, 90, 91, 93, 94, 96,
              99, 100, 101, 102, 104, 106, 107, 108, 109, 111, 112, 113, 115,
              117, 119, 120, 122, 123, 124, 125, 126, 128, 130, 131, 132, 133,
              135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 148,
              149, 150, 151, 152, 153, 158, 161, 162, 164, 165, 166, 167, 168,
              169, 170, 172, 173, 176, 177, 178, 181, 183, 184, 186, 187, 188,
              189, 190, 191, 193, 194, 196, 198, 199, 200, 201, 202, 203, 206,
              207, 208, 209, 210, 212, 213, 215, 216, 217, 218, 220, 221, 222,
              223, 224, 225, 227, 228, 231, 232, 235, 236, 238, 240, 244, 245,
              246, 247, 248, 250, 251, 252, 253, 254, 256, 257, 258, 259, 260,
              263, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277,
              279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291,
              297, 298, 299, 300, 301, 303, 304, 305, 308, 309, 310, 311, 313,
              316, 318, 319, 320, 322, 323, 325, 326, 329, 331, 332, 333, 334,
              335, 339, 340, 342, 344, 345, 346, 347, 350, 351, 353, 358, 359,
              361, 363, 364, 365, 366, 367, 368, 369, 371, 374, 376, 377, 378,
              379, 380, 382, 383, 384, 385, 386, 387, 388, 391, 392, 393, 394,
              395, 397, 398, 399, 400, 406, 407, 408, 409, 410, 411, 413, 414,
              416, 419, 420, 423, 425, 426, 428, 430, 431, 432, 433, 435, 436,
              438, 440, 441, 442, 443, 444, 447, 448, 450, 451, 452, 453, 455,
              457, 460, 461, 462, 463, 464, 466, 468, 469, 470, 471, 474, 475,
              476, 477, 478, 480, 481, 482, 483, 484, 485, 486, 487, 490, 491,
              492, 493, 495, 497, 498, 499, 500, 501, 502, 503, 506, 507, 510,
              511, 512, 513, 514, 516, 517, 518, 520, 522, 523, 525, 526, 528,
              529, 532, 533, 535, 536, 538, 539, 540
            ],
            "peaks": [
              {
                "center": 0,
                "spread": 85,
                "sites": 367.5,
                "log_adj_pvalue": -339.021
              }
            ]
          }, {
            "db": 0,
            "id": "MA0799.1",
            "alt": "RFX4",
            "len": 16,
            "motif_evalue": "0.0e+000",
            "motif_nsites": 14245,
            "n_tested": 242,
            "score_threshold": 5,
            "url": "http://jaspar.genereg.net?ID=MA0799.1&rm=present&collection=CORE",
            "pwm": [
              [0.18853, 0.356884, 0.247854, 0.206731], 
              [0.122699, 0.000924718, 0.863013, 0.0133637], 
              [0.0284906, 0.0259635, 0.0138706, 0.931675], 
              [0.329751, 0.136431, 0.00610468, 0.527713], 
              [0.308716, 0.0339295, 0.488079, 0.169276], 
              [0.000274783, 0.849859, 0.00164271, 0.148223], 
              [8.27846e-05, 0.715231, 0.0036447, 0.281043], 
              [0.789128, 0.0654243, 0.0715392, 0.0739083], 
              [0.0547994, 0.0377075, 0.0297005, 0.877793], 
              [0.163529, 0.0037787, 0.832635, 5.77848e-05], 
              [0.236091, 0.0295655, 0.728683, 0.00566075], 
              [0.120667, 0.518413, 0.00882666, 0.352093], 
              [0.563664, 0.00803467, 0.112911, 0.31539], 
              [0.965232, 0.0140426, 0.0183036, 0.00242277], 
              [0.00361576, 0.961887, 0.00120672, 0.0332916], 
              [0.161006, 0.278538, 0.411285, 0.149172]
            ],
            "total_sites": 146,
            "sites": [
              0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0,
              0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1,
              1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 0, 0,
              1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 2, 1, 0, 1, 0, 0, 0,
              0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 2, 0, 0, 0, 1, 0, 0,
              0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 2, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0,
              1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 0, 0,
              1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0,
              0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
              2, 0, 2, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 2, 0, 0,
              0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0,
              0, 0, 0, 0, 0, 0, 1, 0, 0, 2, 4, 1, 1, 0, 1, 1, 2, 0, 0, 0, 0,
              0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,
              0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1,
              1, 1, 2, 0, 0, 0, 1, 2, 1, 0, 0, 0, 2, 0, 0, 1, 0, 0, 0, 1, 0,
              0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0,
              0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 2, 0, 0, 1, 0, 0, 0, 1, 0,
              0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
              0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1,
              0, 0, 0, 0, 2, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
              0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0,
              1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0,
              1, 0, 2, 0, 1, 2, 0, 1, 1, 2, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0,
              0, 2
            ],
            "seqs": [0, 7, 75, 187, 209, 274, 317, 320, 361, 369, 415, 419, 428],
            "peaks": [
              {
                "center": 0,
                "spread": 11,
                "sites": 13,
                "log_adj_pvalue": -4.85932
              }
            ]
          }, {
            "db": 0,
            "id": "MA0816.1",
            "alt": "Ascl2",
            "len": 10,
            "motif_evalue": "0.0e+000",
            "motif_nsites": 326,
            "n_tested": 245,
            "score_threshold": 5,
            "url": "http://jaspar.genereg.net?ID=MA0816.1&rm=present&collection=CORE",
            "pwm": [
              [0.673167, 0.102317, 0.178997, 0.045519], 
              [0.374232, 0.119922, 0.502845, 0.00300109], 
              [0.00994296, 0.986615, 7.5345e-05, 0.00336597], 
              [0.952167, 7.5345e-05, 7.5345e-05, 0.0476824], 
              [0.0201868, 0.0661471, 0.86188, 0.0517861], 
              [0.00987898, 0.980167, 0.00660934, 0.00334498], 
              [0.0132319, 7.5345e-05, 7.5345e-05, 0.986617], 
              [7.79822e-05, 0.00337433, 0.989871, 0.00667696], 
              [0.0187643, 0.641624, 0.04679, 0.292823], 
              [0.0939722, 0.278996, 0.0773996, 0.549633]
            ],
            "total_sites": 410,
            "sites": [
              0, 1, 3, 2, 0, 1, 1, 0, 2, 0, 3, 2, 2, 1, 1, 0, 3, 1, 0, 1, 1,
              0, 1, 1, 1, 0, 0, 2, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 0,
              1, 1, 1, 1, 0, 2, 0, 0, 0, 1, 0, 4, 0, 0, 1, 2, 0, 1, 0, 1, 4,
              0, 0, 1, 1, 1, 0, 0, 1, 1, 2, 1, 0, 2, 0, 0, 1, 0, 0, 0, 3, 0,
              0, 3, 0, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 0,
              1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 2, 0, 0, 1, 2, 1, 0,
              0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 2, 2, 0, 0, 2, 0, 0, 1, 0,
              0, 1, 1, 2, 1, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 1, 3, 0, 0, 0, 1,
              5, 1, 0, 0, 3, 0, 0, 0, 0, 1, 1, 0, 1, 3, 0, 0, 0, 1, 0, 1, 2,
              0, 2, 1, 1, 3, 2, 1, 1, 0, 2, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0,
              3, 2, 1, 0, 1, 1, 2, 0, 2, 2, 2, 0, 3, 2, 2, 2, 1, 1, 2, 1, 2,
              1, 2, 0, 0, 3, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 3, 1, 3, 1, 1,
              3, 3, 2, 0, 0, 0, 0, 0, 0, 2, 2, 1, 0, 0, 1, 0, 1, 2, 2, 0, 0,
              0, 0, 2, 1, 0, 1, 2, 1, 2, 0, 2, 1, 1, 2, 1, 2, 1, 2, 1, 0, 2,
              2, 3, 1, 3, 2, 0, 0, 0, 2, 1, 1, 0, 0, 1, 1, 1, 0, 1, 2, 2, 3,
              1, 1, 3, 1, 1, 0, 0, 2, 1, 1, 1, 1, 0.5, 1, 1, 1, 0, 0, 1, 0, 0,
              0, 0, 2, 1, 2, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0.5, 0, 1, 1, 1, 0,
              2, 1, 1, 0, 1, 3, 0, 3, 2, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 1,
              2, 3, 1, 1, 0, 2, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 2, 1, 1,
              1, 0, 2, 1, 0, 1, 1, 1, 1, 1, 2, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0,
              2, 0, 0, 0, 1, 1, 0, 0, 3, 0, 0, 0, 3, 0, 0, 2, 4, 0, 0, 0, 0,
              1, 1, 0, 3, 1, 0, 0, 1, 1, 0, 2, 0, 0, 1, 1, 2, 1, 1, 1, 0, 0,
              0, 0, 0, 2, 0, 1, 0, 0, 0, 2, 0, 0, 1, 0, 1, 0, 2, 0, 0, 2, 0,
              3, 1, 3, 1, 0, 2, 0, 1
            ],
            "seqs": [
              5, 14, 16, 18, 20, 23, 26, 35, 36, 41, 44, 46, 49, 56, 61, 63,
              65, 68, 69, 73, 77, 83, 88, 95, 97, 98, 100, 104, 105, 113, 116,
              117, 119, 123, 125, 128, 130, 133, 135, 136, 143, 144, 146, 148,
              149, 152, 156, 157, 162, 164, 167, 168, 173, 175, 176, 178, 180,
              181, 186, 188, 189, 191, 192, 193, 195, 199, 200, 201, 202, 203,
              208, 219, 225, 231, 232, 238, 239, 242, 245, 247, 248, 251, 254,
              255, 256, 257, 260, 261, 265, 270, 271, 273, 279, 286, 295, 308,
              315, 329, 330, 333, 337, 339, 345, 346, 349, 352, 354, 355, 356,
              357, 358, 366, 368, 372, 375, 376, 378, 388, 389, 393, 396, 397,
              398, 399, 400, 401, 402, 405, 409, 410, 411, 412, 418, 420, 426,
              428, 432, 440, 444, 446, 451, 456, 457, 458, 459, 460, 461, 468,
              471, 475, 476, 478, 485, 486, 492, 499, 502, 503, 505, 507, 516,
              517, 521, 522, 524, 526, 527, 530, 531, 539
            ],
            "peaks": [
              {
                "center": 0,
                "spread": 157,
                "sites": 170,
                "log_adj_pvalue": -4.79853
              }
            ]
          }, {
            "db": 0,
            "id": "MA0830.1",
            "alt": "TCF4",
            "len": 10,
            "motif_evalue": "0.0e+000",
            "motif_nsites": 20764,
            "n_tested": 245,
            "score_threshold": 5,
            "url": "http://jaspar.genereg.net?ID=MA0830.1&rm=present&collection=CORE",
            "pwm": [
              [0.232997, 0.407375, 0.104648, 0.254979], 
              [0.384637, 0.121215, 0.474035, 0.0201131], 
              [0.000296223, 0.999063, 1.18329e-06, 0.000640222], 
              [0.999996, 1.18329e-06, 1.18329e-06, 1.22471e-06], 
              [1.22471e-06, 0.847854, 0.0965237, 0.055621], 
              [0.00269621, 0.978675, 0.0186261, 1.22471e-06], 
              [0.0057222, 1.18329e-06, 1.18329e-06, 0.994275], 
              [0.00132522, 0.000246182, 0.997201, 0.00122722], 
              [0.0183931, 0.360756, 0.310991, 0.30986], 
              [0.26088, 0.236636, 0.237915, 0.264568]
            ],
            "total_sites": 384,
            "sites": [
              0, 1, 1, 4, 1, 1, 0, 0, 1, 0, 4, 2, 0, 0, 0, 2, 3, 1, 1, 1, 1,
              0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 1, 0, 1, 0, 1, 0,
              0, 2, 1, 0, 2, 0, 0, 0, 0, 1, 0, 2, 0, 0, 0, 1, 0, 0, 0, 1, 4,
              0, 0, 0, 0, 1, 0, 0, 1, 1, 2, 1, 0, 1, 0, 1, 2, 0, 0, 0, 1, 1,
              0, 0, 0, 1, 0, 0, 0, 0, 1, 3, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1,
              1, 0, 0, 1, 2, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 2, 0,
              0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 1, 1, 0,
              1, 1, 0, 2, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 2, 0, 1, 0, 0,
              4, 2, 0, 0, 0, 1, 2, 0, 0, 1, 1, 1, 1, 2, 2, 0, 0, 0, 1, 1, 1,
              0, 2, 3, 1, 1, 1, 0, 0, 2, 1, 0, 1, 0, 1, 0, 1, 2, 0, 2, 0.5, 0,
              2, 1, 1, 0, 1, 1, 2, 1, 1, 5, 0, 0, 2, 2, 2, 2, 1, 2, 1, 1, 1,
              0, 0, 0, 2, 2.33333, 1, 0, 0, 0, 0, 0, 1, 2, 1, 1, 1, 2, 1, 1,
              2, 1, 3, 1, 1, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 2, 1, 2, 1, 3, 1,
              2, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 1, 0, 0, 2, 0, 1, 0, 2, 1, 1,
              0, 2, 1, 3, 1, 1, 1, 0, 1, 0, 2, 1.33333, 1, 0, 1, 1, 0, 2, 0,
              1, 3, 0, 2, 2, 2, 4, 0, 1, 1, 0, 4, 0, 1, 1, 1, 0, 2, 1, 0, 0.5,
              0, 1, 0, 0, 0, 1, 2, 2, 3, 0, 0, 0, 1, 1, 1, 1, 2, 0, 1, 0, 0,
              2, 1, 1, 0, 1, 1, 1, 0, 0, 3, 2, 2, 0, 0, 1, 0, 0, 1, 1, 1, 1,
              0, 0, 0, 0, 0, 3.33333, 0, 1, 0, 3, 1, 0, 2, 0, 0, 0, 1, 0, 1,
              0, 0, 0, 3, 0, 0, 1, 0, 1, 2, 2, 1, 2, 0, 1, 0, 1, 1, 1, 1, 1,
              0, 0.5, 1, 0, 1, 0, 3, 0, 0, 1, 1, 2, 0, 0, 1, 0, 0, 1, 2, 2, 0,
              2, 2, 0, 0, 1, 1, 0, 1, 0, 1, 2, 1, 1, 0, 1, 0, 1, 0, 1, 3, 0,
              2, 0, 1, 2, 1, 1, 1, 0, 0, 1, 0.5, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0,
              0, 2, 0, 0, 1, 0, 0, 1, 2, 1, 0, 1, 0, 1
            ],
            "seqs": [
              14, 20, 23, 27, 35, 40, 41, 49, 56, 65, 68, 69, 77, 86, 87, 88,
              90, 95, 98, 109, 113, 116, 117, 122, 123, 125, 130, 131, 133,
              135, 136, 141, 143, 144, 145, 147, 148, 149, 150, 152, 156, 157,
              161, 162, 164, 165, 167, 169, 173, 177, 180, 185, 192, 195, 200,
              202, 203, 212, 219, 225, 229, 232, 238, 239, 242, 243, 246, 248,
              251, 255, 256, 260, 263, 265, 270, 281, 282, 289, 291, 295, 296,
              307, 308, 311, 315, 316, 320, 322, 329, 330, 335, 336, 339, 345,
              346, 352, 354, 355, 357, 359, 366, 368, 376, 388, 389, 391, 392,
              393, 394, 396, 397, 399, 400, 401, 402, 406, 407, 409, 410, 411,
              412, 414, 420, 426, 427, 428, 431, 432, 439, 440, 444, 449, 451,
              452, 457, 458, 459, 465, 468, 475, 476, 477, 478, 483, 485, 486,
              488, 499, 502, 503, 504, 507, 508, 516, 521, 522, 524, 526, 532,
              536
            ],
            "peaks": [
              {
                "center": 0,
                "spread": 155,
                "sites": 159.167,
                "log_adj_pvalue": -4.96068
              }
            ]
          }, {
            "db": 0,
            "id": "MA0833.1",
            "alt": "ATF4",
            "len": 13,
            "motif_evalue": "0.0e+000",
            "motif_nsites": 960,
            "n_tested": 243,
            "score_threshold": 5,
            "url": "http://jaspar.genereg.net?ID=MA0833.1&rm=present&collection=CORE",
            "pwm": [
              [0.235164, 0.0795243, 0.494935, 0.190377], 
              [0.18613, 0.128867, 0.45042, 0.234583], 
              [0.658042, 0.208037, 0.130805, 0.00311616], 
              [2.64868e-05, 2.55911e-05, 0.00710985, 0.992838], 
              [0.0169887, 2.55911e-05, 0.973138, 0.00984646], 
              [0.972543, 2.55911e-05, 2.55911e-05, 0.0274056], 
              [0.00237124, 0.436088, 0.0105755, 0.550965], 
              [0.000928393, 2.55911e-05, 0.995413, 0.00363311], 
              [0.0397443, 0.832114, 0.0159129, 0.112229], 
              [0.973866, 0.0228242, 2.55911e-05, 0.00328315], 
              [0.990994, 0.00337324, 0.00114147, 0.00449002], 
              [2.64868e-05, 0.255277, 0.0595204, 0.685176], 
              [0.47859, 0.314444, 0.116776, 0.0901901]
            ],
            "total_sites": 124,
            "sites": [
              0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0,
              0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 1, 0, 2, 0,
              0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0,
              1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,
              0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 3, 0, 0, 0, 0, 1, 0, 0, 0,
              0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1,
              0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0,
              0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0,
              0, 0, 0, 0, 0, 2, 1, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 2,
              0, 0, 1, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0,
              0, 0, 1, 0, 1, 1, 2, 0, 0, 0, 0, 1, 0, 0, 0, 1, 2, 1, 0, 0, 0,
              0, 1, 1, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0,
              0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0,
              1, 0, 2, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 2, 2, 0, 0,
              0, 2, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1,
              1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0,
              0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2,
              0, 0, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
              0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1,
              0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1,
              0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
              0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0,
              0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0,
              0, 0, 0, 0, 0
            ],
            "seqs": [
              9, 17, 50, 54, 65, 73, 75, 91, 93, 100, 114, 119, 120, 143, 157,
              159, 171, 172, 186, 222, 227, 236, 238, 241, 244, 250, 252, 254,
              255, 265, 268, 275, 280, 281, 282, 287, 292, 309, 327, 346, 350,
              360, 361, 373, 388, 398, 406, 411, 444, 459, 465, 472, 487, 494,
              497, 498, 500, 517, 540
            ],
            "peaks": [
              {
                "center": 0,
                "spread": 144,
                "sites": 59,
                "log_adj_pvalue": -5.49432
              }
            ]
          }, {
            "db": 0,
            "id": "MA0841.1",
            "alt": "NFE2",
            "len": 11,
            "motif_evalue": "0.0e+000",
            "motif_nsites": 19209,
            "n_tested": 244,
            "score_threshold": 5,
            "url": "http://jaspar.genereg.net?ID=MA0841.1&rm=present&collection=CORE",
            "pwm": [
              [0.296798, 0.382772, 0.28161, 0.0388201], 
              [0.934491, 0.000448277, 0.0648119, 0.000249323], 
              [0.000107323, 0.000426277, 1.27908e-06, 0.999465], 
              [1.32385e-06, 1.27908e-06, 0.99989, 0.000107323], 
              [0.9992, 0.000585276, 1.27908e-06, 0.000213323], 
              [0.00196031, 0.760349, 0.236789, 0.000901319], 
              [1.32385e-06, 0.00106227, 0.000160278, 0.998776], 
              [5.43236e-05, 0.999784, 1.27908e-06, 0.000160323], 
              [0.998617, 0.000690275, 0.000425277, 0.000266322], 
              [1.32385e-06, 0.124896, 0.000465277, 0.874637], 
              [0.0258632, 0.523604, 0.269078, 0.181456]
            ],
            "total_sites": 67,
            "sites": [
              0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
              0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0,
              0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
              0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
              0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
              0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0,
              0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
              0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
              0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1,
              0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0,
              0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0,
              0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 2, 1, 0, 0, 0, 0, 0,
              1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0,
              0, 2, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0,
              0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,
              0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0,
              0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0,
              0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
              0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1,
              0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
              0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
              0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 2, 0, 0, 1, 0,
              1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
              0, 0, 0, 0, 0, 0, 0
            ],
            "seqs": [
              7, 40, 58, 69, 82, 116, 133, 135, 182, 219, 233, 236, 237, 243,
              249, 260, 285, 300, 314, 323, 341, 367, 379, 415, 470, 495, 506,
              540
            ],
            "peaks": [
              {
                "center": 0,
                "spread": 88,
                "sites": 28,
                "log_adj_pvalue": -6.74665
              }
            ]
          }, {
            "db": 0,
            "id": "MA0871.1",
            "alt": "TFEC",
            "len": 10,
            "motif_evalue": "0.0e+000",
            "motif_nsites": 97,
            "n_tested": 245,
            "score_threshold": 5,
            "url": "http://jaspar.genereg.net?ID=MA0871.1&rm=present&collection=CORE",
            "pwm": [
              [0.522979, 0.139644, 0.337115, 0.000261895], 
              [0.159334, 0.152962, 0.216591, 0.471114], 
              [0.0135812, 0.985904, 0.000253038, 0.000261895], 
              [0.985913, 0.000253038, 0.000253038, 0.0135812], 
              [0.0106682, 0.770292, 0.0835002, 0.135539], 
              [0.339043, 0.0176261, 0.643068, 0.000261895], 
              [0.0852802, 0.0852714, 0.0427622, 0.786685], 
              [0.000261895, 0.000253038, 0.999223, 0.000261895], 
              [0.691139, 0.140296, 0.140296, 0.02827], 
              [0.000261895, 0.389326, 0.231594, 0.378819]
            ],
            "total_sites": 466,
            "sites": [
              0, 0, 1, 2, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 2, 1, 1, 0, 1, 2,
              1, 2, 2, 0, 1, 0, 0, 0.5, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 2, 1, 0,
              1, 1, 0, 0, 2, 0, 1, 0, 0, 1, 0, 2, 1, 1, 1, 2, 1, 0, 1, 0, 1.5,
              0, 0, 1, 2, 4, 2, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 2, 1, 0, 0, 0,
              2, 1, 0, 0, 0, 0, 1, 2, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 1, 3,
              2, 0, 1, 1, 2, 0, 1, 0, 0, 0, 0, 0, 0, 2, 1, 2, 0, 1, 1, 1, 0,
              0, 2, 0, 1, 0, 1, 1, 1, 1, 0, 0, 1, 0, 1, 1, 2, 0, 1, 0, 0, 2,
              0, 0, 1, 1, 0, 1, 0, 1, 1, 2, 0, 0, 1, 3, 1, 0, 2, 0, 1, 0, 1,
              1, 1, 0, 2, 0, 3, 3, 0, 0, 0, 0, 1, 1, 0, 0, 1, 2, 1, 4, 0, 0,
              1, 3, 1, 1, 3, 1, 1, 3, 1, 1, 0, 0, 2, 0, 0, 0, 1, 2, 0, 0, 0,
              1, 2, 0, 2, 0, 2, 1, 1, 2, 5, 2, 2, 3, 0, 0, 2, 0, 1, 2, 1, 0,
              0, 3, 1, 3, 3, 1, 2, 1, 1, 1, 2, 1, 3, 1, 1, 1, 0, 0, 4, 3, 1,
              1, 4, 1, 1, 3, 1, 0, 3, 0, 1, 0, 2, 2, 0, 2, 2, 1, 0, 1, 0, 3,
              0, 1, 0, 1, 2, 0, 2, 0, 0, 0, 1, 1, 2, 1, 3, 1, 2, 0, 1, 0, 0,
              1, 1, 3, 0, 0, 3, 0, 1, 3, 1, 1.5, 1, 0, 2, 1, 2, 0, 0, 1, 0, 1,
              1, 1, 4, 2, 0.5, 2, 3, 1, 0, 2, 2, 0, 0, 1, 3, 1, 1, 0, 0, 3,
              0.5, 1, 0, 0, 0, 1, 2, 0, 2, 0, 1, 0, 2, 0, 1, 1, 2, 0, 3, 1, 0,
              1, 0, 1, 2, 1, 0, 1, 2, 1, 1, 1, 3, 0, 0, 1, 1, 4, 1, 0, 1, 2,
              0, 1, 0, 0, 2, 1, 0, 1.5, 1, 0, 0, 1, 2, 0, 2, 1, 0, 2, 1, 3, 1,
              1, 0, 1, 0, 0, 1, 0, 1, 1, 2, 2, 1, 1, 0, 1, 1, 4, 1, 1, 1, 1,
              0, 2, 0, 1, 2, 1, 1, 2, 1, 1, 2, 3, 0, 0, 1, 0, 0, 0, 0, 2, 0,
              1, 0, 1, 0, 0, 0, 4, 0, 0, 1, 1, 2, 0, 2, 2, 1, 0, 0, 1, 0, 0,
              0, 1, 0, 2, 0, 0, 1, 1, 1, 0, 2, 2, 1, 0, 1, 2, 3, 1, 1, 1, 1,
              0, 1, 1, 2, 0, 1, 1, 0, 2
            ],
            "seqs": [
              35, 37, 46, 47, 50, 54, 69, 83, 85, 89, 90, 96, 97, 98, 102,
              118, 123, 125, 145, 147, 149, 151, 155, 157, 160, 164, 165, 181,
              189, 195, 201, 203, 208, 209, 210, 212, 233, 238, 244, 252, 254,
              260, 267, 268, 269, 289, 310, 311, 316, 334, 336, 337, 346, 349,
              373, 376, 378, 379, 383, 388, 396, 399, 415, 443, 446, 452, 457,
              462, 473, 476, 479, 484, 485, 497, 503, 507, 512, 514, 520, 534,
              535
            ],
            "peaks": [
              {
                "center": 0,
                "spread": 55,
                "sites": 81,
                "log_adj_pvalue": -4.47143
              }
            ]
          }, {
            "db": 0,
            "id": "MA0884.1",
            "alt": "DUXA",
            "len": 13,
            "motif_evalue": "0.0e+000",
            "motif_nsites": 1157,
            "n_tested": 243,
            "score_threshold": 5,
            "url": "http://jaspar.genereg.net?ID=MA0884.1&rm=present&collection=CORE",
            "pwm": [
              [0.22091, 0.308674, 0.191326, 0.279091], 
              [0.145981, 0.172629, 0.0672474, 0.614142], 
              [0.635273, 0.00487081, 0.348197, 0.01166], 
              [0.978701, 0.00581273, 0.0106383, 0.00484756], 
              [0.10668, 0.309015, 0.0980518, 0.486255], 
              [0.011855, 0.386576, 0.19034, 0.411229], 
              [0.0153846, 0.229794, 0.0775025, 0.677318], 
              [0.8902, 0.049183, 0.0412817, 0.0193353], 
              [0.976817, 0.00676465, 0.0096544, 0.00676539], 
              [2.19774e-05, 0.00100115, 0.00492281, 0.994054], 
              [2.19774e-05, 0.901276, 0.002688, 0.0960137], 
              [0.854202, 0.0244501, 0.0438254, 0.0775213], 
              [0.358965, 0.175548, 0.27909, 0.186397]
            ],
            "total_sites": 313,
            "sites": [
              2, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 1, 0, 2, 0, 0, 2, 1,
              1, 1, 0, 2, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 3, 2,
              0, 3, 1, 0, 1, 0, 0, 2, 0, 2, 2, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0,
              0, 0, 2, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0,
              0, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 0, 0, 2, 1, 1, 3, 0, 1, 0, 2,
              1, 1, 0, 2, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0,
              0, 2, 0, 0, 0, 2, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 1,
              2, 0, 0, 0, 0, 0, 1, 0, 0, 2, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 3,
              1, 1, 0, 0, 3, 2, 0, 0, 2, 0, 1, 2, 1, 1, 0, 0, 0, 0, 1, 2, 0,
              0, 0, 0, 1.5, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0,
              1, 0, 1, 1, 0, 1, 0, 0, 2, 1, 2, 1, 0, 2, 1, 0, 2, 0, 1, 1, 3,
              2, 4, 1, 1, 0.5, 1, 3, 3, 1, 1, 2, 3, 0, 0, 1, 2, 3, 3, 2, 0, 2,
              3, 1, 3, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 2, 1, 1, 2, 0, 0, 0,
              2, 1, 0, 1, 1, 0, 2, 0, 0, 1, 3, 0, 0, 1, 1, 0, 1, 1, 1, 0, 1,
              0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 1, 0, 0, 1, 0, 1, 1, 0, 0,
              1, 0, 2, 2, 0, 1, 0, 2, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0,
              1, 1, 0, 0, 0, 0, 0, 1, 0, 2, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0,
              0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 1, 3,
              0, 1, 0, 0, 0, 1, 0, 1, 1, 2, 0, 0, 2, 0, 2, 2, 0, 0, 1, 0, 0,
              0, 1, 0, 0, 0, 0, 0, 2, 3, 2, 0, 0, 1, 0, 0, 0, 1, 2, 1, 1, 0,
              1, 0, 0, 2, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1, 1, 2, 1, 0, 0, 2, 0,
              0, 0, 2, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 3,
              2, 2, 0, 0, 2, 0, 2, 0, 1, 1, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0,
              0, 0, 1, 0, 0
            ],
            "seqs": [
              2, 7, 8, 17, 23, 27, 43, 57, 59, 62, 65, 73, 74, 83, 85, 86,
              100, 104, 108, 112, 139, 143, 157, 164, 168, 178, 184, 185, 195,
              197, 200, 212, 223, 233, 236, 242, 250, 252, 256, 260, 282, 287,
              288, 289, 291, 292, 327, 332, 345, 347, 352, 363, 374, 391, 405,
              413, 416, 418, 420, 433, 440, 453, 462, 480, 494, 495, 501, 502,
              510, 517, 522, 527, 538
            ],
            "peaks": [
              {
                "center": 0,
                "spread": 52,
                "sites": 72.5,
                "log_adj_pvalue": -16.9725
              }
            ]
          }, {
            "db": 0,
            "id": "MA0891.1",
            "alt": "GSC2",
            "len": 10,
            "motif_evalue": "0.0e+000",
            "motif_nsites": 2263,
            "n_tested": 245,
            "score_threshold": 5,
            "url": "http://jaspar.genereg.net?ID=MA0891.1&rm=present&collection=CORE",
            "pwm": [
              [0.228672, 0.340274, 0.219247, 0.211808], 
              [0.176678, 0.416369, 0.0942997, 0.312652], 
              [0.0544178, 1.08568e-05, 1.08568e-05, 0.94556], 
              [0.85421, 0.0368732, 0.0237388, 0.0851765], 
              [0.933736, 0.00510563, 1.08568e-05, 0.0611475], 
              [1.12368e-05, 0.018629, 0.0658569, 0.915502], 
              [0.096088, 0.759585, 0.0674529, 0.0768728], 
              [0.0595056, 0.659021, 0.137959, 0.143516], 
              [0.101744, 0.33151, 0.346398, 0.220349], 
              [0.25248, 0.403763, 0.0833402, 0.260417]
            ],
            "total_sites": 500,
            "sites": [
              1, 0, 0, 0, 1, 0, 1, 2, 0, 1, 0, 0, 1, 2, 0, 1, 0, 0, 1, 2, 4,
              0, 3, 1, 1, 3, 2, 2, 1, 3, 0, 3, 2, 2, 2, 2, 0, 0, 2, 3, 2, 1,
              1, 1, 1, 3, 2, 1, 1, 1, 0, 0, 0, 1, 2, 0, 0, 1, 0, 1, 2, 2, 1,
              1, 1, 2, 0, 1, 1, 2, 0, 3, 0, 1, 0, 0, 0, 0, 1, 0, 2, 2, 0, 3,
              1, 1, 2, 1, 1, 1, 1, 1, 1, 0, 2, 0, 0, 0, 0, 0, 1, 2, 1, 2, 1,
              3, 1, 0, 2, 0, 1, 1, 0, 1, 0, 1, 2, 0, 3, 2, 0, 0, 2, 2, 0, 0,
              3, 1, 1, 0, 1, 0, 1, 0, 2, 1, 2, 2, 1, 2, 1, 0, 0, 0, 1, 1, 0,
              0, 2, 0, 1, 1, 0, 1, 1, 4, 0, 1, 1, 0, 0, 1, 2, 0, 0, 0, 0, 0,
              1, 2, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 2, 3, 1, 1, 1, 0, 0,
              2, 3, 1, 0, 1, 0, 1, 1, 2, 0, 5, 1, 0, 0, 1, 0, 0, 0, 0, 4, 1,
              3, 3, 0, 0, 1, 2, 1, 1, 1, 3, 3, 0, 2, 0.5, 2, 2, 1, 1, 2, 2, 1,
              1, 1, 1, 0, 2, 0, 1, 2, 5, 3, 0, 0, 1, 1, 1, 2, 1, 2, 1, 2, 2,
              1, 1, 6, 2, 2, 1, 2, 2, 3, 2, 1, 3, 1, 0, 2, 2, 0, 2, 3, 2, 1,
              0, 1, 1, 1, 3, 1, 0, 0, 0, 1, 1, 1, 0, 2, 1, 3, 1.5, 1, 0, 1, 1,
              1, 0, 1, 2, 0, 0, 1, 3, 0, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 2, 0,
              1, 0, 3, 0, 1, 2, 1, 1, 0, 0, 2, 1, 0, 1, 2, 1, 1, 2, 1, 0, 0,
              1, 1, 2, 3, 1, 1, 1, 1, 2, 2, 1, 1, 2, 1, 1, 1, 0, 2, 1, 1, 0,
              1, 2, 3, 0, 2, 0, 1, 1, 1, 1, 1, 1, 3, 0, 0, 1, 0, 1, 2, 0, 1,
              0, 1, 1, 0, 1, 0, 0, 1, 1, 1, 0, 1, 2, 0, 0, 1, 4, 1, 2, 3, 0,
              0, 2, 1, 1, 0, 1, 1, 3, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0,
              0, 1, 1, 0, 1, 1, 1, 0, 3, 1, 1, 1, 2, 0, 2, 2, 1, 0, 0, 2, 1,
              0, 0, 1, 0, 0, 0, 0, 3, 2, 1, 0, 0, 0, 0, 3, 1, 2, 0, 0, 1, 2,
              1, 1, 1, 1, 0, 1, 1, 0, 0, 1, 0, 2, 1, 1, 1, 1, 1, 1, 0, 0, 0,
              2, 0, 1, 0, 1, 1, 2, 1
            ],
            "seqs": [
              0, 6, 10, 13, 15, 23, 32, 34, 35, 49, 66, 67, 75, 86, 94, 98,
              100, 104, 112, 113, 115, 117, 124, 126, 133, 139, 150, 162, 165,
              168, 169, 178, 189, 194, 195, 199, 201, 204, 218, 242, 244, 246,
              251, 259, 261, 263, 267, 268, 277, 299, 301, 304, 318, 320, 325,
              331, 333, 340, 341, 342, 348, 350, 352, 367, 371, 385, 388, 398,
              404, 410, 430, 431, 443, 444, 453, 462, 470, 472, 475, 481, 491,
              505, 507, 511, 525, 529, 536
            ],
            "peaks": [
              {
                "center": 0,
                "spread": 53,
                "sites": 86.5,
                "log_adj_pvalue": -6.21702
              }
            ]
          }
        ]
      };
    </script>
    <script type="text/javascript">
var site_url = "http://alternate.meme-suite.org/";

    </script>
    <script type="text/javascript">

/*
 * $
 *
 * Shorthand function for getElementById
 */
function $(el) {
  return document.getElementById(el);
}


/*
 * See http://stackoverflow.com/a/5450113/66387
 * Does string multiplication like the perl x operator.
 */
function string_mult(pattern, count) {
    if (count < 1) return '';
    var result = '';
    while (count > 1) {
        if (count & 1) result += pattern;
        count >>= 1, pattern += pattern;
    }
    return result + pattern;
}

/*
 * See http://stackoverflow.com/questions/814613/how-to-read-get-data-from-a-url-using-javascript
 * Slightly modified with information from
 * https://developer.mozilla.org/en/DOM/window.location
 */
function parse_params() {
  "use strict";
  var search, queryStart, queryEnd, query, params, nvPairs, i, nv, n, v;
  search = window.location.search;
  queryStart = search.indexOf("?") + 1;
  queryEnd   = search.indexOf("#") + 1 || search.length + 1;
  query      = search.slice(queryStart, queryEnd - 1);

  if (query === search || query === "") return {};

  params  = {};
  nvPairs = query.replace(/\+/g, " ").split("&");

  for (i = 0; i < nvPairs.length; i++) {
    nv = nvPairs[i].split("=");
    n  = decodeURIComponent(nv[0]);
    v  = decodeURIComponent(nv[1]);
    // allow a name to be used multiple times
    // storing each value in the array
    if (!(n in params)) {
      params[n] = [];
    }
    params[n].push(nv.length === 2 ? v : null);
  }
  return params;
}

/*
 * coords
 *
 * Calculates the x and y offset of an element.
 * From http://www.quirksmode.org/js/findpos.html
 * with alterations to take into account scrolling regions
 */
function coords(elem) {
  var myX = myY = 0;
  if (elem.getBoundingClientRect) {
    var rect;
    rect = elem.getBoundingClientRect();
    myX = rect.left + ((typeof window.pageXOffset !== "undefined") ?
        window.pageXOffset : document.body.scrollLeft);
    myY = rect.top + ((typeof window.pageYOffset !== "undefined") ?
        window.pageYOffset : document.body.scrollTop);
  } else {
    // this fall back doesn't properly handle absolutely positioned elements
    // inside a scrollable box
    var node;
    if (elem.offsetParent) {
      // subtract all scrolling
      node = elem;
      do {
        myX -= node.scrollLeft ? node.scrollLeft : 0;
        myY -= node.scrollTop ? node.scrollTop : 0;
      } while (node = node.parentNode);
      // this will include the page scrolling (which is unwanted) so add it back on
      myX += (typeof window.pageXOffset !== "undefined") ? window.pageXOffset : document.body.scrollLeft;
      myY += (typeof window.pageYOffset !== "undefined") ? window.pageYOffset : document.body.scrollTop;
      // sum up offsets
      node = elem;
      do {
        myX += node.offsetLeft;
        myY += node.offsetTop;
      } while (node = node.offsetParent);
    }
  }
  return [myX, myY];
}

/*
 * position_popup
 *
 * Positions a popup relative to an anchor element.
 *
 * The avaliable positions are:
 * 0 - Centered below the anchor.
 */
function position_popup(anchor, popup, position) {
  "use strict";
  var a_x, a_y, a_w, a_h, p_x, p_y, p_w, p_h;
  var a_xy, spacer, margin, scrollbar, page_w;
  // define constants
  spacer = 5;
  margin = 15;
  scrollbar = 15;
  // define the positions and widths
  a_xy = coords(anchor);
  a_x = a_xy[0];
  a_y = a_xy[1];
  a_w = anchor.offsetWidth;
  a_h = anchor.offsetHeight;
  p_w = popup.offsetWidth;
  p_h = popup.offsetHeight;
  page_w = null;
  if (window.innerWidth) {
    page_w = window.innerWidth;
  } else if (document.body) {
    page_w = document.body.clientWidth;
  }
  // check the position type is defined
  if (typeof position !== "number") {
    position = 0;
  }
  // calculate the popup position
  switch (position) {
    case 1:
      p_x = a_x + a_w + spacer;
      p_y = a_y + (a_h / 2) - (p_h / 2);
      break;
    case 0:
    default:
      p_x = a_x + (a_w / 2) - (p_w / 2);
      p_y = a_y + a_h + spacer;
      break;
  }
  // constrain the popup position
  if (p_x < margin) {
    p_x = margin;
  } else if (page_w != null && (p_x + p_w) > (page_w - margin - scrollbar)) {
    p_x = page_w - margin - scrollbar - p_w;
  }
  if (p_y < margin) {
    p_y = margin;
  }
  // position the popup
  popup.style.left = p_x + "px";
  popup.style.top = p_y + "px";
}

function lookup_help_popup(popup_id) {
  var _body, pop, info;
  pop = document.getElementById(popup_id);
  if (pop == null) {
    _body = document.getElementsByTagName("body")[0];
    pop = document.createElement("div");
    pop.className = "pop_content";
    pop.id = popup_id;
    pop.style.backgroundColor = "#FFC";
    pop.style.borderColor = "black";
    info = document.createElement("p");
    info.style.fontWeight = "bold";
    info.appendChild(document.createTextNode("Error: No popup for topic \"" + popup_id + "\"."));
    pop.appendChild(info);
    // this might cause problems with the menu, but as this only happens
    // when something is already wrong I don't think that's too much of a problem
    _body.insertBefore(pop, _body.firstChild);
  }
  if (document.getElementsByTagName('body')[0].hasAttribute("data-autobtns")) {
    if (!/\bauto_buttons\b/.test(pop.className)) {
      pop.className += " auto_buttons";
      var back_btn_sec = document.createElement("div");
      back_btn_sec.className = "nested_only pop_back_sec";
      var back_btn = document.createElement("span");
      back_btn.className = "pop_back";
      back_btn.appendChild(document.createTextNode("<< back"));
      back_btn.addEventListener("click", function(e) {
        help_return();
      }, false);
      back_btn_sec.appendChild(back_btn);
      pop.insertBefore(back_btn_sec, pop.firstChild);
      var close_btn_sec = document.createElement("div");
      close_btn_sec.className = "pop_close_sec";
      var close_btn = document.createElement("span");
      close_btn.className = "pop_close";
      close_btn.appendChild(document.createTextNode("close"));
      close_btn.addEventListener("click", function(e) {
        help_popup();
      }, false);
      close_btn_sec.appendChild(close_btn);
      pop.appendChild(close_btn_sec);
    }
  }
  return pop;
}

/*
 * help_popup
 *
 * Moves around help pop-ups so they appear
 * below an activator.
 */
function help_popup(activator, popup_id) {
  "use strict";
  var pop;
  // set default values
  if (typeof help_popup.popup === "undefined") {
    help_popup.popup = [];
  }
  if (typeof help_popup.activator === "undefined") {
    help_popup.activator = null;
  }
  var last_pop = (help_popup.popup.length > 0 ? help_popup.popup[help_popup.popup.length - 1] : null);
  if (typeof(activator) == "undefined") { // no activator so hide
    if (last_pop != null) {
      last_pop.style.display = 'none';
      help_popup.popup = [];
    }
    return;
  }
  pop = lookup_help_popup(popup_id);
  if (pop == last_pop) {
    if (activator == help_popup.activator) {
      //hide popup (as we've already shown it for the current help button)
      last_pop.style.display = 'none';
      help_popup.popup = [];
      return; // toggling complete!
    }
  } else if (last_pop != null) {
    //activating different popup so hide current one
    last_pop.style.display = 'none';
  }
  help_popup.popup = [pop];
  help_popup.activator = activator;
  toggle_class(pop, "nested", false);
  //must make the popup visible to measure it or it has zero width
  pop.style.display = 'block';
  position_popup(activator, pop);
}

/*
 * help_refine
 * 
 * Intended for links within a help popup. Stores a stack of state so
 * you can go back.
 */
function help_refine(popup_id) {
  if (help_popup.popup == null || help_popup.popup.length == 0 || help_popup.activator == null) {
    throw new Error("Can not refine a help popup when one is not shown!");
  }
  var pop = lookup_help_popup(popup_id);
  var last_pop = help_popup.popup[help_popup.popup.length - 1];
  if (pop == last_pop) return; // slightly odd, but no real cause for alarm
  help_popup.popup.push(pop);
  toggle_class(pop, "nested", true);
  last_pop.style.display = "none";
  //must make the popup visible to measure it or it has zero width
  pop.style.display = "block";
  position_popup(help_popup.activator, pop);
}

/*
 * help_return
 * 
 * Intended for links within a help popup. Stores a stack of state so
 * you can go back.
 */
function help_return() {
  if (help_popup.popup == null || help_popup.popup.length == 0 || help_popup.activator == null) {
    throw new Error("Can not return to a earlier help popup when one is not shown!");
  }
  var last_pop = help_popup.popup.pop();
  last_pop.style.display = "none";
  var pop = (help_popup.popup.length > 0 ? help_popup.popup[help_popup.popup.length - 1] : null);
  if (pop != null) {
    toggle_class(pop, "nested", help_popup.popup.length > 1);
    pop.style.display = "block";
    position_popup(help_popup.activator, pop);
  } else {
    help_popup.activator = null;
  }
}

/*
 * update_scroll_pad
 *
 * Creates padding at the bottom of the page to allow
 * scrolling of anything into view.
 */
function update_scroll_pad() {
  var page, pad;
  page = (document.compatMode === "CSS1Compat") ? document.documentElement : document.body;
  pad = $("scrollpad");
  if (pad === null) {
    pad = document.createElement("div");
    pad.id = 'scrollpad';
    document.getElementsByTagName('body')[0].appendChild(pad);
  }
  pad.style.height = Math.abs(page.clientHeight - 100) + "px";
}

function substitute_classes(node, remove, add) {
  "use strict";
  var list, all, i, cls, classes;
  list = node.className.split(/\s+/);
  all = {};
  for (i = 0; i < list.length; i++) {
    if (list[i].length > 0) all[list[i]] = true;
  }
  for (i = 0; i < remove.length; i++) {
    if (all.hasOwnProperty(remove[i])) {
      delete all[remove[i]];
    }
  }
  for (i = 0; i < add.length; i++) {
    all[add[i]] = true;
  }
  classes = "";
  for (cls in all) {
    classes += cls + " ";
  }
  node.className = classes;
}

/*
 * toggle_class
 *
 * Adds or removes a class from the node. If the parameter 'enabled' is not 
 * passed then the existence of the class will be toggled, otherwise it will be
 * included if enabled is true.
 */
function toggle_class(node, cls, enabled) {
  var classes = node.className;
  var list = classes.replace(/^\s+/, '').replace(/\s+$/, '').split(/\s+/);
  var found = false;
  for (var i = 0; i < list.length; i++) {
    if (list[i] == cls) {
      list.splice(i, 1);
      i--;
      found = true;
    }
  }
  if (typeof enabled == "undefined") {
    if (!found) list.push(cls);
  } else {
    if (enabled) list.push(cls);
  }
  node.className = list.join(" ");
}

/*
 * find_child
 *
 * Searches child nodes in depth first order and returns the first it finds
 * with the className specified.
 * TODO replace with querySelector
 */
function find_child(node, className) {
  var pattern;
  if (node == null || typeof node !== "object") {
    return null;
  }
  if (typeof className === "string") {
    pattern = new RegExp("\\b" + className + "\\b");
  } else {
    pattern = className;
  }
  if (node.nodeType == Node.ELEMENT_NODE && 
      pattern.test(node.className)) {
    return node;
  } else {
    var result = null;
    for (var i = 0; i < node.childNodes.length; i++) {
      result = find_child(node.childNodes[i], pattern);
      if (result != null) break;
    }
    return result;
  }
}

/*
 * find_parent
 *
 * Searches parent nodes outwards from the node and returns the first it finds
 * with the className specified.
 */
function find_parent(node, className) {
  var pattern;
  pattern = new RegExp("\\b" + className + "\\b");
  do {
    if (node.nodeType == Node.ELEMENT_NODE && 
        pattern.test(node.className)) {
      return node;
    }
  } while (node = node.parentNode);
  return null;
}

/*
 * find_parent_tag
 *
 * Searches parent nodes outwards from the node and returns the first it finds
 * with the tag name specified. HTML tags should be specified in upper case.
 */
function find_parent_tag(node, tag_name) {
  do {
    if (node.nodeType == Node.ELEMENT_NODE && node.tagName == tag_name) {
      return node;
    }
  } while (node = node.parentNode);
  return null;
}

/*
 * __toggle_help
 *
 * Uses the 'topic' property of the this object to
 * toggle display of a help topic.
 *
 * This function is not intended to be called directly.
 */
function __toggle_help(e) {
  if (!e) e = window.event;
  if (e.type === "keydown") {
    if (e.keyCode !== 13 && e.keyCode !== 32) {
      return;
    }
    // stop a submit or something like that
    e.preventDefault();
  }

  help_popup(this, this.getAttribute("data-topic"));
}

function setup_help_button(button) {
  "use strict";
  var topic;
  if (button.hasAttribute("data-topic")) {
    topic = button.getAttribute("data-topic");
    if (document.getElementById(topic) != null) {
      button.tabIndex = "0"; // make keyboard selectable
      button.addEventListener("click", function() {
        help_popup(button, topic);
      }, false);
      button.addEventListener("keydown", function(e) {
        // toggle only on Enter or Spacebar, let other keys do their thing
        if (e.keyCode !== 13 && e.keyCode !== 32) return;
        // stop a submit or something like that
        e.preventDefault();
        help_popup(button, topic);
      }, false);
    } else {
      button.style.visibility = "hidden";
    }
  }
  button.className += " active";
}

/*
 * help_button
 *
 * Makes a help button for the passed topic.
 */
function help_button(topic) {
  var btn = document.createElement("div");
  btn.className = "help";
  btn.setAttribute("data-topic", topic);
  setup_help_button(btn);
  return btn;
}

/*
 * prepare_download
 *
 * Sets the attributes of a link to setup a file download using the given content.
 * If no link is provided then create one and click it.
 */
function prepare_download(content, mimetype, filename, link) {
  "use strict";
  // if no link is provided then create one and click it
  var click_link = false;
  if (!link) {
    link = document.createElement("a");
    click_link = true;
  }
  try {
    // Use a BLOB to convert the text into a data URL.
    // We could do this manually with a base 64 conversion.
    // This will only be supported on modern browsers,
    // hence the try block.
    var blob = new Blob([content], {type: mimetype});
    var reader = new FileReader();
    reader.onloadend = function() {
      // If we're lucky the browser will also support the download
      // attribute which will let us suggest a file name to save the link.
      // Otherwise it is likely that the filename will be unintelligible. 
      link.setAttribute("download", filename);
      link.href = reader.result;
      if (click_link) {
        // must add the link to click it
        document.body.appendChild(link);
        link.click();
        document.body.removeChild(link);
      }
    }
    reader.readAsDataURL(blob);
  } catch (error) {
    if (console && console.log) console.log(error);
    // probably an old browser
    link.href = "";
    link.visible = false;
  }
}

/*
 * add_cell
 *
 * Add a cell to the table row.
 */
function add_cell(row, node, cls, click_action) {
  var cell = row.insertCell(row.cells.length);
  if (node) cell.appendChild(node);
  if (cls && cls !== "") cell.className = cls;
  if (click_action) cell.addEventListener("click", click_action, false);
}

/*
 * add_header_cell
 *
 * Add a header cell to the table row.
 */
function add_header_cell(row, node, help_topic, cls, colspan) {
  var th = document.createElement("th");
  if (node) th.appendChild(node);
  if (help_topic && help_topic !== "") th.appendChild(help_button(help_topic));
  if (cls && cls !== "") th.className = cls;
  if (typeof colspan == "number" && colspan > 1) th.colSpan = colspan;
  row.appendChild(th);
}

/*
 * add_text_cell
 *
 * Add a text cell to the table row.
 */
function add_text_cell(row, text, cls, action) {
  var node = null;
  if (typeof(text) != 'undefined') node = document.createTextNode(text);
  add_cell(row, node, cls, action);
}

/*
 * add_text_header_cell
 *
 * Add a text header cell to the table row.
 */
function add_text_header_cell(row, text, help_topic, cls, action, colspan) {
  var node = null;
  if (typeof(text) != 'undefined') {
    var nbsp = (help_topic ? "\u00A0" : "");
    var str = "" + text;
    var parts = str.split(/\n/);
    if (parts.length === 1) {
      if (action) {
        node = document.createElement("span");
        node.appendChild(document.createTextNode(str + nbsp));
      } else {
        node = document.createTextNode(str + nbsp);
      }
    } else {
      node = document.createElement("span");
      for (var i = 0; i < parts.length; i++) {
        if (i !== 0) {
          node.appendChild(document.createElement("br"));
        }
        node.appendChild(document.createTextNode(parts[i]));
      }
    }
    if (action) {
      node.addEventListener("click", action, false);
      node.style.cursor = "pointer";
    }
  }
  add_header_cell(row, node, help_topic, cls, colspan);
}

function setup_help() {
  "use strict";
  var help_buttons, i;
  help_buttons = document.querySelectorAll(".help:not(.active)");
  for (i = 0; i < help_buttons.length; i++) {
    setup_help_button(help_buttons[i]);
  }
}

function setup_scrollpad() {
  "use strict";
  if (document.getElementsByTagName('body')[0].hasAttribute("data-scrollpad") && document.getElementById("scrollpad") == null) {
    window.addEventListener("resize", update_scroll_pad, false);
    update_scroll_pad();
  }
}

// anon function to avoid polluting global scope
(function() {
  "use strict";
  window.addEventListener("load", function load(evt) {
    window.removeEventListener("load", load, false);
    setup_help();
    setup_scrollpad();
  }, false);
})();

/*
 *  make_link
 *
 *  Creates a text node and if a URL is specified it surrounds it with a link.
 *  If the URL doesn't begin with "http://" it automatically adds it, as
 *  relative links don't make much sense in this context.
 */
function make_link(text, url) {
  var textNode = null;
  var link = null;
  if (typeof text !== "undefined" && text !== null) textNode = document.createTextNode(text);
  if (typeof url === "string") {
    if (url.indexOf("//") == -1) {
      url = "http://" + url;
    }
    link = document.createElement('a');
    link.href = url;
    if (textNode) link.appendChild(textNode);
    return link;
  }
  return textNode;
}

    </script>
    <script type="text/javascript">
function rad2deg(rad) {
  return rad * 180 / Math.PI;
}

function parse_line_join(line_join) {
  line_join = line_join.toLowerCase();
  if (line_join == "bevel") {
    return 2;
  } else if (line_join == "round") {
    return 1;
  } else { // miter
    return 0;
  }
}

function parse_line_cap(line_cap) {
  line_cap = line_cap.toLowerCase();
  if (line_cap == "square") {
    return 2;
  } else if (line_cap == "round") {
    return 1;
  } else { // butt 
    return 0;
  }
}

function parse_text_align(text_align) {
  text_align = text_align.toLowerCase();
  if (text_align == "center") {
    return "center";
  } else if (text_align == "end" || text_align == "right") {
    return "right"; 
  } else { // start or left
    return "left";
  }
}

function parse_text_baseline(text_baseline) {
  text_baseline = text_baseline.toLowerCase();
  if (text_baseline == "top" || text_baseline == "hanging") {
    return "top";
  } else if (text_baseline == "middle") {
    return "middle";
  } else if (text_baseline == "bottom") {
    return "bottom";
  } else { // alphabetic or ideographic
    return "alphabetic";
  }
}

function parse_colour(colour) {
  var hex6_re = /^#([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])$/;
  var hex3_re = /^#([0-9a-f])([0-9a-f])([0-9a-f])$/;
  var rgb_re = /^\s*rgb\s*\(\s*(\d{1,3})(%?)\s*,\s*(\d{1,3})(%?)\s*,\s*(\d{1,3})(%?)\s*\)\s*$/;
  var rgba_re = /^\s*rgba\s*\(\s*(\d{1,3})(%?)\s*,\s*(\d{1,3})(%?)\s*,\s*(\d{1,3})(%?)\s*,\s*(\d{1,3})(%?)\s*\)\s*$/;
  if (colour == null || colour == "") {
    return {'red': 0, 'green': 0, 'blue': 0, 'alpha': 255};
  }
  colour = colour.replace(/^\s\s*/, '').replace(/\s\s*$/, ''); //trim
  colour = colour.toLowerCase();
  if (colour == "maroon") {// #800000
    return {'red': 128, 'green': 0, 'blue': 0, 'alpha': 255};
  } else if (colour == "red") { // #FF0000
    return {'red': 255, 'green': 0, 'blue': 0, 'alpha': 255};
  } else if (colour == "orange") { // FFA500
    return {'red': 255, 'green': 165, 'blue': 0, 'alpha': 255};
  } else if (colour == "yellow") { // #FFFF00
    return {'red': 255, 'green': 255, 'blue': 0, 'alpha': 255};
  } else if (colour == "olive") { // #808000
    return {'red': 128, 'green': 128, 'blue': 0, 'alpha': 255};
  } else if (colour == "purple") { // #800080
    return {'red': 128, 'green': 0, 'blue': 128, 'alpha': 255};
  } else if (colour == "fuchsia" || colour == "magenta") { // #FF00FF
    return {'red': 255, 'green': 0, 'blue': 255, 'alpha': 255};
  } else if (colour == "white") { // #FFFFFF
    return {'red': 255, 'green': 255, 'blue': 255, 'alpha': 255};
  } else if (colour == "lime") { // #00FF00
    return {'red': 0, 'green': 255, 'blue': 0, 'alpha': 255};
  } else if (colour == "green") { // #008000
    return {'red': 0, 'green': 128, 'blue': 0, 'alpha': 255};
  } else if (colour == "navy") { // #000080
    return {'red': 0, 'green': 0, 'blue': 128, 'alpha': 255};
  } else if (colour == "blue") { // #0000FF
    return {'red': 0, 'green': 0, 'blue': 255, 'alpha': 255};
  } else if (colour == "aqua" || colour == "cyan") { // #00FFFF
    return {'red': 0, 'green': 255, 'blue': 255, 'alpha': 255};
  } else if (colour == "teal") { // #008080
    return {'red': 0, 'green': 128, 'blue': 128, 'alpha': 255};
  } else if (colour == "black") { // #000000
    return {'red': 0, 'green': 0, 'blue': 0, 'alpha': 255};
  } else if (colour == "silver") { // #C0C0C0
    return {'red': 192, 'green': 192, 'blue': 192, 'alpha': 255};
  } else if (colour == "gray") { // #808080
    return {'red': 128, 'green': 128, 'blue': 128, 'alpha': 255};
  }
  var matches;
  matches = hex6_re.exec(colour);
  if (matches) {
    var red = parseInt(matches[1], 16);
    var green = parseInt(matches[2], 16);
    var blue = parseInt(matches[3], 16);
    return {'red': red, 'green': green, 'blue': blue, 'alpha': 255};
  }
  matches = hex3_re.exec(colour);
  if (matches) {
    var red = parseInt(matches[1] + matches[1], 16);
    var green = parseInt(matches[2] + matches[2], 16);
    var blue = parseInt(matches[3] + matches[3], 16);
    return {'red': red, 'green': green, 'blue': blue, 'alpha': 255};
  }
  matches = rgb_re.exec(colour);
  if (matches) {
    var red = parseInt(matches[1]);
    if (matches[2] == "%") red = Math.round((red * 255) / 100);
    var green = parseInt(matches[3]);
    if (matches[4] == "%") green = Math.round((green * 255) / 100);
    var blue = parseInt(matches[5]);
    if (matches[6] == "%") blue = Math.round((blue * 255) / 100);
    return {'red': red, 'green': green, 'blue': blue, 'alpha': 255};
  }
  matches = rgba_re.exec(colour);
  if (matches) {
    var red = parseInt(matches[1]);
    if (matches[2] == "%") red = Math.round((red * 255) / 100);
    var green = parseInt(matches[3]);
    if (matches[4] == "%") green = Math.round((green * 255) / 100);
    var blue = parseInt(matches[5]);
    if (matches[6] == "%") blue = Math.round((blue * 255) / 100);
    var alpha = parseInt(matches[7]);
    if (matches[8] == "%") alpha = Math.round((alpha * 255) / 100);
    return {'red': red, 'green': green, 'blue': blue, 'alpha': alpha};
  }
  // default to black
  throw new Error("Failed to parse colour: " + colour);
}

function colour_equals(colour1, colour2) {
  if (colour1.red != colour2.red) return false;
  if (colour1.green != colour2.green) return false;
  if (colour1.blue != colour2.blue) return false;
  if (colour1.alpha != colour2.alpha) return false;
  return true;
}

// splits a font string into words
function split_words(str) {
  var words = [];
  var start = -1;
  var space = /\s/;
  var single_quote = false;
  var double_quote = false;
  // read words
  for (var i = 0; i < str.length; i++) {
    if (start == -1) {
      if (!space.test(str.charAt(i))) {
        switch (str.charAt(i)) {
          case "'":
            single_quote = true;
            start = i + 1;
            break;
          case '"':
            double_quote = true;
            start = i + 1;
            break;
          default:
            start = i;
        }
      }
    } else {
      if (!single_quote && !double_quote) {
        if (space.test(str.charAt(i))) {
          var len = i - start;
          if (len > 0) words.push(str.substr(start, len));
          start = -1;
        } else if (str.charAt(i) == "'" || str.charAt(i) == '"') {
          throw new Error("Quote in the middle of an unquoted word!");
        }
      } else if (single_quote) {
        if (str.charAt(i) == "'") {
          var len = i - start;
          if (len > 0) words.push(str.substr(start, len));
          start = -1;
          single_quote = false;
        }
      } else if (double_quote) {
        if (str.charAt(i) == '"') {
          var len = i - start;
          if (len > 0) words.push(str.substr(start, len));
          start = -1;
          double_quote = false;
        }
      }
    }
  }
  if (start != -1) {
    if (single_quote || double_quote) throw new Error("Unterminated quoted region");
    words.push(str.substr(start));
  }
  return words;
}

function add_intercepts(ctx2d, eps_callback) {
  ctx2d.eps_callback = eps_callback;
  ctx2d.save = function() {
    this.eps_callback.save();
    Object.getPrototypeOf(this).save.call(this);
  };
  ctx2d.restore = function() {
    this.eps_callback.restore();
    Object.getPrototypeOf(this).restore.call(this);
  };
  ctx2d.beginPath = function() {
    this.eps_callback.beginPath();
    Object.getPrototypeOf(this).beginPath.call(this);
  };
  ctx2d.closePath = function() {
    this.eps_callback.closePath();
    Object.getPrototypeOf(this).closePath.call(this);
  };
  ctx2d.moveTo = function(x, y) {
    this.eps_callback.moveTo(x, y);
    Object.getPrototypeOf(this).moveTo.call(this, x, y);
  };
  ctx2d.lineTo = function(x, y) {
    this.eps_callback.lineTo(x, y);
    Object.getPrototypeOf(this).lineTo.call(this, x, y);
  };
  ctx2d.rect = function(x, y, w, h) {
    this.eps_callback.rect(x, y, w, h);
    Object.getPrototypeOf(this).rect.call(this, x, y, w, h);
  };
  ctx2d.arc = function(x, y, radius, startAngle, endAngle, anticlockwise) {
    this.eps_callback.arc(x, y, radius, startAngle, endAngle, anticlockwise);
    Object.getPrototypeOf(this).arc.call(this, x, y, radius, startAngle, endAngle, anticlockwise);
  };
  ctx2d.arcTo = function(cpx1, cpy1, cpx2, cpy2, radius) {
    this.eps_callback.arcTo(cpx1, cpy1, cpx2, cpy2, radius);
    Object.getPrototypeOf(this).arcTo.call(this, cpx1, cpy1, cpx2, cpy2, radius);
  };
  ctx2d.quadraticArcTo = function(cpx, cpy, x, y) {
    this.eps_callback.quadraticArcTo(cpx, cpy, x, y);
    Object.getPrototypeOf(this).quadraticArcTo.call(this, cpx, cpy, x, y);
  };
  ctx2d.bezierCurveTo = function(cp1x, cp1y, cp2x, cp2y, x, y) {
    this.eps_callback.bezierCurveTo(cp1x, cp1y, cp2x, cp2y, x, y);
    Object.getPrototypeOf(this).bezierCurveTo.call(this, cp1x, cp1y, cp2x, cp2y, x, y);
  };
  ctx2d.stroke = function() {
    this.eps_callback.stroke();
    Object.getPrototypeOf(this).stroke.call(this);
  };
  ctx2d.fill = function() {
    this.eps_callback.fill();
    Object.getPrototypeOf(this).fill.call(this);
  };
  ctx2d.clip = function() {
    this.eps_callback.clip();
    Object.getPrototypeOf(this).clip.call(this);
  };
  ctx2d.fillRect = function(x, y, width, height) {
    this.eps_callback.fillRect(x, y, width, height);
    Object.getPrototypeOf(this).fillRect.call(this, x, y, width, height);
  };
  ctx2d.strokeRect = function(x, y, width, height) {
    this.eps_callback.strokeRect(x, y, width, height);
    Object.getPrototypeOf(this).strokeRect.call(this, x, y, width, height);
  };
  ctx2d.clearRect = function(x, y, width, height) {
    this.eps_callback.clearRect(x, y, width, height);
    Object.getPrototypeOf(this).clearRect.call(this, x, y, width, height);
  };
  ctx2d.fillText = function(string, x, y) {
    this.eps_callback.fillText(string, x, y);
    Object.getPrototypeOf(this).fillText.call(this, string, x, y);
  };
  ctx2d.translate = function(dx, dy) {
    this.eps_callback.translate(dx, dy);
    Object.getPrototypeOf(this).translate.call(this, dx, dy);
  };
  ctx2d.rotate = function(angle) {
    this.eps_callback.rotate(angle);
    Object.getPrototypeOf(this).rotate.call(this, angle);
  };
  ctx2d.scale = function(sx, sy) {
    this.eps_callback.scale(sx, sy);
    Object.getPrototypeOf(this).scale.call(this, sx, sy);
  };
  ctx2d.transform = function(m11, m12, m21, m22, dx, dy) {
    this.eps_callback.transform(m11, m12, m21, m22, dx, dy);
    Object.getPrototypeOf(this).transform.call(this, m11, m12, m21, m22, dx, dy);
  };
  ctx2d.setTransform = function(m11, m12, m21, m22, dx, dy) {
    this.eps_callback.setTransform(m11, m12, m21, m22, dx, dy);
    Object.getPrototypeOf(this).setTransform.call(this, m11, m12, m21, m22, dx, dy);
  };
}

var EpsState = function(copy) {
  // canvas vars
  this.activeStyle = {'red': 0, 'green': 0, 'blue': 0, 'alpha': 255};
  this.fillStyle = {'red': 0, 'green': 0, 'blue': 0, 'alpha': 255};
  this.strokeStyle = {'red': 0, 'green': 0, 'blue': 0, 'alpha': 255};
  this.lineWidth = 1.0;
  this.lineCap = 0;
  this.lineJoin = 0;
  this.miterLimit = 10.0;
  this.font = null;
  this.textAlign = "left";
  this.textBaseline = "alphabetic";
  if (copy) {
    this.activeStyle = copy.activeStyle;
    this.fillStyle = copy.fillStyle;
    this.strokeStyle = copy.strokeStyle;
    this.lineWidth = copy.lineWidth;
    this.lineCap = copy.lineCap;
    this.lineJoin = copy.lineJoin;
    this.miterLimit = copy.miterLimit;
    this.font = copy.font;
    this.textAlign = copy.textAlign;
    this.textBaseline = copy.textBaseline;
  }
};


var EpsContext = function(ctx, width, height) {
  var title = "Image Title";
  var creator = "Image Creator";
  var date = new Date();
  // private parameters
  this.ctx = ctx;
  this.width = width;
  this.height = height;
  this.stack = [];
  this.current_state = new EpsState();
  this.font_lookup = {};
  this.indent = "";
  this.eps_text = 
    "%!PS-Adobe-3.0 EPSF-3.0\n" + 
    "%%Title: " + title + "\n" + 
    "%%Creator: " + creator + "\n" +
    "%%CreationDate: " + date.toUTCString() + "\n" + 
    "%%BoundingBox: 0 0 " + (width * 0.75) + " " + (height * 0.75) + "\n" +
    "%%Pages: 0\n" +
    "%%DocumentFonts:\n" +
    "%%EndComments\n" +
    "0.75 0.75 scale\n" +
    "0 " + height + " translate\n" + 
    "1 -1 scale\n";
  add_intercepts(ctx, this);
};

// look for differences between the current state and the settings to see 
// what has changed. Apply the changes to the eps file.
EpsContext.prototype.detect = function() {
  var state = this.current_state;
  var ctx = this.ctx;
  if (ctx.lineWidth != state.lineWidth) {
    state.lineWidth = ctx.lineWidth;
    this.eps_text += this.indent + state.lineWidth + " setlinewidth\n";
  }
  var cap = parse_line_cap(ctx.lineCap);
  if (cap != state.lineCap) {
    state.lineCap = cap;
    this.eps_text += this.indent + state.lineCap + " setlinecap\n";
  }
  var join = parse_line_join(ctx.lineJoin);
  if (join != state.lineJoin) {
    state.lineJoin = join;
    this.eps_text += this.indent + state.lineJoin + " setlinejoin\n";
  }
  var miterLimit = parseInt(ctx.miterLimit);
  if (miterLimit != state.miterLimit) {
    state.miterLimit = miterLimit;
    this.eps_text += this.indent + state.miterLimit + " setmiterlimit\n";
  }
  var strokeStyle = parse_colour(ctx.strokeStyle);
  if (!colour_equals(strokeStyle, state.strokeStyle)) {
    state.strokeStyle = strokeStyle;
    this.activateStyle(false);
  }
  var fillStyle = parse_colour(ctx.fillStyle);
  if (!colour_equals(fillStyle, state.fillStyle)) {
    state.fillStyle = fillStyle;
    this.activateStyle(true);
  }
  var textAlign = parse_text_align(ctx.textAlign);
  if (textAlign != state.textAlign) {
    state.textAlign = textAlign;
  }
  var textBaseline = parse_text_baseline(ctx.textBaseline);
  if (textBaseline != state.textBaseline) {
    state.textBaseline = textBaseline;
  }
  var font = this.lookup_font(ctx.font);
  if (font != null && font !== state.font) {
    state.font = font;
    this.eps_text += this.indent + "/" + font.name + " findfont " +  
      font.size + " scalefont setfont\n";
  }
};

EpsContext.prototype.activateStyle = function(useFillStyle) {
  var state = this.current_state;
  var style = (useFillStyle ? state.fillStyle : state.strokeStyle);
  if (!colour_equals(state.activeStyle, style)) {
    this.eps_text += this.indent + (style.red / 255) + " " + 
      (style.green / 255) + " " + (style.blue / 255) + " setrgbcolor\n";
    state.activeStyle = style;
  }
};


// saves the current state on the stack
EpsContext.prototype.save = function() {
  this.detect();
  // gsave
  this.eps_text += this.indent + "gsave\n";
  this.stack.push(new EpsState(this.current_state));
  this.indent += "  ";
};

// restores the last saved state
EpsContext.prototype.restore = function() {
  if (this.stack.length == 0) throw new Error("Call to restore not matched with call to save.");
  this.detect();
  this.current_state = this.stack.pop();
  this.indent = Array(this.stack.length + 1).join("  ");
  // grestore
  this.eps_text += this.indent + "grestore\n";
};

// start a path
EpsContext.prototype.beginPath = function() {
  this.detect();
  // newpath
  this.eps_text += this.indent + "newpath\n";
};

// join the current position to the path start
EpsContext.prototype.closePath = function() {
  this.detect();
  // closepath
  this.eps_text += this.indent + "closepath\n";
};

// move the current position
EpsContext.prototype.moveTo = function(x, y) {
  this.detect();
  // moveto
  this.eps_text += this.indent + x + " " + y + " moveto\n";
};

// join the current position to a new position and update the current position
EpsContext.prototype.lineTo = function(x, y) {
  this.detect();
  // lineto
  this.eps_text += this.indent + x + " " + y + " lineto\n";
};

// add a rectangle to the path
EpsContext.prototype.rect = function(x, y, width, height) {
  this.moveTo(x, y);
  this.lineTo(x + width, y);
  this.lineTo(x + width, y + height);
  this.lineTo(x, y + height);
  this.closePath();
};

// add an arc to the path
EpsContext.prototype.arc = function(x, y, radius, startAngle, endAngle, anticlockwise) {
  this.detect();
  if (anticlockwise) {
    // command "X Y RADIUS START_ANGLE END_ANGLE arc"
    this.eps_text += this.indent + x + " " + y + " " + radius + " " + rad2deg(startAngle) + " " + rad2deg(endAngle) + " arcn\n";
  } else {
    // command "X Y RADIUS START_ANGLE END_ANGLE arcn"
    this.eps_text += this.indent + x + " " + y + " " + radius + " " + rad2deg(startAngle) + " " + rad2deg(endAngle) + " arc\n";
  }
};

// imagine two lines, one going from the current position to point 1 and
// another going from point 1 to point 2. 
// Now imagine a circle of the given radius which touches the two lines at at 
// two tangental points T01 and T12. Add a line to the path that goes from
// the current position to T01 and add the arc which goes from T01 to T12.
// see http://www.dbp-consulting.com/tutorials/canvas/CanvasArcTo.html
EpsContext.prototype.arcTo = function(cpx1, cpy1, cpx2, cpy2, radius) {
  this.detect();
  // command "X1 Y1 X2 Y2 RADIUS arct"
  this.eps_text += this.indent + cpx1 + " " + cpy1 + " " + cpx2 + " " + cpy2 + " " + radius + " arct\n";
};

EpsContext.prototype.quadraticArcTo = function(cpx, cpy, x, y) {
  /* 
   For the equations below the following variable name prefixes are used: 
     qp0 is the quadratic curve starting point (you must keep this from your 
        last point sent to moveTo(), lineTo(), or bezierCurveTo() ). 
     qp1 is the quadratic curve control point (this is the cpx,cpy you would 
        have sent to quadraticCurveTo() ). 
     qp2 is the quadratic curve ending point (this is the x,y arguments you 
        would have sent to quadraticCurveTo() ). 
   We will convert these points to compute the two needed cubic control points 
    (the starting/ending points are the same for both 
   the quadratic and cubic curves. 
 
   The exact equations for the two cubic control points are: 
     cp0 = qp0 and cp3 = qp2 
     cp1 = qp0 + (qp1 - qp0) * ratio 
     cp2 = cp1 + (qp2 - qp0) * (1 - ratio) 
     where ratio = (sqrt(2) - 1) * 4 / 3 exactly (approx. 0.5522847498307933984022516322796) 
                   if the quadratic is an approximation of an elliptic arc, 
                      and the cubic must approximate the same arc, or 
           ratio = 2.0 / 3.0 for keeping the same quadratic curve. 
 
   In the code below, we must compute both the x and y terms for each point separately. 
 
    cp1x = qp0x + (qp1x - qp0x) * ratio; 
    cp1y = qp0y + (qp1y - qp0y) * ratio; 
    cp2x = cp1x + (qp2x - qp0x) * (1 - ratio); 
    cp2y = cp1y + (qp2y - qp0y) * (1 - ratio); 
 
   We will now  
     a) replace the qp0x and qp0y variables with currentX and currentY 
        (which *you* must store for each moveTo/lineTo/bezierCurveTo) 
     b) replace the qp1x and qp1y variables with cpx and cpy (which we would 
        have passed to quadraticCurveTo) 
     c) replace the qp2x and qp2y variables with x and y. 
   which leaves us with:  
  */  
  var ratio = 2.0 / 3.0; // 0.5522847498307933984022516322796 if the Bezier is 
                        // approximating an elliptic arc with best fitting  
  var cp1x = this.currentX + (cpx - this.currentX) * ratio;  
  var cp1y = this.currentY + (cpy - this.currentY) * ratio;  
  var cp2x = cp1x + (x - this.currentX) * (1 - ratio);  
  var cp2y = cp1y + (y - this.currentY) * (1 - ratio);  
  
  // and now call cubic Bezier curve to function   
  this.bezierCurveTo( cp1x, cp1y, cp2x, cp2y, x, y );
};

// add a bezier curve to the path
EpsContext.prototype.bezierCurveTo = function(cp1x, cp1y, cp2x, cp2y, x, y) {
  this.detect();
  // command "CP1X CP1Y CP2X CP2Y X Y curveto"
  this.eps_text += this.indent + cp1x + " " + cp1y + " " + cp2x + " " + cp2y + " " + x + " " + y + " curveto";
};

// stroke the current path
EpsContext.prototype.stroke = function() {
  this.detect();
  this.activateStyle(false);
  // stroke
  this.eps_text += this.indent + "stroke\n";
};

// fill the current path
EpsContext.prototype.fill = function() {
  this.detect();
  this.activateStyle(true);
  // fill
  this.eps_text += this.indent + "fill\n";
};

// create a clipping region from the current path
EpsContext.prototype.clip = function() {
  this.detect();
  // clip
  this.eps_text += this.indent + "clip\n";
};

// Draws a filled rectangle
EpsContext.prototype.fillRect = function(x, y, width, height) {
  this.detect();
  this.activateStyle(true);
  // rectfill
  this.eps_text += this.indent + x + " " + y + " " + width + " " + height + " rectfill\n";
};

// Draws a rectangular outline
EpsContext.prototype.strokeRect = function(x, y, width, height) {
  this.detect();
  this.activateStyle(false);
  // rectstroke
  this.eps_text += this.indent + x + " " + y + " " + width + " " + height + " rectstroke\n";
};

// Clears the specified area and makes it transparent.
EpsContext.prototype.clearRect = function(x, y, width, height) {
  this.detect();
  // fill a rectangle with white in the cleared region
  // EPS doesn't do transparency so this is as close as it can get
  // command "1 setgray X Y WIDTH HEIGHT rectfill"
  this.eps_text += this.indent + "gsave\n";
  this.eps_text += this.indent + "  1 setgray\n";
  this.eps_text += this.indent + "  " + x + " " + y + " " + width + " " + height + " rectfill\n";
  this.eps_text += this.indent + "grestore\n";
};

// Draws a filled string
EpsContext.prototype.fillText = function(string, x, y) {
  var state = this.current_state;
  this.detect();
  this.activateStyle(true);
  // lookup the font with "/FONT_NAME findfont" (leaves FONT on stack)
  // scale the font with "FONT SIZE scalefont" (leaves FONT on stack
  // set the font with "FONT setfont"
  // move the printing location with "X Y moveto"
  // various measurement commands will be needed to do center alignment etc
  // like "stringwidth"
  // show the text with "(STRING) show"
  string = string.replace(/\\/g, "\\\\");
  string = string.replace(/\(/g, "\\(");
  string = string.replace(/\)/g, "\\)");
  this.save();
  this.translate(x, y);
  this.scale(1, -1);
  this.eps_text += this.indent + "(" + string + ")\n";
  if (state.textBaseline != "alphabetic") {
    this.beginPath();
    this.moveTo(0,0);
    this.eps_text += this.indent + "dup true charpath flattenpath pathbbox %bounding box\n";
    this.eps_text += this.indent + "/ascent exch def pop /decent exch def pop\n";
    if (state.textBaseline == "top") {
      this.eps_text += this.indent + "0 ascent neg translate %vertical align top\n";
    } else if (state.textBaseline == "middle") {
      this.eps_text += this.indent + "0 ascent decent sub 2 div decent sub neg translate %vertical align middle\n";
    } else if (state.textBaseline == "bottom") {
      this.eps_text += this.indent + "0 decent neg translate %vertical align bottom\n";
    }
  }
  if (state.textAlign == "right") {
    this.eps_text += this.indent + "dup stringwidth pop neg 0 translate %right align\n"  
  } else if (state.textAlign == "center") {
    this.eps_text += this.indent + "dup stringwidth pop 2 div neg 0 translate %center align\n"  
  }
  this.moveTo(0,0);
  this.eps_text += this.indent + "show\n";
  this.restore();
};

// move the canvas origin
EpsContext.prototype.translate = function(dx, dy) {
  this.detect();
  // command "DELTA_X DELTA_Y translate"
  this.eps_text += this.indent + dx + " " + dy + " translate\n";
};

// rotate around the canvas origin
EpsContext.prototype.rotate = function(angle) {
  this.detect();
  // command "DEGREES rotate" (note need to convert angle from radians to degrees)
  this.eps_text += this.indent + rad2deg(angle) + " rotate\n";
};

// scale 
EpsContext.prototype.scale = function(scale_x, scale_y) {
  this.detect();
  // command "SCALE_X SCALE_Y scale
  this.eps_text += this.indent + scale_x + " " + scale_y + " scale\n";
};

// multiplies the current transform matrix by the matrix described by:
// m11    m21   dx
// m12    m22   dy
// 0      0     1
EpsContext.prototype.transform = function(m11, m12, m21, m22, dx, dy) {
  this.detect();
  // command "[M11 M12 M21 M22 DX DY] concat"
  this.eps_text += this.indent + "[" + m11 + " " + m12 + " " + m21 + " " + m22 + " " + dx + " " + dy + "] concat\n";
};

// reset transform matrix to the identity matrix then call transform
EpsContext.prototype.setTransform = function(m11, m12, m21, m22, dx, dy) {
  // command:
  // "[1 0 0 1 0 0] defaultmatrix setmatrix 0 height translate 1 -1 scale "
  // "[M11 M12 M21 M22 DX DY] concat"
  this.eps_text += this.indent + "[1 0 0 1 0 0] defaultmatrix setmatrix\n";
  this.eps_text += this.indent + "0 " + this.height + " translate\n";
  this.eps_text += this.indent + "1 -1 scale\n";
  this.transform(m11, m12, m21, m22, dx, dy);
};

EpsContext.prototype.register_font = function(font_str, eps_font, size) {
  font_str = font_str.replace(/\s+/g, ""); // remove spaces
  font_str = font_str.toLowerCase(); // lower case
  this.font_lookup[font_str] = {'name': eps_font, 'size': size};
};

EpsContext.prototype.lookup_font = function(font_str) {
  font_str = font_str.replace(/\s+/g, ""); // remove spaces
  font_str = font_str.toLowerCase(); // lower case
  return this.font_lookup[font_str];
};

// return the EPS text
EpsContext.prototype.eps = function() {
  return this.eps_text + this.indent + "showpage\n";
};

    </script>
    <script type="text/javascript">
//======================================================================
// start Alphabet object
//======================================================================
var Alphabet = function(alphabet, background) {
  "use strict";
  var i, j, sym, aliases, complement, comp_e_sym, ambigs, generate_background;
  generate_background = (background == null);
  if (generate_background) {
    background = [];
    for (i = 0; i < alphabet.ncore; i++) background[i] = 1.0 / alphabet.ncore;
  } else if (alphabet.ncore != background.length) {
    throw new Error("The background length does not match the alphabet length.");
  }
  this.name = alphabet.name;
  this.like = (alphabet.like != null ? alphabet.like.toUpperCase() : null);
  this.ncore = alphabet.ncore;
  this.symbols = alphabet.symbols;
  this.background = background;
  this.genbg = generate_background;
  this.encode = {};
  this.encode2core = {};
  this.complement = {};
  // check if all symbols are same case
  var seen_uc = false;
  var seen_lc = false;
  var check_case = function (syms) {
    var s, sym;
    if (typeof syms === "string") {
      for (s = 0; s < syms.length; s++) {
        sym = syms.charAt(s);
        if (sym >= 'a' && sym <= 'z') seen_lc = true;
        else if (sym >= 'A' && sym <= 'Z') seen_uc = true;
      }
    }
  };
  for (i = 0; i < this.symbols.length; i++) {
    check_case(this.symbols[i].symbol);
    check_case(this.symbols[i].aliases);
  }
  // now map symbols to indexes
  var update_array = function(array, syms, index) {
    var s, sym;
    if (typeof syms === "string") {
      for (s = 0; s < syms.length; s++) {
        sym = syms.charAt(s);
        array[sym] = index;
        // when only a single case is used, then encode as case insensitive
        if (seen_uc != seen_lc) {
          if (sym >= 'a' && sym <= 'z') {
            array[sym.toUpperCase()] = index;
          } else if (sym >= 'A' && sym <= 'Z') {
            array[sym.toLowerCase()] = index;
          }
        }
      }
    }
  }
  // map core symbols to index
  for (i = 0; i < this.ncore; i++) {
    update_array(this.encode2core, this.symbols[i].symbol, i);
    update_array(this.encode, this.symbols[i].symbol, i);
    update_array(this.encode2core, this.symbols[i].aliases, i);
    update_array(this.encode, this.symbols[i].aliases, i);
  }
  // map ambigous symbols to index
  ambigs = {};
  for (i = this.ncore; i < this.symbols.length; i++) {
    update_array(this.encode, this.symbols[i].symbol, i);
    update_array(this.encode, this.symbols[i].aliases, i);
    ambigs[this.symbols[i].equals] = i;
  }
  // determine complements
  for (i = 0; i < this.ncore; i++) {
    complement = this.symbols[i].complement;
    if (typeof complement === "string") {
      this.complement[i] = this.encode2core[complement];
    }
  }
  next_symbol:
  for (i = this.ncore; i < this.symbols.length; i++) {
    complement = "";
    for (j = 0; j < this.symbols[i].equals.length; j++) {
      comp_e_sym = this.complement[this.encode2core[this.symbols[i].equals.charAt(j)]];
      if (typeof comp_e_sym !== "number") continue next_symbol;
      complement += this.symbols[comp_e_sym].symbol;
    }
    complement = complement.split("").sort().join("");
    if (typeof ambigs[complement] === "number") {
      this.complement[i] = ambigs[complement];
    }
  }
  // determine case insensitivity
  this.case_insensitive = true;
  if (seen_uc == seen_lc) {
    // when there is a mixture of cases it probably won't
    // be case insensitive but we still need to check
    loop:
    for (i = 0; i < this.symbols.length; i++) {
      sym = this.symbols[i].symbol;
      if (sym >= 'A' && sym <= 'Z') {
        if (this.encode[sym.toLowerCase()] != i) {
          this.case_insensitive = false;
          break loop;
        }
      } else if (sym >= 'a' && sym <= 'z') {
        if (this.encode[sym.toUpperCase()] != i) {
          this.case_insensitive = false;
          break loop;
        }
      }
      aliases = this.symbols[i].aliases;
      if (aliases != null) {
        for (j = 0; j < aliases.length; j++) {
          sym = aliases.charAt(j);
          if (sym >= 'A' && sym <= 'Z') {
            if (this.encode[sym.toLowerCase()] != i) {
              this.case_insensitive = false;
              break loop;
            }
          } else if (sym >= 'a' && sym <= 'z') {
            if (this.encode[sym.toUpperCase()] != i) {
              this.case_insensitive = false;
              break loop;
            }
          }
        }
      }
    }
  }
  // normalise aliases to remove the prime symbol and eliminate
  // the alternate cases when the alphabet is case insensitive
  var seen, out;
  for (i = 0; i < this.symbols.length; i++) {
    sym = this.symbols[i].symbol;
    aliases = this.symbols[i].aliases;
    if (typeof aliases != "string") aliases = "";
    seen = {};
    out = [];
    if (this.case_insensitive) {
      sym = sym.toUpperCase();
      aliases = aliases.toUpperCase();
    }
    seen[sym] = true;
    for (j = 0; j < aliases.length; j++) {
      if (!seen[aliases.charAt(j)]) {
        seen[aliases.charAt(j)] = true;
        out.push(aliases.charAt(j));
      }
    }
    this.symbols[i].aliases = out.sort().join("");
  }
};
// return the name of the alphabet
Alphabet.prototype.get_alphabet_name = function() {
  return this.name;
};
// return if the alphabet can be complemented
Alphabet.prototype.has_complement = function() {
  return (typeof this.symbols[0].complement === "string");
};
// return true if an uppercase letter has the same meaning as the lowercase form
Alphabet.prototype.is_case_insensitive = function() {
  return this.case_insensitive;
};
// return the information content of an alphabet letter
Alphabet.prototype.get_ic = function() {
  return Math.log(this.ncore) / Math.LN2;
};
// return the count of the core alphabet symbols
Alphabet.prototype.get_size_core = function() {
  return this.ncore;
};
// return the count of all alphabet symbols
Alphabet.prototype.get_size_full = function() {
  return this.symbols.length;
};
// return the symbol for the given alphabet index
Alphabet.prototype.get_symbol = function(alph_index) {
  "use strict";
  if (alph_index < 0 || alph_index >= this.symbols.length) {
    throw new Error("Alphabet index out of bounds");
  }
  return this.symbols[alph_index].symbol;
};
// return the aliases for the given alphabet index
Alphabet.prototype.get_aliases = function(alph_index) {
  "use strict";
  if (alph_index < 0 || alph_index >= this.symbols.length) {
    throw new Error("Alphabet index out of bounds");
  }
  var sym_obj = this.symbols[alph_index];
  return (sym_obj.aliases != null ? sym_obj.aliases : "");
};
// return the name for the given alphabet index
Alphabet.prototype.get_name = function(alph_index) {
  "use strict";
  var sym;
  if (alph_index < 0 || alph_index >= this.symbols.length) {
    throw new Error("Alphabet index out of bounds");
  }
  sym = this.symbols[alph_index];
  return (typeof sym.name === "string" ? sym.name : sym.symbol);
};
// return the alphabet it is like or null
Alphabet.prototype.get_like = function() {
  "use strict";
  return this.like;
};
// return the index of the complement for the given alphabet index
Alphabet.prototype.get_complement = function(alph_index) {
  var comp_e_sym = this.complement[alph_index];
  if (typeof comp_e_sym === "number") {
    return comp_e_sym;
  } else {
    return -1;
  }
};
// return a string containing the core symbols
Alphabet.prototype.get_symbols = function() {
  "use strict";
  var i, core_symbols;
  core_symbols = "";
  for (i = 0; i < this.ncore; i++) {
    core_symbols += this.symbols[i].symbol;
  }
  return core_symbols;
};
// return if the background was not a uniform generated background
Alphabet.prototype.has_bg = function() {
  "use strict";
  return !this.genbg;
};
// get the background frequency for the index
Alphabet.prototype.get_bg_freq = function(alph_index) {
  "use strict";
  var freq, i, symbols;
  if (alph_index >= 0) {
    if (alph_index < this.ncore) {
      return this.background[alph_index];
    } else if (alph_index < this.symbols.length) {
      freq = 0;
      symbols = this.symbols[alph_index].equals;
      for (i = 0; i < symbols.length; i++) {
        freq += this.background[this.encode2core[symbols.charAt(i)]];
      }
      return freq;
    } 
  }
  throw new Error("The alphabet index is out of range.");
};
// get the colour of the index
Alphabet.prototype.get_colour = function(alph_index) {
  "use strict";
  if (alph_index < 0 || alph_index >= this.symbols.length) {
    throw new Error("BAD_ALPHABET_INDEX");
  }
  if (typeof this.symbols[alph_index].colour != "string") {
    return "black";
  }
  return "#" + this.symbols[alph_index].colour;
};
// get the rgb componets of the colour at the index
Alphabet.prototype.get_rgb = function(alph_index) {
  "use strict";
  if (alph_index < 0 || alph_index >= this.symbols.length) {
    throw new Error("BAD_ALPHABET_INDEX");
  }
  if (typeof this.symbols[alph_index].colour != "string") {
    return {"red": 0, "green": 0, "blue": 0};
  }
  var colour = this.symbols[alph_index].colour;
  var red = parseInt(colour.substr(0, 2), 16) / 255;
  var green = parseInt(colour.substr(2, 2), 16) / 255;
  var blue = parseInt(colour.substr(4, 2), 16) / 255;
  return {"red": red, "green": green, "blue": blue};
};
// convert a symbol into the index
Alphabet.prototype.get_index = function(letter) {
  "use strict";
  var alph_index;
  alph_index = this.encode[letter];
  if (typeof alph_index === "undefined") {
    return -1;
  }
  return alph_index;
};
// convert a symbol into the list of core indexes that it equals
Alphabet.prototype.get_indexes = function(letter) {
  "use strict";
  var alph_index, comprise_str, i, comprise_list;
  alph_index = this.encode[letter];
  if (typeof alph_index === "undefined") {
    throw new Error("Unknown letter");
  }
  comprise_str = this.symbols[alph_index].equals;
  comprise_list = [];
  if (typeof comprise_str == "string") {
    for (i = 0; i < comprise_str.length; i++) {
      comprise_list.push(this.encode2core[comprise_str.charAt(i)]);
    }
  } else {
    comprise_list.push(alph_index);
  }
  return comprise_list;
};
// check if a symbol is the primary way of representing the symbol in the alphabet
Alphabet.prototype.is_prime_symbol = function(letter) {
  var alph_index;
  alph_index = this.encode[letter];
  if (alph_index == null) return false;
  if (this.is_case_insensitive()) {
    return (this.symbols[alph_index].symbol.toUpperCase() == letter.toUpperCase());
  } else {
    return (this.symbols[alph_index].symbol == letter);
  }
};
// compare 2 alphabets
Alphabet.prototype.equals = function(other) {
  "use strict";
  var i, sym1, sym2;
  // first check that it's actually an alphabet object
  if (!(typeof other === "object" && other != null && other instanceof Alphabet)) {
    return false;
  }
  // second shortcircuit if it's the same object
  if (this === other) return true;
  // compare
  if (this.name !== other.name) return false;
  if (this.ncore !== other.ncore) return false;
  if (this.symbols.length !== other.symbols.length) return false;
  for (i = 0; i < this.symbols.length; i++) {
    sym1 = this.symbols[i];
    sym2 = other.symbols[i];
    if (sym1.symbol !== sym2.symbol) return false;
    if (sym1.aliases !== sym2.aliases) return false;
    if (sym1.name !== sym2.name) return false;
    if (typeof sym1.colour !== typeof sym2.colour || 
        (typeof sym1.colour === "string" && typeof sym2.colour === "string" &&
         parseInt(sym1.colour, 16) != parseInt(sym2.colour, 16))) {
      return false;
    }
    if (sym1.complement !== sym2.complement) return false;
    if (sym1.equals !== sym2.equals) return false;
  }
  return true;
};
Alphabet.prototype.check_core_subset = function(super_alph) {
  var complement_same = true;
  var seen_set = {};
  var sub_i, sub_symbol, super_i, super_symbol;
  for (sub_i = 0; sub_i < this.ncore; sub_i++) {
    sub_symbol = this.symbols[sub_i];
    super_i = super_alph.encode[sub_symbol.symbol]; 
    if (super_i == null) return 0;
    super_symbol = super_alph.symbols[super_i];
    if (seen_set[super_i]) return 0;
    seen_set[super_i] = true;
    // check complement
    if (sub_symbol.complement != null && super_symbol.complement != null) {
      if (super_alph.encode[sub_symbol.complement] != super_alph.encode[super_symbol.complement]) {
        complement_same = false;
      }
    } else if (sub_symbol.complement != null || super_symbol.complement != null) {
      complement_same = false;
    }
  }
  return (complement_same ? 1 : -1);
};
// convert a sequence to its reverse complement
Alphabet.prototype.invcomp_seq = function(seq) {
  "use strict";
  var syms, i, e_sym, comp_e_sym;
  if (!this.has_complement()) throw new Error("Alphabet must be complementable");
  syms = seq.split("");
  for (i = 0; i < syms.length; i++) {
    e_sym = this.encode[syms[i]];
    if (typeof e_sym === "undefined") {
      e_sym = this.ncore; // wildcard
    }
    comp_e_sym = this.complement[e_sym];
    if (typeof comp_e_sym === "undefined") {
      comp_e_sym = e_sym; // not complementable
    }
    syms[i] = this.symbols[comp_e_sym].symbol;
  }
  return syms.reverse().join("");
};
// convert the alphabet to the text version
Alphabet.prototype.as_text = function() {
  "use strict";
  function name_as_text(name) {
    var i, c, out;
    out = "\"";
    for (i = 0; i < name.length; i++) {
      c = name.charAt(i);
      if (c == "\"") {
        out += "\\\"";
      } else if (c == "/") {
        out += "\\/";
      } else if (c == "\\") {
        out += "\\\\";
      } else {
        out += c;
      }
    }
    out += "\"";
    return out;
  }
  function symbol_as_text(sym) {
    var out;
    out = sym.symbol;
    if (typeof sym.name === "string" && sym.name != sym.symbol) {
      out += " " + name_as_text(sym.name);
    }
    if (typeof sym.colour === "string") {
      out += " " + sym.colour;
    }
    return out;
  }
  var out, i, j, c, sym;
  out = "";
  // output core symbols with 2 way complements
  for (i = 0; i < this.ncore; i++) {
    c = this.complement[i];
    if (typeof c === "number" && i < c && this.complement[c] === i) {
      out += symbol_as_text(this.symbols[i]) + " ~ " + symbol_as_text(this.symbols[c]) + "\n";  
    }
  }
  // output core symbols with no complement
  for (i = 0; i < this.ncore; i++) {
    if (typeof this.complement[i] === "undefined") {
      out += symbol_as_text(this.symbols[i]) + "\n";
    }
  }
  // output ambiguous symbols that have comprising characters
  for (i = this.ncore; i < this.symbols.length; i++) {
    if (this.symbols[i].equals.length == 0) break;
    out += symbol_as_text(this.symbols[i]) + " = " + this.symbols[i].equals + "\n";
    if (typeof this.symbols[i].aliases === "string") {
      for (j = 0; j < this.symbols[i].aliases.length; j++) {
        if (this.symbols[i].aliases.charAt(j) == this.symbols[i].symbol) continue;
        out += this.symbols[i].aliases.charAt(j) + " = " + this.symbols[i].equals + "\n";
      }
    }
  }
  // output aliases of core symbols
  for (i = 0; i < this.ncore; i++) {
    if (typeof this.symbols[i].aliases === "string") {
      for (j = 0; j < this.symbols[i].aliases.length; j++) {
        if (this.symbols[i].aliases.charAt(j) == this.symbols[i].symbol) continue;
        out += this.symbols[i].aliases.charAt(j) + " = " + this.symbols[i].symbol + "\n";
      }
    }
  }
  // output gap symbols
  i = this.symbols.length - 1;
  if (this.symbols[i].equals.length == 0) {
    out += symbol_as_text(this.symbols[i]) + " =\n";
    if (typeof this.symbols[i].aliases === "string") {
      for (j = 0; j < this.symbols[i].aliases.length; j++) {
        if (this.symbols[i].aliases.charAt(j) == this.symbols[i].symbol) continue;
        out += this.symbols[i].aliases.charAt(j) + " =\n";
      }
    }
  }
  return out;
};
// output the alphabet as it appears in minimal MEME format
Alphabet.prototype.as_meme = function() {
  "use strict";
  function name_as_text(name) {
    var i, c, out;
    out = "\"";
    for (i = 0; i < name.length; i++) {
      c = name.charAt(i);
      if (c == "\"") {
        out += "\\\"";
      } else if (c == "/") {
        out += "\\/";
      } else if (c == "\\") {
        out += "\\\\";
      } else {
        out += c;
      }
    }
    out += "\"";
    return out;
  }
  if (this.equals(AlphStd.DNA)) {
    return "ALPHABET= ACGT\n";
  } else if (this.equals(AlphStd.PROTEIN)) {
    return "ALPHABET= ACDEFGHIKLMNPQRSTVWY\n";
  } else {
    return "ALPHABET" + 
      (this.name != null ? " " + name_as_text(this.name) : "") + 
      (this.like != null ? " " + this.like + "-LIKE" : "") + "\n" +
      this.as_text() + "END ALPHABET\n";
  }
};

// Returns a table showing all the letters in the alphabet
Alphabet.prototype.as_table = function() {
  "use strict";
  var i, j, row, th, td, aliases, equals, sym;
  var table = document.createElement("table");
  // create the core symbol header
  row = table.insertRow(table.rows.length);
  th = document.createElement("th");
  th.appendChild(document.createTextNode("Symbol(s)"));
  row.appendChild(th);
  th = document.createElement("th");
  th.appendChild(document.createTextNode("Name"));
  row.appendChild(th);
  th = document.createElement("th");
  if (this.has_complement()) {
    th.appendChild(document.createTextNode("Complement"));
  }
  row.appendChild(th);
  // list the core symbols
  for (i = 0; i < this.ncore; i++) {
    row = table.insertRow(table.rows.length);
    td = document.createElement("td");
    if (this.symbols[i].colour != null) {
      td.style.color = '#' + this.symbols[i].colour;
    }
    td.appendChild(document.createTextNode(this.symbols[i].symbol));
    aliases = this.get_aliases(i);
    if (aliases.length > 0) {
      td.appendChild(document.createTextNode(' ' + aliases.split('').join(' ')));
    }
    row.appendChild(td);
    td = document.createElement("td");
    if (this.symbols[i].name != null) {
      td.appendChild(document.createTextNode(this.symbols[i].name));
    }
    row.appendChild(td);
    td = document.createElement("td");
    if (this.symbols[i].complement != null) {
      td.style.color = this.get_colour(this.get_index(this.symbols[i].complement));
      td.appendChild(document.createTextNode(this.symbols[i].complement));
    }
    row.appendChild(td);
  }
  // create the ambiguous symbol header
  row = table.insertRow(table.rows.length);
  th = document.createElement("th");
  th.appendChild(document.createTextNode("Symbol(s)"));
  row.appendChild(th);
  th = document.createElement("th");
  th.appendChild(document.createTextNode("Name"));
  row.appendChild(th);
  th = document.createElement("th");
  th.appendChild(document.createTextNode("Matches"));
  row.appendChild(th);
  // list the ambiguous symbols
  for (i = this.ncore; i < this.symbols.length; i++) {
    row = table.insertRow(table.rows.length);
    td = document.createElement("td");
    if (this.symbols[i].colour != null) {
      td.style.color = '#' + this.symbols[i].colour;
    }
    td.appendChild(document.createTextNode(this.symbols[i].symbol));
    aliases = this.get_aliases(i);
    if (aliases.length > 0) {
      td.appendChild(document.createTextNode(' ' + aliases.split('').join(' ')));
    }
    row.appendChild(td);
    td = document.createElement("td");
    if (this.symbols[i].name != null) {
      td.appendChild(document.createTextNode(this.symbols[i].name));
    }
    row.appendChild(td);
    td = document.createElement("td");
    equals = this.symbols[i].equals.split('');
    for (j = 0; j < equals.length; j++) {
      if (j != 0) td.appendChild(document.createTextNode(' '));
      sym = document.createElement("span");
      sym.style.color = this.get_colour(this.get_index(equals[j]));
      sym.appendChild(document.createTextNode(equals[j]));
      td.appendChild(sym);
    }
    row.appendChild(td);
  }
  return table;
};

// returns a dictionary of the colours for EPS
Alphabet.prototype._as_eps_dict = function() {
  "use strict";
  var i, sym, rgb;
  var out = "/fullColourDict <<\n";
  for (i = 0; i < this.ncore; i++) {
    sym = this.get_symbol(i);
    sym = sym.replace(/\\/g, "\\\\");
    sym = sym.replace(/\(/g, "\\(");
    sym = sym.replace(/\)/g, "\\)");
    rgb = this.get_rgb(i);
    out += " (" + sym + ") [" + rgb.red.toFixed(4) + " " + rgb.green.toFixed(4) + " " + rgb.blue.toFixed(4) + "]\n";
  }
  out += ">> def\n";
  out += "/mutedColourDict <<\n";
  for (i = 0; i < this.ncore; i++) {
    sym = this.get_symbol(i);
    sym = sym.replace(/\\/g, "\\\\");
    sym = sym.replace(/\(/g, "\\(");
    sym = sym.replace(/\)/g, "\\)");
    rgb = Alphabet.lighten_colour(this.get_rgb(i));
    out += " (" + sym + ") [" + rgb.red.toFixed(4) + " " + rgb.green.toFixed(4) + " " + rgb.blue.toFixed(4) + "]\n";
  }
  out += ">> def\n";
  return out;
};

// return the alphabet name or a list of primary symbols
Alphabet.prototype.toString = function() {
  "use strict";
  if (this.name != null) {
    return this.name;
  } else {
    return this.get_symbols();
  }
};

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Helper functions
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

// Convert a colour specified in RGB colourspace values into LAB colourspace
Alphabet.rgb2lab = function(rgb) {
  "use strict";
  var xyzHelper, labHelper;
  // XYZ helper
  xyzHelper = function(value) {
    if (value > 0.0445) {
      value = (value + 0.055) / 1.055;
      value = Math.pow(value, 2.4);
    } else {
      value /= 12.92;
    }
    value *= 100;
    return value;
  };
  // lab helper
  labHelper = function(value) {
    if (value > 0.008856) {
      value = Math.pow(value, 1.0 / 3.0);
    } else {
      value = (7.787 * value) + (16.0 / 116.0);
    }
    return value;
  };
  // convert into XYZ colourspace
  var c1, c2, c3;
  if (typeof rgb == "number") {
    c1 = xyzHelper(((rgb >> 16) & 0xFF) / 255.0);
    c2 = xyzHelper(((rgb >> 8) & 0xFF) / 255.0);
    c3 = xyzHelper((rgb & 0xFF) / 255.0);
  } else {
    c1 = xyzHelper(rgb.red);
    c2 = xyzHelper(rgb.green);
    c3 = xyzHelper(rgb.blue);
  }
  var x = (c1 * 0.4124) + (c2 * 0.3576) + (c3 * 0.1805);
  var y = (c1 * 0.2126) + (c2 * 0.7152) + (c3 * 0.0722);
  var z = (c1 * 0.0193) + (c2 * 0.1192) + (c3 * 0.9505);
  // convert into Lab colourspace
  c1 = labHelper(x / 95.047);
  c2 = labHelper(y / 100.0);
  c3 = labHelper(z / 108.883);
  var l = (116.0 * c2) - 16;
  var a = 500.0 * (c1 - c2);
  var b = 200.0 * (c2 - c3);
  return {"l": l, "a": a, "b": b};
};

// Convert a colour specified in HSV colourspace into RGB colourspace
Alphabet.hsv2rgb = function(hue, sat, value, output_object) {
  // achromatic (grey)
  var r = value;
  var g = value;
  var b = value;
  if (sat != 0) {
    var h = hue / 60.0;
    var i = Math.floor(h);
    var f = h - i;
    var p = value * (1.0 - sat);
    var q = value * (1.0 - (sat * f));
    var t = value * (1.0 - (sat * (1.0 - f)));
    if (i == 0) {
      r = value;
      g = t;
      b = p;
    } else if (i == 1) {
      r = q;
      g = value;
      b = p;
    } else if (i == 2) {
      r = p;
      g = value;
      b = t;
    } else if (i == 3) {
      r = p;
      g = q;
      b = value;
    } else if (i == 4) {
      r = t;
      g = p;
      b = value;
    } else {
      r = value;
      g = p;
      b = q;
    }
  }
  if (output_object) {
    return {"red": r, "green": g, "blue": b};
  } else {
    return (Math.floor(r * 255) << 15) | (Math.floor(g * 255) << 8) | (Math.floor(b * 255));
  }
};

// Calculate a distance score between two colours in LAB colourspace
Alphabet.lab_dist = function(lab1, lab2) {
  var c1 = Math.sqrt((lab1.l * lab1.l) + (lab1.a * lab1.a));
  var c2 = Math.sqrt((lab2.l * lab2.l) + (lab2.a * lab2.a));
  var dc = c1 - c2;
  var dl = lab1.l - lab2.l;
  var da = lab1.a - lab2.a;
  var db = lab1.b - lab2.b;
  // we don't want NaN due to rounding errors so fudge things a bit...
  var dh = 0;
  var dh_squared = (da * da) + (db * db) - (dc * dc);
  if (dh_squared > 0) {
    dh = Math.sqrt(dh_squared);
  }
  var first = dl;
  var second = dc / (1.0 + (0.045 * c1));
  var third = dh / (1.0 + (0.015 * c1));
  return Math.sqrt((first * first) + (second * second) + (third * third));
};

// convert an RGB value into a HSL value
Alphabet.rgb2hsl = function(rgb) {
  "use strict";
  var min, max, delta, h, s, l, r, g, b;
  if (typeof rgb == "number") {
    r = ((rgb >> 16) & 0xFF) / 255.0;
    g = ((rgb >> 8) & 0xFF) / 255.0;
    b = (rgb & 0xFF) / 255.0;
  } else {
    r = rgb.red;
    g = rgb.green;
    b = rgb.blue;
  }
  min = Math.min(r, g, b);
  max = Math.max(r, g, b);
  delta = max - min;
  l = min + (delta / 2);
  if (max == min) {
    h = 0; // achromatic (grayscale)
    s = 0;
  } else {
    if (l > 0.5) {
      s = delta / (2 - max - min);
    } else {
      s = delta / (max + min);
    }
    if (max == r) {
      h = (g - b) / delta;
      if (g < b) h += 6;
    } else if (max == g) {
      h = ((b - r) / delta) + 2;
    } else {
      h = ((r - g) / delta) + 4;
    }
    h /= 6;
  }
  return {"h": h, "s": s, "l": l};
};

// convert a HSL value into an RGB value
Alphabet.hsl2rgb = function(hsl, output_object) {
  "use strict";
  function _hue(p, q, t) {
    "use strict";
    if (t < 0) t += 1;
    else if (t > 1) t -= 1;
    if (t < (1.0 / 6.0)) {
      return p + ((q - p) * 6.0 * t);
    } else if (t < 0.5) {
      return q;
    } else if (t < (2.0 / 3.0)) {
      return p + ((q - p) * ((2.0 / 3.0) - t) * 6.0);
    } else {
      return p;
    }
  }
  var r, g, b, p, q;
  if (hsl.s == 0) {
    // achromatic (grayscale)
    r = hsl.l;
    g = hsl.l;
    b = hsl.l;
  } else {
    if (hsl.l < 0.5) {
      q = hsl.l * (1 + hsl.s);
    } else {
      q = hsl.l + hsl.s - (hsl.l * hsl.s);
    }
    p = (2 * hsl.l) - q;
    r = _hue(p, q, hsl.h + (1.0 / 3.0));
    g = _hue(p, q, hsl.h);
    b = _hue(p, q, hsl.h - (1.0 / 3.0));
  }
  if (output_object) {
    return {"red": r, "green": g, "blue": b};
  } else {
    return (Math.floor(r * 255) << 15) | (Math.floor(g * 255) << 8) | (Math.floor(b * 255));
  }
};

Alphabet.lighten_colour = function(rgb) {
  "use strict";
  var hsl = Alphabet.rgb2hsl(rgb);
  hsl.l += (1.0 - hsl.l) * 2 / 3;
  return Alphabet.hsl2rgb(hsl, typeof rgb != "number");
};

//======================================================================
// end Alphabet object
//======================================================================

//======================================================================
// start StandardAlphabet object
//======================================================================

// an extension of the alphabet object to support some additional fields 
// only present in standard alphabets.
var StandardAlphabet = function(enum_code, enum_name, alphabet_data) {
  Alphabet.apply(this, [alphabet_data]);
  this.enum_code = enum_code;
  this.enum_name = enum_name;
};
StandardAlphabet.prototype = Alphabet.prototype;
StandardAlphabet.prototype.constructor = StandardAlphabet;

// A unique code for this standard alphabet.
// This code will be a power of 2 to enable creation of bitsets for
// a selection of standard alphabets.
StandardAlphabet.prototype.get_code = function() {
  return this.enum_code;
};

// A unique name for this standard alphabet.
// this name will be all upper case and the same as the property that
// refers to this alphabet in the AlphStd collection.
StandardAlphabet.prototype.get_enum = function() {
  return this.enum_name;
};

//======================================================================
// end StandardAlphabet object
//======================================================================

// A collection of standard alphabets.
var AlphStd = {
  RNA: new StandardAlphabet(1, "RNA", {
    "name": "RNA",
    "like": "RNA",
    "ncore": 4,
    "symbols": [
      {"symbol": "A", "name": "Adenine", "colour": "CC0000"},
      {"symbol": "C", "name": "Cytosine", "colour": "0000CC"},
      {"symbol": "G", "name": "Guanine", "colour": "FFB300"},
      {"symbol": "U", "name": "Uracil", "colour": "008000",
        "aliases": "T"},
      {"symbol": "N", "name": "Any base", "equals": "ACGU", "aliases": "X."},
      {"symbol": "V", "name": "Not U", "equals": "ACG"},
      {"symbol": "H", "name": "Not G", "equals": "ACU"},
      {"symbol": "D", "name": "Not C", "equals": "AGU"},
      {"symbol": "B", "name": "Not A", "equals": "CGU"},
      {"symbol": "M", "name": "Amino", "equals": "AC"},
      {"symbol": "R", "name": "Purine", "equals": "AG"},
      {"symbol": "W", "name": "Weak", "equals": "AU"}, 
      {"symbol": "S", "name": "Strong", "equals": "CG"},
      {"symbol": "Y", "name": "Pyrimidine", "equals": "CU"},
      {"symbol": "K", "name": "Keto", "equals": "GU"}
    ]
  }), 
  DNA: new StandardAlphabet(2, "DNA", {
    "name": "DNA",
    "like": "DNA",
    "ncore": 4,
    "symbols": [
      {"symbol": "A", "name": "Adenine", "colour": "CC0000", "complement": "T"},
      {"symbol": "C", "name": "Cytosine", "colour": "0000CC", "complement": "G"},
      {"symbol": "G", "name": "Guanine", "colour": "FFB300", "complement": "C"},
      {"symbol": "T", "name": "Thymine", "colour": "008000", "complement": "A",
        "aliases": "U"},
      {"symbol": "N", "name": "Any base", "equals": "ACGT", "aliases": "X."},
      {"symbol": "V", "name": "Not T", "equals": "ACG"},
      {"symbol": "H", "name": "Not G", "equals": "ACT"},
      {"symbol": "D", "name": "Not C", "equals": "AGT"},
      {"symbol": "B", "name": "Not A", "equals": "CGT"},
      {"symbol": "M", "name": "Amino", "equals": "AC"},
      {"symbol": "R", "name": "Purine", "equals": "AG"},
      {"symbol": "W", "name": "Weak", "equals": "AT"}, 
      {"symbol": "S", "name": "Strong", "equals": "CG"},
      {"symbol": "Y", "name": "Pyrimidine", "equals": "CT"},
      {"symbol": "K", "name": "Keto", "equals": "GT"}
    ]
  }), 
  PROTEIN: new StandardAlphabet(4, "PROTEIN", {
    "name": "Protein",
    "like": "PROTEIN",
    "ncore": 20,
    "symbols": [
      {"symbol": "A", "name": "Alanine", "colour": "0000CC"},
      {"symbol": "C", "name": "Cysteine", "colour": "0000CC"},
      {"symbol": "D", "name": "Aspartic acid", "colour": "FF00FF"},
      {"symbol": "E", "name": "Glutamic acid", "colour": "FF00FF"},
      {"symbol": "F", "name": "Phenylalanine", "colour": "0000CC"},
      {"symbol": "G", "name": "Glycine", "colour": "FFB300"},
      {"symbol": "H", "name": "Histidine", "colour": "FFCCCC"},
      {"symbol": "I", "name": "Isoleucine", "colour": "0000CC"},
      {"symbol": "K", "name": "Lysine", "colour": "CC0000"},
      {"symbol": "L", "name": "Leucine", "colour": "0000CC"},
      {"symbol": "M", "name": "Methionine", "colour": "0000CC"},
      {"symbol": "N", "name": "Asparagine", "colour": "008000"},
      {"symbol": "P", "name": "Proline", "colour": "FFFF00"},
      {"symbol": "Q", "name": "Glutamine", "colour": "008000"},
      {"symbol": "R", "name": "Arginine", "colour": "CC0000"},
      {"symbol": "S", "name": "Serine", "colour": "008000"},
      {"symbol": "T", "name": "Threonine", "colour": "008000"},
      {"symbol": "V", "name": "Valine", "colour": "0000CC"},
      {"symbol": "W", "name": "Tryptophan", "colour": "0000CC"},
      {"symbol": "Y", "name": "Tyrosine", "colour": "33E6CC"},
      {"symbol": "X", "name": "Any amino acid", "equals": "ACDEFGHIKLMNPQRSTVWY", "aliases": "*."},
      {"symbol": "B", "name": "Asparagine or Aspartic acid", "equals": "DN"}, 
      {"symbol": "Z", "name": "Glutamine or Glutamic acid", "equals": "EQ"}, 
      {"symbol": "J", "name": "Leucine or Isoleucine", "equals": "IL"}
    ]
  })
};

//======================================================================
// start Symbol object
//======================================================================
var Symbol = function(alph_index, scale, alphabet) {
  "use strict";
  //variable prototype
  this.symbol = alphabet.get_symbol(alph_index);
  this.scale = scale;
  this.colour = alphabet.get_colour(alph_index);
};

Symbol.prototype.get_symbol = function() {
  "use strict";
  return this.symbol;
};

Symbol.prototype.get_scale = function() {
  "use strict";
  return this.scale;
};

Symbol.prototype.get_colour = function() {
  "use strict";
  return this.colour;
};

Symbol.prototype.toString = function() {
  "use strict";
  return this.symbol + " " + (Math.round(this.scale*1000)/10) + "%";
};

function compare_symbol(sym1, sym2) {
  "use strict";
  if (sym1.get_scale() < sym2.get_scale()) {
    return -1;
  } else if (sym1.get_scale() > sym2.get_scale()) {
    return 1;
  } else {
    return 0;
  }
}
//======================================================================
// end Symbol object
//======================================================================

//======================================================================
// start Pspm object
//======================================================================
var Pspm = function(matrix, name, ltrim, rtrim, nsites, evalue, pssm, alt) {
  "use strict";
  var row, col, data, row_sum, delta, evalue_re;
  if (typeof name !== "string") {
    name = "";
  }
  this.name = name;
  //construct
  if (matrix instanceof Pspm) {
    // copy constructor
    this.alph_length = matrix.alph_length;
    this.motif_length = matrix.motif_length;
    this.name = matrix.name;
    this.alt = matrix.alt;
    this.nsites = matrix.nsites;
    this.evalue = matrix.evalue;
    this.ltrim = matrix.ltrim;
    this.rtrim = matrix.rtrim;
    this.pspm = [];
    for (row = 0; row < matrix.motif_length; row++) {
      this.pspm[row] = [];
      for (col = 0; col < matrix.alph_length; col++) {
        this.pspm[row][col] = matrix.pspm[row][col];
      }
    }
    if (matrix.pssm != null) {
      this.pssm = [];
      for (row = 0; row < matrix.motif_length; row++) {
        this.pspm[row] = [];
        for (col = 0; col < matrix.alph_length; col++) {
          this.pssm[row][col] = matrix.pssm[row][col];
        }
      }
    }
  } else {
    // check parameters
    if (ltrim == null) {
      ltrim = 0;
    } else if (typeof ltrim !== "number" || ltrim % 1 !== 0 || ltrim < 0) {
      throw new Error("ltrim must be a non-negative integer, got: " + ltrim);
    }
    if (rtrim == null) {
      rtrim = 0;
    } else if (typeof rtrim !== "number" || rtrim % 1 !== 0 || rtrim < 0) {
      throw new Error("rtrim must be a non-negative integer, got: " + rtrim);
    }
    if (nsites != null) {
      if (typeof nsites !== "number" || nsites < 0) {
        throw new Error("nsites must be a positive number, got: " + nsites);
      } else if (nsites == 0) {
        nsites = null;
      }
    }
    if (evalue != null) {
      if (typeof evalue === "number") {
        if (evalue < 0) {
          throw new Error("evalue must be a non-negative number, got: " + evalue);
        }
      } else if (typeof evalue === "string") {
        evalue_re = /^((?:[+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)|inf)$/;
        if (!evalue_re.test(evalue)) {
          throw new Error("evalue must be a non-negative number, got: " + evalue);
        }
      } else {
        throw new Error("evalue must be a non-negative number, got: " + evalue);
      }
    }
    // set properties
    this.name = name;
    this.alt = alt;
    this.nsites = nsites;
    this.evalue = evalue;
    this.ltrim = ltrim;
    this.rtrim = rtrim;
    if (typeof matrix === "string") {
      // string constructor
      data = parse_pspm_string(matrix);
      this.alph_length = data["alph_length"];
      this.motif_length = data["motif_length"];
      this.pspm = data["pspm"];
      if (this.evalue == null) {
        if (data["evalue"] != null) {
          this.evalue = data["evalue"];
        } else {
          this.evalue = 0;
        }
      }
      if (this.nsites == null) {
        if (typeof data["nsites"] === "number") {
          this.nsites = data["nsites"];
        } else {
          this.nsites = 20;
        }
      }
    } else {
      // assume pspm is a nested array
      this.motif_length = matrix.length;
      this.alph_length = (matrix.length > 0 ? matrix[0].length : 0);
      if (this.nsites == null) {
        this.nsites = 20;
      }
      if (this.evalue == null) {
        this.evalue = 0;
      }
      this.pspm = [];
      // copy pspm and check
      for (row = 0; row < this.motif_length; row++) {
        if (this.alph_length != matrix[row].length) {
          throw new Error("COLUMN_MISMATCH");
        }
        this.pspm[row] = [];
        row_sum = 0;
        for (col = 0; col < this.alph_length; col++) {
          this.pspm[row][col] = matrix[row][col];
          row_sum += this.pspm[row][col];
        }
        delta = 0.1;
        if (isNaN(row_sum) || (row_sum > 1 && (row_sum - 1) > delta) || 
            (row_sum < 1 && (1 - row_sum) > delta)) {
          throw new Error("INVALID_SUM");
        }
      }
      // copy pssm
      if (pssm != null) {
        this.pssm = [];
        for (row = 0; row < this.motif_length; row++) {
          this.pssm[row] = [];
          for (col = 0; col < this.alph_length; col++) {
            this.pssm[row][col] = pssm[row][col];
          }
        }
      }
    }
  }
};

Pspm.prototype.copy = function() {
  "use strict";
  return new Pspm(this);
};

Pspm.prototype.reverse = function() {
  "use strict";
  var x, y, temp, temp_trim;
  //reverse
  x = 0;
  y = this.motif_length-1;
  while (x < y) {
    temp = this.pspm[x];
    this.pspm[x] = this.pspm[y];
    this.pspm[y] = temp;
    x++;
    y--;
  }
  // reverse pssm (if defined)
  if (typeof this.pssm !== "undefined") {
    //reverse
    x = 0;
    y = this.motif_length-1;
    while (x < y) {
      temp = this.pssm[x];
      this.pspm[x] = this.pssm[y];
      this.pssm[y] = temp;
      x++;
      y--;
    }
  }
  //swap triming
  temp_trim = this.ltrim;
  this.ltrim = this.rtrim;
  this.rtrim = temp_trim;
  return this; //allow function chaining...
};

Pspm.prototype.reverse_complement = function(alphabet) {
  "use strict";
  var x, y, temp, i, row, c, temp_trim;
  if (this.alph_length != alphabet.get_size_core()) {
    throw new Error("The alphabet size does not match the size of the pspm.");
  }
  if (!alphabet.has_complement()) {
    throw new Error("The specified alphabet can not be complemented.");
  }
  // reverse motif
  this.reverse();
  //complement
  for (x = 0; x < this.motif_length; x++) {
    row = this.pspm[x];
    for (i = 0; i < row.length; i++) {
      c = alphabet.get_complement(i);
      if (c < i) continue;
      temp = row[i];
      row[i] = row[c];
      row[c] = temp;
    }
  }
  // complement pssm (if defined)
  if (typeof this.pssm !== "undefined") {
    //complement
    for (x = 0; x < this.motif_length; x++) {
      row = this.pssm[x];
      for (i = 0; i < row.length; i++) {
        c = alphabet.get_complement(i);
        if (c < i) continue;
        temp = row[i];
        row[i] = row[c];
        row[c] = temp;
      }
    }
  }
  return this; //allow function chaining...
};

Pspm.prototype.get_stack = function(position, alphabet, ssc) {
  "use strict";
  var row, stack_ic, alphabet_ic, stack, i, sym;
  if (this.alph_length != alphabet.get_size_core()) {
    throw new Error("The alphabet size does not match the size of the pspm.");
  }
  row = this.pspm[position];
  stack_ic = this.get_stack_ic(position, alphabet);
  if (ssc) stack_ic -= this.get_error(alphabet);
  alphabet_ic = alphabet.get_ic();
  stack = [];
  for (i = 0; i < this.alph_length; i++) {
    sym = new Symbol(i, row[i]*stack_ic/alphabet_ic, alphabet);
    if (sym.get_scale() <= 0) {
      continue;
    }
    stack.push(sym);
  }
  stack.sort(compare_symbol);
  return stack;
};

Pspm.prototype.get_stack_ic = function(position, alphabet) {
  "use strict";
  var row, H, i;
  if (this.alph_length != alphabet.get_size_core()) {
    throw new Error("The alphabet size does not match the size fo the pspm.");
  }
  row = this.pspm[position];
  H = 0;
  for (i = 0; i < this.alph_length; i++) {
    if (row[i] === 0) {
      continue;
    }
    H -= (row[i] * (Math.log(row[i]) / Math.LN2));
  }
  return alphabet.get_ic() - H;
};

Pspm.prototype.get_error = function(alphabet) {
  "use strict";
  if (this.nsites === 0) {
    return 0;
  }
  return (alphabet.get_size_core()-1) / (2 * Math.LN2 * this.nsites);
};

Pspm.prototype.get_motif_length = function() {
  "use strict";
  return this.motif_length;
};

Pspm.prototype.get_alph_length = function() {
  "use strict";
  return this.alph_length;
};

Pspm.prototype.get_left_trim = function() {
  "use strict";
  return this.ltrim;
};

Pspm.prototype.get_right_trim = function() {
  "use strict";
  return this.rtrim;
};

Pspm.prototype.as_best_match = function(alphabet) {
  "use strict";
  var match, odds, best_odds, best_index;
  var i, j;
  match = "";
  for (i = 0; i < this.motif_length; i++) {
    best_index = 0;
    best_odds = this.pspm[i][0] / alphabet.get_bg_freq(0);
    for (j = 1; j < this.alph_length; j++) {
      odds = this.pspm[i][j] / alphabet.get_bg_freq(j);
      if (odds > best_odds) {
        best_odds = odds;
        best_index = j;
      }
    }
    match += alphabet.get_symbol(best_index);
  }
  return match;
};

Pspm.prototype.as_count_matrix = function() {
  "use strict";
  var count, count_text, text;
  var i, j;
  text = "";
  for (i = 0; i < this.motif_length; i++) {
    if (i !== 0) {
      text += "\n";
    }
    for (j = 0; j < this.alph_length; j++) {
      if (j !== 0) {
        text += " ";
      }
      count = Math.round(this.nsites * this.pspm[i][j]);
      count_text = "" + count;
      // pad up to length of 4
      if (count_text.length < 4) {
        text += (new Array(5 - count_text.length)).join(" ") + count_text;
      } else {
        text += count_text;
      }
    }
  }
  return text; 
};

Pspm.prototype.as_probability_matrix = function() {
  "use strict";
  var text;
  var i, j;
  text = "";
  for (i = 0; i < this.motif_length; i++) {
    if (i !== 0) {
      text += "\n";
    }
    for (j = 0; j < this.alph_length; j++) {
      if (j !== 0) {
        text += " ";
      }
      text += this.pspm[i][j].toFixed(6);
    }
  }
  return text; 
};

Pspm.prototype.as_score_matrix = function(alphabet, pseudo) {
  "use strict";
  var me, score, out, row, col, score_text;
  me = this;
  if (typeof this.pssm === "undefined") {
    if (!(typeof alphabet === "object" && alphabet != null && alphabet instanceof Alphabet)) {
      throw new Error("The alphabet is required to generate the pssm.");
    }
    if (typeof pseudo === "undefined") {
      pseudo = 0.01;
    } else if (typeof pseudo !== "number" || pseudo < 0) {
      throw new Error("Expected positive number for pseudocount");
    }
    score = function(row, col) {
      "use strict";
      var p, bg, p2;
      p = me.pspm[row][col];
      bg = alphabet.get_bg_freq(col);
      p2 = (p * me.nsites + bg * pseudo) / (me.nsites + pseudo);
      return (p2 > 0 ? Math.round((Math.log(p2 / bg) / Math.LN2) * 100) : -10000);
    };
  } else {
    score = function(row, col) {
      "use strict";
      return me.pssm[row][col];
    };
  }
  out = "";
  for (row = 0; row < this.motif_length; row++) {
    for (col = 0; col < this.alph_length; col++) {
      if (col !== 0) {
        out += " ";
      }
      score_text = "" + score(row, col);
      // pad out to 6 characters
      if (score_text.length < 6) {
        out += (new Array(7 - score_text.length)).join(" ") + score_text;
      } else {
        out += score_text;
      }
    }
    out += "\n";
  }
  return out;
}

Pspm.prototype.as_pspm = function() {
  "use strict";
  return "letter-probability matrix: alength= " + this.alph_length + 
      " w= " + this.motif_length + " nsites= " + this.nsites + 
      " E= " + (typeof this.evalue === "number" ? 
          this.evalue.toExponential() : this.evalue) + "\n" +
      this.as_probability_matrix();
};

Pspm.prototype.as_pssm = function(alphabet, pseudo) {
  "use strict";
  return "log-odds matrix: alength= " + this.alph_length + 
      " w= " + this.motif_length + 
      " E= " + (typeof this.evalue == "number" ?
          this.evalue.toExponential() : this.evalue) + "\n" +
      this.as_score_matrix(alphabet, pseudo);
};

Pspm.prototype.as_meme = function(options) {
  var with_header, with_pspm, with_pssm, version, alphabet, bg_source, pseudocount, strands;
  var out, alen, i;
  // get the options
  if (typeof options !== "object" || options === null) {
    options = {};
  }
  with_header = (typeof options["with_header"] === "boolean" ? options["with_header"] : false);
  with_pspm = (typeof options["with_pspm"] === "boolean" ? options["with_pspm"] : false);
  with_pssm = (typeof options["with_pssm"] === "boolean" ? options["with_pssm"] : false);
  if (!with_pspm && !with_pssm) with_pspm = true;
  if (with_header) {
    if (typeof options["version"] === "string" && /^\d+(?:\.\d+){0,2}$/.test(options["version"])) {
      version = options["version"];
    } else if (typeof options["version"] === "number") {
      version = options["version"].toFixed(0);
    } else {
      version = "4";
    }
    if (typeof options["strands"] === "number" && options["strands"] === 1) {
      strands = 1;
    } else {
      strands = 2;
    }
    if (typeof options["bg_source"] === "string") {
      bg_source = options["bg_source"];
    } else {
      bg_source = "unknown source";
    }
    if (typeof options["alphabet"] === "object" && options["alphabet"] != null
        && options["alphabet"] instanceof Alphabet) {
      alphabet = options["alphabet"];
    } else {
      throw new Error("The alphabet is required to generate the header.");
    }
  }
  // now create the output
  out = "";
  if (with_header) {
    out = "MEME version " + version + "\n\n";
    out += alphabet.as_meme() + "\n";
    if (alphabet.has_complement()) { // assume DNA has both strands unless otherwise specified
      out += "strands: " + (strands === 1 ? "+" : "+ -") + "\n\n";
    }
    out += "Background letter frequencies (from " + bg_source + "):\n";
    alen = alphabet.get_size_core();
    for (i = 0; i < alen; i++) {
      if (i !== 0) {
        if (i % 9 === 0) { // maximum of nine entries per line
          out += "\n";
        } else {
          out += " ";
        }
      }
      out += alphabet.get_symbol(i) + " " + alphabet.get_bg_freq(i).toFixed(3);
    }
  }
  out += "\n\n";
  out += "MOTIF " + this.name + (this.alt == null ? "" : " " + this.alt);
  if (with_pssm) {
    out += "\n\n";
    out += this.as_pssm(options["alphabet"], options["pseudocount"]);
  }
  if (with_pspm) {
    out += "\n\n";
    out += this.as_pspm();
  }
  return out;
}

Pspm.prototype.toString = function() {
  "use strict";
  var str, i, row;
  str = "";
  for (i = 0; i < this.pspm.length; i++) {
    row = this.pspm[i];
    str += row.join("\t") + "\n";
  }
  return str;
};

function parse_pspm_properties(str) {
  "use strict";
  var parts, i, eqpos, before, after, properties, prop, num, num_re;
  num_re = /^((?:[+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)|inf)$/;
  parts = trim(str).split(/\s+/);
  // split up words containing =
  for (i = 0; i < parts.length;) {
    eqpos = parts[i].indexOf("=");
    if (eqpos != -1) {
      before = parts[i].substr(0, eqpos);
      after = parts[i].substr(eqpos+1);
      if (before.length > 0 && after.length > 0) {
        parts.splice(i, 1, before, "=", after);
        i += 3;
      } else if (before.length > 0) {
        parts.splice(i, 1, before, "=");
        i += 2;
      } else if (after.length > 0) {
        parts.splice(i, 1, "=", after);
        i += 2;
      } else {
        parts.splice(i, 1, "=");
        i++;
      }
    } else {
      i++;
    }
  }
  properties = {};
  for (i = 0; i < parts.length; i += 3) {
    if (parts.length - i < 3) {
      throw new Error("Expected PSPM property was incomplete. "+
          "Remaing parts are: " + parts.slice(i).join(" "));
    }
    if (parts[i+1] !== "=") {
      throw new Error("Expected '=' in PSPM property between key and " +
          "value but got " + parts[i+1]); 
    }
    prop = parts[i].toLowerCase();
    num = parts[i+2];
    if (!num_re.test(num)) {
      throw new Error("Expected numeric value for PSPM property '" + 
          prop + "' but got '" + num + "'");
    }
    properties[prop] = num;
  }
  return properties;
}

function parse_pspm_string(pspm_string) {
  "use strict";
  var header_re, lines, first_line, line_num, col_num, alph_length, 
      motif_length, nsites, evalue, pspm, i, line, match, props, parts,
      j, prob;
  header_re = /^letter-probability\s+matrix:(.*)$/i;
  lines = pspm_string.split(/\n/);
  first_line = true;
  line_num = 0;
  col_num = 0;
  alph_length;
  motif_length;
  nsites;
  evalue;
  pspm = [];
  for (i = 0; i < lines.length; i++) {
    line = trim(lines[i]);
    if (line.length === 0) { 
      continue;
    }
    // check the first line for a header though allow matrices without it
    if (first_line) {
      first_line = false;
      match = header_re.exec(line);
      if (match !== null) {
        props = parse_pspm_properties(match[1]);
        if (props.hasOwnProperty("alength")) {
          alph_length = parseFloat(props["alength"]);
          if (alph_length != 4 && alph_length != 20) {
            throw new Error("PSPM property alength should be 4 or 20" +
                " but got " + alph_length);
          }
        }
        if (props.hasOwnProperty("w")) {
          motif_length = parseFloat(props["w"]);
          if (motif_length % 1 !== 0 || motif_length < 1) {
            throw new Error("PSPM property w should be an integer larger " +
                "than zero but got " + motif_length);
          }
        }
        if (props.hasOwnProperty("nsites")) {
          nsites = parseFloat(props["nsites"]);
          if (nsites <= 0) {
            throw new Error("PSPM property nsites should be larger than " +
                "zero but got " + nsites);
          }
        }
        if (props.hasOwnProperty("e")) {
          evalue = props["e"];
          if (evalue < 0) {
            throw new Error("PSPM property evalue should be " +
                "non-negative but got " + evalue);
          }
        }
        continue;
      }
    }
    pspm[line_num] = [];
    col_num = 0;
    parts = line.split(/\s+/);
    for (j = 0; j < parts.length; j++) {
      prob = parseFloat(parts[j]);
      if (prob != parts[j] || prob < 0 || prob > 1) {
        throw new Error("Expected probability but got '" + parts[j] + "'"); 
      }
      pspm[line_num][col_num] = prob;
      col_num++;
    }
    line_num++;
  }
  if (typeof motif_length === "number") {
    if (pspm.length != motif_length) {
      throw new Error("Expected PSPM to have a motif length of " + 
          motif_length + " but it was actually " + pspm.length);
    }
  } else {
    motif_length = pspm.length;
  }
  if (typeof alph_length !== "number") {
    alph_length = pspm[0].length;
    if (alph_length != 4 && alph_length != 20) {
      throw new Error("Expected length of first row in the PSPM to be " +
          "either 4 or 20 but got " + alph_length);
    }
  }
  for (i = 0; i < pspm.length; i++) {
    if (pspm[i].length != alph_length) {
      throw new Error("Expected PSPM row " + i + " to have a length of " + 
          alph_length + " but the length was " + pspm[i].length);
    }
  }
  return {"pspm": pspm, "motif_length": motif_length, 
    "alph_length": alph_length, "nsites": nsites, "evalue": evalue};
}
//======================================================================
// end Pspm object
//======================================================================

//======================================================================
// start Logo object
//======================================================================

var Logo = function(alphabet, options) {
  "use strict";
  this.alphabet = alphabet;
  this.fine_text = "";
  this.x_axis = 1;
  this.y_axis = true;
  this.xlate_nsyms = 1;
  this.xlate_start = null;
  this.xlate_end = null;
  this.pspm_list = [];
  this.pspm_column = [];
  this.rows = 0;
  this.columns = 0;
  if (typeof options === "string") {
    // the old method signature had fine_text here so we support that
    this.fine_text = options;
  } else if (typeof options === "object" && options != null) {
    this.fine_text = (typeof options.fine_text === "string" ? options.fine_text : "");
    this.x_axis = (typeof options.x_axis === "boolean" ? (options.x_axis ? 1 : 0) : 1);
    if (options.x_axis_hidden != null && options.x_axis_hidden) this.x_axis = -1;
    this.y_axis = (typeof options.y_axis === "boolean" ? options.y_axis : true);
    this.xlate_nsyms = (typeof options.xlate_nsyms === "number" ? options.xlate_nsyms : this.xlate_nsyms);
    this.xlate_start = (typeof options.xlate_start === "number" ? options.xlate_start : this.xlate_start);
    this.xlate_end = (typeof options.xlate_end === "number" ? options.xlate_end : this.xlate_end);
  }
};

Logo.prototype.add_pspm = function(pspm, column) {
  "use strict";
  var col;
  if (typeof column === "undefined") {
    column = 0;
  } else if (column < 0) {
    throw new Error("Column index out of bounds.");
  }
  this.pspm_list[this.rows] = pspm;
  this.pspm_column[this.rows] = column;
  this.rows++;
  col = column + pspm.get_motif_length();
  if (col > this.columns) {
    this.columns = col;
  }
};

Logo.prototype.get_columns = function() {
  "use strict";
  return this.columns;
};

Logo.prototype.get_xlate_nsyms = function() {
  "use strict";
  return this.xlate_nsyms;
};

Logo.prototype.get_xlate_start = function() {
  "use strict";
  return (this.xlate_start != null ? this.xlate_start : 0);
};

Logo.prototype.get_xlate_end = function() {
  "use strict";
  return (this.xlate_end != null ? this.xlate_end : this.columns * this.xlate_nsyms);
};

Logo.prototype.get_xlate_columns = function() {
  "use strict";
  return this.get_xlate_end() - this.get_xlate_start();
};

Logo.prototype.get_rows = function() {
  "use strict";
  return this.rows;
};

Logo.prototype.get_pspm = function(row_index) {
  "use strict";
  if (row_index < 0 || row_index >= this.rows) {
    throw new Error("INDEX_OUT_OF_BOUNDS");
  }
  return this.pspm_list[row_index];
};

Logo.prototype.get_offset = function(row_index) {
  "use strict";
  if (row_index < 0 || row_index >= this.rows) {
    throw new Error("INDEX_OUT_OF_BOUNDS");
  }
  return this.pspm_column[row_index];
};

Logo.prototype._as_eps_data = function(ssc, errbars) {
  var i, j, pos, stack_pos, pspm, stack, sym, out;
  out = "";
  for (i = 0; i < this.rows; i++) {
    out += "\nStartLine\n";
    // Indent
    for (j = 0; j < this.pspm_column[i]; j++) {
      out += "() startstack\nendstack\n\n";
    }
    pspm = this.pspm_list[i];
    if (pspm.get_left_trim() > 0) {
      out += "MuteColour\nDrawTrimEdge\n" + pspm.get_left_trim() + " DrawTrimBg\n";
    }
    for (pos = 0; pos < pspm.get_motif_length(); pos++) {
      if (pos != 0 && pos == pspm.get_left_trim()) { // enable full colour
        out += "DrawTrimEdge\nRestoreColour\n";
      } else if (pos == (pspm.get_motif_length() - pspm.get_right_trim())) {
        out += "MuteColour\n" + pspm.get_right_trim() + " DrawTrimBg\n";
      }
      out += "(" + (pos + 1) + ") startstack\n";
      stack = pspm.get_stack(pos, this.alphabet, ssc);
      for (stack_pos = 0; stack_pos < stack.length; stack_pos++) {
        sym = stack[stack_pos];
        out += " " + (sym.get_scale() * this.alphabet.get_ic()) + " (" + sym.get_symbol() + ") numchar\n";
      }
      if (errbars) {
        out += " " + pspm.get_error(this.alphabet) + " Ibeam\n";
      }
      out += "endstack\n\n";
    }
    if (pspm.get_right_trim() > 0 || pspm.get_left_trim() == pspm.get_motif_length()) {
      out += "RestoreColour\n";
    }
    out += "EndLine\n";
  }
  return out;
};

Logo.prototype.as_eps = function(options) {
  "use strict";
  if (this.xlate_nsyms != 1) throw new Error("Unsupported setting xlate_nsyms for EPS");
  if (this.xlate_start != null) throw new Error("Unsupported setting xlate_start for EPS");
  if (this.xlate_end != null) throw new Error("Unsupported setting xlate_end for EPS");

  var LOGOHEIGHT = 7.5; // default height of line in cm
  var cm2pts, height, width, now, ssc, errbars;
  if (typeof options === "undefined") {
    options = {};
  }
  cm2pts = 72 / 2.54;
  if (typeof options.logo_height == "number") {
    height = options.logo_height;
  } else {
    height = LOGOHEIGHT * this.rows;
  }
  if (typeof options.logo_width == "number") {
    width = options.logo_width;
  } else {
    width = this.columns + 2;
  }
  now = new Date();
  ssc = (typeof options.ssc == "boolean" ? options.ssc : false);
  errbars = (typeof options.show_error_bar == "boolean" ? options.show_error_bar : ssc);
  var values = {
    "LOGOHEIGHT": height,
    "LOGOWIDTH": width,
    "BOUNDINGHEIGHT": Math.round(height * cm2pts),
    "BOUNDINGWIDTH": Math.round(width * cm2pts),
    "LOGOLINEHEIGHT": (height / this.rows),
    "CHARSPERLINE": this.columns,
    "BARBITS": this.alphabet.get_ic(),
    "LOGOTYPE": (this.alphabet.has_complement() ? "NA" : "AA"),
    "CREATIONDATE": now.getDate() + "." + (now.getMonth() + 1) + "." + now.getFullYear() + " " + now.getHours() + ":" + now.getMinutes() + ":" + now.getSeconds(),
    "ERRORBARFRACTION": (typeof options.error_bar_fraction == "number" ? options.error_bar_fraction : 1.0),
    "TICBITS": (typeof options.ticbits == "number" ? options.ticbits : 1.0),
    "TITLE": (typeof options.title == "string" ? options.title : ""),
    "FINEPRINT": (typeof options.fineprint == "string" ? options.fineprint : this.fine_text),
    "XAXISLABEL": (typeof options.xaxislabel == "string" ? options.xaxislabel : ""),
    "YAXISLABEL": (typeof options.yaxislabel == "string" ? options.yaxislabel : "bits"),
    "SSC": ssc,
    "YAXIS": (typeof options.show_y_axis == "boolean" ? options.show_y_axis : this.y_axis),
    "SHOWENDS": (typeof options.show_ends == "boolean" ? options.show_ends : false),
    "ERRBAR": errbars,
    "OUTLINE": (typeof options.show_outline == "boolean" ? options.show_outline : false),
    "NUMBERING": (typeof options.show_numbering == "boolean" ? options.show_numbering : this.x_axis != 0),
    "SHOWINGBOX": (typeof options.show_box == "boolean" ? options.show_box : false),
    "CREATOR": (typeof options.creator == "string" ? options.creator : "motif_logo.js"),
    "FONTSIZE": (typeof options.label_font_size == "number" ? options.label_font_size : 12),
    "TITLEFONTSIZE": (typeof options.title_font_size == "number" ? options.title_font_size : 12),
    "SMALLFONTSIZE": (typeof options.small_font_size == "number" ? options.small_font_size : 6),
    "TOPMARGIN" : (typeof options.top_margin == "number" ? options.top_margin : 0.9),
    "BOTTOMMARGIN": (typeof options.bottom_margin == "number" ? options.bottom_margin : 0.9),
    "COLORDICT": this.alphabet._as_eps_dict(),
    "DATA": this._as_eps_data(ssc, errbars)
  };
  // now this requires that the script containing the template has been imported!
  return motif_logo_template(values);
};

//======================================================================
// end Logo object
//======================================================================

// calculate the exact size (in pixels) of an object drawn on the
// canvas assuming that the background of the canvas is transparent.
function canvas_bounds(ctx, cwidth, cheight) {
  "use strict";
  var data, r, c, top_line, bottom_line, left_line, right_line, 
      txt_width, txt_height;

  // extract the image data
  data = ctx.getImageData(0, 0, cwidth, cheight).data;

  // set initial values
  top_line = -1; bottom_line = -1; left_line = -1; right_line = -1;
  txt_width = 0; txt_height = 0;

  // Find the top-most line with a non-transparent pixel
  for (r = 0; r < cheight; r++) {
    for (c = 0; c < cwidth; c++) {
      if (data[r * cwidth * 4 + c * 4 + 3]) {
        top_line = r;
        break;
      }
    }
    if (top_line != -1) {
      break;
    }
  }
  
  // Only bother looking if we found at least one set pixel... 
  if (top_line != -1) {

    //find the last line with a non-transparent pixel
    for (r = cheight-1; r >= top_line; r--) {
      for(c = 0; c < cwidth; c++) {
        if(data[r * cwidth * 4 + c * 4 + 3]) {
          bottom_line = r;
          break;
        }
      }
      if (bottom_line != -1) {
        break;
      }
    }
    // calculate height
    txt_height = bottom_line - top_line + 1;

    // Find the left-most line with a non-transparent pixel
    for (c = 0; c < cwidth; c++) {
      for (r = top_line; r <= bottom_line; r++) {
        if (data[r * cwidth * 4 + c * 4 + 3]) {
          left_line = c;
          break;
        }
      }
      if (left_line != -1) {
        break;
      }
    }

    //find the right most line with a non-transparent pixel
    for (c = cwidth-1; c >= left_line; c--) {
      for(r = top_line; r <= bottom_line; r++) {
        if(data[r * cwidth * 4 + c * 4 + 3]) {
          right_line = c;
          break;
        }
      }
      if (right_line != -1) {
        break;
      }
    }
    txt_width = right_line - left_line + 1;
  }

  //return the bounds
  return {bound_top: top_line, bound_bottom: bottom_line, 
    bound_left: left_line, bound_right: right_line, width: txt_width, 
    height: txt_height};
}

//======================================================================
// start RasterizedAlphabet
//======================================================================

// Rasterize Alphabet
// 1) Measure width of text at default font for all symbols in alphabet
// 2) sort in width ascending
// 3) Drop the top and bottom 10% (designed to ignore outliers like 'W' and 'I')
// 4) Calculate the average as the maximum scaling factor (designed to stop I becoming a rectangular blob).
// 5) Assume scale of zero would result in width of zero, interpolate scale required to make perfect width font
// 6) Draw text onto temp canvas at calculated scale
// 7) Find bounds of drawn text
// 8) Paint on to another canvas at the desired height (but only scaling width to fit if larger).
var RasterizedAlphabet = function(alphabet, logo_scale, font, width) {
  "use strict";
  var default_size, safety_pad, canvas, ctx, middle, baseline, widths, sizes,
      i, sym, size, tenpercent, avg_width, scale, 
      target_width, target_height;
  //variable prototypes
  this.alphabet = alphabet;
  this.scale = logo_scale;
  this.sym_cache = {};
  this.stack_num_cache = [];
  this.scale_num_cache = [];
  // size of canvas
  default_size = 60; // size of measuring canvas
  safety_pad = 20; // pixels to pad around so we don't miss the edges
  // create a canvas to do our measuring
  canvas = document.createElement("canvas");
  if (!canvas.getContext) throw new Error("No canvas support");
  canvas.width = default_size + 2 * safety_pad;
  canvas.height = default_size + 2 * safety_pad;
  middle = Math.round(canvas.width / 2);
  baseline = Math.round(canvas.height - safety_pad);
  ctx = canvas.getContext('2d');
  if (!supports_text(ctx)) throw new Error("Canvas does not support text");
  ctx.font = font;
  ctx.textAlign = "center";
  ctx.translate(middle, baseline);
  // list of widths
  widths = [];
  sizes = [];
  //now measure each letter in the alphabet
  for (i = 0; i < alphabet.get_size_core(); ++i) {
    // reset the canvas
    ctx.clearRect(0, 0, canvas.width, canvas.height);
    ctx.fillStyle = alphabet.get_colour(i);
    // draw the test text
    ctx.fillText(alphabet.get_symbol(i), 0, 0);
    //measure
    size = canvas_bounds(ctx, canvas.width, canvas.height);
    if (size.width === 0) throw new Error("Invisible symbol!");
    widths.push(size.width);
    sizes[i] = size;
  }
  //sort the widths
  widths.sort(function(a,b) {return a - b;});
  //drop 10% of the items off each end
  tenpercent = Math.floor(widths.length / 10);
  for (i = 0; i < tenpercent; ++i) {
    widths.pop();
    widths.shift();
  }
  //calculate average width
  avg_width = 0;
  for (i = 0; i < widths.length; ++i) {
    avg_width += widths[i];
  }
  avg_width /= widths.length;
  // calculate the target width
  target_width = width * this.scale * 2;
  // calculate scales
  for (i = 0; i < alphabet.get_size_core(); ++i) {
    sym = alphabet.get_symbol(i);
    size = sizes[i];
    // calculate scale
    scale = target_width / Math.max(avg_width, size.width);
    // estimate scaled height
    target_height = size.height * scale;
    // create an appropriately sized canvas
    canvas = document.createElement("canvas");
    canvas.width = target_width;
    canvas.height = target_height + safety_pad * 2;
    // calculate the middle
    middle = Math.round(canvas.width / 2);
    // calculate the baseline
    baseline = Math.round(canvas.height - safety_pad);
    // get the context and prepare to draw the rasterized text
    ctx = canvas.getContext('2d');
    ctx.font = font;
    ctx.fillStyle = alphabet.get_colour(i);
    ctx.textAlign = "center";
    ctx.translate(middle, baseline);
    ctx.save();
    ctx.scale(scale, scale);
    // draw the text
    ctx.fillText(sym, 0, 0);
    ctx.restore();
    this.sym_cache[sym] = {"image": canvas, "size": canvas_bounds(ctx, canvas.width, canvas.height)};
  }
};

RasterizedAlphabet.prototype.get_alphabet = function() {
  return this.alphabet;
};

RasterizedAlphabet.prototype.get_scale = function() {
  return this.scale;
};

RasterizedAlphabet.prototype.draw_stack_sym = function(ctx, letter, dx, dy, dWidth, dHeight) {
  "use strict";
  var entry, image, size;
  entry = this.sym_cache[letter];
  image = entry.image;
  size = entry.size;
  ctx.drawImage(image, 0, size.bound_top -1, image.width, size.height+1, dx, dy, dWidth, dHeight);
};

RasterizedAlphabet.prototype.draw_stack_num = function(ctx, font, stack_width, index) {
  var image, image_ctx, text_length;
  if (index >= this.stack_num_cache.length) {
    image = document.createElement("canvas");
    // measure the text
    image_ctx = image.getContext('2d');
    image_ctx.save();
    image_ctx.font = font;
    text_length = image_ctx.measureText("" + (index + 1)).width;
    image_ctx.restore();
    // resize the canvas to fit
    image.width = Math.ceil(stack_width);
    image.height = Math.ceil(text_length);
    // draw the text
    image_ctx = image.getContext('2d');
    image_ctx.translate(Math.round(stack_width / 2), 0);
    image_ctx.font = font;
    image_ctx.textBaseline = "middle";
    image_ctx.textAlign = "right";
    image_ctx.rotate(-(Math.PI / 2));
    image_ctx.fillText("" + (index + 1), 0, 0);
    this.stack_num_cache[index] = image;
  } else {
    image = this.stack_num_cache[index];
  }
  ctx.drawImage(image, 0, 0);
}

RasterizedAlphabet.prototype.draw_scale_num = function(ctx, font, num) {
  var image, image_ctx, text_size, m_length;
  if (num >= this.scale_num_cache.length) {
    image = document.createElement("canvas");
    // measure the text
    image_ctx = image.getContext('2d');
    image_ctx.font = font;
    text_size = image_ctx.measureText("" + num);
    if (text_size.actualBoundingBoxAscent && text_size.actualBoundingBoxDesent) {
      // resize the canvas to fit
      image.width = Math.ceil(text_size.width);
      image.height = Math.ceil(text_size.actualBoundingBoxAscent + text_size.actualBoundingBoxDesent);
      // draw the text
      image_ctx = image.getContext('2d');
      image_ctx.font = font;
      image_ctx.textAlign = "right";
      image_ctx.fillText("" + num, image.width, text_size.actualBoundingBoxAscent);
    } else {
      // measure width of 'm' to approximate height, we double it later anyway
      m_length = image_ctx.measureText("m").width;
      // resize the canvas to fit
      image.width = Math.ceil(text_size.width);
      image.height = Math.ceil(2 * m_length);
      // draw the text
      image_ctx = image.getContext('2d');
      image_ctx.font = font;
      image_ctx.textAlign = "right";
      image_ctx.textBaseline = "middle";
      image_ctx.fillText("" + num, image.width, m_length);
    }
    this.scale_num_cache[num] = image;
  } else {
    image = this.scale_num_cache[num];
  }
  ctx.drawImage(image, -image.width, -Math.round(image.height / 2))
}

//======================================================================
// end RasterizedAlphabet
//======================================================================

//======================================================================
// start LogoMetrics object
//======================================================================

var LogoMetrics = function(ctx, logo_columns, logo_rows, has_names, has_finetext, x_axis, y_axis) {
  "use strict";
  var i, row_height;
  //variable prototypes
  this.pad_top = (has_names ? 5 : 0);
  this.pad_left = (y_axis ? 10 : 0);
  this.pad_right = (has_finetext ? 15 : 0);
  this.pad_bottom = 0;
  this.pad_middle = 20;
  this.name_height = 14;
  this.name_font = "bold " + this.name_height + "px Times, sans-serif";
  this.name_spacer = 0;
  this.y_axis = y_axis;
  this.y_label = "bits";
  this.y_label_height = 12;
  this.y_label_font = "bold " + this.y_label_height + "px Helvetica, sans-serif";
  this.y_label_spacer = 3;
  this.y_num_height = 12;
  this.y_num_width = 0;
  this.y_num_font = "bold " + this.y_num_height + "px Helvetica, sans-serif";
  this.y_tic_width = 5;
  this.stack_pad_left = 0;
  this.stack_font = "bold 25px Helvetica, sans-serif";
  this.stack_height = 90;
  this.stack_width = 26;
  this.stacks_pad_right = 5;
  this.x_axis = x_axis;
  this.x_num_above = 2;
  this.x_num_height = 12;
  this.x_num_width = 0;
  this.x_num_font = "bold " + this.x_num_height + "px Helvetica, sans-serif";
  this.fine_txt_height = 6;
  this.fine_txt_above = 2;
  this.fine_txt_font = "normal " + this.fine_txt_height + "px Helvetica, sans-serif";
  this.letter_metrics = new Array();
  this.summed_width = 0;
  this.summed_height = 0;
  //calculate the width of the y axis numbers
  ctx.font = this.y_num_font;
  for (i = 0; i <= 2; i++) {
    this.y_num_width = Math.max(this.y_num_width, ctx.measureText("" + i).width);
  }
  //calculate the width of the x axis numbers (but they are rotated so it becomes height)
  if (x_axis == 1) {
    ctx.font = this.x_num_font;
    for (i = 1; i <= logo_columns; i++) {
      this.x_num_width = Math.max(this.x_num_width, ctx.measureText("" + i).width);
    }
  } else if (x_axis == 0) {
    this.x_num_height = 4;
    this.x_num_width = 4;
  } else {
    this.x_num_height = 0;
    this.x_num_width = 0;
  }
  
  //calculate how much vertical space we want to draw this
  //first we add the padding at the top and bottom since that's always there
  this.summed_height += this.pad_top + this.pad_bottom;
  //all except the last row have the same amount of space allocated to them
  if (logo_rows > 1) {
    row_height = this.stack_height + this.pad_middle;
    if (has_names) {
      row_height += this.name_height;
      //the label is allowed to overlap into the spacer
      row_height += Math.max(this.y_num_height/2, this.name_spacer); 
      //the label is allowed to overlap the space used by the other label
      row_height += Math.max(this.y_num_height/2, this.x_num_height + this.x_num_above); 
    } else {
      row_height += this.y_num_height/2; 
      //the label is allowed to overlap the space used by the other label
      row_height += Math.max(this.y_num_height/2, this.x_num_height + this.x_num_above); 
    }
    this.summed_height += row_height * (logo_rows - 1);
  }
  //the last row has the name and fine text below it but no padding
  this.summed_height += this.stack_height + (this.y_axis ? this.y_num_height/2 : 0);

  var fine_txt_total = (has_finetext ? this.fine_txt_height + this.fine_txt_above : 0);
  if (has_names) {
    this.summed_height += fine_txt_total + this.name_height;
    this.summed_height += Math.max((this.y_axis ? this.y_num_height/2 : 0), 
        this.x_num_height + this.x_num_above + this.name_spacer);
  } else {
    this.summed_height += Math.max((this.y_axis ? this.y_num_height/2 : 0), 
        this.x_num_height + this.x_num_above + fine_txt_total);
  }

  //calculate how much horizontal space we want to draw this
  //first add the padding at the left and right since that's always there
  this.summed_width += this.pad_left + this.pad_right;
  if (this.y_axis) {
    //add on the space for the y-axis label
    this.summed_width += this.y_label_height + this.y_label_spacer;
    //add on the space for the y-axis
    this.summed_width += this.y_num_width + this.y_tic_width;
  }
  //add on the space for the stacks
  this.summed_width += (this.stack_pad_left + this.stack_width) * logo_columns;
  //add on the padding after the stacks (an offset from the fine text)
  this.summed_width += this.stacks_pad_right;

};

//======================================================================
// end LogoMetrics object
//======================================================================

//found this trick at http://talideon.com/weblog/2005/02/detecting-broken-images-js.cfm
function image_ok(img) {
  "use strict";
  // During the onload event, IE correctly identifies any images that
  // weren't downloaded as not complete. Others should too. Gecko-based
  // browsers act like NS4 in that they report this incorrectly.
  if (!img.complete) {
    return false;
  }
  // However, they do have two very useful properties: naturalWidth and
  // naturalHeight. These give the true size of the image. If it failed
  // to load, either of these should be zero.
  if (typeof img.naturalWidth !== "undefined" && img.naturalWidth === 0) {
    return false;
  }
  // No other way of checking: assume it's ok.
  return true;
}
  
function supports_text(ctx) {
  "use strict";
  if (!ctx.fillText) {
    return false;
  }
  if (!ctx.measureText) {
    return false;
  }
  return true;
}

//draws the scale, returns the width
function draw_scale(ctx, metrics, alphabet_ic, raster) {
  "use strict";
  var tic_height, i;
  tic_height = metrics.stack_height / alphabet_ic;
  ctx.save();
  ctx.translate(metrics.y_label_height, metrics.y_num_height/2);
  //draw the axis label
  ctx.save();
  ctx.font = metrics.y_label_font;
  ctx.translate(0, metrics.stack_height/2);
  ctx.rotate(-(Math.PI / 2));
  ctx.textAlign = "center";
  ctx.fillText("bits", 0, 0);
  ctx.restore();

  ctx.translate(metrics.y_label_spacer + metrics.y_num_width, 0);

  //draw the axis tics
  ctx.save();
  ctx.translate(0, metrics.stack_height);
  for (i = 0; i <= alphabet_ic; i++) {
    //draw the number
    ctx.save();
    ctx.translate(-1, 0);
    raster.draw_scale_num(ctx, metrics.y_num_font, i);
    ctx.restore();
    //draw the tic
    ctx.fillRect(0, -1, metrics.y_tic_width, 2);
    //prepare for next tic
    ctx.translate(0, -tic_height);
  }
  ctx.restore();

  ctx.fillRect(metrics.y_tic_width - 2, 0, 2, metrics.stack_height)

  ctx.restore();
}

function draw_stack_num(ctx, metrics, row_index, raster) {
  "use strict";
  ctx.save();
  ctx.translate(0, Math.round(metrics.stack_height + metrics.x_num_above));
  if (metrics.x_axis == 1) {
    raster.draw_stack_num(ctx, metrics.x_num_font, metrics.stack_width, row_index);
  } else if (metrics.x_axis == 0) {
    // draw dots instead of the numbers (good for small logos)
    ctx.beginPath();
    var radius = Math.round(metrics.x_num_height / 2);
    ctx.arc(Math.round(metrics.stack_width / 2), radius, radius, 0, 2 * Math.PI, false);
    ctx.fill();
  }
  ctx.restore();
}

function draw_stack(ctx, metrics, symbols, raster) {
  "use strict";
  var preferred_pad, sym_min, i, sym, sym_height, pad;
  preferred_pad = 0;
  sym_min = 5;

  ctx.save();//1
  ctx.translate(0, metrics.stack_height);
  for (i = 0; i < symbols.length; i++) {
    sym = symbols[i];
    sym_height = metrics.stack_height * sym.get_scale();
    
    pad = preferred_pad;
    if (sym_height - pad < sym_min) {
      pad = Math.min(pad, Math.max(0, sym_height - sym_min));
    }
    sym_height -= pad;

    //translate to the correct position
    ctx.translate(0, -(pad/2 + sym_height));

    //draw
    raster.draw_stack_sym(ctx, sym.get_symbol(), 0, 0, metrics.stack_width, sym_height);
    //translate past the padding
    ctx.translate(0, -(pad/2));
  }
  ctx.restore();//1
}

function draw_dashed_line(ctx, pattern, start, x1, y1, x2, y2) {
  "use strict";
  var x, y, len, i, dx, dy, tlen, theta, mulx, muly, lx, ly;
  dx = x2 - x1;
  dy = y2 - y1;
  tlen = Math.pow(dx*dx + dy*dy, 0.5);
  theta = Math.atan2(dy,dx);
  mulx = Math.cos(theta);
  muly = Math.sin(theta);
  lx = [];
  ly = [];
  for (i = 0; i < pattern; ++i) {
    lx.push(pattern[i] * mulx);
    ly.push(pattern[i] * muly);
  }
  i = start;
  x = x1;
  y = y1;
  len = 0;
  ctx.beginPath();
  while (len + pattern[i] < tlen) {
    ctx.moveTo(x, y);
    x += lx[i];
    y += ly[i];
    ctx.lineTo(x, y);
    len += pattern[i];
    i = (i + 1) % pattern.length;
    x += lx[i];
    y += ly[i];
    len += pattern[i];
    i = (i + 1) % pattern.length;
  }
  if (len < tlen) {
    ctx.moveTo(x, y);
    x += mulx * (tlen - len);
    y += muly * (tlen - len);
    ctx.lineTo(x, y);
  }
  ctx.stroke();
}

function draw_trim_background(ctx, metrics, left_start, left_end, left_divider, right_start, right_end, right_divider) {
  "use strict";
  var left_size = left_end - left_start;
  var right_size = right_end - right_start;
  var line_x;

  ctx.save();//s8
  ctx.fillStyle = "rgb(240, 240, 240)";
  if (left_size > 0) {
    ctx.fillRect(left_start * metrics.stack_width, 0, left_size * metrics.stack_width, metrics.stack_height);
  }
  if (right_size > 0) {
    ctx.fillRect(right_start * metrics.stack_width, 0, right_size * metrics.stack_width, metrics.stack_height);
  }
  ctx.fillStyle = "rgb(51, 51, 51)";
  if (left_size > 0 && left_divider) {
    line_x = (left_end * metrics.stack_width) - 0.5;
    draw_dashed_line(ctx, [3], 0, line_x, 0, line_x, metrics.stack_height);
  }
  if (right_size > 0 && right_divider) {
    line_x = (right_start * metrics.stack_width) + 0.5;
    draw_dashed_line(ctx, [3], 0, line_x, 0, line_x, metrics.stack_height);
  }
  ctx.restore();//s8
}

function size_logo_on_canvas(logo, canvas, show_names, scale) {
  "use strict";
  var draw_name, draw_finetext, metrics;
  draw_name = (typeof show_names === "boolean" ? show_names : (logo.get_rows() > 1));
  draw_finetext = (logo.fine_text.length > 0);
  if (canvas.width !== 0 && canvas.height !== 0) {
    return;
  }
  metrics = new LogoMetrics(canvas.getContext('2d'), 
      logo.get_xlate_columns(), logo.get_rows(), draw_name, draw_finetext, logo.x_axis, logo.y_axis);
  if (typeof scale == "number") {
    //resize the canvas to fit the scaled logo
    canvas.width = metrics.summed_width * scale;
    canvas.height = metrics.summed_height * scale;
  } else {
    if (canvas.width === 0 && canvas.height === 0) {
      canvas.width = metrics.summed_width;
      canvas.height = metrics.summed_height;
    } else if (canvas.width === 0) {
      canvas.width = metrics.summed_width * (canvas.height / metrics.summed_height);
    } else if (canvas.height === 0) {
      canvas.height = metrics.summed_height * (canvas.width / metrics.summed_width);
    }
  }
}

function draw_logo_on_canvas(logo, canvas, show_names, scale) {
  "use strict";
  var i, draw_name, draw_finetext, ctx, metrics, raster, pspm_i, pspm, 
      offset, col_index, motif_position, ssc;
  ssc = false;
  draw_name = (typeof show_names === "boolean" ? show_names : (logo.get_rows() > 1));
  draw_finetext = (logo.fine_text.length > 0);
  ctx = canvas.getContext('2d');
  //assume that the user wants the canvas scaled equally so calculate what the best width for this image should be
  metrics = new LogoMetrics(ctx, logo.get_xlate_columns(), logo.get_rows(), draw_name, draw_finetext, logo.x_axis, logo.y_axis);
  if (typeof scale == "number") {
    //resize the canvas to fit the scaled logo
    canvas.width = metrics.summed_width * scale;
    canvas.height = metrics.summed_height * scale;
  } else {
    if (canvas.width === 0 && canvas.height === 0) {
      scale = 1;
      canvas.width = metrics.summed_width;
      canvas.height = metrics.summed_height;
    } else if (canvas.width === 0) {
      scale = canvas.height / metrics.summed_height;
      canvas.width = metrics.summed_width * scale;
    } else if (canvas.height === 0) {
      scale = canvas.width / metrics.summed_width;
      canvas.height = metrics.summed_height * scale;
    } else {
      scale = Math.min(canvas.width / metrics.summed_width, canvas.height / metrics.summed_height);
    }
  }
  // cache the raster based on the assumption that we will be drawing a lot
  // of logos the same size and alphabet
  if (typeof draw_logo_on_canvas.raster_cache === "undefined") {
    draw_logo_on_canvas.raster_cache = [];
  }
  for (i = 0; i < draw_logo_on_canvas.raster_cache.length; i++) {
    raster = draw_logo_on_canvas.raster_cache[i];
    if (raster.get_alphabet().equals(logo.alphabet) &&
        Math.abs(raster.get_scale() - scale) < 0.1) break;
    raster = null;
  }
  if (raster == null) {
    raster = new RasterizedAlphabet(logo.alphabet, scale, metrics.stack_font, metrics.stack_width);
    draw_logo_on_canvas.raster_cache.push(raster);
  }
  ctx = canvas.getContext('2d');
  ctx.save();//s1
  ctx.scale(scale, scale);
  ctx.save();//s2
  ctx.save();//s7
  //create margin
  ctx.translate(Math.round(metrics.pad_left), Math.round(metrics.pad_top));
  for (pspm_i = 0; pspm_i < logo.get_rows(); ++pspm_i) {
    pspm = logo.get_pspm(pspm_i);
    offset = logo.get_offset(pspm_i);
    //optionally draw name if this isn't the last row or is the only row 
    if (draw_name && (logo.get_rows() == 1 || pspm_i != (logo.get_rows()-1))) {
      ctx.save();//s4
      ctx.translate(Math.round(metrics.summed_width/2), Math.round(metrics.name_height));
      ctx.font = metrics.name_font;
      ctx.textAlign = "center";
      ctx.fillText(pspm.name, 0, 0);
      ctx.restore();//s4
      ctx.translate(0, Math.round(metrics.name_height + 
          Math.min(0, metrics.name_spacer - metrics.y_num_height/2)));
    }
    //draw scale
    if (logo.y_axis) draw_scale(ctx, metrics, logo.alphabet.get_ic(), raster);
    ctx.save();//s5
    //translate across past the scale
    if (logo.y_axis) {
      ctx.translate(Math.round(metrics.y_label_height + metrics.y_label_spacer + 
        metrics.y_num_width + metrics.y_tic_width), Math.round(metrics.y_num_height / 2));
    }
    //draw the trimming background
    if (pspm.get_left_trim() > 0 || pspm.get_right_trim() > 0) {
      var left_start = offset * logo.get_xlate_nsyms();
      var left_end = (offset + pspm.get_left_trim()) * logo.get_xlate_nsyms();
      var left_divider = true;
      if (left_end < logo.get_xlate_start() || left_start > logo.get_xlate_end()) {
        // no overlap
        left_start = 0;
        left_end = 0;
        left_divider = false;
      } else {
        if (left_start < logo.get_xlate_start()) {
          left_start = logo.get_xlate_start();
        }
        if (left_end > logo.get_xlate_end()) {
          left_end = logo.get_xlate_end();
          left_divider = false;
        }
        left_start -= logo.get_xlate_start();
        left_end -= logo.get_xlate_start();
        if (left_end < left_start) {
          left_start = 0;
          left_end = 0;
          left_divider = false;
        }
      }
      var right_end = (offset + pspm.get_motif_length()) * logo.get_xlate_nsyms();
      //var right_start = right_end - (pspm.get_left_trim() * logo.get_xlate_nsyms());
      var right_start = right_end - (pspm.get_right_trim() * logo.get_xlate_nsyms());
      var right_divider = true;
      if (right_end < logo.get_xlate_start() || right_start > logo.get_xlate_end()) {
        // no overlap
        right_start = 0;
        right_end = 0;
        right_divider = false;
      } else {
        if (right_start < logo.get_xlate_start()) {
          right_start = logo.get_xlate_start();
          right_divider = false;
        }
        if (right_end > logo.get_xlate_end()) {
          right_end = logo.get_xlate_end();
        }
        right_start -= logo.get_xlate_start();
        right_end -= logo.get_xlate_start();
        if (right_end < right_start) {
          right_start = 0;
          right_end = 0;
          right_divider = false;
        }
      }
      draw_trim_background(ctx, metrics, left_start, left_end, left_divider, right_start, right_end, right_divider);
    }
    //draw letters
    var xlate_col;
    for (xlate_col = logo.get_xlate_start(); xlate_col < logo.get_xlate_end(); xlate_col++) {
      ctx.translate(metrics.stack_pad_left,0);
      col_index = Math.floor(xlate_col / logo.get_xlate_nsyms());
      if (xlate_col % logo.get_xlate_nsyms() == 0) {
        if (col_index >= offset && col_index < (offset + pspm.get_motif_length())) {
          motif_position = col_index - offset;
          draw_stack_num(ctx, metrics, motif_position, raster);
          draw_stack(ctx, metrics, pspm.get_stack(motif_position, logo.alphabet, ssc), raster);
        }
      } else {
        if (col_index >= offset && col_index < (offset + pspm.get_motif_length())) {
          ctx.save();// s5.1
          ctx.translate(0, Math.round(metrics.stack_height));
          // TODO draw a dot or dash or something to indicate continuity of the motif
          ctx.restore(); //s5.1
        }
      }
      ctx.translate(Math.round(metrics.stack_width), 0);
    }
    ctx.restore();//s5
    ////optionally draw name if this is the last row but isn't the only row 
    if (draw_name && (logo.get_rows() != 1 && pspm_i == (logo.get_rows()-1))) {
      //translate vertically past the stack and axis's        
      ctx.translate(0, metrics.y_num_height/2 + metrics.stack_height + 
          Math.max(metrics.y_num_height/2, metrics.x_num_above + metrics.x_num_width + metrics.name_spacer));

      ctx.save();//s6
      ctx.translate(metrics.summed_width/2, metrics.name_height);
      ctx.font = metrics.name_font;
      ctx.textAlign = "center";
      ctx.fillText(pspm.name, 0, 0);
      ctx.restore();//s6
      ctx.translate(0, metrics.name_height);
    } else {
      //translate vertically past the stack and axis's        
      ctx.translate(0, metrics.y_num_height/2 + metrics.stack_height + 
          Math.max(metrics.y_num_height/2, metrics.x_num_above + metrics.x_num_width));
    }
    //if not the last row then add middle padding
    if (pspm_i != (logo.get_rows() -1)) {
      ctx.translate(0, metrics.pad_middle);
    }
  }
  ctx.restore();//s7
  if (logo.fine_text.length > 0) {
    ctx.translate(metrics.summed_width - metrics.pad_right, metrics.summed_height - metrics.pad_bottom);
    ctx.font = metrics.fine_txt_font;
    ctx.textAlign = "right";
    ctx.fillText(logo.fine_text, 0,0);
  }
  ctx.restore();//s2
  ctx.restore();//s1
}

function create_canvas(c_width, c_height, c_id, c_title, c_display) {
  "use strict";
  var canvas = document.createElement("canvas");
  //check for canvas support before attempting anything
  if (!canvas.getContext) {
    return null;
  }
  var ctx = canvas.getContext('2d');
  //check for html5 text drawing support
  if (!supports_text(ctx)) {
    return null;
  }
  //size the canvas
  canvas.width = c_width;
  canvas.height = c_height;
  canvas.id = c_id;
  canvas.title = c_title;
  canvas.style.display = c_display;
  return canvas;
}

function logo_1(alphabet, fine_text, pspm) {
  "use strict";
  var logo = new Logo(alphabet, fine_text);
  logo.add_pspm(pspm);
  return logo;
}

function logo_2(alphabet, fine_text, target, query, query_offset) {
  "use strict";
  var logo = new Logo(alphabet, fine_text);
  if (query_offset < 0) {
    logo.add_pspm(target, -query_offset);
    logo.add_pspm(query);
  } else {
    logo.add_pspm(target);
    logo.add_pspm(query, query_offset);
  }      
  return logo;
}

/*
 * Specifies an alternate source for an image.
 * If the image with the image_id specified has
 * not loaded then a generated logo will be used 
 * to replace it.
 *
 * Note that the image must either have dimensions
 * or a scale must be set.
 */
function alternate_logo(logo, image_id, scale) {
  "use strict";
  var image = document.getElementById(image_id);
  if (!image) {
    alert("Can't find specified image id (" +  image_id + ")");
    return;
  }
  //if the image has loaded then there is no reason to use the canvas
  if (image_ok(image)) {
    return;
  }
  //the image has failed to load so replace it with a canvas if we can.
  var canvas = create_canvas(image.width, image.height, image_id, image.title, image.style.display);
  if (canvas === null) {
    return;
  }
  //draw the logo on the canvas
  draw_logo_on_canvas(logo, canvas, null, scale);
  //replace the image with the canvas
  image.parentNode.replaceChild(canvas, image);
}

/*
 * Specifes that the element with the specified id
 * should be replaced with a generated logo.
 */
function replace_logo(logo, replace_id, scale, title_txt, display_style) {
  "use strict";
  var element = document.getElementById(replace_id);
  if (!replace_id) {
    alert("Can't find specified id (" + replace_id + ")");
    return;
  }
  //found the element!
  var canvas = create_canvas(50, 120, replace_id, title_txt, display_style);
  if (canvas === null) {
    return;
  }
  //draw the logo on the canvas
  draw_logo_on_canvas(logo, canvas, null, scale);
  //replace the element with the canvas
  element.parentNode.replaceChild(canvas, element);
}

/*
 * Fast string trimming implementation found at
 * http://blog.stevenlevithan.com/archives/faster-trim-javascript
 *
 * Note that regex is good at removing leading space but
 * bad at removing trailing space as it has to first go through
 * the whole string.
 */
function trim (str) {
  "use strict";
  var ws, i;
  str = str.replace(/^\s\s*/, '');
  ws = /\s/; i = str.length;
  while (ws.test(str.charAt(--i)));
  return str.slice(0, i + 1);
}

    </script>
    <script type="text/javascript">
var LEGEND_LINE = 16;
var LEGEND_FONT = "Helvetica";
var LEGEND_PAD = 5;

var Dasher = function(ctx, start_x, start_y, pattern) {
  if (typeof pattern === "undefined") pattern = [];
  this.ctx = ctx;
  this.x = start_x;
  this.y = start_y;
  this.pattern = pattern;
  this.index = 0;     // where in the pattern are we up to?
  this.fragment = 0;  // how much of the current pattern have we drawn
  this.on = true;     // pen on paper?
  ctx.moveTo(start_x, start_y);
};

Dasher.prototype.dashTo = function(x, y) {
  var dx = x - this.x;
  var dy = y - this.y;
  var d = Math.pow(dx * dx + dy * dy, 0.5);
  if (this.pattern.length == 0) {
    // when no pattern is specified this just draws lines
    this.ctx.lineTo(x, y);
  } else {
    // calculate distance to complete dash
    var dc = this.pattern[this.index] - this.fragment;
    while (dc <= d) {
      // calculate the fraction of the line needed
      var f = dc / d;
      this.x += dx * f;
      this.y += dy * f;
      if (this.on) {
        this.ctx.lineTo(this.x, this.y);
      } else {
        this.ctx.moveTo(this.x, this.y);
      }
      // move to the next dash
      this.fragment = 0;
      // skip empty dashes, just toggling on state
      do {
        this.index = (this.index + 1) % this.pattern.length;
        this.on = !this.on;
      } while (this.pattern[this.index] <= 0);
      // update variables
      dc = this.pattern[this.index];
      dx = x - this.x;
      dy = y - this.y;
      d = Math.pow(dx * dx + dy * dy, 0.5);
    }
    this.fragment += d;
    this.x = x;
    this.y = y;
    if (this.on) {
      this.ctx.lineTo(this.x, this.y);
    } else {
      this.ctx.moveTo(this.x, this.y);
    }
  }
}

var CentrimoResult = function(name, sig, colour, motif_length, 
    total_sites, site_counts, neg_total_sites, neg_site_counts) {
  "use strict";
  if (typeof name === "undefined") {
    name = "";
  }
  if (typeof sig === "undefined") {
    sig = "";
  }
  if (typeof colour == "undefined") {
    colour = "#000000";
  }
  this.name = name;
  this.sig = sig;
  this.colour = colour;
  this.motif_length = motif_length;
  this.total_sites = total_sites;
  this.site_counts = site_counts;
  this.has_neg = (typeof neg_total_sites === "number" && 
      typeof neg_site_counts === "object" && neg_site_counts instanceof Array);
  this.neg_total_sites = neg_total_sites;
  this.neg_site_counts = neg_site_counts;
};

CentrimoResult.prototype.get_site_count = function (index, mirror, neg) {
  count = neg ? this.neg_site_counts[index] : this.site_counts[index];
  if (mirror) {
    i_mirror = this.site_counts.length - 1 - index;
    return (count + (neg ? this.neg_site_counts[i_mirror] : this.site_counts[i_mirror]));
  } else {
    return count;
  }
};

/*
 * CentrimoRSet
 * Construct a centrimo result set.
 */
var CentrimoRSet = function(sequence_length) {
  "use strict";
  this.sequence_length = sequence_length;
  this.results = [];
};

/*
 * seq_len
 * Get the sequence length of the result set.
 */
CentrimoRSet.prototype.seq_len = function() {
  "use strict";
  return this.sequence_length;
};

/*
 * add
 * Add a centrimo result to the set
 */
CentrimoRSet.prototype.add = function(name, sig, colour, motif_length, 
    total_sites, site_counts, neg_total_sites, neg_site_counts) {
  "use strict";
  this.results.push(new CentrimoResult(name, sig, colour, motif_length, 
    total_sites, site_counts, neg_total_sites, neg_site_counts));
};

/*
 * count
 * Return the count of centrimo results.
 */
CentrimoRSet.prototype.count = function() {
  "use strict";
  return this.results.length;
};

/*
 *  get
 *  Get an entry in the result set.
 */
CentrimoRSet.prototype.get = function(index) {
  "use strict";
  return this.results[index];
};

/*
 * CentrimoLine
 */
var CentrimoLine = function(name, sig, colour, dash, thickness, show_on_legend, xlist, ylist) {
  "use strict";
  if (xlist.length != ylist.length) {
    throw new Error("The list of x and y points must be the same length.");
  }
  this.xlist = xlist;
  this.ylist = ylist;
  this.name = name;
  this.sig = sig;
  this.colour = colour;
  this.dash = dash;
  this.thickness = thickness;
  this.show_on_legend = show_on_legend;
  this.max_prob = -1;
};

/*
 * trim
 *
 * Removes points from the ends so the lines are the same length.
 */
CentrimoLine.prototype.trim = function(left, right) {
  "use strict";
  var lefti, righti, gradient, gap, left_y, right_y;
  if (this.xlist.length == 0) return;
  if (typeof left !== "number"|| isNaN(left)) {
    throw new Error("left trim is not a number");
  }
  if (typeof right !== "number" || isNaN(right)) {
    throw new Error("right trim is not a number");
  }
  for (lefti = 0; lefti < this.xlist.length; lefti++) {
    if (this.xlist[lefti] >= left) {
      break;
    }
  }
  if (lefti === 0 && this.xlist[0] !== left) {
    throw new Error("Attempt to undertrim line on the left.");
  }
  for (righti = this.xlist.length - 1; righti >= 0; righti--) {
    if (this.xlist[righti] <= right) {
      break;
    }
  }
  if (righti === (this.xlist.length - 1) && this.xlist[righti] !== right) {
    throw new Error("Attempt to undertrim line on the right.");
  }
  if (lefti == this.xlist.length || righti == -1) {
    // all points outside of drawable region
    this.xlist = [];
    this.ylist = [];
    return;
  }
  if (this.xlist[lefti] != left) {
    // create a new point that is exactly at left by interpolating
    gradient = (this.ylist[lefti] - this.ylist[lefti-1]) / 
      (this.xlist[lefti] - this.xlist[lefti-1]);
    gap = left - this.xlist[lefti-1];
    left_y = this.ylist[lefti-1] + gradient * gap;
    this.xlist.splice(0, lefti, left);
    this.ylist.splice(0, lefti, left_y);
    righti = righti - lefti + 1;
  } else {
    this.xlist.splice(0, lefti);
    this.ylist.splice(0, lefti);
    righti -= lefti;
  }
  if (this.xlist[righti] != right) {
    // create a new point that is exactly at right by interpolating
    gradient = (this.ylist[righti + 1] - this.ylist[righti]) /
      (this.xlist[righti + 1] - this.xlist[righti]);
    gap = right - this.xlist[righti];
    right_y = this.ylist[righti] + gradient * gap;
    // truncate the lists
    this.xlist.length = righti + 1;
    this.ylist.length = righti + 1;
    // push the new item on the end of the lists
    this.xlist.push(right);
    this.ylist.push(right_y);
  } else {
    // truncate the lists
    this.xlist.length = righti + 1;
    this.ylist.length = righti + 1;
  }
  this.max_prob = -1;
};

CentrimoLine.prototype.max = function() {
  "use strict";
  var y_max, i;
  if (this.max_prob != -1) {
    return this.max_prob;
  }
  y_max = 0;
  for (i = 0; i < this.xlist.length; i++) {
    if (this.ylist[i] > y_max) {
      y_max = this.ylist[i];
    }
  }
  this.max_prop = y_max;
  return this.max_prop;
};

/*
 * CentrimoScale
 *
 * Calculates the increments on the y axis
 */
var CentrimoScale = function(max_prob) {
  "use strict";
  var decimals, inc, rounder, max, inc_plus;
  if (max_prob === 0) {
    this.max = 0.01;
    this.inc = 0.002;
    this.digits = 3;
    return;
  }
  // find the minimum number of decimals needed to display the largest
  // digit of the maximum probability
  decimals = Math.ceil(-(Math.log(max_prob) / Math.log(10)));
  // calculate an increment which is (at minimum) 10 times smaller the the max
  inc = Math.pow(10, -(decimals+1));
  // round-up the maximum probabilty to its largest digit
  rounder = Math.pow(10, decimals);
  max = Math.ceil(max_prob * rounder) / rounder;
  // adjust the increment so it's between 5 and 12 times the maximum
  // probability
  if (inc * 5 < max && inc * 12 > max) {
    inc *= 1;
  } else if (inc * 10 < max && inc * 24 > max) {
    inc *= 2;
  } else if (inc * 25 < max && inc * 60 > max) {
    inc *= 5;
  } else if (inc * 50 < max && inc * 120 > max) {
    inc *= 10;
  }
  max += inc;
  inc_plus = (1.125 * inc);
  while (max - inc_plus > max_prob) {
    max -= inc;
  }
  max = Math.min(max, 1.0);
  this.max = max;
  this.inc = inc;
  this.digits = decimals+1;
};

var CentrimoLegendMetrics = function(lw, lh, id_w, pv_w, sq_w) {
  "use strict";
  this.width = lw;
  this.height = lh;
  this.id_width = id_w;
  this.pv_width = pv_w;
  this.sq_width = sq_w;
};

var CentrimoGraphMetrics = function(legend_metrics, top_edge, bottom_edge,
    left_mark, left_val, right_mark, right_val) {
  if (typeof legend_metrics !== "object" || legend_metrics === null) {
    this.legend_width = 10;
    this.legend_height = 10;
  } else {
    this.legend_width = legend_metrics.width;
    this.legend_height = legend_metrics.height;
  }
  this.top_edge = top_edge;
  this.bottom_edge = bottom_edge;
  this.left_mark = left_mark;
  this.left_val = left_val;
  this.right_mark = right_mark;
  this.right_val = right_val;
};

/*
 * CentrimoGraph
 * Takes a results set and a window weight array and produces a graph. 
 * The weights in the window_weights should be non-negative and sum to 1.
 */
var CentrimoGraph = function(rset, window_weights, fine_text, start, end, mirror) {
  "use strict";
  var trim_left, trim_right, i, j, k, result, x, y, xpos, ypos, positions;
  var y_neg, ypos_neg, line_thickness;

  line_thickness = (window_weights.length < 10 ? 1 : 3);
  if (typeof fine_text !== "string") {
    fine_text = "";
  }
  if (typeof mirror !== "boolean") mirror = false;
  this.mirror = mirror;
  if (mirror) {
    if (typeof start === "number") {
      start = Math.max(0, start);
    } else {
      start = 0;
    }
  }
  this.fine_text = fine_text;
  this.lines = [];
  for (i = 0; i < rset.count(); i++) {
    result = rset.get(i);
    x = [];
    y = [];
    if (result.has_neg) {
      y_neg = [];
    }
    xpos = (result.motif_length - rset.seq_len() + (window_weights.length - 1)) / 2;
    if (typeof trim_left === "undefined") {
      trim_left = xpos;
    } else if (trim_left < xpos) {
      trim_left = xpos;
    }
    positions = result.site_counts.length - window_weights.length + 1;
    for (j = 0; j < positions; j++, xpos += 1) {
      ypos = 0;
      // avoid division by zero when no sites are found
      if (result.total_sites > 0) {
        for (k = 0; k < window_weights.length; k++) {
          ypos += window_weights[k] * result.get_site_count(j + k, mirror, 0);
        }
        ypos /= result.total_sites;
      }
      x.push(xpos);
      y.push(ypos);
      // handle the negative dataset
      if (result.has_neg) {
        ypos_neg = 0;
        if (result.neg_total_sites > 0) {
          for (k = 0; k < window_weights.length; k++) {
            ypos_neg += window_weights[k] * result.get_site_count(j + k, mirror, 1);
          }
          ypos_neg /= result.neg_total_sites;
        }
        y_neg.push(ypos_neg);
      }
    }
    // subtract 1 from xpos because for loop will increment it one more than needed.
    xpos -= 1;
    this.lines.push(new CentrimoLine(result.name, result.sig, result.colour, [], line_thickness, true, x, y));
    if (result.has_neg) {
      this.lines.push(new CentrimoLine(result.name, result.sig, result.colour, [6,4], 2, false, x.slice(0), y_neg));
    }
    if (positions > 0) {
      if (typeof trim_right === "undefined") {
        trim_right = xpos;
      } else if (trim_right > xpos) {
        trim_right = xpos;
      }
    }
  }
  if (typeof start !== "undefined" && start != null) {
    if (start > trim_left) {
      trim_left = start;
    }
    this.start = start;
  } else {
    this.start = -Math.ceil(rset.seq_len() / 2);
  }
  if (typeof end !== "undefined" && end != null) {
    if (end < trim_right) {
      trim_right = end;
    }
    this.end = end;
  } else {
    this.end = Math.floor(rset.seq_len() / 2);
  }
  this.max_prob = 0;
  for (i = 0; i < this.lines.length; i++) {
    this.lines[i].trim(trim_left, trim_right);
    this.max_prob = Math.max(this.max_prob, this.lines[i].max());
  }
  this.scale = new CentrimoScale(this.max_prob);
};

/*
 * draw_graph
 *
 * Draws a motif probability graph
 */
CentrimoGraph.prototype.draw_graph = function (ctx, w, h, draw_legend, legend_x, legend_y) {
  "use strict";
  var gap, l_margin, t_margin, b_margin, r_margin, legend_metrics, 
      legend_width, legend_height;
  gap = 10;
  l_margin = gap + 30 + 10 * (2 + this.scale.digits);
  t_margin = 20;
  b_margin = 60;
  r_margin = 30;
  legend_metrics = this.measure_legend(ctx);
  // setting global
  legend_width = legend_metrics.width;
  legend_height = legend_metrics.height;
  // constrain legend to within graph area
  legend_x = Math.round(legend_x);
  legend_y = Math.round(legend_y);
  if (legend_x < (l_margin + gap)) {
    legend_x = l_margin + gap;
  } else if ((legend_x + legend_metrics.width) > (w - r_margin - gap)) {
    legend_x = w - r_margin - legend_metrics.width - gap;
  }
  if (legend_y < (t_margin + gap)) {
    legend_y = t_margin + gap;
  } else if ((legend_y + legend_metrics.height) > (h - b_margin - gap)) {
    legend_y = h - b_margin - legend_metrics.height - gap;
  }

  // draw graph
  ctx.save();
  // draw border
  ctx.beginPath();
  ctx.moveTo(l_margin - 0.5, t_margin +0.5);
  ctx.lineTo(l_margin - 0.5, h - (b_margin - 0.5));
  ctx.lineTo(w - r_margin - 0.5, h - (b_margin - 0.5));
  ctx.lineTo(w - r_margin - 0.5, t_margin +0.5);
  ctx.closePath();
  ctx.stroke();
  // draw fineprint
  ctx.save();
  ctx.font = "9px Helvetica";
  ctx.textAlign = "right";
  ctx.textBaseline = "bottom";
  ctx.fillText(this.fine_text, w - 1, h - 2);
  ctx.restore();
  // draw y axis
  ctx.save();
  ctx.translate(l_margin, t_margin);
  this.draw_y_axis(ctx, 0, h - (t_margin + b_margin));
  ctx.restore();
  // draw y labels
  ctx.save();
  ctx.translate(gap, t_margin);
  this.draw_y_axis_label(ctx, l_margin, h - (t_margin + b_margin));
  ctx.restore();
  // draw x axis
  ctx.save();
  ctx.translate(l_margin, h - b_margin);
  this.draw_x_axis(ctx, w - (l_margin + r_margin), b_margin);
  ctx.restore();
  // draw top axis
  ctx.save();
  ctx.translate(l_margin, t_margin);
  this.draw_top_axis(ctx, w - (l_margin + r_margin), 0);
  ctx.restore();
  // draw x axis labels
  ctx.save();
  ctx.translate(l_margin, h - b_margin);
  this.draw_x_axis_label(ctx, w - (l_margin + r_margin), b_margin - gap);
  ctx.restore();
  // draw lines
  ctx.save();
  ctx.translate(l_margin, t_margin);
  this.draw_lines(ctx, w - (l_margin + r_margin), h - (t_margin + b_margin), 8);
  ctx.restore();
  // draw legend
  if (draw_legend) { 
    ctx.save();
    ctx.translate(legend_x, legend_y);
    this.draw_legend(ctx, legend_metrics);
    ctx.restore();
  }
  ctx.restore();
  return new CentrimoGraphMetrics(legend_metrics, t_margin, h - b_margin,
      l_margin, this.start, w - r_margin, this.end);
};

/*
 * draw_x_axis
 *
 */
CentrimoGraph.prototype.draw_x_axis = function(ctx, w, h) {
  "use strict";
  var scale_x, length, tic_inc, tic_min, tic_max, i, x;
  // pixels per unit
  scale_x = w / (this.end - this.start);
  // calcuate a good tic increment
  length = this.end - this.start;
  if (length > 50) {
    // multiple of 10
    tic_inc = Math.max(1, Math.round(length / 100)) * 10;
  } else if (length > 25) {
    tic_inc = 5;
  } else if (length > 10) {
    tic_inc = 2;
  } else {
    tic_inc = 1;
  }
  // work out the min and max values within the start and end
  tic_min = Math.round(this.start / tic_inc) * tic_inc;
  if (tic_min < this.start) {
    tic_min += tic_inc;
  }
  tic_max = Math.round(this.end / tic_inc) * tic_inc;
  if (tic_max > this.end) {
    tic_max -= tic_inc;
  }
  // draw the tics
  ctx.save();
  ctx.font = "14pt Helvetica";
  ctx.textBaseline = "top";
  ctx.textAlign = "center";
  for (i = tic_min; i <= tic_max; i+= tic_inc) {
    x = Math.round((i - this.start) * scale_x) + 0.5;
    ctx.fillText(""+i, x, 5);
    if (i == this.start || i == this.end) continue;
    ctx.beginPath();
    ctx.moveTo(x, -5);
    ctx.lineTo(x, 3);
    ctx.stroke();
  }
  
  ctx.restore();
};

/*
 * draw_top_axis
 *
 */
CentrimoGraph.prototype.draw_top_axis = function(ctx, w, h) {
  "use strict";
  var scale_x, length, tic_inc, tic_min, tic_max, i, x;
  // pixels per unit
  scale_x = w / (this.end - this.start);
  // calcuate a good tic increment
  length = this.end - this.start;
  if (length > 50) {
    // multiple of 10
    tic_inc = Math.max(1, Math.round(length / 100)) * 10;
  } else if (length > 25) {
    tic_inc = 5;
  } else {
    tic_inc = 1;
  }
  // work out the min and max values within the start and end
  tic_min = Math.round(this.start / tic_inc) * tic_inc;
  if (tic_min < this.start) {
    tic_min += tic_inc;
  }
  tic_max = Math.round(this.end / tic_inc) * tic_inc;
  if (tic_max > this.end) {
    tic_max -= tic_inc;
  }
  // draw the tics
  ctx.save();
  ctx.font = "14pt Helvetica";
  ctx.textBaseline = "top";
  ctx.textAlign = "center";
  for (i = tic_min; i <= tic_max; i+= tic_inc) {
    if (i == this.start || i == this.end) continue;
    x = Math.round((i - this.start) * scale_x) + 0.5;
    ctx.beginPath();
    ctx.moveTo(x, 0);
    ctx.lineTo(x, 8);
    ctx.stroke();
  }
  ctx.restore();
};

/*
 * draw_x_axis_label
 */
CentrimoGraph.prototype.draw_x_axis_label = function(ctx, w, h) {
  "use strict";
  ctx.save();
  ctx.font = "14pt Helvetica";
  ctx.textAlign = "center";
  ctx.textBaseline = "bottom";
  ctx.fillText((this.mirror ? 
        "Distance of Best Site from Sequence Center" : 
        "Position of Best Site in Sequence"), w/2, h);
  ctx.restore();
};

/*
 * draw_y_axis
 *
 * TODO some work needs to be done to allow moving the zero
 */
CentrimoGraph.prototype.draw_y_axis = function(ctx, w, h) {
  "use strict";
  var y_scale, p, y;
  ctx.save();
  ctx.font = "14pt Helvetica";
  ctx.textBaseline = "middle";
  ctx.textAlign = "right";

  y_scale = h / this.scale.max;
  for (p = 0; p < this.scale.max; p += this.scale.inc) {
    y = Math.round(h - p * y_scale) + 0.5;
    this.draw_y_tic(ctx, this.scale.digits, y, p);
  }
  this.draw_y_tic(ctx, this.scale.digits, 0.5, this.scale.max);

  ctx.restore();
};

/*
 * draw_y_tic
 */
CentrimoGraph.prototype.draw_y_tic = function(ctx, digits, y, p) {
  "use strict";
  ctx.beginPath();
  ctx.moveTo(5, y);
  ctx.lineTo(-3, y);
  ctx.stroke();
  ctx.fillText(p.toFixed(digits), -5, y);
};

/*
 * draw_y_axis_label
 */
CentrimoGraph.prototype.draw_y_axis_label = function(ctx, w, h) {
  "use strict";
  ctx.save();
  ctx.translate(0, h/2);
  ctx.rotate(-Math.PI / 2);
  ctx.font = "14pt Helvetica";
  ctx.textBaseline = "top";
  ctx.textAlign = "center";
  ctx.fillText("Probability", 0, 0);
  ctx.restore();
};

/*
 * draw_lines
 */
CentrimoGraph.prototype.draw_lines = function(ctx, w, h, tic_size) {
  "use strict";
  var scale_y, scale_x, i, line, x_points, y_points, j, x, y, dasher;
  if (typeof tic_size === "undefined") {
    tic_size = 0;
  }
  scale_y = h / this.scale.max;
  scale_x = w / (this.end - this.start);
  // draw the central line
  if (0 > this.start && 0 < this.end) {
    ctx.save();
    ctx.translate((-this.start) * scale_x, 0);
    ctx.strokeStyle = '#DDD';
    ctx.beginPath();
    ctx.moveTo(0.5, tic_size);
    ctx.lineTo(0.5, h - tic_size);
    ctx.stroke();
    ctx.restore();
  }
  // draw the lines
  ctx.save();
  ctx.lineJoin = "bevel";
  ctx.miterLimit = 0;
  for (i = 0; i < this.lines.length; i++) {
    line = this.lines[i];
    ctx.lineWidth = line.thickness;
    x_points = line.xlist;
    y_points = line.ylist;
    if (x_points.length > 1) {
      ctx.strokeStyle = line.colour;
      ctx.beginPath();
      for (j = 0; j < x_points.length; j++) {
        if (isNaN(x_points[j])) {
          throw new Error("X NaN!");
        }
        if (isNaN(y_points[j])) {
          throw new Error("Y NaN!");
        }
        x = (x_points[j] - this.start) * scale_x;
        y = h - y_points[j] * scale_y;
        if (j === 0) {
          dasher = new Dasher(ctx, x, y, line.dash);
        } else {
          dasher.dashTo(x, y);
        }
      }
      ctx.stroke();
    } else if (x_points.length == 1) {
      if (isNaN(x_points[0])) {
        throw new Error("X NaN!");
      }
      if (isNaN(y_points[0])) {
        throw new Error("Y NaN!");
      }
      x = (x_points[0] - this.start) * scale_x;
      y = h - y_points[0] * scale_y;
      ctx.fillStyle = line.colour;
      ctx.beginPath();
      ctx.arc(x, y, 2, 0, 2*Math.PI, false);
      ctx.fill();
    }
  }
  ctx.restore();
};

/*
 * measure_legend
 */
CentrimoGraph.prototype.measure_legend = function(ctx) {
  "use strict";
  var lw, lh, sq_w, id_w, pv_w, lines, i, line, len;
  // initilise the line height to the size of the padding
  lh = 2 * LEGEND_PAD;
  // calculate the column widths
  sq_w = LEGEND_LINE - 2;
  id_w = 0;
  pv_w = 0;
  ctx.save();
  ctx.font = "" + LEGEND_LINE + "px " + LEGEND_FONT; 
  for (i = 0; i < this.lines.length; i++) {
    line = this.lines[i];
    if (!line.show_on_legend) {
      continue;
    }
    lh += LEGEND_LINE * 1.2;
    len = ctx.measureText(line.name).width;
    if (id_w < len) {
      id_w = len;
    }
    len = ctx.measureText(line.sig).width;
    if (pv_w < len) {
      pv_w = len;
    }
  }
  lh = Math.round(lh);
  ctx.restore();
  // legend width is a function of the column widths
  lw = id_w + pv_w + sq_w + 4 * LEGEND_PAD;

  return new CentrimoLegendMetrics(lw, lh, id_w, pv_w, sq_w);
};

/*
 * draw_legend
 */
CentrimoGraph.prototype.draw_legend = function(ctx, metrics) {
  "use strict";
  var ln_h, pad, w, h, id_w, pv_w, sq_w, id_x, pv_x, sq_x, i, line;
  if (this.lines.length === 0) {
    return;
  }
  ln_h = LEGEND_LINE;
  pad = LEGEND_PAD;
  w = metrics.width;
  h = metrics.height;
  id_w = metrics.id_width;
  pv_w = metrics.pv_width;
  sq_w = metrics.sq_width;
  id_x = 0;
  pv_x = id_x + id_w + pad;
  sq_x = pv_x + pv_w + pad;

  ctx.save();
  ctx.font = "" + ln_h + "px " + LEGEND_FONT;
  ctx.textAlign = "left";
  ctx.textBaseline = "alphabetic";
  // draw it
  ctx.save();
  ctx.fillStyle = 'white';
  ctx.fillRect(0.5, 0.5, w-1, h-1);
  ctx.strokeStyle = 'black';
  ctx.strokeRect(0.5, 0.5, w-1, h-1);
  ctx.restore();
  ctx.translate(pad, pad);
  ctx.fillStyle = "black";
  for (i = 0; i < this.lines.length; i++) {
    line = this.lines[i];
    if (!line.show_on_legend) {
      continue;
    }
    ctx.translate(0, ln_h);
    ctx.save();
    ctx.fillStyle = line.colour;
    ctx.fillRect(sq_x, -sq_w + 0.1 * ln_h, sq_w, sq_w);
    ctx.restore();
    ctx.fillText(line.name, id_x, 0);
    ctx.fillText(line.sig, pv_x, 0);
    ctx.translate(0, 0.2 * ln_h);
  }
  ctx.restore();
};

/*
 * triangular_weights
 * Returns an array of length n containing normalized weights.
 *
 */
function triangular_weights(n) {
  "use strict";
  var weights, half, half_i, sum, i, unscaled_weight;
  weights = [];
  half = n/2;
  half_i = Math.floor(half);
  sum = 0;
  for (i = 0; i < half_i; i++) {
    unscaled_weight = (i + 0.5) / half;
    weights[i] = unscaled_weight;
    weights[n - i -1] = unscaled_weight;
    sum += 2 * unscaled_weight;
  }
  if (n % 2 == 1) {
    weights[half_i] = 1;
    sum += 1;
  }
  // normalize
  for (i = 0; i < n; i++) {
    weights[i] /= sum;
  }
  return weights;
}

/*
 * uniform_weights
 * Returns an array of length n containing normalized weights.
 *
 */
function uniform_weights(n) {
  "use strict";
  var weights, weight, i;
  weights = [];
  weight = 1.0 / n;
  for (i = 0; i < n; i++) {
    weights[i] = weight;
  }
  return weights;
}

    </script>
    <script type="text/javascript">
var palate = ["white", "cyan", "blue", "#FF00FF", "#00FF00", "red", "orange", "#008000", "#8A2BE2", "black"];
var text_palate = ["black", "black", "white", "white", "black", "white", "black", "white", "white", "white"];
var INT_MAX = 9007199254740992;

var s_motifs = [];
var s_swatches = [];
var s_logos = []
var s_count = 0;
var swap = null;
var alphabet = new Alphabet(data.alphabet, data.background);
var logo_timer = null; // timer to draw motif when the mouse pauses on a row
var logo_motif = null; // motif to draw when timer expires
var logo_row = null; // the row (or tbody) that the mouse is over
var legend_x = 1000;
var legend_y = 1000;
var union_seq_ids = [];
var intersect_seq_ids = [];
var graph_metrics = new CentrimoGraphMetrics(null, 0, 0, 0, 0, 0, 0);
var graph_click = {"start": 0, "stop": 0};
var zooms = [];

var sort_table = {
  "motif": [
    {"name": "<i>E</i>-value", "fn": sort_motif_evalue, "priority": 1, "pair": "evalue"},
    {"name": "Fisher <i>E</i>-value", "fn": sort_motif_fisherpv, "priority": 2, 
      "show": data['options']['neg_sequences'], "pair": "fisherpv"},
    {"name": "Region Position", "fn": sort_motif_position, "pair": "position"},
    {"name": "Region Distance", "fn": sort_motif_center, "pair": "center"},
    {"name": "Region Width", "fn": sort_motif_spread, "pair": "spread"},
    {"name": "Region Matches", "fn": sort_motif_sites, "pair": "sites"},
    {"name": "<i>p</i>-value (Neg Data)", "fn": sort_motif_neg_pvalue,
      "show": data['options']['neg_sequences'], "pair": "neg_pvalue"},
    {"name": "Region Matches in (Neg Data)", "fn": sort_motif_neg_sites, 
      "show": data['options']['neg_sequences'], "pair": "neg_sites"},
    {"name": "Matthew's Correlation Coefficient", "fn": sort_motif_mcc, 
      "show": data['options']['mcc'], "pair": "mcc"},
    {"name": "Total Matches", "fn": sort_motif_total_sites, "pair": "evalue"},
    {"name": "Max Probability", "fn": sort_motif_probability, "pair": "evalue"},
    {"name": "ID", "fn": sort_motif_id, "pair": "evalue"},
    {"name": "Name", "fn": sort_motif_alt, "pair": "evalue"},
  ],
  "region": [
    {"id": "evalue", "name": "<i>E</i>-value", "fn": sort_peak_evalue,
      "priority": 1},
    {"id": "fisherpv", "name": "Fisher <i>E</i>-value", "fn": sort_peak_fisherpv,
      "priority": 2, "show": data['options']['neg_sequences']},
    {"id": "position", "name": "Region Position", "fn": sort_peak_position},
    {"id": "center", "name": "Region Distance", "fn": sort_peak_center},
    {"id": "spread", "name": "Region Width", "fn": sort_peak_spread},
    {"id": "sites", "name": "Region Matches", "fn": sort_peak_sites},
    {"id": "neg_pvalue", "name": "<i>p</i>-value (Neg Data)",
      "fn": sort_peak_neg_pvalue, "show": data['options']['neg_sequences']},
    {"id": "neg_sites", "name": "Region Matches in (Neg Data)",
      "fn": sort_peak_neg_sites, "show": data['options']['neg_sequences']},
    {"id": "mcc", "name": "Matthew's Correlation Coefficient",
      "fn": sort_peak_mcc, "show": data['options']['mcc']}
  ],
};

pre_load_setup();


/*
 * name_from_source
 *
 * Makes a file name more human friendly to read.
 */
function name_from_source(source) {
  "use strict";
  var file, noext;
  if (source == "-") {
    return "-"
  }
  //assume source is a file name
  file = source.replace(/^.*\/([^\/]+)$/,"$1");
  noext = file.replace(/\.[^\.]+$/, "");
  return noext.replace(/_/g, " ");
}

/*
 * pre_load_setup
 *
 *  Sets up initial variables which may be
 *  required for the HTML document creation.
 */
function pre_load_setup() {
  "use strict";
  var i, motifs, params, showlist, show, parts, db_i, id, j, motif;
  var seq_db, db, dbs, sites, max_site, max_site_pos;
  for (i = 0; i < palate.length -1; i++) {
    s_motifs[i] = null;
    s_swatches[i] = null;
    s_logos[i] = null;
  }
  s_count = 0;
  motifs = data["motifs"];
  if (data["options"]["neg_sequences"]) {
    motifs.sort(sort_motif_fisherpv);
  } else {
    motifs.sort(sort_motif_evalue);
  }
  // put a copy of the best evalue in the motif
  for (i = 0; i < motifs.length; i++) {
    motif = motifs[i];
    motif["best_log_adj_pvalue"] = motif["peaks"][0]["log_adj_pvalue"];
    // calculate the best probability
    max_site = 0;
    max_site_pos = 0;
    sites = motif["sites"];
    for (j = 0; j < sites.length; j++) {
      if (sites[j] > max_site) {
        max_site = sites[j];
        max_site_pos = j;
      }
    }
    motif["max_prob"] = max_site / motif["total_sites"];
    motif["max_prob_loc"] = max_site_pos + (motif["len"] / 2) - (data["seqlen"] / 2);
  }
  params = parse_params();
  if (params["show"]) {
    showlist = params["show"];
    for (i = 0; i < showlist.length; i++) {
      show = showlist[i];
      parts = show.match(/^db(\d+) (.+)$/);
      db_i = parseInt(parts[1]);
      id = parts[2];
      // loop over the motifs looking for a match
      for (j = 0; j < motifs.length; j++) {
        motif = motifs[j];
        if (motif["db"] == db_i && motif["id"] == id) {
          motif["colouri"] = s_count + 1;
          s_motifs[s_count] = motif;
          s_count++;
          break;
        }
      }
      // give up if we've used all the available colours
      if ((s_count + 1) >= palate.length) break; 
    }
  } else {
    s_count = Math.min(3, motifs.length);
    for (i = 0; i < s_count; i++) {
      motif = motifs[i];
      motif["colouri"] = i+1;
      s_motifs[i] = motif;
    }
  }
  calculate_seq_ids();
  // get the name of the sequence db
  seq_db = data['sequence_db'];
  if (!seq_db['name']) seq_db['name'] = name_from_source(seq_db['source']);
  // get the names of the motif databases
  dbs = data['motif_dbs'];
  for (i = 0; i < dbs.length; i++) {
    db = dbs[i];
    if (!db['name']) db['name'] = name_from_source(db['source']);
  }
}

function num_keys(e) {
  if (!e) var e = window.event;
  var code = (e.keyCode ? e.keyCode : e.which);
  var keychar = String.fromCharCode(code);
  var numre = /\d/;
  // only allow 0-9 and various control characters (Enter, backspace, delete)
  if (code != 8 && code != 9 && code != 13 && code != 46 && !numre.test(keychar)) {
    e.preventDefault();
  }
}

/*
 * toggle_column
 *
 * Adds or removes a class from the table displaying the 
 * centrally enriched motifs. This is primary used to set the visibility
 * of columns by using css rules. If the parameter 'show' is not passed
 * then the existence of the class will be toggled, otherwise it will be
 * included if show is false.
 */
function toggle_column(cls) {
  toggle_class($("motifs"), cls);
}

/*
 * toggle_filter
 *
 * Called when the user clicks a checkbox
 * to enable/disable a filter option.
 */
function toggle_filter(chkbox, filter_id) {
  var filter = $(filter_id);
  filter.disabled = !(chkbox.checked);
  if (!filter.disabled) {
    filter.focus();
    if (filter.select) filter.select();
  }
}

/*
 * enable_filter
 *
 * Called when the user clicks a filter label.
 * Enables the filter.
 */
function enable_filter(chkbox_id, filter_id) {
  var chkbox = $(chkbox_id);
  if (!chkbox.checked) {
    var filter = $(filter_id);
    $(chkbox_id).checked = true;
    filter.disabled = false;
    filter.focus();
    if (filter.select) filter.select();
  }
}

/*
 * update_filter
 *
 * If the key event is an enter key press then
 * update the filter on the CEM table
 */
function update_filter(e) {
  if (!e) var e = window.event;
  var code = (e.keyCode ? e.keyCode : e.which);
  if (code == 13) {
    e.preventDefault();
    make_CEM_table();
  }
}

/*
 * toggle_lock
 *
 */

/*
 * clear_selection
 *
 * Called when the user clicks the X in the
 * title of the centrally enriched motifs and
 * causes all the motifs to be deselected.
 */
function clear_selection() {
  for (var i = 1; i < palate.length; i++) {
    var motif = s_motifs[i-1];
    var swatch = s_swatches[i-1];
    s_motifs[i-1] = null;
    s_swatches[i-1] = null;
    s_logos[i-1] = null;
    if (motif) delete motif['colouri'];
    if (swatch) swatch.style.backgroundColor = palate[0];
  }
  s_count = 0;
  if (!data['options']['noseq']) {
    //reset_sequences_IDs_list();
    union_seq_ids = [];
    intersect_seq_ids = [];
    display_seq_ids();
  }
  make_PM_table();
  make_MP_graph();
}

/*
 * toggle_graph_motif
 *
 * Activated when the user clicks on a swatch in the centrally enriched motifs 
 * table. If the motif is already selected it deselects it otherwise it picks 
 * an unused colour and selects it for graphing.
 */
function toggle_graph_motif(e) {
  "use strict";
  var swatch;
  if (!e) var e = window.event;
  if (e.target) swatch = e.target;
  else if (e.srcElement) swatch = e.srcElement;
  // in case we land on a text node
  if (swatch.nodeType == 3) swatch = swatch.parentNode;
  // find the containing tbody
  var group = find_parent(swatch.parentNode, "peak_group");
  // get the attached motif
  var motif = group['data_motif'];
  if (motif['colouri'] && motif['colouri'] != 0) {
    // deselect the motif
    var i = motif['colouri'];
    s_motifs[i-1] = null;
    s_swatches[i-1] = null;
    s_logos[i-1] = null;
    delete motif['colouri'];
    swatch.style.backgroundColor = palate[0];
    s_count--;
    if (!data['options']['noseq']) calculate_seq_ids();
  } else {
    // select an unused colour
    var i;
    for (i = 1; i < palate.length; i++) {
      if (!s_motifs[i-1]) break;
    }
    if (i == palate.length) {
      alert("All graph colours used. Please deselect motifs before adding more.");
      return;
    }
    s_motifs[i-1] = motif;
    s_swatches[i-1] = swatch;
    motif['colouri'] = i;
    swatch.style.backgroundColor = palate[i];
    s_count++;
    if (!data['options']['noseq']) {
      if (s_count == 1) {
        union_seq_ids = motif["seqs"].slice(0);
        intersect_seq_ids = union_seq_ids.slice(0);
      } else {
        union_seq_ids = union_nums(union_seq_ids, motif["seqs"]);
        intersect_nums(intersect_seq_ids, motif["seqs"]);
      }
    }
  }
  if (!data['options']['noseq']) display_seq_ids();
  make_PM_table();
  make_MP_graph();
}

/*
 * move_legend
 *
 * Called when the user clicks on the graph
 * to move the legend location.
 */
function move_legend(e) {
  var target;
  if (!e) var e = window.event;
  if (e.target) target = e.target;
  else if (e.srcElement) target = e.srcElement;
  var elemXY = coords(target);
  var posx = 0;
  var posy = 0;
  if (e.pageX || e.pageY)   {
    posx = e.pageX;
    posy = e.pageY;
  }
  else if (e.clientX || e.clientY)   {
    posx = e.clientX + document.body.scrollLeft
      + document.documentElement.scrollLeft;
    posy = e.clientY + document.body.scrollTop
      + document.documentElement.scrollTop;
  }
  var x = posx - elemXY[0];
  var y = posy - elemXY[1];
  legend_x = x - graph_metrics.legend_width/2;
  legend_y = y - graph_metrics.legend_height/2;
  if (parseInt($("legend").value) != 0) make_MP_graph();
}

function highlight_peak(e) {
  var target, pop;
  pop = $("pop_peak");
  if (pop.style.visibility === "visible") return;
  if (!e) var e = window.event;
  if (e.target) target = e.target;
  else if (e.srcElement) target = e.srcElement;
  while (!target['data_peak']) {
    if (target.nodeName == 'BODY') return;
    target = target.parentNode;
  }
  var peak = target['data_peak'];

  var l = graph_metrics.left_mark;
  var w = graph_metrics.right_mark - graph_metrics.left_mark;
  var d = graph_metrics.right_val - graph_metrics.left_val;
  var unit = w / d;

  var peak_width = peak["spread"];
  var peak_left = peak["center"] - (peak["spread"] / 2);
  var peak_offscreen = 0;
  if (peak_left < graph_metrics.left_val) {
    peak_offscreen = graph_metrics.left_val - peak_left;
    peak_width = Math.max(0, peak_width - peak_offscreen);
    peak_left = graph_metrics.left_val;
  } else if ((peak_left + peak_width) > graph_metrics.right_val) {
    peak_offscreen = (peak_left + peak_width) - graph_metrics.right_val;
    peak_width = Math.max(0, peak_width - peak_offscreen);
    peak_left = Math.min(peak_left, graph_metrics.right_val);
  }
  
  if (peak_width > 0) {
    pop.style.width = (peak_width * unit) + "px";
    pop.style.left = (l + ((peak_left - graph_metrics.left_val) * unit)) + "px";
    pop.style.visibility = "visible";
  }
}

function dehighlight_peak(e) {
  $("pop_peak").style.visibility = "hidden";
}

/*
 * hover_logo
 *
 * Activated when the user hovers their cursor over a row in the centrally 
 * enriched motifs table. After a fifth of a second delay, displays a box with 
 * the logo and reverse complement logo.
 */
function hover_logo(e) {
  var popup;
  if (this === logo_row) return;
  logo_row = this;
  if (logo_timer) clearTimeout(logo_timer);
  logo_row.addEventListener('mousemove', move_logo, false);
  popup = $("logo_popup");
  if (popup["data_motif"] != logo_row["data_motif"]) {
    logo_timer = setTimeout(popup_logo, 200);
  } else {
    popup.style.display = "block";
  }
}

/*
 * dehover_logo
 *
 * Activated when the user moves their cursor off a row in the centrally 
 * enriched motifs table. Hides the logo box (or stops it from being displayed).
 */
function dehover_logo(e) {
  var popup = $("logo_popup");
  popup.style.display = "none";
  if (logo_timer) clearTimeout(logo_timer);
  if (logo_row) logo_row.removeEventListener('mousemove', move_logo, false);
  logo_row = null;
  logo_timer = null;
}

/*
 * move_logo
 * 
 * keeps the motif logo at a set distance from the cursor.
 */
function move_logo(e) {
  var popup = $("logo_popup");
  popup.style.left = (e.pageX + 20) + "px";
  popup.style.top = (e.pageY + 20) + "px";
}

/*
 * popup_logo
 *
 * Activated when the user has had the cursor over a row in the centrally 
 * enriched motifs table for longer than 1/5th of a second. It draws the
 * motif logos in a popup and displays the popup.
 */
function popup_logo() {
  if (logo_row == null) return;
  var motif = logo_row["data_motif"];
  var pspm = new Pspm(motif['pwm'], motif['id'], 0, 0, 
      motif['motif_nsites'], motif['motif_evalue']);
  var canvas = $("logo_popup_canvas");
  var logo = logo_1(alphabet, "", pspm);
  draw_logo_on_canvas(logo, canvas, false, 0.5);
  if (!data["options"]["norc"]) {
    // draw RC motif
    var canvas_rc = $("logo_popup_canvas_rc");
    var pspm_rc = pspm.copy().reverse_complement(alphabet);
    var logo_rc = logo_1(alphabet, "", pspm_rc);
    draw_logo_on_canvas(logo_rc, canvas_rc, false, 0.5);
  }

  var popup = $("logo_popup");
  popup.style.display = "block";
  popup['data_motif'] = motif;
  logo_timer = null;
}

/*
 * swap_colour
 *
 * Activated when the user clicks a swatch in the plotted motifs table.
 * If a swatch has already been selected then swap colours with this one,
 * otherwise record which swatch has been selected.
 */
function swap_colour(e) {
  var swatch;
  if (!e) var e = window.event;
  if (e.target) swatch = e.target;
  else if (e.srcElement) swatch = e.srcElement;
  var row = swatch;
  while (!row['motif']) row = row.parentNode;
  var motif = row['motif'];
  if (swap == null) {
    swatch.appendChild(document.createTextNode("\u21c5"));
    swap = motif;
  } else if (swap == motif) {
    while (swatch.firstChild) swatch.removeChild(swatch.firstChild);
    swap = null;
  } else {
    var swapi = swap['colouri'];
    var motifi = motif['colouri'];
    motif['colouri'] = swapi;
    swap['colouri'] = motifi;
    // swap swatches
    var temp = s_swatches[swapi-1];
    s_swatches[swapi-1] = s_swatches[motifi-1];
    s_swatches[motifi-1] = temp;
    // swap motifs
    temp = s_motifs[swapi-1];
    s_motifs[swapi-1] = s_motifs[motifi-1];
    s_motifs[motifi-1] = temp;
    // swap logos
    temp = s_logos[swapi-1];
    s_logos[swapi-1] = s_logos[motifi-1];
    s_logos[motifi-1] = temp;
    // update swatch colours
    s_swatches[swapi-1].style.backgroundColor = palate[swapi];
    s_swatches[motifi-1].style.backgroundColor = palate[motifi];
    swap = null;
    make_PM_table();
    make_MP_graph();
  }
}

/*
 * set_colour
 *
 * Activated when the user clicks a swatch in the unused colours section.
 * If a swatch has already been selected then set its colour to this one,
 * otherwise warn the user that they must select a motif swatch first.
 */
function set_colour(e) {
  var swatch;
  if (!e) var e = window.event;
  if (e.target) swatch = e.target;
  else if (e.srcElement) swatch = e.srcElement;
  var colouri = swatch['colouri'];
  if (swap) {
    var swapi = swap['colouri'];
    swap['colouri'] = colouri;
    s_swatches[colouri-1] = s_swatches[swapi-1];
    s_motifs[colouri-1] = s_motifs[swapi-1];
    s_logos[colouri-1] = s_logos[swapi-1];
    s_swatches[swapi-1] = null;
    s_motifs[swapi-1] = null;
    s_logos[swapi-1] = null;
    s_swatches[colouri-1].style.backgroundColor = palate[colouri];
    swap = null;
    make_PM_table();
    make_MP_graph();
  } else {
    alert("You must select a motif to set to this colour first.");
  }
}

/*
 * page_loaded
 *
 * Called when the page has loaded for the first time.
 */
function page_loaded() {
  first_load_setup();
  post_load_setup();
}

/*
 * page_loaded
 *
 * Called when a cached page is reshown.
 */
function page_shown(e) {
  if (e.persisted) post_load_setup();
}

/*
 * union_nums
 *
 * Returns a union of two sorted lists of numbers.
 */
function union_nums(list1, list2) {
  "use strict";
  var i, j, list_out;
  i = j = 0;
  list_out = [];
  while (i < list1.length && j < list2.length) {
    if (list1[i] < list2[j]) {
      list_out.push(list1[i]);
      i++;
    } else if (list1[i] === list2[j]) {
      list_out.push(list1[i]);
      i++;
      j++;
    } else { // list1[i] > list2[j]
      list_out.push(list2[j]);
      j++;
    }
  }
  if (i < list1.length) {
    for (; i < list1.length; i++) {
      list_out.push(list1[i]);
    }
  } else {
    for (; j < list2.length; j++) {
      list_out.push(list2[j]);
    }
  }
  return list_out;
}

/*
 * intersect_nums
 *
 * Removes numbers from the target_list which do not also appear in the
 * incoming_list. Both lists must be sorted.
 */
function intersect_nums(target_list, incoming_list) {
  "use strict";
  var i, j, shift;
  shift = i = j = 0;
  while (i < target_list.length && j < incoming_list.length) {
    if (target_list[i] > incoming_list[j]) {
      j++;
    } else if (target_list[i] < incoming_list[j]) {
      i++;
      shift++;
    } else {
      if (shift > 0) target_list[i - shift] = target_list[i];
      i++;
      j++;
    }
  }
  target_list.length = i - shift;
}

function calculate_seq_ids() {
  var i, motif;
  // calculate sequence id sets
  if (!data['options']['noseq']) {
    if (s_count == 0) {
      union_seq_ids = [];
      intersect_seq_ids = [];
    } else {
      for (i = 0; i < s_motifs.length; i++) {
        motif = s_motifs[i];
        if (motif) {
          union_seq_ids = motif["seqs"].slice(0);
          intersect_seq_ids = union_seq_ids.slice(0);
          break;
        }
      }
      for (; i < s_motifs.length; i++) {
        motif = s_motifs[i];
        if (motif === null) continue;
        union_seq_ids = union_nums(union_seq_ids, motif["seqs"]);
        intersect_nums(intersect_seq_ids, motif["seqs"]);
      }
    }
  }
}

function display_seq_ids() {
  var u_n_cont, u_p_cont, i_n_cont, i_p_cont, i_s_cont;
  var union_count, intersect_count, total_count;
  var union_percent, intersect_percent, intersect_seqs, i;
  var sequences;
  sequences = data["sequences"];
  union_count = union_seq_ids.length;
  intersect_count = intersect_seq_ids.length;
  total_count = sequences.length;
  union_percent = Math.round((union_count / total_count) * 100);
  intersect_percent = Math.round((intersect_count / total_count) * 100);
  u_n_cont = $('matching_union_number');
  u_p_cont = $('matching_union_percentage');
  i_n_cont = $('matching_intersection_number');
  i_p_cont = $('matching_intersection_percentage');
  i_s_cont = $('matching_intersection_sequences');
  u_n_cont.innerHTML = "";
  u_n_cont.appendChild(document.createTextNode(union_count));
  u_p_cont.innerHTML = "";
  u_p_cont.appendChild(document.createTextNode(union_percent));
  i_n_cont.innerHTML = "";
  i_n_cont.appendChild(document.createTextNode(intersect_count));
  i_p_cont.innerHTML = "";
  i_p_cont.appendChild(document.createTextNode(intersect_percent));
  intersect_seqs = [];
  for (i = 0; i < intersect_count; i++) {
    intersect_seqs.push(sequences[intersect_seq_ids[i]]);
  }
  i_s_cont.value = intersect_seqs.join("\n");
}

/*
 * find_highest_peaks
 *
 * Locate highest peaks for every motifs
 * Compute every x position and keep the highest one
 */
/*
function find_highest_peaks(smoothing_type) {
  var sequence_length=data['seqlen'];
  var windo=parseInt($("windo").value);
  var half_window = windo / 2;
  var weights = [];
  var tbl = $("motifs");
  var tbody = tbl.tBodies[0];
  if (smoothing_type==1) { // Only computed for weighted moving average
    var total_weight = 0;
    for (var i = 0; i < windo; i++) {
      var pos = i + 0.5;
      var weight = (pos < half_window ? pos / half_window : (windo - pos) / half_window);
      weights.push(weight);
      total_weight += weight;
    }
  }
  for (var i = 0; i < data['motifs'].length; i++) { // For each motif
    var motif = data['motifs'][i];
    var sites = motif['sites'];
    var max_prob=-1;
    var index_max_prob=-1;
    var xpos = (motif.len / 2) - (sequence_length / 2) + half_window;
    var end = sites.length - windo;
    for (var j = 0; j < end; j++, xpos += 1) {
      var sum = 0;
      for (var k = 0; k < windo; k++) {
        sum += (smoothing_type==1) ? sites[j + k] * weights[k] : sites[j + k];
      }
      var avg = (smoothing_type==1) ? sum / total_weight : sum / windo;
      var prob = avg / motif['total_sites'];
      if (prob>max_prob) { // If Y axis value is higher than saved one
        max_prob=prob; // Save it
        index_max_prob=Math.floor(xpos); // Save the location
      }
    }
    motif["highest_peak"]=index_max_prob; // Save highest peak location for this motif
  }
}*/

/*
 * first_load_setup
 *
 * Setup state that is dependent on everything having been loaded already.
 * On browsers which cache state this is only run once.
 */
function first_load_setup() {
  if (data['options']['noseq']) {
    // no sequence ids to display
    $('seq_area').style.display='none';
  }
  if (!data['options']['local']) {
    // bins are centered, there is only one peak
    $('show_blocation').checked = false;
    $('CB_show_blocation').style.display='none';
    $('box_peak_sort').style.display = 'none';
    toggle_class($('motifs'), 'hide_OEbins', true);
  }
  if (!data['options']['neg_sequences']) {
    $('show_fisherpv').checked = false;
    $('show_negtsites').checked = false;
    $('show_negbsites').checked = false;
    $('show_negative_binomial').checked = false;
    // no negative sites, so hide negative bin sites and total
    $('CB_show_plot_negative').style.display= 'none';
    $('plot_negative').value = 0;
    $('CB_show_negbsites').style.display= 'none';
    $('CB_show_negtsites').style.display= 'none';
    $('CB_show_negative_binomial').style.display='none';
    $('CB_filter_on_negbintest').style.display='none';
    $('cb_show_fisherpv').style.display = 'none';
    $('cb_filter_on_fisherpv').style.display = 'none';
  }
  if (data['options']['disc']) {
    // negative data set was not used with a discriminative search
    $('cb_show_fisherpv').style.display = 'none';
  }
  if (!data['options']['mcc']) {
    $('CB_show_MCC').style.display='none';
  }
  if (!data['options']['optimize_score']) {
    // per motif score optimisation turned off, so hide column
    $('show_score').checked = false;
  }
}

/*
 * post_load_setup
 *
 * Setup state that is dependent on everything having been loaded already.
 */
function post_load_setup() {
  "use strict";
  var tbl, i;
  if (data["options"]["norc"]) $("logo_popup_canvas_rc").style.display = "none";
  $("filter_id").disabled = !($("filter_on_id").checked);
  $("filter_alt").disabled = !($("filter_on_alt").checked);
  $("filter_evalue").disabled = !($("filter_on_evalue").checked);
  $("filter_binwidth").disabled = !($("filter_on_binwidth").checked);
  $("filter_negbintest").disabled = !($("filter_on_negbintest").checked);
  tbl = $("motifs");
  toggle_class(tbl, "hide_db", !$("show_db").checked);
  toggle_class(tbl, "hide_id", !$("show_id").checked);
  toggle_class(tbl, "hide_name", !$("show_name").checked);
  toggle_class(tbl, "hide_fisherpv", !$("show_fisherpv").checked);
  toggle_class(tbl, "hide_evalue", !$("show_evalue").checked);
  toggle_class(tbl, "hide_pvalue", !$("show_pvalue").checked);
  toggle_class(tbl, "hide_MCC", !$("show_MCC").checked);
  toggle_class(tbl, "hide_blocation", !$("show_blocation").checked);
  toggle_class(tbl, "hide_bwidth", !$("show_bwidth").checked);
  toggle_class(tbl, "hide_bsites", !$("show_bsites").checked);
  toggle_class(tbl, "hide_tsites", !$("show_tsites").checked);
  toggle_class(tbl, "hide_negbsites", !$("show_negbsites").checked);
  toggle_class(tbl, "hide_negtsites", !$("show_negtsites").checked);
  toggle_class(tbl, "hide_negative_binomial", !$("show_negative_binomial").checked);
  toggle_class(tbl, "hide_maxprob", !$("show_maxprob").checked);
  toggle_class(tbl, "hide_hpeak", !$("show_hpeak").checked); //max prob location
  toggle_class(tbl, "hide_nbinstested", !$("show_nbinstested").checked);
  toggle_class(tbl, "hide_score", !$("show_score").checked);
  make_PM_table();
  make_CEM_table();
  make_MP_graph();
  add_MP_graph_listeners();
  if (!data['options']['noseq']) display_seq_ids();
}

/*
 *  sort_motif_id
 *
 *  Takes 2 motif objects and compares them based on id and database.
 */
function sort_motif_id(m1, m2) {
  var diff;
  diff = m1['id'].localeCompare(m2['id']);
  if (diff == 0) {
    diff = m1['db'] - m2['db'];
  }
  return diff;
}

/*
 * sort_motif_alt
 *
 * Takes 2 motif objects and compares them based on alternate id.
 */
function sort_motif_alt(m1, m2) {
  var diff;
  if (m1['alt'] && m2['alt']) {
    diff = m1['alt'].localeCompare(m2['alt']);
    if (diff != 0) return diff;
    return sort_motif_evalue(m1, m2);
  } else {
    if (m1['alt']) {
      return -1;
    } else {
      return 1;
    }
  }
}

/*
 * sort_motif_fisherpv
 *
 * Takes 2 motif objects and compares them based on the Fisher pvalue
 */
function sort_motif_fisherpv(m1, m2) {
  var diff, p1, p2;
  p1 = m1['peaks'][0];
  p2 = m2['peaks'][0];
  diff = p1['fisher_log_adj_pvalue'] - p2['fisher_log_adj_pvalue'];
  if (diff != 0) return diff;
  diff = p2['pos_sites'] - p1['pos_sites'];
  if (diff != 0) return diff;
  return sort_motif_evalue(m1, m2);
}

function sort_motif_neg_pvalue(m1, m2) {
  var diff, p1, p2;
  //return sort_motif_evalue(m1, m2);
  p1 = m1['peaks'][0];
  p2 = m2['peaks'][0];
  diff = p1['neg_log_adj_pvalue'] - p2['neg_log_adj_pvalue'];
  if (diff != 0) return diff;
  diff = p2['neg_sites'] - p1['neg_sites'];
  if (diff != 0) return diff;
  return sort_motif_evalue(m1, m2);
}

function sort_motif_neg_sites(m1, m2) {
  var diff, p1, p2;
  p1 = m1['peaks'][0];
  p2 = m2['peaks'][0];
  diff = p1['neg_sites'] - p2['neg_sites'];
  if (diff != 0) return diff;
  diff = p1['neg_log_adj_pvalue'] - p2['neg_log_adj_pvalue'];
  if (diff != 0) return diff;
  return sort_motif_evalue(m1, m2);
}

/*
 * sort_motif_evalue
 *
 * Takes 2 motif objects and compares them based on the log_adj_pvalue.
 */
function sort_motif_evalue(m1, m2) {
  var diff, p1, p2;
  p1 = m1['peaks'][0];
  p2 = m2['peaks'][0];
  diff = p1['log_adj_pvalue'] - p2['log_adj_pvalue'];
  if (diff != 0) return diff;
  diff = p1['spread'] - p2['spread'];
  if (diff != 0) return diff;
  return sort_motif_id(m1, m2);
}

/*
 * sort_motif_spread
 *
 * Takes 2 motif objects and compares them based on the bin_width.
 */
function sort_motif_spread(m1, m2) {
  var diff, p2, p2;
  p1 = m1['peaks'][0];
  p2 = m2['peaks'][0];
  diff = p1['spread'] - p2['spread'];
  if (diff != 0) return diff;
  diff = p1['log_adj_pvalue'] - p2['log_adj_pvalue'];
  if (diff != 0) return diff;
  return sort_motif_id(m1, m2);
}

/*
 * sort_motif_probability
 *
 * Takes 2 motif objects and compares them based on the maximum probability.
 */
function sort_motif_probability(m1, m2) {
  var diff;
  diff = m2['max_prob'] - m1['max_prob'];
  if (diff != 0) return diff;
  return sort_motif_evalue(m1, m2);
}

/*
 * sort_motif_sites
 *
 * Takes 2 motif objects and compares them based on the bin sites.
 */
function sort_motif_sites(m1, m2) {
  var diff, p1, p2;
  p1 = m1['peaks'][0];
  p2 = m2['peaks'][0];
  diff = p2['sites'] - p1['sites'];
  if (diff != 0) return diff;
  return sort_motif_evalue(m1, m2);
}

/*
 * sort_motif_center
 *
 * Takes 2 motif objects and compares them based on the abs(bin location).
 */
function sort_motif_center(m1, m2) {
  var diff, p1, p2;
  p1 = m1['peaks'][0];
  p2 = m2['peaks'][0];
  diff = Math.abs(p1['center']) - Math.abs(p2['center']);
  if (diff != 0) return diff;
  diff = p1['center'] - p2['center'];
  if (diff != 0) return diff;
  return sort_motif_evalue(m1, m2);
}

/*
 * sort_motif_position
 *
 * Takes 2 motif objects and compares them based on the bin location.
 */
function sort_motif_position(m1, m2) {
  var diff, p1, p2;
  p1 = m1['peaks'][0];
  p2 = m2['peaks'][0];
  diff = p1['center'] - p2['center'];
  if (diff != 0) return diff;
  return sort_motif_evalue(m1, m2);
}

/*
 * sort_motif_mcc
 *
 * Takes 2 motif objects and compares them based on the Matthews Correlation Coefficient.
 */
function sort_motif_mcc(m1, m2) {
  var diff, p1, p2;
  p1 = m1['peaks'][0];
  p2 = m2['peaks'][0];
  diff = p2['mcc'] - p1['mcc'];
  if (diff != 0) return diff;
  return sort_motif_evalue(m1, m2);
}

/*
 * sort_motif_total_sites
 *
 * Takes 2 motif objects and compares them based on the total sites.
 */
function sort_motif_total_sites(m1, m2) {
  var diff;
  diff = m2['total_sites'] - m1['total_sites'];
  if (diff != 0) return diff;
  return sort_motif_evalue(m1, m2);
}


/*
 * get_sort_cmp
 *
 * Gets the sorting comparator by index.
 *
 */
function motif_sort_cmp(index) {
  "use strict";
  if (index > 0 && index < sort_table["motif"].length) {
    return sort_table["motif"][index]["fn"];
  }
  return sort_motif_evalue;
}

/*
 * sort_peak_fisherpv
 *
 * Takes 2 peak objects and compares them based on the Fisher pvalue
 */
function sort_peak_fisherpv(p1, p2) {
  var diff;
  if (p1['filtered'] != p2['filtered']) return (p1['filtered'] ? 1 : -1);
  diff = p1['fisher_log_adj_pvalue'] - p2['fisher_log_adj_pvalue'];
  if (diff != 0) return diff;
  diff = p2['pos_sites'] - p1['pos_sites'];
  if (diff != 0) return diff;
  return sort_peak_evalue(p1, p2);
}

function sort_peak_evalue(p1, p2) {
  var diff;
  if (p1['filtered'] != p2['filtered']) return (p1['filtered'] ? 1 : -1);
  diff = p1['log_adj_pvalue'] - p2['log_adj_pvalue'];
  if (diff != 0) return diff;
  diff = p1['spread'] - p2['spread'];
  if (diff != 0) return diff;
  return p1['center'] - p2['center']; 
}

function sort_peak_mcc(p1, p2) {
  var diff;
  if (p1['filtered'] != p2['filtered']) return (p1['filtered'] ? 1 : -1);
  diff = p2['mcc'] - p1['mcc'];
  if (diff != 0) return diff;
  return sort_peak_evalue(p1, p2);
}

function sort_peak_center(p1, p2) {
  if (p1['filtered'] != p2['filtered']) return (p1['filtered'] ? 1 : -1);
  diff = Math.abs(p1['center']) - Math.abs(p2['center']); 
  if (diff != 0) return diff;
  return p1['center'] - p2['center']; 
}

function sort_peak_position(p1, p2) {
  if (p1['filtered'] != p2['filtered']) return (p1['filtered'] ? 1 : -1);
  return p1['center'] - p2['center']; 
}

function sort_peak_spread(p1, p2) {
  var diff;
  if (p1['filtered'] != p2['filtered']) return (p1['filtered'] ? 1 : -1);
  diff = p1['spread'] - p2['spread'];
  if (diff != 0) return diff;
  diff = p1['log_adj_pvalue'] - p2['log_adj_pvalue'];
  if (diff != 0) return diff;
  return p1['center'] - p2['center']; 
}

function sort_peak_sites(p1, p2) {
  var diff;
  if (p1['filtered'] != p2['filtered']) return (p1['filtered'] ? 1 : -1);
  diff = p2['sites'] - p1['sites'];
  if (diff != 0) return diff;
  return sort_peak_evalue(p1, p2);
}

function sort_peak_neg_pvalue(p1, p2) {
  var diff;
  if (p1['filtered'] != p2['filtered']) return (p1['filtered'] ? 1 : -1);
  diff = p1['neg_log_adj_pvalue'] - p2['neg_log_adj_pvalue'];
  if (diff != 0) return diff;
  diff = p2['neg_sites'] - p1['neg_sites'];
  if (diff != 0) return diff;
  return sort_peak_evalue(p1, p2);
}

function sort_peak_neg_sites(p1, p2) {
  var diff;
  if (p1['filtered'] != p2['filtered']) return (p1['filtered'] ? 1 : -1);
  diff = p1['neg_sites'] - p2['neg_sites'];
  if (diff != 0) return diff;
  diff = p1['neg_log_adj_pvalue'] - p2['neg_log_adj_pvalue'];
  if (diff != 0) return diff;
  return sort_peak_evalue(p1, p2);
}

function peak_sort_cmp(index) {
  "use strict";
  if (index > 0 && index < sort_table["region"].length) {
    return sort_table["region"][index]["fn"];
  }
  return sort_peak_evalue;
}

/*
 * log2str
 *
 * Converts a log value into scientific notation.
 */
function log2str(log_val, precision, max) {
  var log10_val, e, m;
  if (log_val < 0) {
    log10_val = log_val / Math.log(10);
    e = Math.floor(log10_val);
    m = Math.pow(10, log10_val - e);
    if (m + (0.5 * Math.pow(10, -precision)) >= 10) {
      m = 1;
      e += 1;
    }
    return "" + m.toFixed(precision) + "e" + e;
  } else if (typeof max !== "number" || Math.exp(log_val) < max) {
    return Math.exp(log_val).toFixed(precision);
  } else {
    return ">"+max;
  }
}

/*
 * str2log
 *
 * Converts a scientific notation number string to a log value.
 */
function str2log(str, default_value) {
  var sci_num_re, parts, m, e, log_num;
  if (typeof default_value === "undefined") {
    default_value = null;
  }
  sci_num_re = /^([+]?\d+(?:\.\d+)?)(?:[eE]([+-]\d+))?$/;
  parts = sci_num_re.exec(str);
  if (parts && parseFloat(parts[1]) != 0) {
    m = parseFloat(parts[1]);
    if (m === 0) return default_value;
    e = (parts.length == 3 && parts[2] != null ? parseInt(parts[2]) : 0);
    log_num = (((Math.log(m)/Math.log(10)) + e) * Math.log(10));
    return log_num;
  } else {
    return default_value;
  }
}

/*
 * pvstr
 *
 * Gets the p-value of the motif in string form.
 */
function pvstr(peak) {
  return log2str(peak['log_adj_pvalue'], 1);
}

/*
 * evstr
 *
 * Gets the E-value of the motif in string form.
 */
function evstr(peak, type) {
  return log2str(peak[type] + Math.log(data['tested']), 1);
}

/*
 * make_swatch
 *
 * Make a swatch block.
 */
function make_swatch(colouri) {
  var swatch = document.createElement('div');
  swatch.className = 'swatch';
  swatch.style.backgroundColor = palate[colouri];
  swatch.style.color = text_palate[colouri];
  return swatch;
}

function make_CEM_main_row(tbody, motif) {
  "use strict";
  var colouri, row, swatch, peak, expander;
  peak = motif['peaks'][0];
  colouri = motif['colouri'];
  if (!colouri) colouri = 0;
  row = tbody.insertRow(tbody.rows.length);
  row['data_peak'] = peak;
  swatch = make_swatch(colouri);
  swatch.onclick = toggle_graph_motif;
  if (colouri != 0) {
    s_swatches[colouri -1] = swatch;
  }
  add_cell(row, swatch);
  add_text_cell(row, motif_dbs[motif['db']]['name'], 'col_db');
  add_cell(row, make_link(motif['id'], motif['url']), 'col_id');
  add_text_cell(row, motif['alt'], "col_name");
  add_text_cell(row, evstr(peak, 'log_adj_pvalue'), 'col_evalue');
  if (data['options']['neg_sequences']) {
    add_text_cell(row, evstr(peak, 'fisher_log_adj_pvalue'), "col_fisherpv");
  }
  add_text_cell(row, pvstr(peak), 'col_pvalue');
  if (data['options']['neg_sequences']) {
    add_text_cell(row, log2str(peak['neg_log_adj_pvalue'],1), "col_negative_binomial");
  } else {
    add_text_cell(row, '', "col_negative_binomial");
  }
  if (data['options']['mcc']) {
    add_text_cell(row, peak['mcc'].toFixed(3), "col_MCC");
  } else {
    add_text_cell(row, '', "col_MCC");
  }
  add_text_cell(row, peak['center'], "col_blocation");
  add_text_cell(row, peak['spread'], 'col_bwidth');
  add_text_cell(row, Math.round(peak['sites']), "col_bsites");
  add_text_cell(row, motif['total_sites'], "col_tsites");
  if (data['options']['neg_sequences']) {
    add_text_cell(row, Math.round(peak['neg_sites']), "col_negbsites");
    add_text_cell(row, motif['neg_total_sites'], "col_negtsites");
  } else {
    add_text_cell(row, '', "col_negbsites")
    add_text_cell(row, '', "col_negtsites");
  }
  add_text_cell(row, motif["max_prob"].toFixed(4), "col_maxprob");
  add_text_cell(row, motif["max_prob_loc"], "col_problocation");
  add_text_cell(row, motif['n_tested'], "col_nbinstested");
  add_text_cell(row, motif['score_threshold'].toFixed(2), "col_score");
  if (motif['peaks'].length > 1) {
    expander = document.createElement('span');
    expander.appendChild(document.createTextNode("\u21A7"));
    expander.className = "expander";
    expander.addEventListener("click", toggle_peaks, false);
    add_cell(row, expander, "col_OEbins");
  } else {
    add_text_cell(row, '-', "col_OEbins");
  }
  row.addEventListener('mouseover', highlight_peak, false);
  row.addEventListener('mouseout', dehighlight_peak, false);
}

function make_CEM_sub_row(tbody, peak) {
  var row = tbody.insertRow(tbody.rows.length);
  row['data_peak'] = peak;
  row.className = "sub_peak";
  add_text_cell(row,'\u2022', 'no_swatch');
  add_text_cell(row, '', 'col_db');
  add_text_cell(row, '', 'col_id');
  add_text_cell(row, '', 'col_name');
  add_text_cell(row, evstr(peak, 'log_adj_pvalue'), 'col_evalue');
  if (data['options']['neg_sequences']) {
    add_text_cell(row, evstr(peak, 'fisher_log_adj_pvalue'), "col_fisherpv");
  }
  add_text_cell(row, pvstr(peak), 'col_pvalue');
  if (data['options']['neg_sequences']) {
    add_text_cell(row, log2str(peak['neg_log_adj_pvalue'],1), "col_negative_binomial");
  } else {
    add_text_cell(row, '', "col_negative_binomial");
  }
  if (data['options']['mcc']) {
    add_text_cell(row, peak['mcc'].toFixed(3), "col_MCC");
  } else {
    add_text_cell(row, '', "col_MCC");
  }
  add_text_cell(row, peak['center'], "col_blocation");
  add_text_cell(row, peak['spread'], 'col_bwidth');
  add_text_cell(row, Math.round(peak['sites']), "col_bsites");
  add_text_cell(row, '', "col_tsites");
  if (data['options']['neg_sequences']) {
    add_text_cell(row, Math.round(peak['neg_sites']), "col_negbsites");
  } else {
    add_text_cell(row, '', "col_negbsites")
  }
  add_text_cell(row, '', "col_negtsites");
  add_text_cell(row, '', "col_maxprob");
  add_text_cell(row, '', "col_problocation");
  add_text_cell(row, '', "col_nbinstested");
  add_text_cell(row, '', "col_score");
  add_text_cell(row, '', "col_OEbins");
  row.addEventListener('mouseover', highlight_peak, false);
  row.addEventListener('mouseout', dehighlight_peak, false);
}

function make_CEM_skip_row(tbody, n_skipped) {
  var row, cell, desc;
  if (n_skipped === 0) return;
  row = tbody.insertRow(tbody.rows.length);
  row.className = "sub_peak";

  if (n_skipped === 1) {
    desc = "1 peak hidden due to filters";
  } else {
    desc = n_skipped + " peaks hidden due to filters";
  }

  cell = row.insertCell(row.cells.length);
  cell.colSpan = 19;
  cell.style.textAlign = "center";
  cell.style.fontWeight = "bold";
  cell.appendChild(document.createTextNode(desc));
}

/*
 * make_CEM_table
 *
 * Generate the table which lists centrally enriched motifs.
 */
function make_CEM_table() {
  var motif_sort, peak_sort;
  var filter, motifs, filtered, motif, peaks, motif_dbs;
  var tbl, tbody, row, cell, i, j, skipped;
  // get the filter and sort comparator
  motif_sort = motif_sort_cmp(parseInt($('motif_sort').value));
  peak_sort = peak_sort_cmp(parseInt($('peak_sort').value));
  filter = get_filter();

  motifs = data['motifs'];
  // sort the motif peaks
  for (i = 0; i < motifs.length; i++) {
    motif = motifs[i];
    peaks = motif['peaks'];
    for (j = 0; j < peaks.length; j++) {
      peaks[j]["filtered"] = filter_peak(filter, peaks[j]);
    }
    peaks.sort(peak_sort);
  }
  // filter the motifs
  filtered = [];
  for (i = 0; i < motifs.length; i++) {
    if (filter_motif(filter, motifs[i])) continue;
    if (motifs[i]["peaks"][0]["filtered"]) continue;
    filtered.push(motifs[i]);
  }
  // sort
  filtered.sort(motif_sort);
  // limit
  if (filter["on_count"]) {
    if (filtered.length > filter["count"]) filtered.length = filter["count"];
  }
  // re-add any omitted s_motifs motifs
  outer_loop:
  for (i = 0; i < s_motifs.length; i++) {
    if (s_motifs[i] == null) continue;
    for (j =0; j < filtered.length; j++) {
      if (filtered[j] === s_motifs[i]) {
        continue outer_loop;
      }
    }
    filtered.push(s_motifs[i]);
  }
  // sort again
  filtered.sort(motif_sort);

  // clear the table
  tbl = $("motifs");
  for (i = tbl.tBodies.length - 1; i >= 0; i--) {
    tbody = tbl.tBodies[i];
    tbody.parentNode.removeChild(tbody);
  }

  motif_dbs = data['motif_dbs'];
  // add the new rows to the table
  for (i = 0; i < filtered.length; i++) {
    motif = filtered[i];
    peaks = motif['peaks'];
    tbody = document.createElement('tbody');
    tbody.className = "peak_group";
    tbody["data_motif"] = motif;
    tbody.addEventListener('mouseover', hover_logo, false);
    tbody.addEventListener('mouseout', dehover_logo, false);
    make_CEM_main_row(tbody, motif);
    skipped = 0;
    for (j = 1; j < peaks.length; j++) {
      if (filter_peak(filter, peaks[j])) {
        skipped++;
        continue;
      }
      make_CEM_sub_row(tbody, peaks[j]);
    }
    make_CEM_skip_row(tbody, skipped);
    tbl.appendChild(tbody);
  }
  // note the count of filtered motifs
  if (filtered.length != motifs.length) {
    skipped =  motifs.length - filtered.length;
    tbody = document.createElement('tbody');
    row = tbody.insertRow(tbody.rows.length);

    if (skipped === 1) {
      desc = "1 motif hidden due to filters";
    } else {
      desc = skipped + " motifs hidden due to filters";
    }
    cell = row.insertCell(row.cells.length);
    cell.colSpan = 19;
    cell.style.textAlign = "center";
    cell.style.fontWeight = "bold";
    cell.appendChild(document.createTextNode(desc));
    tbl.appendChild(tbody);
  }
}

function get_filter() {
  var filter, id_pat, alt_pat, alt_re, log_evalue_max, spread, count;
  var neg_log_pvalue_min;
  filter = {};
  // get the db filter
  filter["on_db"] = $("filter_on_db").checked;
  filter["db"] = $("filter_db").value;
  // get the id filter
  filter["on_id"] = $("filter_on_id").checked;
  id_pat = $("filter_id").value;
  try {
    filter["id"] = new RegExp(id_pat, "i");
    $("filter_id").className = "";
  } catch (err) {
    $("filter_id").className = "error";
    filter["on_id"] = false;
  }
  // get the name filter
  filter["on_alt"] = $("filter_on_alt").checked;
  alt_pat = $("filter_alt").value;
  try {
    filter["alt"] = new RegExp(alt_pat, "i");
    $("filter_alt").className = "";
  } catch (err) {
    filter["on_alt"] = false;
    $("filter_alt").className = "error";
  }
  // get the evalue filter
  filter["on_pvalue"] = $("filter_on_evalue").checked;
  if ((log_evalue_max = str2log($("filter_evalue").value)) != null) {
    filter["log_pvalue"] = log_evalue_max - Math.log(data['tested']);
    $("filter_evalue").className = "";
  } else {
    filter["on_pvalue"] = false;
    $("filter_evalue").className = "error";
  }
  // get the Fisher pv filter
  filter["on_fisherpv"] = $("filter_on_fisherpv").checked;
  if ((log_fisherpv_max = str2log($("filter_fisherpv").value)) != null) {
    filter["log_fisherpv"] = log_fisherpv_max - Math.log(data['tested']);
    $("filter_fisherpv").className = "";
  } else {
    filter["on_fisherpv"] = false;
    $("filter_fisherpv").className = "error";
  }
  // get the spread filter
  filter["on_spread"] = $("filter_on_binwidth").checked;
  spread = parseInt($("filter_binwidth").value);
  if (isNaN(spread) || spread < 1) {
    filter["on_spread"] = false;
    $("filter_binwidth").className = "error";
  } else {
    filter["spread"] = spread;
    $("filter_binwidth").className = "";
  }
  // get the negative binomial test filter
  filter["on_neg"] = data['options']['neg_sequences'] && $("filter_on_negbintest").checked;
  if ((neg_log_pvalue_min = str2log($("filter_negbintest").value)) != null) {
    $("filter_negbintest").className = "";
    filter["neg_log_pvalue"] = neg_log_pvalue_min - Math.log(data['tested']);
  } else {
    filter["on_neg"] = false;
    $("filter_negbintest").className = "error";
  }
  // get the motif count limit
  filter["on_count"] = $("filter_on_top").checked;
  count = parseInt($("filter_top").value);
  if (isNaN(count) || count < 1) {
    filter["on_count"] = false;
    $("filter_top").className = "error";
  } else {
    filter["count"] = count;
    $("filter_top").className = "";
  }
  return filter; 
}

function filter_motif(filter, motif) {
  if (filter["on_db"] && motif["db"] != filter["db"]) return true;
  if (filter["on_id"] && !filter["id"].test(motif["id"])) return true;
  if (filter["on_alt"] && !filter["alt"].test(motif["alt"])) return true;
  return false;
}

function filter_peak(filter, peak) {
  if (filter["on_fisherpv"] && peak["fisher_log_adj_pvalue"] > filter["log_fisherpv"]) return true;
  if (filter["on_pvalue"] && peak["log_adj_pvalue"] > filter["log_pvalue"]) return true;
  if (filter["on_spread"] && peak["spread"] > filter["spread"]) return true;
  if (filter["on_neg"] && peak["neg_log_adj_pvalue"] < filter["neg_log_pvalue"]) return true;
  return false;
}

function filter_CEM_table() {
  "use strict";
  var tbl, tbody, tr, motif, peaks, i, j, filter;
  tbl = $("motifs");
  filter = get_filter();
  for (i = 0; i < tbl.tBodies.length; i++) {
    tbody = tbl.tBodies[i];
    motif = tbody["data_motif"];
    toggle_class(tbody, "filtered", filter_motif(filter, motif));
    for (j = 0; j < tbody.rows.length; j++) {

    }
  }
}

/*
 * show_all_peaks
 *
 * Show or hide sub-peaks
 */
function show_all_peaks(param) {
  var tbl = $("motifs");
  var tbody = tbl.tBodies[0];
  var NValue=param.childNodes[0].nodeValue; // Catch the motif (based on argument value sent by clicking on arrow)
  var bin_number=0;
  for (var i=0; i<tbody.rows.length;i++) { // For each motif
    if (tbody.rows[i].className==param.className) {    // For each sub-peaks
      bin_number++;
      if (must_be_display(param.className,bin_number)==false || NValue=="\u21A5") { // If it has to be hidden or arrow was up
        tbody.rows[i].style.display="none";    // Hide it
      }
      else {
      tbody.rows[i].style.display="table-row";    // Show it
      }
    }
  }
  param.childNodes[0].nodeValue= (NValue=="\u21A7") ? "\u21A5" : "\u21A7" ; // Change arrow orientation
}

function toggle_peaks(e) {
  var expander, group;
  if (!e) e = window.event;
  if (e.target) expander = e.target;
  else if (e.srcElement) expander = e.srcElement;
  group = find_parent(expander.parentNode, "peak_group");
  toggle_class(group, "more");
}

/*
 * must_be_display
 *
 * Check all sub-peaks and verify if they have to be displayed or not (based on filters)
 */
function must_be_display(ID, bin_number) {
  "use strict";
  var motifs, i, motif, peak, log_pvalue_max, log_evalue_max, log_pvalue_min;
  motifs = data['motifs'];
  for (i = 0; i < motifs.length; i++) {
    motif = motifs[i];
    if (motif['db'] + motif['id'] == ID) {    // Catch the motif
      peak = motif['peaks'][bin_number];    // Catch the sub-peaks
      if ($("filter_on_evalue").checked) {
        if ((log_evalue_max = str2log($("filter_evalue").value)) != null) {
          log_pvalue_max = log_evalue_max - Math.log(data['tested']);
        } else {
          log_pvalue_max = 0;
        }
        if (log_pvalue_max < peak['log_adj_pvalue']) return false; 
      }
      if ($("filter_on_fisherpv").checked) {
        if ((log_evalue_max = str2log($("filter_fisherpv").value)) != null) {
          log_pvalue_max = log_evalue_max - Math.log(data['tested']);
        } else {
          log_pvalue_max = 0;
        }
        if (log_pvalue_max < peak['fisher_log_adj_pv']) return false; 
      }
      if ($("filter_on_negbintest").checked) {
        if ((log_pvalue_max = str2log($("filter_negbintest").value)) == null) {
          log_pvalue_min = Math.log(data['tested']);
        }
        if (log_pvalue_min > peak['neg_log_adj_pvalue']) return false; 
      }
      if ($("filter_on_binwidth").checked && 
          parseInt($("filter_binwidth").value) > peak['spread']) {
            return false;
      }
    }
  }
  return true;
}

/*
 * make_PM_table
 *
 * Generate the table which lists plotted motifs
 */
function make_PM_table() {
  swap = null;
  var graphed = [];
  var unused = [];
  for (var i = 1; i < palate.length; i++) {
    if (s_motifs[i-1]) graphed.push(s_motifs[i-1]);
    else unused.push(i);
  }
  graphed.sort(sort_motif_evalue);

  var tbl = $("graph_list");
  var tbody = tbl.tBodies[0];
  while (tbody.rows.length > 0) {
    tbody.deleteRow(0);
  }
  // add the new rows to the table
  for (var i = 0; i < graphed.length; i++) {
    var motif = graphed[i];
    var colouri = motif['colouri'];
    if (!colouri) colouri = 0;
    var row = tbody.insertRow(tbody.rows.length);
    row['motif'] = motif;
    var swatch = make_swatch(colouri);
    swatch.onmousedown = swap_colour;
    add_cell(row, swatch);
    add_cell(row, make_link(motif['id'], motif['url']));
    if (!s_logos[colouri-1]) {
      s_logos[colouri-1] = document.createElement("canvas");
      var pspm = new Pspm(motif['pwm'], motif['id'], 0, 0, 
          motif['motif_nsites'], motif['motif_evalue']);
      var logo = logo_1(alphabet, "", pspm);
      draw_logo_on_canvas(logo, s_logos[colouri-1], false, 0.3);
    }
    add_cell(row, s_logos[colouri-1]);
  }
  var div = $("unused_colours");
  while (div.firstChild) div.removeChild(div.firstChild);
  $("unused_colours_section").style.display = (unused.length > 0 ? "block" : "none");
  for (var i = 0; i < unused.length; i++) {
    var swatch = make_swatch(unused[i]);
    swatch['colouri'] = unused[i];
    swatch.onclick = set_colour;
    div.appendChild(swatch);
  }
}

/*
 * make_MP_graph
 *
 * Create a motif probability graph on the canvas.
 */
function make_MP_graph() {
  var canvas = $("graph");
  canvas.width = canvas.width;
  if (canvas.getContext) {
    var ctx = canvas.getContext('2d');
    make_MP_graph2(ctx, canvas.width, canvas.height);
  }
}

function handle_MP_graph_mousemove(e) {
  "use strict";
  var graph, start, stop, left, width, pop;
  graph = $("graph");
  graph_click["stop"] = e.pageX - graph.getBoundingClientRect().left;
  // constrain stop and start to the graph
  start = graph_click["start"];
  if (start < graph_metrics.left_mark) {
    start = graph_metrics.left_mark;
  } else if (start > graph_metrics.right_mark) {
    start = graph_metrics.right_mark;
  }
  stop = graph_click["stop"];
  if (stop < graph_metrics.left_mark) {
    stop = graph_metrics.left_mark;
  } else if (stop > graph_metrics.right_mark) {
    stop = graph_metrics.right_mark;
  }
  // pick the smaller to be the left
  if (start < stop) {
    left = start;
    width = stop - start;
  } else {
    left = stop;
    width = start - stop;
  }
  // visualize the selected range 
  pop = $("pop_peak");
  if (width > 10) {
    pop.style.width = width + "px";
    pop.style.left = left + "px";
    pop.style.visibility = "visible";
  } else {
    pop.style.visibility = "hidden";
  }
}

function handle_MP_graph_mouseup(e) {
  "use strict";
  var graph, start, stop, left, right, left_val, right_val, pop, l, w, d, unit;
  document.removeEventListener("mouseup", handle_MP_graph_mouseup, false);
  document.removeEventListener("mousemove", handle_MP_graph_mousemove, false);
  graph = $("graph");
  graph_click["stop"] = e.pageX - graph.getBoundingClientRect().left;
  // hide the range preview
  pop = $("pop_peak");
  pop.style.visibility = "hidden";
  // constrain stop and start to the graph
  start = graph_click["start"];
  if (start < graph_metrics.left_mark) {
    start = graph_metrics.left_mark;
  } else if (start > graph_metrics.right_mark) {
    start = graph_metrics.right_mark;
  }
  stop = graph_click["stop"];
  if (stop < graph_metrics.left_mark) {
    stop = graph_metrics.left_mark;
  } else if (stop > graph_metrics.right_mark) {
    stop = graph_metrics.right_mark;
  }
  // pick the smaller to be the left
  if (start < stop) {
    left = start;
    right = stop;
  } else {
    left = stop;
    right = start;
  }
  l = graph_metrics.left_mark;
  w = graph_metrics.right_mark - graph_metrics.left_mark;
  d = graph_metrics.right_val - graph_metrics.left_val;
  unit = w / d;
  // convert into graph values
  left_val = graph_metrics.left_val + Math.round((left - l) / unit);
  right_val =  graph_metrics.left_val + Math.round((right - l) / unit);
  // check if we're doing a legend move and not a zoom
  if ((right - left) < 10 || left_val == right_val) {
    move_legend(e);
    return;
  }
  // add a zoom to the stack
  zooms.push({"left_val": left_val, "right_val": right_val});
  make_MP_graph();
  $("zoom_out").disabled = false;
  $("zoom_center").disabled = false;
}

function handle_MP_graph_mousedown(e) {
  "use strict";
  var graph;
  document.addEventListener("mouseup", handle_MP_graph_mouseup, false);
  document.addEventListener("mousemove", handle_MP_graph_mousemove, false);
  graph = $("graph");
  graph_click["start"] = e.pageX - graph.getBoundingClientRect().left;
  
}

function handle_zoom_out_click() {
  if (zooms.length > 0) {
    zooms.pop();
    make_MP_graph();
    if (zooms.length == 0) {
      $("zoom_out").disabled = true;
      $("zoom_center").disabled = true;
    }
  }
}

function handle_zoom_center_click() {
  var zoom, reach;
  if (zooms.length > 0) {
    zoom = zooms.pop();
    reach = Math.max(1, Math.round((zoom["right_val"] - zoom["left_val"]) / 2));
    zooms.push({"left_val": -reach, "right_val": reach});
    make_MP_graph();
  }
}

function add_MP_graph_listeners() {
  "use strict";
  var graph, zoom_out, zoom_center;
  graph = $("graph");
  graph.addEventListener("mousedown", handle_MP_graph_mousedown, false);
  zoom_out = $("zoom_out");
  zoom_out.disabled = true;
  zoom_out.addEventListener("click", handle_zoom_out_click, false);
  zoom_center = $("zoom_center");
  zoom_center.addEventListener("click", handle_zoom_center_click, false);
  zoom_center.disabled = true;
}

function download_eps() {
  var canvas = $("graph");
  canvas.width = canvas.width;
  if (canvas.getContext) {
    var ctx = canvas.getContext('2d');
    var eps_ctx = new EpsContext(ctx, canvas.width, canvas.height);
    eps_ctx.register_font("14pt Helvetica", "Helvetica", 14 / 3 * 4);
    eps_ctx.register_font("16px Helvetica", "Helvetica", 16);
    eps_ctx.register_font("9px Helvetica", "Helvetica", 9);
    make_MP_graph2(ctx, canvas.width, canvas.height);
    $("eps_content").value = eps_ctx.eps();
  }
}

function make_MP_graph2(ctx, width, height) {
  "use strict";
  var windo, type, legend, plot_negative, plot_distance, motifs, rset, i, motif;
  var name, sig, colour, weights, graph, peak_highlight;
  // get the graph settings
  windo = parseInt($("windo").value);
  if (isNaN(windo) || windo < 1) {
    windo = 20;
    $("windo").value = 20;
  }
  type = parseInt($("plot_type").value);
  legend = parseInt($("legend").value);
  plot_negative = parseInt($("plot_negative").value);
  plot_distance = parseInt($("plot_distance").value) != 0;
  // get the selected motifs
  motifs = [];
  for (i = 0; i < s_motifs.length; i++) {
    if (s_motifs[i] != null) motifs.push(s_motifs[i]);
  }
  // sort the motifs
  motifs.sort(sort_motif_evalue);
  // create a result set with all the selected motifs
  rset = new CentrimoRSet(data["seqlen"]);
  for (i = 0; i < motifs.length; i++) {
    motif = motifs[i];
    name = motif["id"];
    if (motif["alt"]) name = motif["alt"] + " " + motif["id"];
    sig = "p=" + log2str(motif["best_log_adj_pvalue"], 1);
    colour = palate[motif["colouri"]];
    if (plot_negative) {
      rset.add(name, sig, colour, motif["len"], motif["total_sites"],
        motif["sites"], motif["neg_total_sites"], motif["neg_sites"]);
    } else {
      rset.add(name, sig, colour, motif["len"], motif["total_sites"],
        motif["sites"], 0, 0);
    }
  }
  // get the smoothing weights
  weights = (type == 1 ? triangular_weights(windo) : uniform_weights(windo));
  // get the zoom
  var range_left = null;
  var range_right = null;
  if (zooms.length > 0) {
    var zoom = zooms[zooms.length - 1];
    range_left = zoom["left_val"];
    range_right = zoom["right_val"];
  }
  // now make a new graph from the result set and smoothing weights
  graph = new CentrimoGraph(rset, weights, "CentriMo " + data["version"], range_left, range_right, plot_distance);
  graph_metrics = graph.draw_graph(ctx, width, height, legend, legend_x, legend_y);
  peak_highlight = $("pop_peak");
  peak_highlight.style.top = graph_metrics.top_edge + "px";
  peak_highlight.style.height = (graph_metrics.bottom_edge - graph_metrics.top_edge) + "px";
}

function sync_sort_selection () {
  "use strict";
  var i, mapper, motif_sort, region_sort;
  motif_sort = $("motif_sort");
  region_sort = $("peak_sort");
  if (typeof sync_sort_selection.mapper === "undefined") {
    var id2idx;
    // first map region id to index
    id2idx = {};
    for (i = 0; i < region_sort.options.length; i++) {
      id2idx[sort_table["region"][parseInt(region_sort.options[i].value, 10)]["id"]] = i;
    }
    // now generate a mapping of index in motif sort to index in region sort
    mapper = [];
    for (i = 0; i < motif_sort.options.length; i++) {
      mapper[i] = id2idx[sort_table["motif"][parseInt(motif_sort.options[i].value, 10)]["pair"]];
    }
    sync_sort_selection.mapper = mapper;
  } else {
    mapper = sync_sort_selection.mapper;
  }
  if (!$('allow_peak_sort').checked) {
    region_sort.selectedIndex = mapper[motif_sort.selectedIndex];
  }
}

function populate_sort_list (sellist, items) {
  var i, j, item, opt, priority, selected;
  priority = 0;
  selected = 0;
  for (i = 0, j = 0; i < items.length; i++) {
    item = items[i];
    if (typeof item["show"] === 'undefined' || item["show"]) {
      opt = document.createElement("option");
      opt.innerHTML = item["name"];
      opt.value = i;
      sellist.add(opt, null);
      if (typeof item["priority"] !== 'undefined' && item["priority"] > priority) {
        selected = j;
        priority = item["priority"];
      }
      j++;
    }
  }
  sellist.selectedIndex = selected;
}

function populate_sort_lists() {
  "use strict";
  var i, motif_sort, region_sort, motif_sort_list, region_sort_list;
  motif_sort = $("motif_sort");
  region_sort = $("peak_sort");
  try {motif_sort.removeEventListener("click", sync_sort_selection, false);} catch (e) {}
  try {motif_sort.removeEventListener("change", sync_sort_selection, false);} catch (e) {}
  for (i = motif_sort.options.length-1; i >= 0; i--) motif_sort.remove(i);
  for (i = region_sort.options.length-1; i >= 0; i--) region_sort.remove(i);
  motif_sort_list = sort_table["motif"];
  region_sort_list = sort_table["region"];
  populate_sort_list(motif_sort, motif_sort_list);
  populate_sort_list(region_sort, region_sort_list);
  sync_sort_selection();
  motif_sort.addEventListener("click", sync_sort_selection, false);
  motif_sort.addEventListener("change", sync_sort_selection, false);
}

    </script>
    <style type="text/css">
div.graph_box {
  position: relative;
}
div.pop_graph_peak {
  position:absolute; 
  left: 0;
  top: 0; 
  z-index: 5; 
  width: 10px;
  height: 10px; 
  opacity: 0.2; 
  background-color: #3333ff;
  visibility: hidden;
}
table.inputs {
  margin-top: 20px;
  border-collapse:collapse;
}
table.inputs * td, table.inputs * th {
  padding-left: 15px;
  padding-right: 15px;
  padding-top: 1px;
  padding-bottom: 1px;
}
table.motifs {
  margin-top: 20px;
  border-collapse:collapse;
}
table.motifs * td, table.motifs * th {
  padding-left: 15px;
  padding-right: 15px;
  padding-top: 1px;
  padding-bottom: 1px;
}
table.motifs * td.col_blocation, table.motifs * td.col_bwidth, 
table.motifs * td.col_bsites, table.motifs * td.col_tsites,
table.motifs * td.col_maxprob, table.motifs * td.col_problocation,
table.motifs * td.col_nbinstested, table.motifs * td.col_score {
  text-align: right;
  padding-right: 40px;
}
table.motifs tbody:hover { 
  background: #ddddff; 
}
table.motifs tbody tr:hover {
  background: #ccccff; 
}
table.hide_db .col_db {
  display: none;
}
table.hide_id .col_id {
  display: none;
}
table.hide_name .col_name {
  display: none;
}
table.hide_fisherpv .col_fisherpv {
  display: none;
}
table.hide_evalue .col_evalue {
  display: none;
}
table.hide_pvalue .col_pvalue {
  display: none;
}
table.hide_MCC .col_MCC {
  display: none;
}
table.hide_maxprob .col_maxprob {
  display: none;
}
table.hide_bsites .col_bsites {
  display: none;
}
table.hide_negbsites .col_negbsites {
  display: none;
}
table.hide_blocation .col_blocation {
  display: none;
}
table.hide_hpeak .col_problocation {
  display: none;
}
table.hide_bwidth .col_bwidth {
  display: none;
}
table.hide_tsites .col_tsites {
  display: none;
}
table.hide_negtsites .col_negtsites {
  display: none;
}
table.hide_nbinstested .col_nbinstested {
  display: none;
}
table.hide_score .col_score {
  display: none;
}
table.hide_negative_binomial .col_negative_binomial {
  display: none;
}
table.hide_OEbins .col_OEbins {
  display: none;
}
div.graph_options_section {
  width:30%; 
  float:right;
}
div.graph_options_section h5 {
  margin-top: 10px;
}
table.graph_list {
  border-collapse:collapse;
}
table.graph_list * td, table.graph_list * th {
  padding-left: 5px;
  padding-right: 5px;
  padding-top: 1px;
  padding-bottom: 1px;
}
th.deselect {
  font-size:25px; 
  cursor: default;
}
th.deselect:hover {
  color: red;
}
div.filter {
  display: inline-block;
  padding-right: 10px;
}
div.swatch {
  margin: auto;
  width: 20px;
  height: 20px;
  text-align: center;
  font-size: 16px;
  border: 1px solid black;
  cursor: default;
}
div.swatch:hover {
  width: 16px;
  height: 16px;
  font-size: 16px;
  border: 3px outset black;
}
div.swatch:active {
  width: 16px;
  height: 16px;
  font-size: 16px;
  border: 3px inset black;
}
span.expander {
  cursor: pointer;
  font-size: larger;
}
div.pop_logo {
  position:absolute;
  z-index:1;
  top:0px;
  left:0px;
  border: 3px outset black;
  background-color: white;
  display:none;
}
div.pop_colour {
  position:absolute;
  z-index:1;
  top:0px;
  left:0px;
  margin-left: -13px;
  margin-top: -13px;
  display:none;

}
div.pop_content {
  position:absolute;
  z-index:1;
  width:300px;
  padding: 5px;
  background: #E4ECEC;
  font-size: 12px;
  font-family: Arial;
  border-style: double;
  border-width: 3px;
  border-color: #AA2244;
  display:none;
}

span.arrow {
  font-size: larger;
  color: red;
}

#unused_colours div.swatch {
  display: inline-block;
  margin-right: 5px;
}

.no_swatch {
  text-align: center;
  font-size: larger;
}

input.error:enabled {
  background: #FF5555;
}

tr.sub_peak {
  display: none;
}

tbody.more > tr.sub_peak {
  display: table-row;
}

    </style>
    <style type="text/css">
/* The following is the content of meme.css */
body { background-color:white; font-size: 12px; font-family: Verdana, Arial, Helvetica, sans-serif;}

div.help {
  display: inline-block;
  margin: 0px;
  padding: 0px;
  width: 12px;
  height: 13px;
  cursor: pointer;
  background-image: url(data:image/gif;base64,R0lGODlhDAANAIABANR0AP///yH5BAEAAAEALAAAAAAMAA0AAAIdhI8Xy22MIFgv1DttrrJ7mlGNNo4c+aFg6SQuUAAAOw==);
}

div.help:hover {
  background-image: url(data:image/gif;base64,R0lGODlhDAANAKEAANR0AP///9R0ANR0ACH+EUNyZWF0ZWQgd2l0aCBHSU1QACH5BAEAAAIALAAAAAAMAA0AAAIdDGynCe3PgoxONntvwqz2/z2K2ImjR0KhmSIZUgAAOw==);
}

p.spaced { line-height: 1.8em;}

span.citation { font-family: "Book Antiqua", "Palatino Linotype", serif; color: #004a4d;}

p.pad { padding-left: 30px; padding-top: 5px; padding-bottom: 10px;}

td.jump { font-size: 13px; color: #ffffff; background-color: #00666a;
  font-family: Georgia, "Times New Roman", Times, serif;}

a.jump { margin: 15px 0 0; font-style: normal; font-variant: small-caps;
  font-weight: bolder; font-family: Georgia, "Times New Roman", Times, serif;}

h2.mainh {font-size: 1.5em; font-style: normal; margin: 15px 0 0;
  font-variant: small-caps; font-family: Georgia, "Times New Roman", Times, serif;}

h2.line {border-bottom: 1px solid #CCCCCC; font-size: 1.5em; font-style: normal;
  margin: 15px 0 0; padding-bottom: 3px; font-variant: small-caps;
  font-family: Georgia, "Times New Roman", Times, serif;}

h4 {border-bottom: 1px solid #CCCCCC; font-size: 1.2em; font-style: normal;
  margin: 10px 0 0; padding-bottom: 3px; font-family: Georgia, "Times New Roman", Times, serif;}

h5 {margin: 0px}

a.help { font-size: 9px; font-style: normal; text-transform: uppercase;
  font-family: Georgia, "Times New Roman", Times, serif;}

div.pad { padding-left: 30px; padding-top: 5px; padding-bottom: 10px;}

div.pad1 { margin: 10px 5px;}

div.pad2 { margin: 25px 5px 5px;}
h2.pad2 { padding: 25px 5px 5px;}

div.pad3 { padding: 5px 0px 10px 30px;}

div.box { border: 2px solid #CCCCCC; padding:10px; overflow: hidden;}

div.bar { border-left: 7px solid #00666a; padding:5px; margin-top:25px; }

div.subsection {margin:25px 0px;}

img {border:0px none;}

th.majorth {text-align:left;}
th.minorth {font-weight:normal; text-align:left; width:8em; padding: 3px 0px;}
th.actionth {font-weight:normal; text-align:left;}

.explain h5 {font-size:1em; margin-left: 1em;}

div.doc {margin-left: 2em; margin-bottom: 3em;}

th.trainingset {
  border-bottom: thin dashed black; 
  font-weight:normal; 
  padding:0px 10px;
}
div.pop_content {
  position:absolute;
  z-index:50;
  width:300px;
  padding: 5px;
  background: #E4ECEC;
  font-size: 12px;
  font-family: Arial;
  border-style: double;
  border-width: 3px;
  border-color: #AA2244;
  display:none;
}

div.pop_content > *:first-child {
  margin-top: 0px;
}

div.pop_content h1, div.pop_content h2, div.pop_content h3, div.pop_content h4, 
div.pop_content h5, div.pop_content h6, div.pop_content p {
  margin: 0px;
}

div.pop_content p + h1, div.pop_content p + h2, div.pop_content p + h3, 
div.pop_content p + h4, div.pop_content p + h5, div.pop_content p + h6 {
  margin-top: 5px;
}

div.pop_content p + p {
  margin-top: 5px;
}

div.pop_content > *:last-child {
  margin-bottom: 0px;
}

div.pop_content div.pop_close {
  /* old definition */
  float:right;
  bottom: 0;
}

div.pop_content span.pop_close, div.pop_content span.pop_back {
  display: inline-block;
  border: 2px outset #661429;
  background-color: #CCC;
  padding-left: 1px;
  padding-right: 1px;
  padding-top: 0px;
  padding-bottom: 0px;
  cursor: pointer;
  color: #AA2244; /*#661429;*/
  font-weight: bold;
}

div.pop_content span.pop_close:active, div.pop_content span.pop_back:active {
  border-style: inset;
}

div.pop_content span.pop_close {
  float:right;
  /*border: 2px outset #AA002B;*/
  /*color: #AA2244;*/
}

div.pop_content:not(.nested) .nested_only {
  display: none;
}

div.pop_back_sec {
  margin-bottom: 5px;
}

div.pop_close_sec {
  margin-top: 5px;
}

table.hide_advanced tr.advanced {
  display: none;
}
span.show_more {
  display: none;
}
table.hide_advanced span.show_more {
  display: inline;
}
table.hide_advanced span.show_less {
  display: none;
}


/*****************************************************************************
 * Program logo styling
 ****************************************************************************/
div.prog_logo {
  border-bottom: 0.25em solid #0f5f60;
  height: 4.5em;
  width: 24em;
  display:inline-block;
}
div.prog_logo img {
  float:left;
  width: 4em;
  border-style: none;
  margin-right: 0.2em;
}
div.prog_logo h1, div.prog_logo h1:hover, div.prog_logo h1:active, div.prog_logo h1:visited {
  margin:0;
  padding:0;
  font-family: Arial, Helvetica,  sans-serif;
  font-size: 3.2em;
  line-height: 1em;
  vertical-align: top;
  display: block;
  color: #026666;
  letter-spacing: -0.06em;
  text-shadow: 0.04em 0.06em 0.05em #666;
}
div.prog_logo h2, div.prog_logo h2:hover, div.prog_logo h2:active, div.prog_logo h2:visited {
  display: block;
  margin:0;
  padding:0;
  font-family: Helvetica, sans-serif;
  font-size: 0.9em;
  line-height: 1em;
  letter-spacing: -0.06em;
  color: black;
}

div.big.prog_logo {
  font-size: 18px;
}


    </style>
  </head>
  <body onload="page_loaded()" onpageshow="page_shown(event)">
    <!-- Popups -->
    <div id="logo_popup" class="pop_logo">
      <canvas id="logo_popup_canvas" width="200" height="50"></canvas>
      <canvas id="logo_popup_canvas_rc" width="200" height="50"></canvas>
    </div>
    <!-- Help popups -->
    <div class="pop_content" style="width:400px" id="pop_prob_graph">
      <p>Each "motif probability curve" shows the (estimated) probability of the
      <b>best</b> match to a given motif occurring at a given position in the
      input sequences.  This estimated probability is based only on sequences that
      contain at least one match with score greater than the minimum score defined
      for this motif, and is the maximum likelihood estimate of the conditional
      probability shown below.</p>
      <p>Points (X,Y) on the plot are:<br>
      &nbsp;&nbsp;Y = Pr(best match occurs at position X | sequence contains a match)</p>
      <p><b>Note:</b> The plots are smoothed according to the function 
      selected from the "Smoothing" menu on the right. Setting the smoothing
      window size to 1 turns off smoothing.</p>
      <p>If a negative dataset has been supplied then two lines are drawn for
      each motif representing both datasets. The normal dataset is plotted with
      a single unbroken line whereas the negative dataset is plotted with a
      dashed line.</p>
      <div style="float:right; bottom:0px;">[ 
        <a href="javascript:help_popup()">close</a> ]</div>
    </div>
    <div class="pop_content" id="pop_plotting">
      <p>This shows a listing of all motifs currently plotted on the graph.</p>
      <p>The color used to plot a motif can be changed by clicking on the
      color swatch next to the motif you want to change, followed by clicking
      on the color swatch you wish to swap it with.</p>
      <div style="float:right; bottom:0px;">[ 
        <a href="javascript:help_popup()">close</a> ]</div>
    </div>
    <div class="pop_content" id="pop_unused_colours">
      <p>These are extra colors you may use for plotting motifs.</p>  
      <p>Click on the color swatch next to one of the above motifs, then click 
      on one of these "unused color" swatches to change the color of the 
      motif's plot.</p>
      <div style="float:right; bottom:0px;">[ 
        <a href="javascript:help_popup()">close</a> ]</div>
    </div>
    <div class="pop_content" style="width: 500px" id="pop_graph">
      <p>These options change the display of the graph.</p>
      <dl>
        <dt>Smoothing:</dt>
        <dd><p>Allows selection of the smoothing function applied to the graph.</p>
        <p>The weighted moving average option uses weights shaped as an isosceles 
        triangle where the central point (or points in an even sized window) 
        get the maximum weight.</p>
        <p>The moving average simply weights all points in the smoothing window 
        equally.</p> 
        <p><b>Note:</b> Setting the smoothing window size to 1 turns off 
        smoothing.</dd></p>
        <dt>Window</dt>
        <dd><p>The window size used to smooth the graph. The larger the smoothing
        window size, the smoother the graph, at the cost of hiding detail.</p> 
        <p>Below a smoothing window size of 10, thinner lines are used on the 
        graph to allow more detail to be visible.</p>
        <p><b>Note:</b> Remember to press "return" or "enter" after changing 
        the number in the input box in order to see the effect of the new 
        smoothing window size.</p></dd>
        <dt>Legend</dt>
        <dd><p>Choose to display/disable the on-graph legend. The legend can be 
        moved by clicking on the graph.</p></dd>
        <dt>Negative Sequences</dt>
        <dd><p>Choose whether to plot the motif probability curve(s) for the
        negative sequences (if provided). The curve(s) are plotted as dashed
        lines, using the same color as the corresponding curve for the positive
        sequences.</p></dd>
        <dt>Zoom</dt>
        <dd>Drag a range on the graph to zoom into that section. Clicking
        "Undo Zoom" will return the view to the preiously displayed part of the
        graph and clicking "Center on 0" will move the view so 0 is in the
        center.</dd>
        <dt>Download EPS</dt>
        <dd><p>Download the graph that you are currently viewing as an 
        encapsulated postscript (EPS) image. EPS images are scalable making them
        suitable for publication.</p></dd>
      </dl>
      <div style="float:right; bottom:0px;">[ 
        <a href="javascript:help_popup()">close</a> ]</div>
    </div>
    <div class="pop_content" id="pop_filtering">
      <p>List only enriched motifs that meet the selected filter criteria below.</p>
      <p><b>Selected motifs are always listed</b>; deselect all motifs first by clicking on
      the "X" above the color swatches if you wish to filter all motifs.</p>
      <p>To filter on "ID" or "Name", you can enter any Javascript regular
      expression pattern.  See <a href="http://www.w3schools.com/jsref/jsref_obj_regexp.asp">here</a>
      for documentation on Javascript regular expression patterns.</p>
      <div style="float:right; bottom:0px;">[
        <a href="javascript:help_popup()">close</a> ]</div>
    </div>
    <div class="pop_content" id="pop_sorting">
      <p>Sorting is applied after filtering where possible (the exception being
      the "Top" filter) so the filters applied will affect the sort.  You can
      choose the motif sorting feature using the "Motifs:" menu.</p> 
      <p>If CentriMo is searching for locally enriched regions (not just centrally
      enriched regions), then multiple regions may be found per motif, and
      the "Regions:" menu will also be displayed.  In this case, 
      CentriMo first sorts all regions using the feature
      shown in the "Regions:" menu, and then it sorts the highest-ranked
      region of each motif according to the feature shown in the "Motifs:" menu.
      </p>
      <p>
      Unless you check the box next to the "Regions:" menu, it will automatically 
      show the same feature as the "Motifs:"
      menu (or "<i>E</i>-value" if a motif-only feature is chosen in the "Motifs:" menu). 
      </p>
      <p>
      <b>Note:</b>The motif <i>p</i>-value shown in the plot legend will always be for
      the region with the lowest <i>p</i>-value, and therefore may not match the value
      shown in the table "<i>p</i>-value" column 
      when the "Regions:" menu is not set to "<i>p</i>-value".
      </p>
      <div style="float:right; bottom:0px;">[ 
        <a href="javascript:help_popup()">close</a> ]</div>
    </div>
    <div class="pop_content" id="pop_db">
      <p>The name of the database (file name) that contains the motif.</p>
      <div style="float:right; bottom:0px;">[ 
        <a href="javascript:help_popup()">close</a> ]</div>
    </div>
    <div class="pop_content" id="pop_id">
      <p>A name for the motif that is unique in the motif database file.</p>
      <div style="float:right; bottom:0px;">[ 
        <a href="javascript:help_popup()">close</a> ]</div>
    </div>
    <div class="pop_content" id="pop_name">
      <p>An alternate name of the motif that may be provided in the motif database file.</p>
      <div style="float:right; bottom:0px;">[ 
        <a href="javascript:help_popup()">close</a> ]</div>
    </div>
    <div class="pop_content" id="pop_fisherpv">
      <p>The expected number motifs that would have least one 
        region as <b>comparatively</b> enriched for 
        best matches to the motif as the reported region in the
        <b>positive</b> sequences compared with the <b>negative</b>
        sequences.  
      </p>
      <p>
        The Fisher <i>E</i>-value is the (one-sided) <i>p</i>-value of 
	the one-sided Fisher's exact test that <b>at least</b> as many best matches 
	in the region in the positive sequences that contain at least 
	one match, multiplied by the number of motifs in the input database(s).
        The Fisher's exact test <i>p</i>-value is corrected for the number
	of regions and score thresholds tested ("Multiple Tests").
      </p>
      <p>
        Fisher's exact test assumes that the probability that the best match 
	(if any) falls into a given region is the same for all 
	positive and negative sequences.
      </p>
      <div style="float:right; bottom:0px;">[ 
        <a href="javascript:help_popup()">close</a> ]</div>
    </div>
    <div class="pop_content" id="pop_pvalue">
      <p>The probability that any tested region would be as enriched for 
      best matches to this motif as the reported region is.</p>
      <p>By default the <i>p</i>-value is calculated by using the one-tailed
      binomial test on the number of sequences with a match to the
      motif ("Total Matches") that have their best match in the reported region ("Region Matches"),
      corrected for the number of regions and score thresholds tested ("Multiple Tests"). 
      The test assumes that the probability that the best match in a sequence falls
      in the region is the region width divided by the number of
      places a motif can align in the sequence (sequence length minus motif
      width plus 1).</p>
      <p>When CentriMo is run in discriminative mode with a negative set of sequences, the
      <i>p</i>-value of a region is calculated using Fisher's exact test
      on the enrichment of best matches in the positive sequences ("Region Matches")
      relative to the negative sequences ("Negative Region Matches"), 
      corrected for the number of regions and score thresholds tested ("Multiple Tests").  
      The test assumes that the probability that the best match 
      (if any) falls into a given region is the same for all 
      positive and negative sequences.
      <div style="float:right; bottom:0px;">[ 
        <a href="javascript:help_popup()">close</a> ]</div>
    </div>
    <div class="pop_content" id="pop_evalue">
      <p>The expected number motifs that would have least one region as enriched for 
      best matches to the motif as the reported region.  
      The <i>E</i>-value is the <i>p</i>-value
      multiplied by the number of motifs in the input database(s).</p>
      <div style="float:right; bottom:0px;">[ 
        <a href="javascript:help_popup()">close</a> ]</div>
    </div>
    <div class="pop_content" id="pop_MCC">
      <p>The Matthew's Correlation Coefficient (MCC) gives a measure of the ability
      of the motif to discriminate the positive sequences from the negative sequences:
      <dl>
        <dt> MCC = [TP*TN - FP*FN] / [(TP + FP) * (TP + FN) * (TN + FP) * (TN + FN)]</dt>
      </dl>
      where 
      <dl>
        <dd>TP is the number of positive sequences with a best match in the reported region,</dd>
        <dd>FP is the number of negative sequences with a best match in the reported region,</dd>
        <dd>TN is the number of negative sequences without a best match in the reported region, and</dd>
        <dd>FN is the number of positive sequences without a best match in the reported region.</dd>
      </dl>
      <p>MCC ranges from -1 to +1, where a +1 result indicates that the occurrence
      of the best match to the motif in the reported region perfectly discriminates positive
      sequences from negative sequences.
      <div style="float:right; bottom:0px;">[ 
        <a href="javascript:help_popup()">close</a> ]</div>
    </div>
    <div class="pop_content" id="pop_score">
      <p>This is the score threshold (in bits) for determining if a sequence contains a match to this motif.</p>
      <p>When score optimization is enabled, this column lists the score
      threshold that gives the best <i>p</i>-value. Otherwise it
      shows the smallest score found that was above the minimum score threshold
      specified to CentriMo.</p>
      <div style="float:right; bottom:0px;">[ 
        <a href="javascript:help_popup()">close</a> ]</div>
    </div>
    <div class="pop_content" id="pop_binw">
      <p>The width (in sequence positions) of the most enriched region.
      A best match to the motif is counted as being in the region if
      the center of the motif falls in the region.</p>
      <div style="float:right; bottom:0px;">[ 
        <a href="javascript:help_popup()">close</a> ]</div>
    </div>
    <div class="pop_content" id="pop_bin_sites">
      <p>The number of (positive) sequences whose <b>best</b> match to the motif 
      falls in the reported region.</p>
      <p><b>Note:</b> This number may be less than the number of (positive) sequences that
      have a best match in the region. The reason for this is that a sequence may
      have many matches that score equally best. If <i>n</i> matches have the
      best score in a sequence, 1/<i>n</i> is added to the appropriate bin
      for each match.</p>
      <div style="float:right; bottom:0px;">[ 
        <a href="javascript:help_popup()">close</a> ]</div>
    </div>
    <div class="pop_content" id="pop_neg_bin_sites">
      <p>The number of <b>negative</b> sequences where the <b>best</b> match to
      the motif falls in the reported region. This value is rounded but the
      underlying value may contain fractional counts.</p>
      <p><b>Note:</b> This number may be less than the number of <b>negative</b>
      have a best match in the region. The reason for this is that a sequence may
      have many matches that score equally best. If <i>n</i> matches have the
      best score in a sequence, 1/<i>n</i> is added to the appropriate bin
      for each match.</p>
      <div style="float:right; bottom:0px;">[ 
        <a href="javascript:help_popup()">close</a> ]</div>
    </div>
    <div class="pop_content" id="pop_total_sites">
      <p>The number of sequences containing a match to the motif above the
      score threshold ("Score Threshold").</p>
      <div style="float:right; bottom:0px;">[ 
        <a href="javascript:help_popup()">close</a> ]</div>
    </div>
    <div class="pop_content" id="pop_neg_total_sites">
      <p>The number of <b>negative</b> sequences containing a match to the motif
      above the minimum score threshold. When score optimization is enabled the
      score threshold may be raised higher than the minimum.</p>
      <div style="float:right; bottom:0px;">[ 
        <a href="javascript:help_popup()">close</a> ]</div>
    </div>
    <div class="pop_content" id="pop_negative_binomial">
      <p>The probability that any tested region in the <b>negative</b>
      sequences would be as enriched for best matches to this motif according
      to the Binomial test.</p> 
      <p>Use the filter to display only motifs differentially enriched in both
      datasets (low <i>p</i>-value and high negative <i>p</i>-value).</p>
      <div style="float:right; bottom:0px;">[ 
        <a href="javascript:help_popup()">close</a> ]</div>
    </div>
    <div class="pop_content" id="pop_prob">
      <p>The maximum probability that the best match occurs at any single sequence position.
      If the smoothing window size ("Window:", to right of graph) is set to "1", then this is value is
      the maximum value of the match-probability curve.</p>
      <div style="float:right; bottom:0px;">[ 
        <a href="javascript:help_popup()">close</a> ]</div>
    </div>
    <div class="pop_content" id="pop_nbinstested">
      <p>This is the number of multiple tests (<i>n</i>) done for this motif.  It was
      used to correct the original <i>p</i>-value of a region for multiple tests
      using the formula </p>
      <dl>
        <dd>p' = 1 - (1-p)^n</dd>
      </dl>
      <p>where <i>p</i> is the uncorrected <i>p</i>-value.
      The number of multiple tests is the number of regions considered times the
      number of score thresholds considered.  It depends on the motif length, sequence length, 
      and the type of optimizations being done (central enrichment, local enrichement, score
      optimization).</p>
      <div style="float:right; bottom:0px;">[ 
        <a href="javascript:help_popup()">close</a> ]</div>
    </div>
    <div class="pop_content" id="pop_bin_location">
      <p>Location of the center of the most enriched region.</p>
      <div style="float:right; bottom:0px;">[ 
        <a href="javascript:help_popup()">close</a> ]</div>
    </div>
    <div class="pop_content" id="pop_SMmotifs">
      <p>The text box lists the sequence identifiers for sequences which have at
      least one of their best matches in the most significant region of <b>all</b> the
      selected motifs.</p>
      <p>The "Intersection" subheading gives the number of identifiers in the
      text box and their percentage out of the total number of input sequences.</p>
      <p>The "Union" subheading lists the number and percentage of
      sequences that have at least one of their best matches in the most
      significant region of <b>any</b> of the selected motifs and their 
      percentage out of the total number of input sequences.</p>

      <p>Note that the number of sequences with a match to a given motif in
      its best region may be larger than the value of "Region Matches". This is because
      a sequence may have multiple equally best matches and in that case a
      fractional match count is assigned to each of them when "Region Matches" is computed.</p>
      <div style="float:right; bottom:0px;">[ 
        <a href="javascript:help_popup()">close</a> ]</div>
    </div>
    <div class="pop_content" id="pop_OEbins">
      <p>When more than one significant, non-overlapping region is found,
      they can be shown (and hidden again) by clicking the arrow.</p>
      <p>By default the regions are sorted by <i>E</i>-value, but this can be
      changed by the menu on the right of the page.</p>
      <div style="float:right; bottom:0px;">[ 
        <a href="javascript:help_popup()">close</a> ]</div>
    </div>
    <div class="pop_content" id="pop_problocation">
      <p>Sequence position where the (unsmoothed) match-probability curve for this motif 
      attains its maximum.  Set the smoothing window size ("Window:", to right of graph) to
      "1" to see the unsmoothed match probability curve.</p>
      <div style="float:right; bottom:0px;">[ 
        <a href="javascript:help_popup()">close</a> ]</div>
    </div>
    <!-- Page starts here -->
    <div id="top" class="pad1">
      <div class="prog_logo big">
        <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9wLGwYsOTtZCG8AAAA8dEVYdENvbW1lbnQAIEltYWdlIGdlbmVyYXRlZCBieSBHUEwgR2hvc3RzY3JpcHQgKGRldmljZT1wbm1yYXcpCgcnzvAAACAASURBVHja7Z13YBVVvsc/M3P7vSk3BVJIQiihN0MVUDpSFBAFsXcEy/pW1HXbs6xrWZ9dV11FBSuKCNK7CSUJoQYIJKT3kH57mZn3R9wgG1TePnUp8/nrkjNzuHPO9/7O+f3OOb8BDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDY0LBwGYoTXDRYkE5AmAqrXFRctrun9+qnZUXxRPbPs2A+v0mahhoQguN4FxY2j64C2UENtF0+sxITH//OgXLzbJq4cOosTE0Lzic3x/fAxd9j7CHnviojUBuovtgS2HjqLExRBI6YpvyCBCDXrMz/yN0IR4Wh59UBPABT/rPZqLGtsRzGYAWhbegZhzGNNfngWzmZYH5l9U7XFRDQECAkJeHnKneBSD/ru5sITjlb/hHz8W01+exX7zfPRllZoALkRM1XWoXi9K56TT/i6bjTR99QmeJ/+MYd0GwqdejTn7gCaAC46DB0CSkLt0PkNLCDjuuY2WbevB6cQ2Yw7mzds1AVxIGA4cBp2OQJekH7zG07cn7k1rICwU263zMezZrwngQkGfcwTVoEfo0vVHr3N1S6L+2w2oOh2Wt96FYFATwAXB4cOodjt+i/EnL1WiIghMnoBYUQmKqgngvP/1O90IzS0IPXqc3Q2qCp3i0bu9oCpaHOC8p6oK1etBGZx6lj6jgBofj1pdDYqiWYDzXumFJUg+P57+vc5aAP6YaITGRjAaNQGc70ilZSDLCH36nvU9SlgoCAKWonJNAOc7QkUFqiThTu509jeZLaghIQhHczUBnNe/fn8QQ85R6N///3SfGmJFlWUoLdUEcF7+6hGwffAJ4eOnIW3cjNK79//pfjnEhmoPR19UonkB5yNhL7+J4c9PooaF4X/rTZrmzfy/VWBrFYCxtEITwHlpATKzEEwmasuO/XsVWK0QEoJaVKQNAefduN/UjFhcijpp0r9dhyJAMCoCios1AZx3pq28CqmxCffll/6/6lHjO4HXi9EvawI4r6goh9palIkT/n/1dOgAgoCQl68J4LxBUTHk5EJiIu7O8e2K606KNDVKZ+cJxH23g7aiQhPAeYMcRJ++i0D3LhA83XR7PAKP3BfJhtWWs6oqkBCHKghIpeWaAM6b2X9QRneiAOXSESCd/og1FQZkWUT26VHPZpU3Ng5BkjBeoPsEL0gBGCtroLoaT+oAEITTylwugSum+SgqUThZrf/pSWBsDKooIlyg0cALUwDrN0NoKGrHju2nB0EdtjA/kZHwzfKfPg0UkECwWS/YWMAFKQDTtjSCneJROnZoV5a+XU/QL3HNdV4qKqG08Cx2ByUlITU2oUPSBHCuo/cFULduRe3RnWB4GHJQIBA4VV5braNzdw9Gi59x41Ty83+6CcROCaheL9TXaQI417E98DAEAnhuv56KSj2vvxBGwXETAJXlOgYNDtCtG4SEKlSUK8g+Iyerfzwi7kvpAl4v+HwYyqswf7lSE8A5afrTMzB89TXBeXPwXnopW1ZbSP/WiNP5XbkJfP4gDmfr9H/srHryD+rJ2Wf5UY/A370rkttD2KI/EnbFDGwPPYZO1GkCOKdcP7cb82t/R7VaaXnzZfJyTbhcCjfdpLBto5VgQGD3Dj15R83ExysU6gqYFT8G9x1vU17vY/OaH54QCsnJ4PMhrV6DUN8AHg9i/glNAOcS5uwDGHbuxvniswR1IscO6+nWXWHSzHoMBijKN3HssIVOyT42GVax0HgvC4IL2J7yNrV9t1JcYGTLevOZXcHkzsijR+LctBbP6y+B14tYUHhBtNsFsxxsXPYlckQknkmjqTspIcsiyd1dmC0K/foHKSoUSUkOUtX/W57Xv8hDwd8x0jcSxaxwYtRaEvPGYzQJeL0CJtPp44G3QwTeVV+h6lRM0bFYVDDk5uGdNE6zAOcKWfvCmB94kxVfR7Pi40jKysAe0dqRktGLKBtxRlazVPcR98sPMMY3Bhs2+gb74hIceGNKqCgTQBXaWwBRZKt5K0f0R0jrcZLN41XI1YaAc4ajh60szenJlKFVOINmevZ14mhRiYpuXQfo1SdIdrbMn9ZlMioyha7Bbhhp9f97BnpSL7dQMvk9jmVbyT3cGh1UVdi4KozHng3wpO45Xje+zkf6j3ja8DivPGbG66xE9Po1AfwnkBDaZuFHc6xsfa+B+8RPuWKqgRtvqyNkUia3/qm47frwUIVyXxNGVySDE8PpHezXVmbBwj3yAgp0RxBG7aH4kAk5CLJPz0dZBexw7yNtrY2Xvc+w0LOQhf75NHWNZNm4WoT65vZBIwWKThg0Afxine/2EHrNjYRPmI4MrF6vY5qcRqB3BgtnL+N18z+41XwTu8O30iA0AFBiLaDsjwuZ/1ALs71z29XZP9CPErUC57CtrDdsBsXElFXvUx6zl2FjXdxdvwh/Tl8S1AQmByYxUBqM33ESt9LYrq5VX1p57y2zJoCfiz+Z/8QH5g9w4kRGQVdQhO7gIYTdmWz7u4/OyUHqRnzNvW+35rtrFppZJC9isbiY983vc0I6wfPWZxgU04G7el1yxv/DolpI9+wgOgoqLEV0qx6Pf28/bruiA08NGk+oTeDggVMh43GmmfxjdgPVupPt6qqsEHC0SPi8p5pWQSFIEPUczMh3TnsBx3THyJfyyVAz2G3bTX95EDef0BHe2EQpCWzd2kT0u5tZVv4NY04kce/Av6N3tcbre+l78Zn+M24038gUeQoLvAsw88O/zKASZJF0O6GNejq8O4ERE3zMDk3EHB4gKgoOlonsyzLRp7+PS02TmbAplNWzMriXkQQIEhT8GHw29mWY6N8fHPUSUic/aVIa5bpysoVsbgneQrKcTIQScXEK4NB+A+HhKonJgZ+8VkHhPcN7DFBSucl3A4XiCT40fEhyoInkSCNvVC4kNOU9DsS3cP+iAFe7+1E/49RiTWogFb/qx2PwsMC7gA5qh58OJhkgPsKAuLEnMf2dWDq4ARg8wk1NjYUd28xIokhdrQ9f4UJ2vdCdkiF76XZdOsVCMfKH99F7UiIOWz07mv2s6f4UkUIUBsVAuBrOK4ZXMGPm4cDDdPN3Q0VFQPhpF7egGH9UBGpY6PktgG2bjDQ0wBPP/rQAsvXZWAQryWsOk9RFT6fEy2gQ6nk7eQEV8X+hZ3wN7ybt5LIsC1evEAn8sf2p3+HB4aQGUzFwlpMyAUZd7iPnoJ4hw07vmGkz3eQfC/LZUjNGQSSpLIz3Zn5K46E7MQ2OoigqHzXsKJkRX9LSIrC/Io4OQw084H2A2GAsKirlunLWGNcwWz+bDcIGYnwxP/mVLLVNhAwcjvcvT9D8wN3t9jec8wKQkZGQKC/VceSQkSumygguJ2J5FUpiAqrZ1N4cC0FW6FZwkMO89VQstXM203L99YyouYoty4s5On8A+XVViLM/4v5Prkfn24ErdeAZ+lM4+87/p8cQGeSxJ5rOWNa9p5/f/VlGb5Tx/b6aPl/m0HD3CKq/uoKHrrqd9X7oFyGzNXInwRWTeXDiTad9l8RgItOUaYgmkZm6mSxWF9Pb3/60kqpCY50evyDTNWMnKiDu2An33AJG0/k1CdyhS+cV9W12rzczbFiQA7kC0hNvEXX5ZAy7sk5/8ICH/boDvG98nxNSAYsrnufbrAYWvyjw0WILmZ+5SFlTzr6kN9n7yF957P5G4t5aCagoQwb/KlZMb2yNLYQPSGbaqnJi9UbscQLLV4dwsthGnz4K8xNHEFQkdm5tb7ITlUSu9V7LLfItPKd/jlyp/cFTQYC/v2rjzVciOLKsCAEwHMulIq+1/Gw3tP5HBZCbY6JJamKN4ROWfiyxOPlvdBlWS4cYhcyl5eByYyg4yqovjGxZG8KKbc2MDZ3CBuNasqQsLlFSCb52jKXMI7pyN3ODq5lt/JSH2E94r0PEKV2ZWtQPtbQYtUsX/Cb9rzmaocbEgM3GpQ0bKGswsDlNZNgoDyoqepvKhMkBMjMkREGkuFBH7hEJv6+14yKUCOb55mHCxCbDprY6C6VC7jHfxhcfRBLbUeXycR4ycmOQkXAUN+I8VMfVUyOpqzYi/0zHFCTgcYBFv1/087WOIjFqsB2/tZl1H3VioLEHoaKNzbPvxVdWimuDlR7xu3E3dMA/aTrr19nIi1pPy+PhjO14GffF3sw49xW8fFMp13XYzpQ+lcSufhdzcxNSbEdCb7yXm5TbCT1ahn7vPoTLLsN19ZW/qgAEjxfDmvUY31tM0oaldIwIMO7WaGSLEUSRpiaRELOO99+y4mwMIPgMLFtmpaTAQLhdpWO4ngQlgcWG9+ikJqEPGHjb/DY7duo4khbFbxdKOBpshL36Eo6ufZHjE/hkezJTHu3Gjm16EpIUwuz/ngpeeOaFf37c/YsIIHu3mRkzg7ynLuG6a1VKX7+SxX81Y1Pt+N44wcqZFey8009pwEzx8ZsZen8223UbuHzLEfh8GEXmS9ixTqHH5rcZMzcE7rsJw/sfIZSWEpg2gbiJd2PFht7pQv/1N7hvnod/2OBfVQCKPQxlyGDUrl2xW730P/EV5udfxphXAKqC7vgxXOv3EJq5hXFrf0/IltX0uXMw2ZXR1FWKREVCj9BoGur0PLFzO3szLaS/l8KEyhvQz1rD9h5LuCJa4t3lNuqGdGK/5zIqx+3nnoXdKGxwUXciioQuXgz/sqPNjx/pJ7aufV8Abe8LePVNN3Nuavn/m0YFDuwI4cGMlQx9YgUPehfRKdgFVZCRvD5KLn+Qj53TCV/SzMY3jyCPGkfCfcuIXbaNP92g4BfspP1pFcETlUxeegvGla/jGTeGqCvnIuzYieud13Ff23rKVzpZT8iKNTinTSQYH/sf86UFBKSiEszb0jF/8BGUlSGIAogqamISvpHDMX2wFDnSTsub77LCPRx3vY6YWD+NTUH+enwVl4xv4KqmG7hiLOQ6K3i1w5NUCw70HxaT9s3nXNOUzaplC5kUOpnwQCLeRU9y5ywT5VUSU2e4ECVIM6SRKWTyW99vf1QE30sX/z9tAnjjbQcDLgnQrefZLXB89ZmVcZP8mEwKJsspU9TshFufKabPwm9J6ubmLs+CU/7s7izCrpnLopR16Hr2ZGfNF/jfeB9dbICls90k+uLRpaXju/NOxOoq9Bs2Ut9QgazKmIsrsA0cStO+XacSPf5zG8/P7Br9++pXIRD4LqnUd99JFMGgR19YQsTEK1sbe9JEXq+eTXWtgP2OSaTctIOBxl4YldM9FvNLL2F46jnq0jKQKiux3ziHPa/dwNI7bGwpy2H8+ucZG5PCsrdsTHhzLU8l3c0oZTTPu5/HivW0upqkJp4y/DdxB6bzt8Ft3sn/tLmB+yx7qG0QCJGiiJDDKc61UVWhZ/R4Z1v7+pQgLn+AwsM2tmXIHM6xMnKEyvE8gWkzXIQmFPHi6t1Iccm4u+3nLs/Lp/ucWXsRvH6mP96TpR9KPLz5EOVf1LHnpu50TT+A88MnkDp3xrRkCaqqol51JbLaKi5P53j0f3iUYJfOtL3k5Fzp+O9P3w1ndjsDXZJo2LaOsNk3wKZN3Cutw18voyzugWfUqwRT2t9nOngcnSxiGdAdtWsMeoOFEZ9WET93Kclx/+CrO++m6vBUDPN78O6OWq5OmM02cRt7TbsoeHE2o8f4iepdzXLzcg5KB8hUM0mo6X/mOIDX3MDnNUfZGdjPDPMoWtb8hp17BAYMdhMWrtCktrC9Lp8lSyQUXQDTb9ZjcvRBFcYyREzk7xtryFV3UetQeHCWibmel0+LdAkuF8aNWwmOHIm9l55uqRYi9rQw47MYmgYtBPPd+Pv1xj+gH/ZvViM0NNBy582nfVnHw785J+PpZ0sgMZ7G9A0ITlerS7nvALb/egTz5Om4nvgjrpuv+557JiAUFCKkpBCQA2A2IfTqDQf3Eerycjt30kvXh419VrOqvI4Rzmu48dBdjOy3jE8PltCyQ6HM56B+yJ8JF+z0Dw7ggfJn+a+N1Wd2Ax8eOowrch5hiDKYJV8KHI/JYPoUH888FoEiuniy6mOefjHAkF4W7rnXy+xePdh36WtsH/4Cn8y4hxXDniU0ez/zPrEyTe7YNja24Xajz9pD4Pp5REcGmDu/hYGjTKhHsgn94DMCnRMI2qwEOkQSmHoFxMbiG3r64o16AbzeSDYZCUZFEIyKwDNpHE0Z30JiIpann0f/vUwkQkUlYn0DwZHDTzXhnbcg1ddjXLkKgBHBETzs+QPLx9xKbO5EasolbEdHUVgaILqThxOG45TmWVjgWsAdnrvY+UUCd13S58wC6BCqp3t3mcaHH8ZbFca+zl9xdOprSPO+IvmBnWz6OJprh8fyu4m9uUI/mmu9c9ji3EaFUEm9oYnHK/fz6hcZPFG4gI7Hs9o9uG3rTrBYcA8ZiE4Cm05FN6h369HrZV+gjhgOoaGg0+GeOQ153BhU6cI7iNHOKoRYcbz1CmJVFebPl5/yz2tqERsa8Q44tXfBNXcWakICpi+/RnS521YyO8vduHV+A8s+DqHy2+5E7ZvI5892o653Ov2+/gN2TwzLPwlBb1QZPkI5swBECS5PrUPK3Ml/p8zlkpFumrvsparbDuYOS+bJrtfzyMwkBMPpiZMXO99nQc2VPLCglJQUH8LYkVjeeb/9gsY77xHs2welQ3Tb37yDB4IkgdGI95IBqGKrxQgMHYxj0W/OvTH+F8LTqzvyvHmY/v4PpNq6NgEgy6gjT09w4Xzij+j2HUB//PQtafEJMtOudpCbp7JwdjxxoUam945gkD2OPz8agSCJjJjspEOs/4cjgXEFO3mleh6p4h4eEe7nLvd9vBA/n+dm92LW1f4fWj9h4gd1iE3NeN54Hfc1MxH27sNYXnUqfNrYgnjwEIHhQ057O5c8oH/rrNlkItivz2k+tq9b54tGAEDrq2ocDqzvLW3tmPoGBJ0Ob9fTU9v7JoxBtVoJff2ddnVMnOLhnodbGBus49kba3n0nk+RdmWRUyQxLTaTAV+9jCn74A8sBgWDWLZtRzpZTdJ9t1OXk0mUEolO1BE5ajTuBXfhuO369rHkhkbMy5ahjh+Pc/glGEKsYDRifuMdfM/8d6uZ+nw5KAqBy0edPh5KAq5nn0INBpB797ygkzL/FP6e3fFdOwvzcy9gWrEKtbISevVC/Zfj7XJ4KL47bsH0xNPonnmcYMeo08qj7Cqhtz3CDVtAiDjODZun0FMYSmLaTlAU5Icf/IEhwOFEt3I1crduCEVFWF98HQD7xKsgNxfzQ48S/sifEevqT/dVt6Yj5uXjfPg3rQ/SpwfBgf0xvL8EndCqL/0HS1FjY/CPap+vx7XwTtwPLEC5iDu/1eaLeG69kcDgSwjqROROcXh/ILrpmTIBwsMI+c3D7crMOzMR0nYQvOsOakpyke65keHDnAT+6wGCvXpgKyg9swUwZh9AdLtp/vJjbIt+j/HNt9FnZSPu2oXrb38FfwDr088RsWMXjrdexde/N8aCYqz3Pkhg/Fjcg08tx/pvuA7dtm8Jvete/JMnIOTlE7x+LrKIxo9ZgaGpNGz+5qcnjr164L9qOsYPlmLO3ItnWOteCMHnx7h4CWJ0NA1P/aE1APS3v7TdZ6+oQN2V2W4IVwGCl41G9XpoXPEpereX8MGjUJubkZ96gvoH54OqYjici/3Ka1GNRlxffIzltrtRT56kees6At2ST6s48vHn0L31DorXiyDLONM24x7UV+vlnwmd20tEcm/ky0bRuGwJigCGvELsQ0bhfe1lmm+e094Te/wZrK+8gXDqDSj/c2oISEvHN34MSmgIvphoPA8sRLlyOvX339kW5fL3601D2kYArCPHIuTl4/nL4+06H6D+8UdpPH6QwNxrELp21Tr/ZyZoMeF/dBG6jCz06bvQF5YQftd9qD174ph25sxoQlJSq9d1Jgsg22y0bF6Dr0/rGzVEtwdBVpBDrO0qMhw5RvjsG5CHD6Xhg7d+MkCjb3YSCLNpvfZzTxuCClEDhiPbw5Hy8pE7RON66Tk8E8ee8XrL1nSs825BcrvbrwUIyZ3bOh9AsfzwDlp/n540fv0pcmLCWUXntM7/haKKOhH3ow9hfuC3BOfOoelPDyN3ivvRULRq0IP7DBagvjSPgD1Ua9XzzQrU1qEvLcc7sC/ofnyLpz4gE5YyAF1dXXsLoHX+eWoFOkQhd4g6q2sDegk1PAxOCQDNMbvIEPr1O3MgSOMi8R5SumkCuJjx9eutCeBiRu2jCeDitgDJiZoALmoL8C+ri5oALnI0AWgC0NAEoKEJQEMTwK+Kx+OhqrKK5sZm1q9eT0Z6Bk0NTWxYvYGKsgr8Pj8b126kuKCY+pP1bFi9AUeLg/qT9axbtQ6P23PGeutP1rNp3SYEBERBZNPaTdT/yza2qsoqcg/nosoqu9J2AVBe/OPvBDqQfYCW5hYydmRQmHfmNLGCKrDum3U0NTRRW1MLwJGcIzTUN5C1O4uc/TnnnAD+Y0mimuqbWPXFKm6/73aGXTqM2upa1q9az3W3XkdxQTEbvtnAtKunsS9rHy0NLUycOpHtm7Zjs9mYPH0y+zL2MWjYILJ2ZiEKIsNGDwNgd9pups+eTnZWNo4WBxOnTmT9yvWYrCa6dO1CXEIc1RXV1NXUUV5STr+B/cjYkcHK5St55qVnqK2qpbKykpiYGFxOF117dAWgIK+AohNFjJkwhqyMLLqkdGHrxq04WhzMuGYGAEdzjpI6OJXCvEKWf76cp196msqSSvSSnrUr13LH/Dvant+6ah3qWb6V3P27315YAlBVldwjuZSXl1NbWYstzIaiKIRHhHMg+wB5x/KIT4gnNyeXDas3MOeGOTTUNWAxWdAb9aRvSae6uprO3Ttjtpg5cugIiqJQXV2NoAosfWcp8cnx9O3XlyVvL6HwRCFxCXHU1dYRciQEi8UCIugkHau+WsWU6VMYMWoEABXlFeTn5rNpzSYGpA4g/dt0xk4YS+buTCZNncT6b9azf+9+Jk+fTDAQxOVykXs4l11pu5g1ZxY5B3MoPF6IyWIiOyObupo6GhsamXXtLDJ2ZJCQnACAZdsO+OqrHzxL+GsJoG0/QLWj+lcVQUVpBfEJ8ZQUl5CUnERjQyNetxeH04HJaCIkJIT6+noUWSEiKoKa6hr0ej2hYaG4HC4UFEJCQyjMKyQyKhJ7hB2vz4vJYKKhsYG4TnEoQYXqqmpCw0LxeDyEhoYSHRNNTVUNzY3NhIaH4mhxEBsfS211LZ0SO5GXm4fZYqa2ppbUoalUlFUQ3TGaksISOsZ2pLmpGVEUkSQJWZaRFZmo6Cjq6+oxGAz4vX6iO0bj9XrpENOBkoISwuxhVJZXEhIWQkJSqwB09Y3gcp3V2YdgQvzP2vbfPx7+q1mAuto60ramMW3WNDat3YTRaCTcHk7+sXzKS8sZedlIDhUfov8l/Sk4XsD2LduZNXcWJ46fYG/WXsZNHode3z4NTFlxGW6Xmx59elBcWMzRI0cZM3FMW3l4ZDiH9h/CarMSHRPN4UOHiYiIwOV2kdI7hZjvXgxp++7ASp/+fWhpaWH/3v306deHE/knSEhIIPdoLm6Pm9ShqYhi+6mT3+cnLCyMNavWMHTEUOTvcrjU1ddhNBsxGow01je2CSAYaYdI+8UzB9ixaQdXzrmS+tp6PG4PqUNT2bhmI4OHDEZn0pGRnsHuHbvp1bcXNRU1jJs8jvxj+Zw4doI+A/qgyApe2cuqL1Yxetxo7JF26mrrsNvtHDpwiEFDB2E2mqmprsHV7GL9mvVcNv4y7BF2SgpK6JrSlU8Xf4ov6GPwkMFUlVUxaPAgyovLKSwoxGwx069/P0xWE2UFZVx19VV8tuQzRl42kq2btjL1qqkU5hUiiiKfL/mcjnEdGTJ8CJJOoqW5hXWr19Gvbz8C3gAmo4lnH3+Wv77yV+qq6zAajGxev5nUwadS2S03LqdRbUREJJJIDnCAoQxlN7sZwhAqqMCMmTDCmOmfef4LQG/Sk3s4l4iICMpKyji07xDxneLZv28/zhYnOr2OpK5JrFmxhsjISLZv2o4kSQiCQGV5JRGREaio+Pw+9mfup76xnqioKFRZJSM9g/FXjKeosIigP0ja9jRqKmsoLiimoa6BQDDAyZqTmGwmSo6W4HA48Pq8NNQ30NTYRNrmNGwhNvQGPUdzjhIfH8/iNxczcsxIqiqrMFvN7Nm5h0HDBuFyupCDMik9U/h86efo9DqunXct/Qb0w2a10aVbF9atXEdcQhwFeQV4fV58fh82q42qylPH5UrFUqqEKiQk3LjZz37iiGMf+4ghhnzysWEjmmj4BZOS/2pzgObGZhwOBxGREQSCAcLCwtrcM1FoNan2SDulxaWEhYW1JohQ1dZO9/roENMBr8fLpnWbGD95PF6PF71ej6RrHYsFQSAYDKKqKmazGWeLk4joCPR6PSerT2I0GwkNC6W5qRmdXofX7cXv8+P3+7HZbHi8ntZ5hNeLs8VJaHgoer0el8tFZGQkLc0tREVHcXDvQeKT4rHarDQ3NiMIAhFREXi9XgQEHC0Owu3hyIqMxWLhZM1JbCE2fF4fKir2iFaz7xbcKCjf+eIifvwYMeLDhwEDMnKrK4uIRbX8YnOAX1QAjQ2NbFq7ialXTqWqqoqIqAjCwsPITM+kxdHC2PFj2bJpC1arldFjR7Nn9x6Gjx7O0ZyjHNp/iOtuvo4jB49QeKKQSdMnYTS2f8dfdmY2HqeH0eNHk388n+ITxUycNvG0a7J2ZREZHUlpUSlms7nt8/gp43/wux87coy4TnFsWL2B6TOms3vnbrr36E5C54T2Xo2iUlZSRqekTuQfz6djx46kb0tH0klYrVbiYuPIPZZLIBBg2lXTMFlM/9Fx//sC+GXSxH3Hzu07mXHNDMpKy8ja3eqvHz9ynJQez1wLzgAAAv1JREFUKcQlxJGdmU3Pnj0Jt4eTsz+H9G3ppA5JpaSghKGXDqXoRBFlJWWkDkvFZDIRCAZY9cUqTGYTsizjcXsw6UwcOXyEvgP7IqgCB/cepGPHjnyz/BvC7eGtnZlzDLPZTHh4OAf2HiAqMoqq0ip6DehFWVEZ6dvSqa6qxh5ux+V24ff5+ccb/2DCpAmEhISQeziXkuIS7HY7HWM78sn7n9DS3ILBYMDr9eLxeNiyYQs9e/bkjZffYMpVU7CYLZjNZqrLqhF1ImMnjqW8qJye/XoC8OE7ocgBicMHdez61srxowa8bj3794nsTrNRUqjD1WwiO1ugRy/5Z+2X72cJ+0XnABaLhQ1rNhCfGI/T4aSxsRF7uJ3jx45TUlxCYlIiWRlZ+L1+zBYzYyeN5ctPvqRTQie2btja1tHZGdmMmTAGFZXq6mryjuRxsu4kEREROFuciKJIWWkZzmYn5eXlHD18lOaGZpobW1225uZmbI02nA4ndSfrcLQ4aGxspLK8ktraWo7lHEOQBELDQjm07xBzbppD3/59cbvdpG1NI3VIKmu/WUvnLp05efIkgiDQuUtn1q5c2zYHSOmVgmSQGDR4EACZOzO55sZryPg2gxB7CCuXrWTC1AnfG3slQD4tICsAAiKCKiIgAiKq8ssekf9Fh4BgIIjX68VkMiErMjqdDkEQ8Lg9CGJrqFZRFARBQBRFjCYjTocTvV6PoiiIooiqqgSDQSxWC16vl+yMbC697FKCgWDbuC9KrX65qrReazQaCQQCGI1GREnE7XIjSRLBYOs9Or0ORVZwOVwEg0HCI8Lb7gsGgxhNRnxeH3q9Hq/Xi9FoxOvzYtQbKcwvpHP3zuh0Ovw+P4IgtN4nB1uv93gxmU1tz+1xe5B0EsFA6zOcapvWBGKq+l2yM6E1JKCq3/XId/9GBUn3yw0BujP8UUNbDNLQBKBxMWAVAJPWDhclAhDQmkFDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0ND4wLjfwE9VJhuBfJALAAAAABJRU5ErkJggg==" alt="CentriMo Logo">
        <h1>CentriMo</h1>
        <h2>Local Motif Enrichment Analysis</h2>
      </div>
      <p>
        For further information on how to interpret these results or to get a 
        copy of the MEME software please access 
        <a href="http://meme-suite.org/">http://meme-suite.org</a>. 
      </p>
      <p>If you use CentriMo in your research, please cite the following paper:<br />
        <span class="citation">
          Timothy L. Bailey and Philip Machanick, 
          &quot;Inferring direct DNA binding from ChIP-seq&quot;, 
          <i>Nucleic Acids Research</i>, <b>40</b>:e128, 2012.
          <a href="http://nar.oxfordjournals.org/content/40/17/e128">[full text]</a>
        </span>
      </p>
    </div>
    <!-- navigation -->
    <div class="pad2">
      <a class="jump" href="#graph_sec">Motif Probability Graph</a>
      &nbsp;&nbsp;|&nbsp;&nbsp;
      <a class="jump" href="#data_sec">Enriched Motifs</a>
      &nbsp;&nbsp;|&nbsp;&nbsp;
      <a class="jump" href="#inputs">Input Files</a>
      &nbsp;&nbsp;|&nbsp;&nbsp;
      <a class="jump" href="#info_sec">Program information</a>
    </div>
    <!-- alert the user when their browser is not up to the task -->
    <noscript><h1 style="color:red">Javascript is required to view these results!</h1></noscript>
    <h1 id="html5_warning" style="color:red; display:none;">Your browser does not support canvas!</h1>
    <script>
      if (!window.HTMLCanvasElement) $("html5_warning").style.display = "block";
    </script>
    <h2 class="mainh pad2">Results</h2>
    <div class="box">
      <span id="ins_desc"></span>
      <!-- write out the job description -->
      <script>
        if (data['job_description']) {
          var node = $("ins_desc");
          while (node.firstChild) node.removeChild(node.firstChild);
          var header = document.createElement("h4");
          header.id = "description";
          header.appendChild(document.createTextNode("Description"));
          node.appendChild(header);
          var paragraphs = data['job_description'].split("\n\n");
          for (var i = 0; i < paragraphs.length; i++) {
            var p = document.createElement("p");
            var lines = paragraphs[i].split("\n");
            for (var j = 0; j < lines.length; j++) {
              if (j != 0) p.appendChild(document.createElement('br'));
              p.appendChild(document.createTextNode(lines[j]));
            }
            node.appendChild(p);
          }
        }
      </script>
      <div>
        <div style="float:left; width:70%">
          <h4 id="graph_sec">Motif Probability Graph (score &ge; <span 
              id="ins_score2"></span>)&nbsp;<div class="help" 
              onclick="help_popup(this, 'pop_prob_graph')"></div></h4>
          <script>
            $("ins_score2").innerHTML = (data['options']['optimize_score']) ? 
            "optimal score threshold (bits) for given motif" : data['options']['score'] + " bits";
          </script>
          <div class="graph_box">
            <div id="pop_peak" class="pop_graph_peak"></div>
            <canvas id="graph" width="700" height="400"></canvas>
          </div>
        </div>
        <div class="graph_options_section">
          <h4 id="graph_sec">Options</h4>
          <h5>Plotting&nbsp;<div class="help" onclick="help_popup(this, 'pop_plotting')"></div></h5>
          <div style="max-height:200px; min-height:100px; overflow-y: auto;">
            <table class="graph_list" id="graph_list"><tbody></tbody></table>
          </div>
          <div id="unused_colours_section">
            <h5>Unused Colours&nbsp;<div class="help" onclick="help_popup(this, 'pop_unused_colours')"></div></h5>
            <span id="unused_colours"></span>
          </div>
          <h5>Graph&nbsp;<div class="help" onclick="help_popup(this, 'pop_graph')"></div></h5>
          <div>
            <label for="plot_type">Smoothing:</label>
            <select id="plot_type" onchange="recreate_table=true; make_MP_graph(); recreate_table=false">
              <option value="0">Moving Average</option>
              <option value="1" selected>Weighted Moving Average</option>
            </select>
          </div>
          <div>
            <label for="windo">Window:</label>
            <input type="number" style="min-width:40px;" id="windo" 
            onkeypress="num_keys(event)"
            onchange="recreate_table=true; make_MP_graph(); recreate_table=false" value="20" size="2" step="1" min="1">
          </div>
          <div>
            <label for="legend">Legend:</label>
            <select id="legend" onchange="make_MP_graph()">
              <option value="0">Disabled</option>
              <option value="1" selected>Enabled (click on graph to move)</option>
            </select>
          </div>
          <div>
            <label for="plot_distance">X-axis:</label>
            <select id="plot_distance" onchange="make_MP_graph()">
              <option value="0">Position of Best Site in Sequence</option>
              <option value="1">Distance of Best Site from Sequence Center</option>
            </select>
          </div>
          <div id="CB_show_plot_negative">
            <label for="plot_negative">Negative sequences:</label>
            <select id="plot_negative" onchange="make_MP_graph()">
              <option value="0">Not plotted</option>
              <option value="1" selected>Plotted as dashed line</option>
            </select>
          </div>
          <div>
            <label>Zoom:</label>
            <input type="button" id="zoom_out" value="Undo Zoom"/>
            <input type="button" id="zoom_center" value="Center on 0"/>
          </div>
          <div style="margin-top:10px;"> 
            <form id="eps_form" method="post" action="">
              <script>$("eps_form").action = site_url + "/utilities/save_generated_file";</script>
              <input type="hidden" name="name" value="centrimo.eps">
              <input type="hidden" name="mime_type" value="application/postscript">
              <input type="hidden" id="eps_content" name="content" value="">
              <input type="submit" onclick="download_eps()" value="Download EPS (for publication)">
            </form>
          </div>
        </div>
      </div>
      <div>
        <div style="float:left; width:70%">
          <h4 id="data_sec">Enriched motifs (<i>E</i>-value &le; 
            <span id="ins_ethresh"></span> using 
            <span id="ins_test"></span> test)
          </h4>
          <script>
            $("ins_ethresh").innerHTML = data['options']["ethresh"];
            $("ins_test").innerHTML = ((data['options']['disc']) ? "Fisher's exact" : "the binomial");
          </script>
          <table class="motifs hide_db hide_maxprob hide_tsites" id="motifs">
            <thead>
            <tr align="center">
              <th class="deselect" onclick="clear_selection()" 
                title="clear selection">&#x2612;</th>
              <th class="col_db">Database&nbsp;<div class="help" 
                  onclick="help_popup(this, 'pop_db')"></div></th>
              <th class='col_id'>ID&nbsp;<div class="help" 
                  onclick="help_popup(this, 'pop_id')"></div></th>
              <th class="col_name">Name&nbsp;<div class="help" 
                  onclick="help_popup(this, 'pop_name')"></div></th>
              <th class='col_evalue'><i>E</i>-value&nbsp;<div class="help" 
                    onclick="help_popup(this, 'pop_evalue')"></div></th>
              <th class='col_fisherpv'>Fisher <i>E</i>-value&nbsp;<div class="help" 
                    onclick="help_popup(this, 'pop_fisherpv')"></div></th>
              <th class="col_pvalue"><i>p</i>-value&nbsp;<div class="help" 
                  onclick="help_popup(this, 'pop_pvalue')"></div></th>
              <th class="col_negative_binomial">Negative <i>p</i>-value&nbsp;<div class="help" 
                  onclick="help_popup(this, 'pop_negative_binomial')"></div></th>
              <th class="col_MCC">MCC&nbsp;<div class="help" 
                  onclick="help_popup(this, 'pop_MCC')"></div></th>
              <th class="col_blocation">Region Center&nbsp;<div class="help" 
                  onclick="help_popup(this, 'pop_bin_location')"></div></th>
              <th class='col_bwidth'>Region Width&nbsp;<div class="help" 
                  onclick="help_popup(this, 'pop_binw')"></div></th>
              <th class="col_bsites">Region Matches&nbsp;<div class="help" 
                  onclick="help_popup(this, 'pop_bin_sites')"></div></th>
              <th class="col_tsites">Total Matches&nbsp;<div class="help" 
                  onclick="help_popup(this, 'pop_total_sites')"></div></th>
              <th class="col_negbsites">Negative Region Matches&nbsp;<div class="help" 
                  onclick="help_popup(this, 'pop_neg_bin_sites')"></div></th>
              <th class="col_negtsites">Negative Total Matches&nbsp;<div class="help" 
                  onclick="help_popup(this, 'pop_neg_total_sites')"></div></th>
              <th class="col_maxprob">Max Probability&nbsp;<div class="help" 
                  onclick="help_popup(this, 'pop_prob')"></div></th>
              <th class="col_problocation">Max Probability Location&nbsp;<div class="help" 
                  onclick="help_popup(this, 'pop_problocation')"></div></th>
              <th class="col_nbinstested">Multiple Tests&nbsp;<div class="help" 
                  onclick="help_popup(this, 'pop_nbinstested')"></div></th>
              <th class="col_score">Score Threshold&nbsp;<div class="help" 
                  onclick="help_popup(this, 'pop_score')"></div></th>
              <th class="col_OEbins">Other Regions&nbsp;<div class="help" 
                  onclick="help_popup(this, 'pop_OEbins')"></div></th>
            </tr>
            </thead>
            <tbody>
            </tbody>
          </table>
        </div>
        <div style="float:right; width:30%">
          <div id="seq_area">
            <h4>Matching sequences (out of <span id="ins_seqN"></span>) 
              <div class="help" onclick="help_popup(this, 'pop_SMmotifs')"></div></h4>
            <script>$("ins_seqN").innerHTML = data['sequence_db']['count'];</script>
            <h5>Union: <span id="matching_union_number">0</span> sequences 
              (<span id="matching_union_percentage">0</span>%).</h5>
            <h5>Intersection: <span id="matching_intersection_number">0</span>
              sequences (<span id="matching_intersection_percentage">0</span>%).</h5>
                    <textarea id="matching_intersection_sequences" rows="10" cols="50" readonly></textarea>
                    </div>
          <h4>Filter &amp; Sort</h4>
          <h5>Filters&nbsp;<div style="margin-top:5px;" class="help" 
              onclick="help_popup(this, 'pop_filtering')" ></div></h5>
          <div id="filters">
            <div >
              <input type="checkbox" id="filter_on_top" value="1" 
              onclick="toggle_filter(this, 'filter_top')">
              <label for="filter_top" 
                onclick="enable_filter('filter_on_top', 'filter_top')">Top</label>
              <input type="number" id="filter_top" value="10" size="4" min="1" step="1"
              onkeypress="num_keys(event); update_filter(event)" disabled>
            </div>
            <div >
              <input type="checkbox" id="filter_on_db" value="1" 
              onclick="toggle_filter(this, 'filter_db')">
              <label for="filter_db" 
                onclick="enable_filter('filter_on_db', 'filter_db')"
                >Database is</label>
              <select id="filter_db" disabled>
                <script>
                  var filter_db = $("filter_db");
                  filter_db.options.length = 0;
                  for (var i = 0; i < data['motif_dbs'].length; i++) {
                    var db = data['motif_dbs'][i];
                    filter_db.add(new Option(db['name'], i));
                  }
                </script> 
              </select>
            </div>
            <div >
              <input type="checkbox" id="filter_on_id" value="1" 
              onclick="toggle_filter(this, 'filter_id')">
              <label for="filter_id" 
                onclick="enable_filter('filter_on_id', 'filter_id')"
                >ID matches</label>
              <input type="text" id="filter_id" value=".*" size="12" 
              onkeypress="update_filter(event)" disabled>
            </div>
            <div >
              <input type="checkbox" id="filter_on_alt" value="1" 
              onclick="toggle_filter(this, 'filter_alt')">
              <label for="filter_alt"
                onclick="enable_filter('filter_on_alt', 'filter_alt')"
                >Name matches</label>
              <input type="text" id="filter_alt" value=".*" size="12" 
              onkeypress="update_filter(event)" disabled>
            </div>
            <div >
              <input type="checkbox" id="filter_on_evalue" value="1" 
              onclick="toggle_filter(this, 'filter_evalue')">
              <label for="filter_evalue"
                onclick="enable_filter('filter_on_evalue', 'filter_evalue')"
                ><i>E</i>-value &le;</label>
              <input type="text" id="filter_evalue" value="1" size="7" 
              onkeypress="update_filter(event)" disabled>
            </div>
            <div id='cb_filter_on_fisherpv' >
              <input type="checkbox" id="filter_on_fisherpv" value="1" 
              onclick="toggle_filter(this, 'filter_fisherpv')">
              <label for="filter_fisherpv"
                onclick="enable_filter('filter_on_fisherpv', 'filter_fisherpv')"
                >Fisher <i>E</i>-value&le;</label>
              <input type="text" id="filter_fisherpv" value="1" size="7" 
              onkeypress="update_filter(event)" disabled>
            </div>
            <div >
              <input type="checkbox" id="filter_on_binwidth" value="1" 
              onclick="toggle_filter(this, 'filter_binwidth')">
              <label for="filter_binwidth"
                onclick="enable_filter('filter_on_binwidth', 'filter_binwidth')"
                >Region Width &le;</label>
              <input type="number" id="filter_binwidth" value="200" size="7" 
              min="1" onkeypress="num_keys(event); update_filter(event)" disabled>
            </div>
            <div id='CB_filter_on_negbintest'>
              <input type="checkbox" id="filter_on_negbintest" value="1" 
              onclick="toggle_filter(this, 'filter_negbintest')">
              <label for="filter_negbintest"
                onclick="enable_filter('filter_on_negbintest', 'filter_negbintest')"
                >Negative set <i>E</i>-value &ge;</label>
              <input type="text" id="filter_negbintest" value="1" size="7" 
              onkeypress="update_filter(event)" disabled>
            </div>
          </div>
          <div style="margin: 5px 0;">
            <h5>Sort&nbsp;<div class="help"
                onclick="help_popup(this, 'pop_sorting')"></div></h5>
            <div>
              <label for="motif_sort">Motifs:&nbsp;&nbsp; </label>
              <select id="motif_sort"></select>
            </div>
            <div id="box_peak_sort">
              <input type="checkbox" id="allow_peak_sort" value="1" 
              onclick="toggle_filter(this, 'peak_sort')">
              <label for="peak_sort" 
                onclick="enable_filter('allow_peak_sort', 'peak_sort')"
                >Regions: </label>
		          <select id="peak_sort" disabled></select>
            </div>
            <script>populate_sort_lists();</script>
          </div>
          <div>
            <input type="button" value="Update" onclick="make_CEM_table()">
          </div>
          <h4>Columns to display</h4>
          <div >
            <input type="checkbox" id="show_db" value="1" 
            onclick="toggle_column('hide_db')">
            <label for="show_db">Show Database</label>
          </div>
          <div >
            <input type="checkbox" id="show_id" value="1" 
            onclick="toggle_column('hide_id')" checked>
            <label for="show_id">Show ID</label>
          </div>
          <div >
            <input type="checkbox" id="show_name" value="1" 
            onclick="toggle_column('hide_name')" checked>
            <label for="show_name">Show Name</label>
          </div>
          <div >
            <input type="checkbox" id="show_evalue" value="1" 
            onclick="toggle_column('hide_evalue')" checked>
            <label for="show_evalue">Show <i>E</i>-value</label>
          </div>
          <div >
            <input type="checkbox" id="show_pvalue" value="1" 
            onclick="toggle_column('hide_pvalue')">
            <label for="show_pvalue">Show <i>p</i>-value</label>
          </div>
          <div id='cb_show_fisherpv'>
            <input type="checkbox" id="show_fisherpv" value="1" 
            onclick="toggle_column('hide_fisherpv')" checked>
            <label for="show_fisherpv">Show Fisher <i>E</i>-value</label>
          </div>
          <div id='CB_show_MCC'>
            <input type="checkbox" id="show_MCC" value="1" 
            onclick="toggle_column('hide_MCC')">
            <label for="show_MCC">Show Matthew's Correlation Coefficient</label>
          </div>
          <div id='CB_show_blocation'>
            <input type="checkbox" id="show_blocation" value="1" 
            onclick="toggle_column('hide_blocation')" checked>
            <label for="show_blocation">Show Region Center</label>
          </div>
          <div >
            <input type="checkbox" id="show_bwidth" value="1" 
            onclick="toggle_column('hide_bwidth')" checked>
            <label for="show_bwidth">Show Region Width</label>
          </div>
          <div >
            <input type="checkbox" id="show_bsites" value="1" 
            onclick="toggle_column('hide_bsites')" checked>
            <label for="show_bsites">Show Region Matches</label>
          </div>
          <div >
            <input type="checkbox" id="show_tsites" value="1" 
            onclick="toggle_column('hide_tsites')">
            <label for="show_tsites">Show Total Matches</label>
          </div>
          <div id='CB_show_negative_binomial'>
            <input type="checkbox" id="show_negative_binomial" value="1" 
            onclick="toggle_column('hide_negative_binomial')">
            <label for="show_negative_binomial">Show Negative <i>p</i>-value</label>
          </div>
          <div id='CB_show_negbsites'>
            <input type="checkbox" id="show_negbsites" value="1" 
            onclick="toggle_column('hide_negbsites')" checked>
            <label for="show_negbsites">Show Negative Region Matches</label>
          </div>
          <div id='CB_show_negtsites'>
            <input type="checkbox" id="show_negtsites" value="1" 
            onclick="toggle_column('hide_negtsites')">
            <label for="show_negtsites">Show Negative Total Matches</label>
          </div>
          <div >
            <input type="checkbox" id="show_maxprob" value="1" 
            onclick="toggle_column('hide_maxprob')">
            <label for="show_maxprob">Show Max Probability</label>
          </div>
          <div >
            <input type="checkbox" id="show_hpeak" value="1" 
            onclick="toggle_column('hide_hpeak')">
            <label for="show_hpeak">Show Max Probability Location</label>
          </div>
          <div >
            <input type="checkbox" id="show_nbinstested" value="1" 
            onclick="toggle_column('hide_nbinstested')">
            <label for="show_nbinstested">Show Multiple Tests</label>
          </div>
          <div>
            <input type="checkbox" id="show_score" value="1" 
            onclick="toggle_column('hide_score')">
            <label for="show_score">Show Score Threshold</label>
          </div>
        </div>
        <div style="clear:both"></div>
      </div>
    </div>
    <h2 id="inputs" class="mainh pad2">Input Files</h2>
    <div class="box">
      <h4>Sequences</h4>
      <table class="inputs">
        <tr><th>Database</th><th>Source</th><th>Sequence Count</th></tr>
        <tr>
          <td id="ins_seq_name"></td>
          <td id="ins_seq_source"></td>
          <td id="ins_seq_count"></td>
        </tr>
      </table>
      <script>
      {
        var db = data['sequence_db'];
        $("ins_seq_name").innerHTML = db['name'];
        $("ins_seq_source").innerHTML = db['source'];
        $("ins_seq_count").innerHTML = db['count'];
      }
      </script>
      <div id='neg_seq_input'>
      <h4>Negative sequences</h4>
      <table class="inputs">
        <tr><th>Database</th><th>Source</th><th>Sequence Count</th></tr>
        <tr>
          <td id="ins_negseq_name"></td>
          <td id="ins_negseq_source"></td>
          <td id="ins_negseq_count"></td>
        </tr>
      </table>
      </div>
      <script>
      {
        if (data['options']['neg_sequences']) {
          var db = data['negative_sequence_db'];
          if (!db['name']) db['name'] = name_from_source(db['source']);
          $("ins_negseq_name").innerHTML = db['name'];
          $("ins_negseq_source").innerHTML = db['source'];
          $("ins_negseq_count").innerHTML = db['count'];
        }
        else {
          $('neg_seq_input').style.display='none';
        }
      }
      </script>
      <h4>Motifs</h4>
      <table id="motif_dbs" class="inputs">
        <thead>
          <tr><th>Database</th><th>Source</th><th>Motif Count</th></tr>
        </thead>
        <tbody></tbody>
      </table>
      <script>
      {
        var tbl = $('motif_dbs');
        var tbody = tbl.tBodies[0];
        while (tbody.rows.length > 0) {
          tbody.deleteRow(0);
        }
        var motif_dbs = data['motif_dbs'];
        for (var i = 0; i < motif_dbs.length; i++) {
          var db = motif_dbs[i];
          var row = tbody.insertRow(tbody.rows.length);
          add_text_cell(row, db['name']);
          add_text_cell(row, db['source']);
          add_text_cell(row, db['count']);
        }
      }
      </script>
    </div>
    <div id="info_sec" class="bar">
      <div class="subsection">
        <a name="version"/>
        <h5>CentriMo version</h5>
        <span id="ins_version"></span>
        (Release date: <span id="ins_release"></span>)
        <script>
          $("ins_version").innerHTML = data["version"];
          $("ins_release").innerHTML = data["release"];
        </script> 
      </div>
      <div class="subsection">
        <a name="command" />
        <h5>Command line summary</h5>
        <textarea id="cmd" rows="5" style="width:100%;" readonly="readonly">
        </textarea>
        <script>$("cmd").value = data["cmd"].join(" ");</script>
      </div>
    </div>
  </body>
</html>