Giter VIP home page Giter VIP logo

lyprox's Introduction

GitHub Social Card

What is LyProX?

It is a Django web app that displays the detailed patterns of lymphatic metastases in head & neck cancer and allows one to explore the underlying dataset(s) in much detail. It is hosted under the URL https://lyprox.org.

Motivation

HNSCC spreads though the lymphatic system of the neck and forms metastases in regional lymph nodes. Macroscopic metastases can be detected with imaging modalities like MRI, PET and CT scans. They are then consequently included in the target volume, when radiotherapy is chosen as part of the treatment. However, microscopic metastases are too small be diagnosed with current imaging techniques.

To account for this microscopic involvement, parts of the lymphatic system are often irradiated electively to increase tumor control. Which parts are included in this elective clinical target volume is currently decided based on guidelines 1 2 3 4. These in turn are derived from reports of the prevalence of involvement per lymph node level (LNL), i.e. the portion of patients that were diagnosed with metastases in any given LNL, stratified by primary tumor location. It is recommended to include a LNL in the elective target volume if 10 - 15% of patients showed involvement in that particular level.

However, while the prevalence of involvement has been reported in the literature 5 6, and the general lymph drainage pathways are understood well, the detailed progression patterns of HNSCC remain poorly quantified. We believe that the risk for microscopic involvement in an LNL depends highly on the specific diagnose of a particular patient and their treatment can hence be personalized if the progression patterns were better quantified.

Our Goal

With the interface we primarily aim to make our extracted dataset easily accessible. By visualizing it interactively, one can very quickly test or come up with hypothesis regarding the lymphatic spread of HNSCC. Hopefully, this in turn motivates other researchers to investigate these hypotheses, extract and share more data in similar detail.

This, in turn would enable us (or anyone, really) to build more accurate and precise tumor progression models. E.g. like previous work on using Bayesian networks to predict the personalized probability of involvement 7 or our recent publication on this issue using hidden Markov models and thereby introducing an explicit way of modelling time 8.

Datasets of Lymphatic Progression Patterns

The data that is visualized in this interface lives in an open-source repository on its own: lyDATA.

We have also published a paper on the dataset and the interface in Radiotherapy & Oncology 9, with a preprint being available on medRxiv 10.

Probabilistic Models for Personalized CTV Definition

We also work on probabilistic models 7 8 that may predict the lymphatic spread of head & neck cancer. The underlying code is hosted in another repository: lymph.

How to contribute

There are two ways you can contribute to this project:

  1. If you are a clinical researcher in the field and would like to share your data with us, please get in touch with us via email: [email protected].
  2. The other way is by contributing to this repository, e.g. if you are a software developer. I guess this is somewhat unlikely, due to the very specific scope of this Django app, but we still welcome any contribution. In this case, a detailed documentation of the source code can be found on GitHub pages.

Run this interface locally

If you want to host your data yourself or try how your data looks in the web app without committing to an upload, feel free to follow these instructions to get it up and running on your local machine.

