dasmoth / dalliance

Interactive web-based genome browser.
http://www.biodalliance.org/
BSD 2-Clause "Simplified" License
227 stars 68 forks source link

BigBed #19

Closed pascalg closed 10 years ago

pascalg commented 13 years ago

Another question from me.

I displayed a BigBed file in dalliance and in general it works fine. However I do not see the strand and score information in the browser. I was hoping, that the features are coloured according to their score. The bed file also contains a itemRgb column, but its ignored too. Am I doing something wrong, or is this just not yet implemented? Further I would like to add binary bed files as a default track. Is there a way to add binary files to the "sources" in the HTML file, like the DAS servers?

Thanks,

Pascal

dasmoth commented 13 years ago

Orientation and score fields should make it through the Dalliance bigbed code fine. Currently, we don't support the itemRgb field -- a DAS stylesheet is the only way to use your own colours -- but I think you're right that it should be supported when there isn't a stylesheet available.

I don't suppose you have a small example of the kind of data you're looking at? If you could send a link + a few notes about how you'd like it to look, we should be able to get something working!

pascalg commented 13 years ago

Basically I want to display microarray expression data. This data is mean normalised across samples, meaning that I have values from about -10 to 10 and want to display them like a heatmap in the browser. An example on UCSC would be the Affymetrix Exon Array tissue dataset (http://genome.ucsc.edu/cgi-bin/hgTrackUi?hgsid=206100779&c=chrY&g=affyExonTissues). UCSC has a special format for this, but I thought to use BED and the itemRgb to visualise the expression changes. The score does not support negative values?

To test bigBed files, I converted the following bed file to bidBed (using this command: bedToBigBed test.csv hg19.chrom.sizes myBigBed.bb)

chr7 54028 73584 a 100 - chr7 60328 61569 b 10 - chr7 62967 63529 c 5 - chr7 64068 64107 d 100 - chr7 65159 65220 e 500 - chr7 75460 116489 f 600 - chr7 244679 249951 g 800 + chr7 244826 249951 h 1000 + chr7 288051 304059 I 50 + chr7 322636 324640 j 10 -

The bigBed file can be found on my server: http://134.76.20.181/exchange/myBigBed.bb However, when I display the file in the browser I now see strand information, but all scores are set to 100 and have the same colour.

pascalg commented 13 years ago

Hi again,

I am wondering, if the example I sent is sufficient for you to reconstruct my issue? Is there any (maybe already existing) solution for it?

Thanks, Pascal

dasmoth commented 13 years ago

Thanks, that helps.

There was a bug preventing propagation of scores from .bb files. That should be fixed in master now.

However, you still need a way to render the scores, and the default .bb stylesheet doesn't do that. At the moment, the only solution is to attach an explicit stylesheet in the configuration, e.g. http://www.biodalliance.org/test/for-pascalg.html

I'm inclined to think that for your problem, using the itemRgb field might be a better solution. Don't suppose you have an example .bb which does this?

dasmoth commented 13 years ago

There's now some basic itemRgb support in 0.7.0pre2. Try http://www.biodalliance.org/test/for-pascalg.html for an example. Does this solve your problem?

pascalg commented 13 years ago

Awesome!! I will experiment with the new feature in the next weeks, but it looks perfect. Great work. Thanks

pascalg commented 12 years ago

Is there any possibility to add links to the menue of bigbed entries. I mean when I click on a transcript a meneu pops up with a link to e.g. ENSEMBL. Can I do the same with bigbed?

dasmoth commented 12 years ago

Would the "ID-driven" links supported by BED detail format do what you want:

         http://genome.ucsc.edu/FAQ/FAQformat.html#format1.7

...or do you need a custom link for each feature (in which case we'd have to sort out an alternative format)?

pascalg commented 12 years ago

No, an ID-driven link would be perfectly fine.

dasmoth commented 12 years ago

Okay, I've been meaning to have a proper go at BEDdetail soon. Will try to get it done by the weekend.

dasmoth commented 12 years ago

We've got a partial solution for this now. See:

         http://www.biodalliance.org/test/

Unfortunately, there doesn't seem to be a way to include the information we're after in the bigbed file itself, but you can now specify something like:

          link:                 'http://ncbi36.ensembl.org/Homo_sapiens/Gene/Summary?t=$$'

When programmatically configuring a track. Might be worth asking UCSC if they'd be willing to consider allowing a "track line" to be stored in a bigbed -- there is a little bit of space for extensions in the header, so it's technically possible...

Sorry this isn't as neat as I expected, and hope the partial solution is useful to you.

pascalg commented 12 years ago

No, that is everything I need. Thank you very much!!

I have another question. On your test page, you include a track from a bigbed file called BBD test. This track can be collapsed by the collapseSuperGroups option. When its collapsed, the gene symbols rather then the ENSEMBL transcript IDs are show. This is great, but how did you do that. How can I specify in a bed file which transcripts belong together?

pascalg commented 12 years ago

I figured it out by myself and it is very easy: Just add the ENSEMBL gene ID in column 13 and the symbol in column 14.

dasmoth commented 12 years ago

Glad to hear you've got this sorted out. "collapseSuperGroups" is a slightly hacky way of telling the browser "treat this like a gene track". I'd really like it to go away, but unfortunately a lot of data formats don't really include enough information to reliably infer what sorts of features they contain (the notable exception being DAS/1.6, where we can (and do!) infer gene-ness using SO terms).

dasmoth commented 10 years ago

Most of the issues discussed here can now be handled by wrapping your bigbed files in a track hub.