tonydisera / gene.iobio

An iobio app for examining gene variants
22 stars 4 forks source link

Takes a long time to clear filters #619

Closed AlistairNWard closed 7 years ago

AlistairNWard commented 7 years ago
  1. Running on a single sample with ACMG genes (URL at bottom),

  2. Analyze all (and call all),

  3. Select RYR2 - a pretty big gene,

  4. Apply filters,

  5. Clear all filters. Takes quite a few seconds for anything to happen. Since odd that clearing the filters takes a long time, but if it does, we should have a working glyph.

http://gene.iobio.io/?species=Human&rel0=proband&rel1=mother&rel2=father&name0=&bam0=https://s3.amazonaws.com/iobio/samples/bam/Sample12.bam&bai0=&vcf0=https://s3.amazonaws.com/iobio/samples/vcf/Sample12_combined_filtered_normalized.vcf.gz&tbi0=&genes=BRCA1,BRCA2,TP53,STK11,MLH1,MSH2,MSH6,PMS2,APC,MUTYH,VHL,MEN1,RET,PTEN,RB1,SDHD,SDHAF2,SDHC,SDHB,TSC1,TSC2,WT1,NF2,COL3A1,FBN1,TGFBR1,TGFBR2,SMAD3,ACTA2,MYH11,MYBPC3,MYH7,TNNT2,TNNI3,TPM1,MYL3,ACTC1,PRKAG2,GLA,MYL2,LMNA,RYR2,PKP2,DSP,DSC2,TMEM43,DSG2,KCNQ1,KCNH2,SCN5A,LDLR,APOB,PCSK9,RYR1,CACNA1S,ATP7B,BMPR1A,SMAD4,OTC&gene=RYR2&affectedSibs=&unaffectedSibs=

tonydisera commented 7 years ago

A loading gif now shows at the top of the filter side panel when filtering is in progress.

screen shot 2017-06-05 at 5 13 11 pm

When the clear button is pressed, the message shows 'Clearing filter'.

screen shot 2017-06-05 at 5 15 07 pm
AlistairNWard commented 7 years ago

Thanks Tony. This works. Couple of comments.

  1. Maybe it's just my machine, but the glyph doesn't animate; instead, the whole thing seems to freeze while filters are applied or removed. I wonder if we're starting to ask too much of gene.iobio? I apply a filter, and basically my browser is out of action. For example, I come back to waffle, but I can't actually click on anything while gene is sorting out the filters. Perhaps we should start a larger discussion about moving things server side?

  2. Would it also make sense to turn the cursor into a working glyph when waiting for things to finish?

tonydisera commented 7 years ago

Hi Al. You are correct. I noticed that yesterday as well. I suspected I couldn't slip this by you.

There is a way to do multi-threading in HTML5 with WebWorker objects, so I'm going to give that a try.

AlistairNWard commented 7 years ago

I respect your efforts to try and slip it by me!

tonydisera commented 7 years ago

I moved the code that decompresses the cached data into a WebWorker thread so that the UI doesn't 'freeze' when a filter is applied on a large set of genes/variants. Also, I moved the loader message to the filter summary at the top of the page so that is displayed more prominently.

When any filter is applied -

screen shot 2017-06-06 at 7 01 38 pm

When 'Clear filter' is clicked -

clearing_filter
AlistairNWard commented 7 years ago

Any thoughts on changing the cursor when working, as well as the glyph?

tonydisera commented 7 years ago

I'm happy to do that if we think it helps. I was debating leaving it out since the user is free to perform other actions (now that the freezing problem should be fixed).

AlistairNWard commented 7 years ago

Oh, I see. Hadn't thought of that. Yeah, let's just leave it as is.