Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

Introduction

This page documents the various endpoints used to convert IGB Quickloads to a UCSC track hub.

Converter UI

URL - https://translate.bioviz.org/

...

There are 3 get requests with different file paths /hub.txt, /genomes.txt, /trackDb.txt.

  1. /hub.txt

...

    • Logic

      • The field values are generated from quickLoadUrl + "/" + genome_name + "/annots.xml".
      • Consider only <file> tags where reference="none".
      • This URL returns the following fields: track, bigDataUrl, shortLabel, longLabel, type, and visibility.
        1. track

...

        1. Track should be unique single word in

...

        1. uscs. It is title with spaces replaced with "_"
        2. bigDataUrl – The name field of the <file> tag if it is already a URL. Otherwise, it is constructed as quickLoadUrl + "/" + genome_name + "/" + name.
        3. shortLabel – The last word of the title attribute.
        4. longLabel – The description field of the <file> tag.
        5. type – Determined based on the file extension of bigDataUrl.
          1. genomic_extensions = {
                        'bigWig': ['bw', 'bigwig'],
                        'bigBed 12': ['bb', 'bigbed'],
                        'bigGenePred': ['bb'],
                        'bigChain': ['bigchain'],
                        'bigNarrowPeak': ['bb'],
                        'bigBarChart': ['bb'],
                        'bigInteract': ['bb'],
                        'bigPsl': ['bb'],
                        'bigMaf': ['bb'],
                        'hic': ['hic'],
                        'bam': ['bam', 'cram'],
                        'HAL': ['hal'],
                        'vcfTabix': ['vcf', 'vcf.gz']
                    }
          2. Get the extension of bigDataUrl.
          3. If the extension is present in genomic_extensions and equals "bb", check whether the word before .bb matches a key in genomic_extensions. If yes, return that key (e.g., bigGenePred).
          4. Example: GSE63189_Catalog_of_lncRNAs_in_MCF-7cells.bigGenePred.bb → bigGenePred
        6. .
          1. Otherwise, if the extension matches a value in genomic_extensions, return the corresponding key.
          2. If the extension is just .bb, return bigBed 12.
        7. visibility – Always set to "dense".
      • SuperTrack
        • If a title has "/" in it, it means it has subfolders. Creating subfolders is not possible in ucsc but we can create top level folder. To do that we need to use superTrack. 
          1. track – It is first word before "/" in title with " " replaced with "_"
          2. superTrack on show
          3. shortLabel – It is first word before "/" in title.
          4. longLabel – The description field of the <file> tag.
            1. In side this superTrack we create subtracks.
              1. track – It is similar to normal track name.
              2. bigDataUrl – It is similar to normal track bigDataUrl.
              3. shortLabel – It is the title name excluding the first word.
              4. longLabelIt is similar to normal track longLabel.
              5. typeIt is similar to normal track type.
              6. visibility – Always set to "hide".
              7. parent – It is the superTrack track name.

Head Request

    • Logic

      • Returns headers and status_code. The status_code is determined by verifying all GET calls.
    • Purpose

      • UCSC makes a HEAD request to validate the URL when it is added to Connected Hubs.
        • To test:
          1. Go to UCSC Track Data Hubs → Connected Hubs tab.
          2. When the URL is pasted, UCSC sends a HEAD request to verify the status code.

...

Update UCSC Synonyms.txt

    • Urlhttps://translate.bioviz.org/api/generateUcscSynonyms

    • Logic

      • IGB's source code maintains a list of synonyms for recognizing the same genome version from different genome browsers, called synonyms.txt. We have created a version of this file that matches the IGB specific genome version name to the UCSC genome version name. When a user adds an IGB Quickload as a track hub to the UCSC Genome Browser, translate.bioviz.org checks if the genome versions located in the Quickload match any of the genomes found in UCSC and if so, will load the data in the appropriate genome.
      • When the above URL is clicked on, the translate.bioviz.org server updates the synonyms.txt file following these steps:
        1. Fetch the list of UCSC genomes from the following API:

      Check if these genomes exist in IGB’s
        1. Compare the UCSC genomes to IGB’s source code synonyms.txt file (path: core/synonym-lookup/src/main/resources/synonyms.txt).
        2. If a UCSC genome is found in synonyms.txt, add the IGB genome name (first column in synonyms.txt) and the UCSC genome name to
      a new
        1. the synonyms.txt in the hub_facade repository (path: igb_trackhub/api/synonyms.txt).