mskilab-org / case-report

Genomic case report
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

centering on locus upon click and have gene be included in full module upon click #17

Closed jrafailov closed 1 day ago

jrafailov commented 1 week ago

Describe the bug @shihabdider had implemented this before but it seems that this functionality is no longer working. The expected behavior is from the filtered events table, upon click the module that comes up should center around the locus position indicated by the table. Additionally, the full gene range should be visible + some padding!

To Reproduce Steps to reproduce the behavior:

  1. click on mutation in events table
  2. note that module appears but not centered where locus is

Expected behavior The expected behavior is from the filtered events table, upon click the module that comes up should center around the locus position indicated by the table. Additionally, the full gene range should be visible + some padding!

shihabdider commented 1 week ago

See: https://github.com/mskilab-org/case-report/blob/9a3ca30087c1f81ad3fe00b652608150638d4b38/src/helpers/utility.js#L833

The method is still there, but I think it's not longer being used?

shihabdider commented 1 week ago

Ah, I think I see the problem.

It's relying on vartype == "SNV" to enforce the centering, but the oncokb snv outputs omit this field (we should probably fix this @kevinmhadi ). @xanthopoulakis an easy fix is to instead check if ["missense", "trunc"].includes(type) as the condition.

kevinmhadi commented 1 week ago

I just pushed the change to Skilift branch oncokb_fusions to add vartype = "SNV" for all small mutations from oncokb (I'm assuming indels are flagged the same way)

shihabdider commented 1 week ago

Great, then @xanthopoulakis you don't need to make any changes. I just have to update the filtered events table.

xanthopoulakis commented 5 days ago

Great, then @xanthopoulakis you don't need to make any changes. I just have to update the filtered events table.

Great! Let me know when you can verify this works indeed.

shihabdider commented 3 days ago

@xanthopoulakis Unfortunately, it doesn't seem like adding vartype fixed this issue. I would double check how the Location column is being populated. I suspect the old methods are being overridden by new code that you introduced in your refactor.

See:

https://github.com/mskilab-org/case-report/blob/9a3ca30087c1f81ad3fe00b652608150638d4b38/src/helpers/utility.js#L833

The method is still there, but I think it's not longer being used?

Update: Seems like fusion split view was also affected, which makes me think that the way the genome location is being computed was overridden.

shihabdider commented 2 days ago

OK after further investigation, it seems like the Variant_g is no longer being reported as expected with the new oncokb calls: (e.g "Variant_g": "g.25398285-25398285",). Previously Variant_g had the base change and the coordinates formatted as seqname:start-end. This is why it's not working.

@kevinmhadi Any chance we can update the Variant_g in the onckob_snv to reflect the old format? (e.g "Variant_g": "2:29432664-29432664 C>T",)

For the fusions, the behavior is a bit weird. For some fusions it opens in split:

image

For others it doesn't:

image

shihabdider commented 2 days ago

OK, so centering for vartype==SNV now works again. However, this centering code should also apply to DELs.

@xanthopoulakis you just need to update this line https://github.com/mskilab-org/case-report/blob/9a3ca30087c1f81ad3fe00b652608150638d4b38/src/helpers/utility.js#L848

to include DEL, i.e the condition should be event.vartype === "SNV" || event.vartype === "DEL"