Local track files

We realize that not every research group has the ability to set up a web server with CORS enabled. As of version 48.0.0, we added the ability to read local track files or an entire folder as a datahub. This means the user can view track files from their hard drive to the browser. The format for these track files is same as those that are hosted on a webserver.

Note

The tracks viewed through the local track feature cannot be saved to the browser’s local storage. Thus, when you refresh the browser your local tracks will be gone. Tracks need to be re-selected or re-grant the browser permission to read local files. This is a security setup of Javascript. To avoid uploading multiple files repeatedly, the user can create a hub.config.json file to specify files as a local datahub. In this manner, after a refresh event the user can just choose their local datahub again instead of choosing individual tracks separately.

Important

Since the user needs to give permission for the web browser to access files on a local hard drive, tracks from a local hard drive cannot be saved into Session. Please consider using HTTP(S) hosted tracks to work with the session function.

View local files as tracks

To use your local files, make sure to format your files correctly. First, open the View Local Tracks menu from Tracks:

_images/upload1.png

By default, you will be on the Add Local Track tab. Second, choose your track file format:

_images/upload2.png

Third, choose your files. You can choose many files of same type if the track type only requires one file (bigWig, bigBed, HiC, and bigInteract) or if the track type requires a data file and index file (bedGraph, methylC, etc.) then you need to choose each pair individually.

_images/upload3.png

Example upload of 2 local bigWig files:

_images/upload4.png

The 2 bigWig tracks are added to the browser view:

_images/upload5.png

Example upload of 1 local Bedgraph track and its associated index file:

_images/upload6.png

The bedGraph track is added to the browser view:

_images/upload7.png

View files or a folder as a datahub

If you want to upload many different types of track files to the browser, you can do that too! Choose the Add Local Hub tab from the track upload menu as before:

_images/upload8.png

Create a file called hub.config.json for the browser to configure your local data hub (example below):

[
    {
        "filename": "2value.bg.gz",
        "type": "bedgraph",
        "name": "test bedgraph",
        "options": {"height": 100}
    },
    {
        "filename": "TW463_20-5-bonemarrow_MeDIP.bigWig",
        "type": "bigwig",
        "name": "MeDIP",
        "options": {"color": "pink"}
    },
    {
        "filename": "TW551_20-5-bonemarrow_MRE.CpG.bigWig",
        "type": "bigwig",
        "name": "MRE",
        "options": {"color": "red"}
    },
    {
        "filename": "h1.liftedtohg19.gz",
        "type": "methylc"
    }
]

Note

Please note the name and options attribute specified in this file. The syntax is the same as a remote datahub file.

Note

Track files not specified in hub.config.json will be skipped. Orders of tracks will follow the order defined in hub.config.json file.

You can either choose an entire folder by clicking the first button:

_images/upload9.png

or choose many files by clicking the second button:

_images/upload10.png

After uploading either a folder or many files, your local datahub will be displayed: (Please note the name and options specified in your hub.config.json file will also be applied)

_images/upload11.png