Question: Adding Custom Bed And Bam Tracks To UCSC Browser By URL
gravatar for user
7.9 years ago by
United States
user870 wrote:

I'm trying to add custom tracks to a UCSC genome browser session. I can add BAM files as follows:

track type=bam name="bam1" bigDataUrl=http://...bam1.bam

This works and UCSC is able to retrieve the BAM file and display it as a track. I'd like to also include BED files as tracks as well. I tried adding it to the custom tracks file like this:

track type=bam name="bam1" bigDataUrl=http://...bam1.bam
track name="bed1" url=http://...bed1.bed

But it complains about the second (BED) line. If I add type=bed to the second line after track it still does not work. How can I tell UCSC the locations of multiple BAM and BED files and have it load those as separate tracks? thanks

browser ucsc bam bed genome • 7.7k views
ADD COMMENTlink modified 6.1 years ago by yyqin900 • written 7.9 years ago by user870

What is bed1.bam, either its bed or bam. Also check Visualizing Chip-Seq Data Using Ucsc [Bigwig]

ADD REPLYlink modified 7.9 years ago • written 7.9 years ago by Sukhi Singh10k

Sorry, typo, it's meant to be a .bed

ADD REPLYlink written 7.9 years ago by user870

Try converting bed to bigbed using bedToBigBed and replace the url with bigDataUrl. It should work, I am not sure, If ucsc picks up bed file and anyways why to send a heavy file when you can use small, light weight encrypted formats (bigBed,bigwig etc.)

ADD REPLYlink modified 7.9 years ago • written 7.9 years ago by Sukhi Singh10k

I am running it locally so file size is not an issue. When I try it as bedGraph with the following line:

track type=bedGraph name="mytrack" bigDataUrl=theurl

I get the error "Unrecognized format type=bedGraph line 2 of custom track". Very frustrating, I follow the same exact syntax they show in the example

ADD REPLYlink modified 7.9 years ago • written 7.9 years ago by user870

That error probably means that the line does not start with "chr". UCSC bedGraph requires only chromosomes 1-22, X, Y and M prefixed with "chr".

ADD REPLYlink written 7.4 years ago by Neilfws49k

Sukhdeep Singh's response below is correct. The reason for this error is that bedGraph is not a valid bigDataUrl file format. As far as I can tell, bedGraph format can only be specified by adding "track type=bedGraph" in the track definition line of the bedGraph file itself, i.e. bedGraph cannot be specified as a type in the "Paste URLs or data:" box on the UCSC Add Custom Tracks page. If "track type=bedGraph" is not added to a bedGraph file, it is interpreted by the browser simply as a plain bed file with column 4 (the quantitative value) used as the bed interval name.

ADD REPLYlink modified 6.3 years ago • written 6.3 years ago by Casey Bergman18k

Have the same problem.

ADD REPLYlink modified 6.1 years ago • written 6.1 years ago by yyqin900
gravatar for Sukhi Singh
7.9 years ago by
Sukhi Singh10k
Sukhi Singh10k wrote:

I've got the problem.

From the user page,

bigDataUrl=<external_url> - Defines a URL to the data file for BAM, bigBed, bigWig or VCF tracks. This is a required attribute for those track types. There is no default for this attribute.

It doesn't states, bedGraph, thats what my point is. This whole local file, remote server paradigm is valid for above four kinds of tracks.

Try putting two bam files, or bigwig files, the error should go away. Best way is to convert the bedGraph to bigWig or bigBed and the utility to do that exists called bedGraphToBigWig or change the bigDataUrl to url


ADD COMMENTlink modified 7.9 years ago • written 7.9 years ago by Sukhi Singh10k
gravatar for Maximilian Haeussler
6.2 years ago by
Maximilian Haeussler1.4k wrote:

One can now just paste the URL of the file, there is no need to add the track type=bam bigDataUrl=xxx etc. Just the URL should be enough, as long as the file extension is a common one like .bam or .bw or .bb or .bigBed.

As for loading bed files, if you want to load a normal .bed file, just paste the URL, do not add the bigDataUrl=xxx statements.

ADD COMMENTlink written 6.2 years ago by Maximilian Haeussler1.4k

Does this means, the old usage is deprecated?

ADD REPLYlink written 6.2 years ago by Sukhi Singh10k

But then how to change the track name?

ADD REPLYlink written 6.1 years ago by yyqin900
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1007 users visited in the last hour