Footnotes

  1. Vincent Grégoire and Others, Selection and delineation of lymph node target volumes in head and neck conformal radiotherapy. Proposal for standardizing terminology and procedure based on the surgical experience, Radiotherapy and Oncology, vol. 56, pp. 135-150, 2000, doi: https://doi.org/10.1016/S0167-8140(00)00202-4.

  2. Vincent Grégoire, A. Eisbruch, M. Hamoir, and P. Levendag, Proposal for the delineation of the nodal CTV in the node-positive and the post-operative neck, Radiotherapy and Oncology, vol. 79, no. 1, pp. 15-20, Apr. 2006, doi: https://doi.org/10.1016/j.radonc.2006.03.009.

  3. Vincent Grégoire et al., Delineation of the neck node levels for head and neck tumors: A 2013 update. DAHANCA, EORTC, HKNPCSG, NCIC CTG, NCRI, RTOG, TROG consensus guidelines, Radiotherapy and Oncology, vol. 110, no. 1, pp. 172-181, Jan. 2014, doi: https://doi.org/10.1016/j.radonc.2013.10.010.

  4. Julian Biau et al., Selection of lymph node target volumes for definitive head and neck radiation therapy: a 2019 Update, Radiotherapy and Oncology, vol. 134, pp. 1-9, May 2019, doi: https://doi.org/10.1016/j.radonc.2019.01.018.

  5. Jatin. P. Shah, F. C. Candela, and A. K. Poddar, The patterns of cervical lymph node metastases from squamous carcinoma of the oral cavity, Cancer, vol. 66, no. 1, pp. 109-113, 1990, doi: https://doi.org/10.1002/1097-0142(19900701)66:1%3C109::AID-CNCR2820660120%3E3.0.CO;2-A.

  6. Laurence Bauwens et al., Prevalence and distribution of cervical lymph node metastases in HPV-positive and HPV-negative oropharyngeal squamous cell carcinoma, Radiotherapy and Oncology, vol. 157, pp. 122-129, Apr. 2021, doi: https://doi.org/10.1016/j.radonc.2021.01.028.

  7. Bertrand Pouymayou, P. Balermpas, O. Riesterer, M. Guckenberger, and J. Unkelbach, A Bayesian network model of lymphatic tumor progression for personalized elective CTV definition in head and neck cancers, Physics in Medicine & Biology, vol. 64, no. 16, p. 165003, Aug. 2019, doi: https://doi.org/10.1088/1361-6560/ab2a18. 2

  8. Roman Ludwig, B. Pouymayou, P. Balermpas, and J. Unkelbach, A hidden Markov model for lymphatic tumor progression in the head and neck, Sci Rep, vol. 11, no. 1, p. 12261, Dec. 2021, doi: https://doi.org/10.1038/s41598-021-91544-1. 2

  9. Roman Ludwig et al., Detailed patient-individual reporting of lymph node involvement in oropharyngeal squamous cell carcinoma with an online interface, Radiotherapy and Oncology, Feb. 2022, doi: https://doi.org/10.1016/j.radonc.2022.01.035.

  10. Roman Ludwig, J.-M. Hoffmann, B. Pouymayou et al., Detailed patient-individual reporting of lymph node involvement in oropharyngeal squamous cell carcinoma with an online interface, medRxiv, Dec. 2021. doi: https://doi.org/10.1101/2021.12.01.21267001.

lyprox's People

Contributors

dependabot[bot] avatar lfranceschetti avatar rmnldwg avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

lyprox's Issues

Delete multiple patients

It would be helpful if one could select multiple (or even just all) patients and then delete them all together.

Add Institutions to Models

If we want to include more datasets from different institutions and hospitals, I will need to include a model to support this.

So, create a model for an institution that can hold multiple patients (ForeignKey on patients, I think).

upgrade to Django 4.0

Recently, Django 4.0 was released and as far as I have understood the release notes, nothing major should break when I upgrade LyProX.

Tooltips & help modal

Especially on the dashboard view, tooltips on most elements would help people understand the functionalities quickly. Hence, this would reduce the need for an extensive (and tiring to read) documentation. What's left that needs explaining could be collected in a modal that pops up when one opens the page for the first time.

create CSV from list

add function to export current selection of patients to CSV table. This CSV should have the same format as the one for uploading.

inform user about pCT

Planning CT is sometimes done after a neck dissection. The user needs to be informed that this might skew the displayed results.

N0 selection

Add a way/button to immediately select all N0 patients

switch to fontawesome 6 as package

I just found out that fontawesome has a pip package that can be used with django. However, there seems to be an issue with fontawesome 5 and pip. But I should probably sooner or later upgrade to fontawsome 6 anyways, so when that day has come, I can probably switch to the pip version.

c/p

Also display stage prefix c and p in the patient's TNM stage.

logging

Implement logging on multiple levels, so that - upon deployment - one can track which kinds of bugs and issues appear

Rewrite README

Now that the interface is running on a server, I guess there's no real need anymore for the detailed explanations of how to install it locally.

It surely makes sense to keep them somewhere, but the README might be better suited for a general overview of the purpose and implementation of the interface.

show institution numbers

Bertrand had the idea to display how many patients of each institution are in selection. This is helpful and necessary, I think.

authentication

Implement an authentication system so that we can safely deploy this interface on the web without the need to remove parts

Hiding institutions in dashboard

Make the displayed institution buttons dependent on whether or not the user is logged in. So that datasets of hidden institutions are only shown after a login.

discrepancies to Bertrand's interface

e.g. when selecting "midline extension" (+) as the only filtering criteria, Bertrand's and this interface are off by a count of 2. Other cases must be checked as well

Versioning

Add some sort of versioning (e.g. with versioneer) so that we and others can keep track of changes more easily

% switch button

add a button to the dashboard that allows the user to toggle between absolute numbers and percentages

diagnostic conses

Problem

The CLB data does not specify the modality (MRI, PET, CT, FNA) that was used to diagnose an LNL as clinically involved or healthy. It is already a consensus formed by experts. Now I need to combine this with our USZ data where we have detailed information on every modality.

Idea

One idea is to create an "umbrella button" called diagnostic consensus or something like that. Internally, that would be handled just like any other modality. But in the interface, selecting this modality automatically includes MRI, PET, CT and FNA as well - which is basically the diagnostic consensus for patients like the ones in our dataset.

