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
:

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

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.

Example upload of 2 local bigWig files:

The 2 bigWig tracks are added to the browser view:

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

The bedGraph track is added to the browser view:

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:

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:

or choose many files by clicking the second button:

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)
