Adding Custom Bed And Bam Tracks To UCSC Browser By URL
2
3
Entering edit mode
11.2 years ago
user ▴ 940

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

ucsc genome browser bam bed • 11k views
ADD COMMENT
1
Entering edit mode

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

ADD REPLY
1
Entering edit mode

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

ADD REPLY
0
Entering edit mode

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 REPLY
0
Entering edit mode

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 REPLY
0
Entering edit mode

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 REPLY
0
Entering edit mode

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 REPLY
0
Entering edit mode
11.2 years ago

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

Cheers

ADD COMMENT
0
Entering edit mode
9.5 years ago

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 COMMENT
0
Entering edit mode

Does this means, the old usage is deprecated?

ADD REPLY

Login before adding your answer.

Traffic: 1806 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6