web4bio / webgen

WebGen Vertically Integrated Project
https://web4bio.github.io/webgen/main/html/
11 stars 26 forks source link

bug: we only look for solid tumors but LAML is not a solid tumor (and related uncaught exceptions) #312

Closed kaczmarj closed 2 years ago

kaczmarj commented 3 years ago

when i select (LAML) Acute Myeloid Leukemia as the tumor type, i get the two errors at the bottom of this post. we (richard, adit, and i) traced the error to the query

GET https://firebrowse.herokuapp.com/?http://firebrowse.org/api/v1/Metadata/Counts?&cohort=LAML&sample_type=TP,TB&data_type=mrnaseq&totals=true

this results in an empty json output (""). and this empty data probably causes the errors. we should definitely account for empty data and handle that gracefully. perhaps we could alert the user that no data was returned for that tumor and to select a different one.

sample_type=TP requests primary solid tumors, but acute myeloid leukemia is a blood cancer (ie it's an uncontrolled division of blood cells but it doesn't necessarily form a solid mass -- the cells float in the blood). we solved this by changing the sample_type to sample_type=TP,TB to include solid tumors and blood cancers. here is a list of these sample_type codes https://gdc.cancer.gov/resources-tcga-users/tcga-code-tables/sample-type-codes.


errors:

Uncaught (in promise) TypeError: countQuery is undefined
    displayNumberSamples http://0.0.0.0:8000/js/fillSelectBoxes.js:108
    onchange http://0.0.0.0:8000/html/:1
    jQuery 5
    triggerChange https://cdnjs.cloudflare.com/ajax/libs/select2/3.5.4/select2.min.js:21
    onSelect https://cdnjs.cloudflare.com/ajax/libs/select2/3.5.4/select2.min.js:22
    selectHighlighted https://cdnjs.cloudflare.com/ajax/libs/select2/3.5.4/select2.min.js:22
    init https://cdnjs.cloudflare.com/ajax/libs/select2/3.5.4/select2.min.js:21
    bind https://cdnjs.cloudflare.com/ajax/libs/select2/3.5.4/select2.min.js:21
    jQuery 8
    init https://cdnjs.cloudflare.com/ajax/libs/select2/3.5.4/select2.min.js:21
    select2 https://cdnjs.cloudflare.com/ajax/libs/select2/3.5.4/select2.min.js:23
    jQuery 2
    select2 https://cdnjs.cloudflare.com/ajax/libs/select2/3.5.4/select2.min.js:23
    <anonymous> http://0.0.0.0:8000/html/:102
    jQuery 9
    <anonymous> http://0.0.0.0:8000/html/:100
    promise callback* http://0.0.0.0:8000/html/:99
fillSelectBoxes.js:108:19
    displayNumberSamples http://0.0.0.0:8000/js/fillSelectBoxes.js:108
    AsyncFunctionNext self-hosted:692
    (Async: async)
    onchange http://0.0.0.0:8000/html/:1
    jQuery 5
    triggerChange https://cdnjs.cloudflare.com/ajax/libs/select2/3.5.4/select2.min.js:21
    onSelect https://cdnjs.cloudflare.com/ajax/libs/select2/3.5.4/select2.min.js:22
    selectHighlighted https://cdnjs.cloudflare.com/ajax/libs/select2/3.5.4/select2.min.js:22
    init https://cdnjs.cloudflare.com/ajax/libs/select2/3.5.4/select2.min.js:21
    bind https://cdnjs.cloudflare.com/ajax/libs/select2/3.5.4/select2.min.js:21
    jQuery 8
    init https://cdnjs.cloudflare.com/ajax/libs/select2/3.5.4/select2.min.js:21
    select2 https://cdnjs.cloudflare.com/ajax/libs/select2/3.5.4/select2.min.js:23
    jQuery 2
    select2 https://cdnjs.cloudflare.com/ajax/libs/select2/3.5.4/select2.min.js:23
    <anonymous> http://0.0.0.0:8000/html/:102
    jQuery 9
    <anonymous> http://0.0.0.0:8000/html/:100
    (Async: promise callback)
    <anonymous> http://0.0.0.0:8000/html/:99

and

Uncaught (in promise) TypeError: results is undefined
    getBarcodesFromCohortForClinical http://0.0.0.0:8000/js/fillSelectBoxes.js:251
    fetchClinicalData http://0.0.0.0:8000/js/fillSelectBoxes.js:259
    fillClinicalSelectBox http://0.0.0.0:8000/js/fillSelectBoxes.js:274
    onchange http://0.0.0.0:8000/html/:1
    jQuery 5
    triggerChange https://cdnjs.cloudflare.com/ajax/libs/select2/3.5.4/select2.min.js:21
    onSelect https://cdnjs.cloudflare.com/ajax/libs/select2/3.5.4/select2.min.js:22
    selectHighlighted https://cdnjs.cloudflare.com/ajax/libs/select2/3.5.4/select2.min.js:22
    init https://cdnjs.cloudflare.com/ajax/libs/select2/3.5.4/select2.min.js:21
    bind https://cdnjs.cloudflare.com/ajax/libs/select2/3.5.4/select2.min.js:21
    jQuery 8
    init https://cdnjs.cloudflare.com/ajax/libs/select2/3.5.4/select2.min.js:21
    select2 https://cdnjs.cloudflare.com/ajax/libs/select2/3.5.4/select2.min.js:23
    jQuery 2
    select2 https://cdnjs.cloudflare.com/ajax/libs/select2/3.5.4/select2.min.js:23
    <anonymous> http://0.0.0.0:8000/html/:102
    jQuery 9
    <anonymous> http://0.0.0.0:8000/html/:100
    promise callback* http://0.0.0.0:8000/html/:99
fillSelectBoxes.js:251:3