Deploy IGV webapp on linux server
Contents
Config IGV on the server.
I have to share the inteactive results with my colleague. But I don’t like to install UCSC genomebrower in local. Instead, a light-weight one is what I need.
1. Installation
- Install nodejs
if you have conda, just
| |
- build igv-webapp
| |
2. Running the app
| |
3. Configuration (Example)
gtf, bed, bam, bigwig … in
resourcedirectory fisrt.prepare a json file contain all the required information of tracks. see also igv.js wiki. E.g. mm10_igv-lab.sv.json
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23import json tracks = [] for b in ['a1.bed','a2.bed','c1.bed','c2.bed']: bed = os.path.basename(b) track = { "name": bed.replace(".bed",""), "type": "annotation", "format": "bed", "sourceType": "file", "url": f"http://igv-app-03:5000/resources/{bed}", # your server name + port + file path #order: Number.MAX_VALUE, #"visibilityWindow": 300000000, "displayMode": "EXPANDED" } tracks.append(track) sv = { "label": "IGV-Lab", # name will be shown under track's menu. "description": "Any descriptions", "link": "", "tracks": tracks } with open('./resources/tracks/mm10_igv-lab.json', 'w') as outfile: json.dump(sv, outfile)add the json to
trackRegistry.jsonin theresource/tracks.1 2 3 4 5"mm10": [ "resources/tracks/mm10_annotations.json", "resources/tracks/mm10_encode.json", "resources/tracks/mm10_igv-lab.json" # add ]load files
- select the correct genome, e.g. mm10
- In the dropdown menu of tracks, you’ll see
IGV-Lab. Click it, and select the files you’ve just add.