Clinical-Genomics / loqusdbapi

A simple REST api for loqusdb
2 stars 0 forks source link

Fix MT variants query for genome build 38 #48

Closed northwestwitch closed 8 months ago

northwestwitch commented 8 months ago

This PR adds | fixes:

How to prepare for test:

How to test:

Expected outcome:

Review:

This version is a:

northwestwitch commented 8 months ago

Hi @Jakob37, I wrote a fix to the missing MT loqus stats. I was wondering if you could give it a try, given that you have both scout and loqusdb with build 38 data? (we don't :unamused:). I'm not sure about your settings but I guess you use loqusdbapi and not loqusdb to retrieve the stats right?

Jakob37 commented 8 months ago

Hi @Jakob37, I wrote a fix to the missing MT loqus stats. I was wondering if you could give it a try, given that you have both scout and loqusdb with build 38 data? (we don't 😒). I'm not sure about your settings but I guess you use loqusdbapi and not loqusdb to retrieve the starts right?

Great, thanks for the quick response!

Checking our docker compose file, it indeed looks like we use loqusdb-api (I'll double check with Markus).

I'll see if @alkc or @mhkc can take a look next week! (Otherwise I can check when back in office the week after next).

northwestwitch commented 8 months ago

Checking our docker compose file, it indeed looks like we use loqusdb-api

If you use compose you could try to pull this image instead of the production one

mhkc commented 8 months ago

I still get null values in the loqusdb card with the latest version of loqusdb-stage.

The API seem to respond with a 404 error when querying for the variant, "GET /variants/M_3572_T_G HTTP/1.1" 404

bild

northwestwitch commented 8 months ago

The API seem to respond with a 404 error when querying for the variant, "GET /variants/M_3572_T_G HTTP/1.1" 404

Thanks for the test @mhkc! Do you you get valid stats if instead you query for /variants/MT_3572_T_G - not via scout perhaps, but with curl for instance? Just to figure out how the MT chromosomes are represented in your database!

Jakob37 commented 8 months ago

Hi again @northwestwitch ! We investigated this further, and we found that our missing observations looks like an error on our part. We hadn't managed to upload any MT variants into the SNV db due to them being filtered out by not having any GQ score (and being uploaded together with other SNVs which had).

For MT SVs we see frequencies.

We are investigating now how we best can get in our MT SNV variants into loqus DB. Then we'll know for sure whether it works, but it looks likely.

Do you btw know how MT variants / GQ scores are handled with loqusdb up in Stockholm?

Anyway, looks like this might be a non-issue from our side. Sorry about the inconvenience here!

northwestwitch commented 8 months ago

Hi again @northwestwitch ! We investigated this further, and we found that our missing observations looks like an error on our part. We hadn't managed to upload any MT variants into the SNV db due to them being filtered out by not having any GQ score (and being uploaded together with other SNVs which had).

For MT SVs we see frequencies.

We are investigating now how we best can get in our MT SNV variants into loqus DB. Then we'll know for sure whether it works, but it looks likely.

Do you btw know how MT variants / GQ scores are handled with loqusdb up in Stockholm?

Anyway, looks like this might be a non-issue from our side. Sorry about the inconvenience here!

No worries, the important is to understand why it is not working. I am sorry but I am not familiar with how this is handled in loqusdb. I suggest we close this PR and we open a specific issue in the loqus repo

dnil commented 8 months ago

Hm, lets see: we had a slightly similar thing from the somatic side, maybe Senteion calls that didn't use the GQ fields, so we added an option to make loqus check the QUAL field instead for those. https://github.com/Clinical-Genomics/loqusdb/pull/118/files

dnil commented 8 months ago

Perhaps you have a quality value for MT stashed away somewhere that you could move to the QUAL or GQ column? Or we could perhaps mod loqusdb to look at that as well if it is somewhat standard. What caller do you use?

Jakob37 commented 8 months ago

Hm, lets see: we had a slightly similar thing from the somatic side, maybe Senteion calls that didn't use the GQ fields, so we added an option to make loqus check the QUAL field instead for those. https://github.com/Clinical-Genomics/loqusdb/pull/118/files

OK that's good to know!

Perhaps you have a quality value for MT stashed away somewhere that you could move to the QUAL or GQ column? Or we could perhaps mod loqusdb to look at that as well if it is somewhat standard. What caller do you use?

Great to get your input. We use Mutect2 for the MT calls at the moment, for which TLOD score seems the closest to a quality score. We have considered as you say to see whether that could be reused as the QUAL/GQ score. We will have to discuss some more I think on how we would like to approach this.