...
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.
- track – The first Track should be unique single word in the title attribute.uscs. It is title with spaces replaced with "_"
- bigDataUrl – The name field of the <file> tag if it is already a URL. Otherwise, it is constructed as quickLoadUrl + "/" + genome_name + "/" + name.
- shortLabel – The last word of the title attribute.
- longLabel – The description field of the <file> tag.
- type – Determined based on the file extension of bigDataUrl.
- 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']
} - Get the extension of bigDataUrl.
- 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).
- Example: GSE63189_Catalog_of_lncRNAs_in_MCF-7cells.bigGenePred.bb → bigGenePred
- Otherwise, if the extension matches a value in genomic_extensions, return the corresponding key.
- If the extension is just .bb, return bigBed 12.
- genomic_extensions = {
- 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.
- track – It is first word before "/" in title with " " replaced with "_"
- superTrack on show
- shortLabel – It is first word before "/" in title.
- longLabel – The description field of the <file> tag.
- In side this superTrack we create subtracks.
- track – It is similar to normal track name.
- bigDataUrl – It is similar to normal track bigDataUrl.
- shortLabel – It is the title name excluding the first word.
- longLabel – It is similar to normal track longLabel.
- type – It is similar to normal track type.
- visibility – Always set to "hide".
- parent – It is the superTrack track name.
- In side this superTrack we create subtracks.
- 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.
- SuperTrack
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:
- Go to UCSC Track Data Hubs → Connected Hubs tab.
- When the URL is pasted, UCSC sends a HEAD request to verify the status code.
- To test:
- UCSC makes a HEAD request to validate the URL when it is added to Connected Hubs.
...