Page tree
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

  1. Converter UI 

    1. Url
      1. https://translate.bioviz.org/
  2. Get Requests

    • There are 3 get requests with different file paths /hub.txt, /genomes.txt, trackDb.txt. The logic for each get request is explained below.
    • /hub.txt

    • /genomes.txt

      • Url
        1. https://translate.bioviz.org/api/igbTrackHubs?quickLoadUrl=https://api.bitbucket.org/2.0/repositories/lorainelab_udaya/testquickload/src/main/quickload2&filePath=/genomes.txt
      • Logic
        1. This URL returns the following fields: genome, trackDb, organism, defaultPos, and twoBitPath.
          1. genome – Generated from quickLoadUrl + /contents.txt. The genome name is validated against UCSC genome names by checking ucsc_synonyms.txt (see the section Generate UCSC Synonyms.txt). If the genome name matches a UCSC genome name, only genome and trackDb are returned. Otherwise, organism, defaultPos, and twoBitPath are also included.
          2. trackDb – Constructed as genome_name + /trackDb.txt.
          3. organism – Required only when the genome name is not a UCSC genome name. The value is fetched from species.txt in the integrated-genome-browser repository. The first two words of the genome name (separated by _) are used to search in species.txt. If a match is found, the organism name from the first column of that row is used.
          4. defaultPos – Fetched from quickLoadUrl + "/" + genome_name + "/genome.txt". The genome.txt file contains chromosome lengths and assembly information. defaultPos is set as <first_chromosome_name>:0-<length_of_first_chromosome>.
          5. twoBitPath – If a 2bit file exists at quickLoadUrl + "/" + genome_name + "/" + genome_name + ".2bit", that path is used. Otherwise, it is retrieved from annots.xml within the same directory by selecting the <file> tag whose reference attribute is true.
    • trackDb.txt

      • Url
        1. https://translate.bioviz.org/api/igbTrackHubs?quickLoadUrl=https://api.bitbucket.org/2.0/repositories/lorainelab_udaya/testquickload/src/main/quickload2&filePath=/A_thaliana_Jun_2009/trackDb.txt
      • Logic
        1. This URL returns the following fields: track, bigDataUrl, shortLabel, longLabel, type, and visibility.
          1. The field values are generated from quickLoadUrl + "/" + genome_name + "/annots.xml".
          2. Consider only <file> tags where reference="none".
          3. track – The first word in the title attribute.
          4. bigDataUrl – The name field of the <file> tag if it is already a URL. Otherwise, it is constructed as quickLoadUrl + "/" + genome_name + "/" + name.
          5. shortLabel – The last word of the title attribute.
          6. longLabel – The description field of the <file> tag.
          7. 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.
            5. Otherwise, if the extension matches a value in genomic_extensions, return the corresponding key.
            6. If the extension is just .bb, return bigBed 12.
          8. visibility – Always set to "dense".
  3. Head Request

    • Logic 
      1. Returns headers and status_code. The status_code is determined by verifying all GET calls.
    • Purpose 
      1. UCSC makes a HEAD request to validate the URL when it is added to Connected Hubs.
      2. Go to UCSC Track Data Hubs → Connected Hubs tab.
      3. When the URL is pasted, UCSC sends a HEAD request to verify the status code.
  4. Generate Ucsc Synonyms.txt

  • No labels