Closed AlistairNWard closed 7 years ago
A loading gif now shows at the top of the filter side panel when filtering is in progress.
When the clear button is pressed, the message shows 'Clearing filter'.
Thanks Tony. This works. Couple of comments.
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?
Would it also make sense to turn the cursor into a working glyph when waiting for things to finish?
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.
I respect your efforts to try and slip it by me!
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 -
When 'Clear filter' is clicked -
Any thoughts on changing the cursor when working, as well as the glyph?
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).
Oh, I see. Hadn't thought of that. Yeah, let's just leave it as is.
Running on a single sample with ACMG genes (URL at bottom),
Analyze all (and call all),
Select RYR2 - a pretty big gene,
Apply filters,
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=