Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Colors in BED format are ignored #214

Open
max-l opened this issue Feb 11, 2017 · 2 comments
Open

Colors in BED format are ignored #214

max-l opened this issue Feb 11, 2017 · 2 comments

Comments

@max-l
Copy link
Contributor

max-l commented Feb 11, 2017

I am using this stylesheet to display bed tracks : https://www.biodalliance.org/stylesheets/gencode.xml

The rows in the bed tracks have colors that are not honored by the browser, I suspect that the stylesheet is designed override the color.

Here is a sample line in my bed track :

10	14521189	14530459	NP_001269626.1	500	-	14521189	14530459	20,50,0	3	117,151,128	0,679,9142

It displayed as red boxes.I suppose the browser assigns the stylesheet type "translation" or "bb-translation" from the genecode.xml stylesheet, but I don't see how, there is nothing in the row that "says" they are a translation or a "bb-translation".

The genecode.xml stylesheet does exactly what I need (display the tracks as boxes against a genome), except for the color, would love to know how to control the color from the stylesheet or get it to honor the RGB color in bedtracks....

If there was a JSON version of the gencode.xml stylesheet it would be pure pleasure to use it (instead of genecode.xml)...

Oh, and thanks for this great project ! ;-)

@dasmoth
Copy link
Owner

dasmoth commented Feb 13, 2017

Colours in BED and bigBed files are supported, but need to be explicitly enabled (which is necessary in order to match UCSC track-hub behaviour).

You can do this with the BGITEM stylesheet property: http://www.biodalliance.org/stylesheets.html

To get a well-behaved gene track with gene bodies coloured according to the itemRgb field of a bigBed file, you probably want (using your preferred JSON format):

       {
             name: 'Colourful gene track',
             bwgURI: '/path/to/genes.bw',
             style: [
                   {type: 'transcript',
                    style: {
                        glyph: 'BOX',
                        HEIGHT: 10,
                        FGCOLOR: 'black'
                        BGCOLOR: 'white',
                        BUMP: 'yes',
                        LABEL: 'yes'
                    }
                 },
                 {type: 'translation',
                  style: {
                         glyph: 'BOX',
                         HEIGHT: 10,
                         FGCOLOR: 'black',
                         BGITEM: 'yes'
                 }}]
       }

@max-l
Copy link
Contributor Author

max-l commented Feb 15, 2017

It works wonderfully, thanks !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants