russelllab / kinaseResistance

A method to predict activating, deactivating and resistance mutations in kinases
http://activark.russelllab.org
GNU General Public License v3.0
1 stars 0 forks source link

Mouseover information in the alignment as mechismo format #34

Closed gurdeep330 closed 1 year ago

gurdeep330 commented 1 year ago

@tschmenger So Rob suggested having the mouseover information in the Mechismo format z.B. kinase/WTpos; mt_type EGFR/T790; R T is the WT AA and R is the mutation type

tschmenger commented 1 year ago

I see. This would then require that this information is present in the "Mutational_Infofile_Kinases.txt". So far we have {UniprotID:{A/D/R:[Position, instead we would then perhaps need {UniprotID:{A/D/R:[Mutation.

The script could then constructs two dictionaries from this, one where we have a list of positions and one where we have the infostring for each position. I could then just look this info up in the second dictionary or search the position in the first dictionary.

gurdeep330 commented 1 year ago

@tschmenger He wants to see EGFR/T790 and not EGFR/T790M Just the WTaa and position I guess you are already displaying this information in the mouseover (EGFR/790). You just have to show it as EGFR/T790 though you will still have to fetch the WTaa from the alignment

tschmenger commented 1 year ago

Alright. Yeah, I can offer a fix for that immediately using create_svg_20230503_kinases_GS.py. Note that I am using the gene names as given in the alignment, so right now it would be EGFR_HUMAN/T790 followed by the relavant ADR categories. Do we want the last parts (ADR info) in the mouseover, too? Otherwise we could close this issue.

gurdeep330 commented 1 year ago

Yeah, I think the immediate fix is fine for now but eventually, we would also want to show more information in the mouseover. So we can anyway let this issue be open and can bring it up again with him next week when he is here in person.

gurdeep330 commented 1 year ago

http://kinasex.russelllab.org/result?uniqID=LAMT7&kinase=MAP2K1&mutation=V211D

tschmenger commented 1 year ago

I have taken care of adding the extra line. A/D/R labeling is done because that were the categories from the infofile, will have a look at this once we use Activating etc instead. I suppose the only changes I need to make is to increase the width of some boxes.

tschmenger commented 1 year ago

The new script will have these things, I already implemented them. Only thing I have to confirm are minor cosmetics, as the dictionary I am currently using still has A/D/R, but I already increased the legend boxes and shifted the start of the text to the left, so I would think the full words will fit neatly into their boxes now.

tschmenger commented 1 year ago

The dictionary currently looks like this: {'P00519': {'Activating': ['337'], 'Deactivating': [], 'Resistance': ['315', '250', '253', '255', '317', '276', '311'], ........

I think one way we could re-format the dict could be like this: {'P00519': {'Activating':[ ['337', 'INFO TO BE SHOWN'] ], ' Deactivating': [ [ ] ], 'Resistance': [ ['315', 'INFO TO BE SHOWN'] , '[250', 'INFO TO BE SHOWN'] , ['253', 'INFO TO BE SHOWN'], ['255', 'INFO TO BE SHOWN'], ['317', 'INFO TO BE SHOWN'], ['276', 'INFO TO BE SHOWN'], '[311', 'INFO TO BE SHOWN'] ], ........

tl;dr: instead of 1 list for each categorie we could have a list of lists where item [0] is the position and [1] the info we want to show in the mouseover.

Of course open to suggestions.

gurdeep330 commented 1 year ago

@tschmenger I agree. Here is the same dic:

Create_SVG/Enhancements_May2023/sample_dic_mutation_info.txt

The info is already wrapped in the a and i tags

gurdeep330 commented 1 year ago

@tschmenger, here is the updated dictionary: Create_SVG/Enhancements_May2023/sample_dic_mutation_info.txt with

  1. position as the first item in the list
  2. mutation/PTMsite as the second item
  3. URL as the third item
gurdeep330 commented 1 year ago

@tschmenger I have integrated your updates with the webApp http://activark.russelllab.org/result?uniqID=4USF8&kinase=BRAF&mutation=V600E The URLs are also fixed (COSMIC etc).

I guess now you only have to look into adding that "open the URL" icon, right?

tschmenger commented 1 year ago

I added Bootstrap Box arrow up-right icon as .svg to the .svg. You will find it in Create_SVG/Enhancements_May2023/May11th with the name create_svg_20230512_kinases_GS.py