[Gmod-ajax] Alignments2 - Set mismatch color?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Gmod-ajax] Alignments2 - Set mismatch color?

Keiran Raine

Hi,

 

I've had a request to change the read colouring but to do this I need to modify the base mismatch colours slightly.  Is this possible via call back?

 

The colour seems to be set from a mismatch object, mismatch.base, View/FeatureGlyph/Alignment.js -> _drawMismatches().

 

Thanks,

 

Keiran Raine

Principal Bioinformatician

Cancer Genome Project

Wellcome Trust Sanger Institute

 

[hidden email]

Tel:+44 (0)1223 834244 Ext: 4983

Office: H104

-- The Wellcome Trust Sanger Institute is operated by Genome Research Limited, a charity registered in England with number 1021457 and a company registered in England with number 2742969, whose registered office is 215 Euston Road, London, NW1 2BE.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gmod-ajax mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-ajax
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Alignments2 - Set mismatch color?

Colin
I think the general idea is that the Alignments2 mismatch colors use the CSS (e.g. the base_a, base_g etc. from sequence.css), so that it matches the colors of the bases on the DNA track. You can change the CSS colors in sequence.css but it also changes the reference sequence track.

You could make a subclass of the Alignments2 track with a custom _colorForBase function potentially in order to make fully custom Alignments2 track coloring potentially.

-Colin

On Wed, Jul 26, 2017 at 12:35 PM, Keiran Raine <[hidden email]> wrote:

Hi,

 

I've had a request to change the read colouring but to do this I need to modify the base mismatch colours slightly.  Is this possible via call back?

 

The colour seems to be set from a mismatch object, mismatch.base, View/FeatureGlyph/Alignment.js -> _drawMismatches().

 

Thanks,

 

Keiran Raine

Principal Bioinformatician

Cancer Genome Project

Wellcome Trust Sanger Institute

 

[hidden email]

Tel:<a href="tel:+44%201223%20834244" value="+441223834244" target="_blank">+44 (0)1223 834244 Ext: 4983

Office: H104

-- The Wellcome Trust Sanger Institute is operated by Genome Research Limited, a charity registered in England with number 1021457 and a company registered in England with number 2742969, whose registered office is 215 Euston Road, London, NW1 2BE.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gmod-ajax mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-ajax



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gmod-ajax mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-ajax
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Alignments2 - Set mismatch color?

Colin
You can also reverse that logic and "subclass the CSS" so that there is the default .base_a .base_g etc which is picked up by the Alignments2 track and then make a more specific CSS selector for the DNA track

# 'A' on the alignments2 is bright blue
.base_a {
    background-color: #00BFFF;
}

# 'A' on the sequence track is green
.track_jbrowse_view_track_sequence .base_a {
    background-color: #00BF00;
}


-Colin

On Wed, Jul 26, 2017 at 2:54 PM, Colin <[hidden email]> wrote:
I think the general idea is that the Alignments2 mismatch colors use the CSS (e.g. the base_a, base_g etc. from sequence.css), so that it matches the colors of the bases on the DNA track. You can change the CSS colors in sequence.css but it also changes the reference sequence track.

You could make a subclass of the Alignments2 track with a custom _colorForBase function potentially in order to make fully custom Alignments2 track coloring potentially.

-Colin

On Wed, Jul 26, 2017 at 12:35 PM, Keiran Raine <[hidden email]> wrote:

Hi,

 

I've had a request to change the read colouring but to do this I need to modify the base mismatch colours slightly.  Is this possible via call back?

 

The colour seems to be set from a mismatch object, mismatch.base, View/FeatureGlyph/Alignment.js -> _drawMismatches().

 

Thanks,

 

Keiran Raine

Principal Bioinformatician

Cancer Genome Project

Wellcome Trust Sanger Institute

 

[hidden email]

Tel:<a href="tel:+44%201223%20834244" value="+441223834244" target="_blank">+44 (0)1223 834244 Ext: 4983

Office: H104

-- The Wellcome Trust Sanger Institute is operated by Genome Research Limited, a charity registered in England with number 1021457 and a company registered in England with number 2742969, whose registered office is 215 Euston Road, London, NW1 2BE.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gmod-ajax mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-ajax




------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gmod-ajax mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-ajax
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Alignments2 - Set mismatch color?

Keiran Raine

Thanks Colin,

 

Both approaches are very useful.  The subclass of CSS probably the simplest to patch into an official release, say if you want to go for a more GBrowse like view, all mismatches red.

 

Thanks,

 

Keiran Raine

Principal Bioinformatician

Cancer Genome Project

Wellcome Trust Sanger Institute

 

[hidden email]

Tel:+44 (0)1223 834244 Ext: 4983

Office: H104

 

From: Colin <[hidden email]>
Date: Wednesday, 26 July 2017 at 20:27
To: Keiran Raine <[hidden email]>
Cc: "[hidden email]" <[hidden email]>
Subject: Re: [Gmod-ajax] Alignments2 - Set mismatch color?

 

You can also reverse that logic and "subclass the CSS" so that there is the default .base_a .base_g etc which is picked up by the Alignments2 track and then make a more specific CSS selector for the DNA track

 

# 'A' on the alignments2 is bright blue

.base_a {

    background-color: #00BFFF;

}

# 'A' on the sequence track is green

.track_jbrowse_view_track_sequence .base_a {
    background-color: #00BF00;
}

 

 

-Colin

 

On Wed, Jul 26, 2017 at 2:54 PM, Colin <[hidden email]> wrote:

I think the general idea is that the Alignments2 mismatch colors use the CSS (e.g. the base_a, base_g etc. from sequence.css), so that it matches the colors of the bases on the DNA track. You can change the CSS colors in sequence.css but it also changes the reference sequence track.

 

You could make a subclass of the Alignments2 track with a custom _colorForBase function potentially in order to make fully custom Alignments2 track coloring potentially.

 

-Colin

 

On Wed, Jul 26, 2017 at 12:35 PM, Keiran Raine <[hidden email]> wrote:

Hi,

 

I've had a request to change the read colouring but to do this I need to modify the base mismatch colours slightly.  Is this possible via call back?

 

The colour seems to be set from a mismatch object, mismatch.base, View/FeatureGlyph/Alignment.js -> _drawMismatches().

 

Thanks,

 

Keiran Raine

Principal Bioinformatician

Cancer Genome Project

Wellcome Trust Sanger Institute

 

[hidden email]

Tel:<a href="tel:&#43;44%201223%20834244" target="_blank">+44 (0)1223 834244 Ext: 4983

Office: H104

-- The Wellcome Trust Sanger Institute is operated by Genome Research Limited, a charity registered in England with number 1021457 and a company registered in England with number 2742969, whose registered office is 215 Euston Road, London, NW1 2BE.

 

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gmod-ajax mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-ajax

 

 

-- The Wellcome Trust Sanger Institute is operated by Genome Research Limited, a charity registered in England with number 1021457 and a company registered in England with number 2742969, whose registered office is 215 Euston Road, London, NW1 2BE.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gmod-ajax mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-ajax
Loading...