`unknown` when combining with logical AND

When three diagnoses are available for a given lymph node level - e.g. [True, False, None] - then python's built-in all (which I am using for the logical AND) returns correctly False. However, this is not quite what we want. If a diagnostic modality has nothing to report w.r.t. to that LNL, we would like to ignore it.

I think, the solution would be to use ~any(~[True, False, None]) (doesn't quite work like that, because one cannot negate an array), since from a logic standpoint, this is the same and it treats the None like we want it to be treated.

Upload with wrong date format throws 500 error

When a CSV file is uploaded that has the wrong date format for one or more fields, the whole thing crashes and throws a 500 error.

Ideally, the interface should be able to handle a variety of common date formats and if it encounters an unknown one it shouldn't crash, but gracefully inform the user of it.

Testing

Use Bertrand's interface as a guideline for testing the correctness of the dashboard.

discard lateralization of tumor

It is unnecessary to keep the information on which side (right or left) the tumor occured. So, it'd make sense to discard that information and transform the side of the diagnoses to ipsi & contra, which is the part of the information that actually matters.

Add consensus method(s)

Problem

The logical OR and AND are not ideal or informative in every case.

Solution

Implement one or two new methods that combine the available diagnostic modalities in a smarter way.

Edit patient

The core data of an added patient cannot be edited. Only their tumors and/or LNL involvements can be modified.

Can't keep name & birthday when editing patient

Due to the hash-value check in the PatientForm it is not possible to edit a patient and give him the same name & birthday as before. One should add another check to make sure this hash-value comparison is only done upon patient creation.

Combination of a & b LNLs seems not to work correctly

Specifically, when I select modalities PET & pCT and look for patient without involvement in LNL II but with involvement in LNL III contralaterally, I see patients that do have involvement in LNL II (namely patient 127). That's bad.

sync migrations

Problem

Right now both the database as well as the migrations of the server and my local machine are completely independent. This means that if I change a model field and come up with an elegant solution to migrate the old data to the new model, I need to get that migration over to the server manually and also manage when and how to pull commits.

Possible Solution

I add the migrations of every app to what git tracks and write a custom management command that creates backups of the database before every migration. Also, I should stop performing the python manage.py makemigrations command automatically when commits to main get pushed to the server.

That would allow me to keep the general anatomy of the remote and local database in sync without syncing the database itself (which would be a security issue, I think).

Indicate computation status

Indicate to the user when the selection of patients and diagnoses deviates from what was computed when "Compute" was pressed the last time. Maybe grey out the button after the computation until anything else is pressed.

Tumor deletion doesn't update patient

When one deletes the tumor of a patient, that patient's overall T-stage does not get updated. E.g. when the deleted tumor is T3, but the remaining tumor is only T2, then the patient will still display T3 as its T-stage.

Cycle through & search for patients

Right now, one cannot look at the next or the previous patient when in the detail view. Also, it's not possible to display a subset of the dataset in a list (e.g. the one that was selected in the dashboard).

N-category details

In TNM staging, N-category has more details like a, b, c. I should extract and include that in the display.

Unknown number

The way the number of unknown patients is displayed in the dashboard is a bit confusing. Maybe drop that number altogether or also pull the number for healthy and involved inside the bar too?

production

Make it somehow possible to switch seamlessly between development and production without interfering with git source control.

Anonymization of dates

For further anonymization, one could shift all dates by a couple of days (ideally a random number for every patient). By "all dates" I mean diagnose date and modality dates, not the birthday however, since that will be deleted anyways and is used for the hash function.

Visual guide through dashboard

On first glance, the dashboard is still quite overwhelming. An idea could be to add a visual guide that - upon the first visit or when one clicks on the help button - puts the focus of the user to the individual parts of the interface one by one, explaining them in some detail.

Ideally, I can do this completely without cookies...

Neck dissection

It looks like the filter for neck dissection is not working. For PET and neck dissection + I get 0 patients

risk app

Add a django app that provides an interface for the risk computation. This would require the ability to upload a batch of sampled parameters or run the sampling for a stored dataset.

unknowns in combination with OR

If a patient has had an FNA, the logical OR introduces a lot of "unknown" labels in the LNLs that were not inspected by the FNA. But "unknown" & "True" for example should always yield "True".

Option to hide certain datasets

Sometimes we would like to look at a dataset that we do not want to show to the world yet (or are not yet allowed to), so an option to hide e.g. datasets from certain institutions would be helpful there.

Compute shortcut

Define a shortcut for the computation. E.g. ALT + C or something like that.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.