Question: UCSC custom track - can different peaks have different color+height?
0
gravatar for nonish5
6.1 years ago by
nonish540
European Union
nonish540 wrote:

Hi, 

I want to build a custom UCSC track where different peaks have different color+height.

I read the instructions here, http://genome.ucsc.edu/goldenPath/help/customTrack.html, but didn't find such example.

The only similar example that I found is presented below, but the different color is only for positive vs. negative peaks. and I want all my peaks to be positive.

http://genome.ucsc.edu/goldenpath/help/bedgraph.html

Do you know if this is possible at all?

Edit:

More specifically, the 2 types of data that I want to present (in two colors) is a score per position (some of the scores are 0 and I simply ignore them and don't plot them at all). Thus, the span of each peak is 1 (a single position) and the height is different. In addition, since I have 2 types of data, a position may have a score in both options and there may be an overlap in some cases.

I succeeded drawing something like this using  "track type=bedGraph":

like this:

browser position chr20:41052953-41066370
track type=bedGraph name="BedGraph Format" description="BedGraph format" visibility=full 
chr20    41052876    41052877    0.214750
chr20    41052953    41052954    -0.409103
chr20    41052989    41052990    0.118746

(with positive and negative values for the last column).

I was wondering if there is format that supports two colors for the data where all peaks are positive. and if so, what happens in case the same position contains two such peaks.

In addition, I need the ability to generate an automatic link to the UCSC browser that displays the area of interest.

[This is possible when using bed files, using a link of the form "http://genome.ucsc.edu/cgi-bin/hgTracks?db=hg19&position=chrX&hgct_customText=https://my_data_file.txt" (where my_data_file.txt is the data file that I generated)]

Thanks!

gene genome • 3.5k views
ADD COMMENTlink modified 6.1 years ago • written 6.1 years ago by nonish540
3
gravatar for Madelaine Gogol
6.1 years ago by
Madelaine Gogol5.2k
Kansas City
Madelaine Gogol5.2k wrote:

You can do it in a track hub with a multiwig, but it'll take some set up.

ADD COMMENTlink written 6.1 years ago by Madelaine Gogol5.2k

A bed format doesn't support my request?

thanks!

ADD REPLYlink modified 6.1 years ago • written 6.1 years ago by nonish540

BED format doesn't do height, thus no contour, no peaks. BED format specifies features, rectangles. To accomplish what you want, you will have to decompose your data into more than one track, and then use multiwig, as Madelaine suggested, to overlay the decomposed tracks and specify the colors you want for each one. You'd essentially have to do the "decomposing" step either way (in principle), since you need a way to classify peaks (i.e. regions) so you can assign color. It's sort of a nifty idea to extract your peaks into classes, such that a given data track contains just the regions of that class. You could have three classes (tracks for overlaying): peaks of type 1, peaks of type 2, data not considered a peak (i.e. the stuff between the peaks). As to the issue of "what happens in case the same position contains two such peaks", this is a little confusing. How many "peaks" can occur in a single position of a data track? How are you calling peaks such that you have more than one at a given spot? Either way, with multiwig the peaks can overlap and the colors can be semitransparent such that they blend.

ADD REPLYlink written 6.1 years ago by seidel7.1k
1
gravatar for Matt Shirley
6.1 years ago by
Matt Shirley9.4k
Cambridge, MA
Matt Shirley9.4k wrote:

This is possible. Take a look at the BED format description. You'll need a 9 column format; even though you don't require all 9 fields you have to specify them. Check out the example on the same page.

ADD COMMENTlink written 6.1 years ago by Matt Shirley9.4k

I think that's only for a bed track, not wig.

ADD REPLYlink written 6.1 years ago by Madelaine Gogol5.2k

Yes, you are correct. I was thinking that the score value would determine the height, like bedGraph format, but bedGraph is just a wiggle variant.

ADD REPLYlink written 6.1 years ago by Matt Shirley9.4k
Please log in to add an answer.

Help
Access

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