Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add activity filtering #171

Merged
merged 9 commits into from
Dec 4, 2023
Merged

Add activity filtering #171

merged 9 commits into from
Dec 4, 2023

Conversation

zuzg
Copy link
Owner

@zuzg zuzg commented Nov 20, 2023

Fixes: #167
image

@zuzg zuzg linked an issue Nov 20, 2023 that may be closed by this pull request
@zuzg zuzg marked this pull request as ready for review November 20, 2023 09:28
@zuzg
Copy link
Owner Author

zuzg commented Nov 20, 2023

TODO: add top and bottom thresholds and make points gray instead of not visible

@zuzg
Copy link
Owner Author

zuzg commented Nov 20, 2023

Update: top and bottom filtering
image

Copy link
Collaborator

@azywot azywot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job! 😎
Added some comments below; one additional think - I think I'd be wise to apply some button to reset the values for the thresholds (the same thing we have in (un)stacking in Hit Validation).
Totally optional: as for initial thresholds we could take min and max from the data uploaded.

dashboard/pages/correlation/callbacks.py Outdated Show resolved Hide resolved
dashboard/pages/correlation/stages/s2_correlation_plots.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@Tremirre Tremirre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added some small comments
other than that LGTM

dashboard/pages/correlation/callbacks.py Outdated Show resolved Hide resolved
dashboard/pages/correlation/callbacks.py Outdated Show resolved Hide resolved
@zuzg
Copy link
Owner Author

zuzg commented Dec 1, 2023

⚠️ Update ⚠️
image
Sample results:
correlation_threshold_2023-12-01.csv

@zuzg zuzg requested review from azywot and Tremirre December 1, 2023 18:42
Copy link
Collaborator

@azywot azywot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested locally, LGTM in general 🙏💅 added smol com

edit: could you move Save filtered dataframe button a little bit down?

dashboard/pages/correlation/callbacks.py Outdated Show resolved Hide resolved
@zuzg zuzg merged commit 092c8bf into develop Dec 4, 2023
2 checks passed
@zuzg zuzg deleted the 167-update-correlation-plot branch December 14, 2023 12:37
zuzg added a commit that referenced this pull request Dec 14, 2023
* feat: store user compounds data in the filesystem

* test: add unit tests to LocalFileStorage

* chore: add missing newlines, remove extra newlines

* Add base plate class

* Add plate reading from dir

* add missing dependencies

* echo file processing

* add echo files parser + tests

* update dependencies v2

* add missing newlines

* add missing newlines :))

* Add docs

* add suggestions

* resolve styling issue

* Refactor BMG files reading

* Add tests

* Add summary visualizations

* Modify summary tuple method

* Fix docstring

* Modify test for plate

* Optimize dataframe reading

* Define PlateSummary type

* 72 set up pre-commit (#75)

* Add pre-commit

* Add black workflow

* Reformat files

* 73 detect outliers control values (#77)

* Fix colours in control values plot

* Add outliers detection

* Add test for outliers

* Apply review fixes

* Fix tests

* Separate plate_array from df

* Fix typing and docs

* Change plot types

* Change plates viz to plotly

* 74 inhibitionactivation values (#79)

* Fix colours in control values plot

* Add outliers detection

* Add test for outliers

* Apply review fixes

* Fix tests

* Separate plate_array from df

* compute inhibition/activation

* merge activation/inhibition with echo files

* check upon the values

* fix combining echo bmg files

* drop unnecessary columns

* remove outliers from the resultant df

* split compounds/controls, add z-score

* add visualizations

* add tests

* improve docs and plot

---------

Co-authored-by: Zuza Gawrysiak <[email protected]>

* closes #80 general restructuring (#81)

* chore: merge src into dashboard

* update: set basic pages structure

* update: add stages placeholders to Primary Screening process

* chore: for the time being move old code to LEGACY folder, remove outdated layouts

* feat: add decorator for error handling

* fix: correct import in a unit test

* update: make data_folder a class attribute to facilitate global configuration

* fix: correct LocalFileStorage test

* chore: remove redundant style attr

* Plot improvements (#85)

* Filter low quality plates

* Make plot grid size modifiable

* Add z per plate plot

* Change template to plotly_white

* Apply review fixes

* Add plotly template as const

* Stage 1 and Stage 4 uploading (#86)

* Add reading ioFile in bmg

* Saving BML in Storage

* Add echo reading

* Add coments

* Resolve tests problems

* Pre-commit

* Pre-commit changes

* Solve problems

* Bmg refactor

* Bmg refactor

* Echo parser refactor

* Fix

* Fix comment

* 82 implement stage 2 (#90)

* fix: add correct name to elements property, set stages container style to take full width

* fix: subplots' titles not visibile correctly in heatmaps plot

* feat: implement paginated heatmap plates viewer

* add datatable for statistics preview, extend controls

* add docstring

* fix: sizing on smaller screens

* Add stage 3 in dash (#89)

* Add stage 3 in dash

* Add z threshold slider

* Refactor filtering lq plates

* Change return annotation

* 83 implement stage 5 in dashboard (#92)

* add stage 5 table

* add plots ad datatable

* add interactive z-score

* change act/inh/zscore plots

* add RangeSlider

* change data table styling

* resolve imports/typos

* Add stage 3 improvements (#95)

* Change view of stage 1 and 4 (#93)

* Change view of stage 1 and 4

* Resolve problems

* Divide info into two parts

* Change view

* Change view

* closes 96 update stage 2 layout (#97)

* adjust stage 2 layout

* hide plot controls

* disable zooming and panning on heatmap plots

* closes 98 add report stage revamp process controls (#99)

* add placeholder for stage 6

* add functional controls component

* remove old function for creating controls component

* add icons to prev/next stage buttons

* add border to controls component

* remove commented code

* closes 101 add correlation process (#104)

* chore: rename primary_screening package to screening

* update: rename primary-screening process page to screening

* update: dummy element to be created per-process page

* feat: add correlation process basis

* feat: fill in first stage html

* feat: add files parsing and validation placeholder

* feat: implement remaining stages

* Export screening results to csv file (#107)

* add save report v1

* download echo_bmg_combined.csv

* add custom csv name

* clean callbacks.py

* update delete_file

* remove custom file name

* remove imports

* fix csv export (#112)

* Report generation (#108)

* Generate simple raport

* Add storage for report data

* Add plot in raport

* Resolve problems

* Clean code

* Add secondary screening plots (#103)

* Add secondary screening plots

* Add concentration calculation

* Fix docstring

* Save report to download (#113)

* 115 deanonymize compounds (#117)

* Add eos

* Update regex

* Add eos to correlation stage

* Fix test

* Fix well naming issues

* Remove unnecessary changes

* Fix test

* Remove rows without eos

* closes 116 UI for hit validation process (#119)

* Add hit validation process page stages, implement first stage

* add parameters setting to first stage

* adjust parameter change callback

* implement second stage of hit validation process

* remove step from concentration bounds inputs

* reorder pages in nav bar

* Update INH/ACT/Z-SCORE plots (#114)

* add area charts

* add hline

* add ranges to act/inh

* add filter criteria

* add well/plate distinction

* filter compounds to save

* alter serialization

* include bmg controls

* fix test

* fix test #2

* Pipeline check and fixes (#120)

* change z-score calculation

* handle different echo files

* alter act/inh

* fix test

* fix tests & add exceptions button

* filter low quality plates

* change the origin

* Add url to EOS datable (#129)

* Add eos url

* Fix styling

* Save app settings to JSON file (#131)

* Save json from primmary screening

* clean

* pre-commit

* Rename methods and dicts

* Add saving settings in correlation and hit validation

* Style buttons

* closes 126 implement third process (#133)

* remove .venv from git tracking

* implement basic parsing

* implement file parsing and graph creation

* implement csv downloading

* remove unneeded files

---------

Co-authored-by: njytwf <[email protected]>

* closes 138 control hit plot (#139)

* fix initial process callbacks not setting stored uuid

* implement stacking control

* round top/bottom values

* closes 140 configuration for hit determination (#142)

* ui for controls

* parametrize hit determination

* connect state variables with the configuration callback

* remove whitespace

* Add plots to screening report (#143)

* Add data projections (#132)

* update combining process

* add data projection process

* add dropdowns

* add eos links, save file

* remove an outdated test

* alter combine_assays_for_projection

* add loading sign/dynamic table

* add controls to the report

* Revert "add controls to the report"

This reverts commit 14328d2.

* remove apply button

* add controls to the plot

* revert legacy change

* include both ACT & INH to projections

* update umap package version

* remove legacy, return uuid initially

* Implement SMILES predictor (#141)

* Train xgboost

* Predict on ecbd data

* Add smoter

* Save preds to pq

* Fix plotted eoses (#151)

* Add predictions to dashboard (#146)

* Add predictions to dashboard

* Add SMILES plotting

* Change predictions file to pq

* Add missing requirements

* Comment out umap (#153)

* Comment out umap

* Format notebook

* Update default projection

* merge inh/act into feature (#144)

* merge inh/act into feature

* remove functools.partial wrapper

* 136 Save individual EOS report (#155)

* Add statistics

* Create report

* Add concentration for 50% modulation

* Uppercase letter

* closes 147 app redesign 💅💅 (#154)

* navbar and homepage re-design

* make logo smaller, set correct logo src

* redesign about page

* reformat file

* add smartart to about page

* Correlation report (#157)

* Create report correlation

* Create report correlation

* Fix Correlation stage

* Add typing

* Fix concentration_50 statistic (#161)

* Create report correlation

* Fix concentration_50

* closes 159 minor UI adjustments (#160)

* add link

* make main pages responsive

* hit browser styling fixes

* adjust stacking controls styling

* replace buttons list with searchable dropdown for hit browser component selection

* fix individual report generation

* Add structural similarity (#156)

* Add structural similarity

* Small refactor

* Fix file upload

* Improve clustering

* Move plot to plots

* Update colors

* Export eos plots to the final report (#168)

* add report generation

* add dependencies

* alter saved plots

* fix: handle case when last page is of size 0 (#169)

* closes 165 update projections (#170)

* add 3d projection plots

* facilitate selected datapoints download for Visualization stage

* facilitate selected datapoints download for Similarity stage

* disable "Download selected" buttons when 3d plotting enabled

* 147 app redesign v2 (#162)

* unify plots view, add loaders

* add page blockers

* divide eos/echo loaders

* remove unnecessary comments

* change select file color

* correct heatmap loader

* alter upload text

* add info icon

* alter info icon position

* fix info icon

* Add ML experiment setup (#176)

* Add ml experiment setup

* Add feature selection, hp tuning and docs

* Split projection stage (#174)

* split stages

* add projections processes descriptions

* closes 166 minor styling (#175)

* unify precision in screening process

* fix unit display for concentration50

* add kaleido dependency

* unify precision in data projection process

* add thousands delimiter

* restyle controls to include process name

* replace screening statistics charts with bar plots

* adjust styling for tooltip

* allow to extend tooltip with custom styling

* add bottom padding to page container

* add tooltips to hit validation process

* move tooltip annotation to components module

* add tooltips to Screening process

* reduce process title size

* add tooltips to data projection process

* extend docstring of the annotating function

* add tooltips to correlation process

* adjust concentration slider desc

* update sliders tooltip descriptions for correlation

* adjust coloring of mean value bar plots

* add missing information in various descriptions

* render error message when user uploads less than 3 screening files in data projection process

* readd missing stage

* restore controls chart to scatter plot

* Update version (#179)

* Update version

* Remove dev

* fix responsiveness (#181)

* Add reproducibility (#177)

* Reproducing Screening and Correlation

* Reproducing Hit Validation

* Remove checkbox changning

* Change gitignore

* Add alerts

* Resolve

* Reports refactor (#178)

* Reproducing Screening and Correlation

* Reproducing Hit Validation

* Remove checkbox changning

* Create Header in reports

* Merge develop

* restore changes from broken branch (#185)

* After testing adjustments (#184)

* add projections smiles info

* add modulation_50/concentration_50 to report

* add low quality plate csv

* fix test

* correct typos/pca_smiles_summary

* remove pca_smiles_summary

* Add activity filtering (#171)

* Add activity filtering

* Update layout

* Add top and bottom thresholds

* Add lines and separate threshold change

* Add save button

* Move button and rename cols

* Update button

* Refactor uploading files (#187)

* Add text on upload

* Individual text

* Refactor

* Add missing words

* Resolve merge problem

* Bump version (#188)

---------

Co-authored-by: Bartosz Stachowiak <[email protected]>
Co-authored-by: Bartosz Stachowiak <[email protected]>
Co-authored-by: azywot <[email protected]>
Co-authored-by: AndrzejKaj <[email protected]>
Co-authored-by: Agata <[email protected]>
Co-authored-by: njytwf <[email protected]>
zuzg added a commit that referenced this pull request Dec 19, 2023
* Release v2.1.0 (#189)

* feat: store user compounds data in the filesystem

* test: add unit tests to LocalFileStorage

* chore: add missing newlines, remove extra newlines

* Add base plate class

* Add plate reading from dir

* add missing dependencies

* echo file processing

* add echo files parser + tests

* update dependencies v2

* add missing newlines

* add missing newlines :))

* Add docs

* add suggestions

* resolve styling issue

* Refactor BMG files reading

* Add tests

* Add summary visualizations

* Modify summary tuple method

* Fix docstring

* Modify test for plate

* Optimize dataframe reading

* Define PlateSummary type

* 72 set up pre-commit (#75)

* Add pre-commit

* Add black workflow

* Reformat files

* 73 detect outliers control values (#77)

* Fix colours in control values plot

* Add outliers detection

* Add test for outliers

* Apply review fixes

* Fix tests

* Separate plate_array from df

* Fix typing and docs

* Change plot types

* Change plates viz to plotly

* 74 inhibitionactivation values (#79)

* Fix colours in control values plot

* Add outliers detection

* Add test for outliers

* Apply review fixes

* Fix tests

* Separate plate_array from df

* compute inhibition/activation

* merge activation/inhibition with echo files

* check upon the values

* fix combining echo bmg files

* drop unnecessary columns

* remove outliers from the resultant df

* split compounds/controls, add z-score

* add visualizations

* add tests

* improve docs and plot

---------

Co-authored-by: Zuza Gawrysiak <[email protected]>

* closes #80 general restructuring (#81)

* chore: merge src into dashboard

* update: set basic pages structure

* update: add stages placeholders to Primary Screening process

* chore: for the time being move old code to LEGACY folder, remove outdated layouts

* feat: add decorator for error handling

* fix: correct import in a unit test

* update: make data_folder a class attribute to facilitate global configuration

* fix: correct LocalFileStorage test

* chore: remove redundant style attr

* Plot improvements (#85)

* Filter low quality plates

* Make plot grid size modifiable

* Add z per plate plot

* Change template to plotly_white

* Apply review fixes

* Add plotly template as const

* Stage 1 and Stage 4 uploading (#86)

* Add reading ioFile in bmg

* Saving BML in Storage

* Add echo reading

* Add coments

* Resolve tests problems

* Pre-commit

* Pre-commit changes

* Solve problems

* Bmg refactor

* Bmg refactor

* Echo parser refactor

* Fix

* Fix comment

* 82 implement stage 2 (#90)

* fix: add correct name to elements property, set stages container style to take full width

* fix: subplots' titles not visibile correctly in heatmaps plot

* feat: implement paginated heatmap plates viewer

* add datatable for statistics preview, extend controls

* add docstring

* fix: sizing on smaller screens

* Add stage 3 in dash (#89)

* Add stage 3 in dash

* Add z threshold slider

* Refactor filtering lq plates

* Change return annotation

* 83 implement stage 5 in dashboard (#92)

* add stage 5 table

* add plots ad datatable

* add interactive z-score

* change act/inh/zscore plots

* add RangeSlider

* change data table styling

* resolve imports/typos

* Add stage 3 improvements (#95)

* Change view of stage 1 and 4 (#93)

* Change view of stage 1 and 4

* Resolve problems

* Divide info into two parts

* Change view

* Change view

* closes 96 update stage 2 layout (#97)

* adjust stage 2 layout

* hide plot controls

* disable zooming and panning on heatmap plots

* closes 98 add report stage revamp process controls (#99)

* add placeholder for stage 6

* add functional controls component

* remove old function for creating controls component

* add icons to prev/next stage buttons

* add border to controls component

* remove commented code

* closes 101 add correlation process (#104)

* chore: rename primary_screening package to screening

* update: rename primary-screening process page to screening

* update: dummy element to be created per-process page

* feat: add correlation process basis

* feat: fill in first stage html

* feat: add files parsing and validation placeholder

* feat: implement remaining stages

* Export screening results to csv file (#107)

* add save report v1

* download echo_bmg_combined.csv

* add custom csv name

* clean callbacks.py

* update delete_file

* remove custom file name

* remove imports

* fix csv export (#112)

* Report generation (#108)

* Generate simple raport

* Add storage for report data

* Add plot in raport

* Resolve problems

* Clean code

* Add secondary screening plots (#103)

* Add secondary screening plots

* Add concentration calculation

* Fix docstring

* Save report to download (#113)

* 115 deanonymize compounds (#117)

* Add eos

* Update regex

* Add eos to correlation stage

* Fix test

* Fix well naming issues

* Remove unnecessary changes

* Fix test

* Remove rows without eos

* closes 116 UI for hit validation process (#119)

* Add hit validation process page stages, implement first stage

* add parameters setting to first stage

* adjust parameter change callback

* implement second stage of hit validation process

* remove step from concentration bounds inputs

* reorder pages in nav bar

* Update INH/ACT/Z-SCORE plots (#114)

* add area charts

* add hline

* add ranges to act/inh

* add filter criteria

* add well/plate distinction

* filter compounds to save

* alter serialization

* include bmg controls

* fix test

* fix test #2

* Pipeline check and fixes (#120)

* change z-score calculation

* handle different echo files

* alter act/inh

* fix test

* fix tests & add exceptions button

* filter low quality plates

* change the origin

* Add url to EOS datable (#129)

* Add eos url

* Fix styling

* Save app settings to JSON file (#131)

* Save json from primmary screening

* clean

* pre-commit

* Rename methods and dicts

* Add saving settings in correlation and hit validation

* Style buttons

* closes 126 implement third process (#133)

* remove .venv from git tracking

* implement basic parsing

* implement file parsing and graph creation

* implement csv downloading

* remove unneeded files

---------

Co-authored-by: njytwf <[email protected]>

* closes 138 control hit plot (#139)

* fix initial process callbacks not setting stored uuid

* implement stacking control

* round top/bottom values

* closes 140 configuration for hit determination (#142)

* ui for controls

* parametrize hit determination

* connect state variables with the configuration callback

* remove whitespace

* Add plots to screening report (#143)

* Add data projections (#132)

* update combining process

* add data projection process

* add dropdowns

* add eos links, save file

* remove an outdated test

* alter combine_assays_for_projection

* add loading sign/dynamic table

* add controls to the report

* Revert "add controls to the report"

This reverts commit 14328d2.

* remove apply button

* add controls to the plot

* revert legacy change

* include both ACT & INH to projections

* update umap package version

* remove legacy, return uuid initially

* Implement SMILES predictor (#141)

* Train xgboost

* Predict on ecbd data

* Add smoter

* Save preds to pq

* Fix plotted eoses (#151)

* Add predictions to dashboard (#146)

* Add predictions to dashboard

* Add SMILES plotting

* Change predictions file to pq

* Add missing requirements

* Comment out umap (#153)

* Comment out umap

* Format notebook

* Update default projection

* merge inh/act into feature (#144)

* merge inh/act into feature

* remove functools.partial wrapper

* 136 Save individual EOS report (#155)

* Add statistics

* Create report

* Add concentration for 50% modulation

* Uppercase letter

* closes 147 app redesign 💅💅 (#154)

* navbar and homepage re-design

* make logo smaller, set correct logo src

* redesign about page

* reformat file

* add smartart to about page

* Correlation report (#157)

* Create report correlation

* Create report correlation

* Fix Correlation stage

* Add typing

* Fix concentration_50 statistic (#161)

* Create report correlation

* Fix concentration_50

* closes 159 minor UI adjustments (#160)

* add link

* make main pages responsive

* hit browser styling fixes

* adjust stacking controls styling

* replace buttons list with searchable dropdown for hit browser component selection

* fix individual report generation

* Add structural similarity (#156)

* Add structural similarity

* Small refactor

* Fix file upload

* Improve clustering

* Move plot to plots

* Update colors

* Export eos plots to the final report (#168)

* add report generation

* add dependencies

* alter saved plots

* fix: handle case when last page is of size 0 (#169)

* closes 165 update projections (#170)

* add 3d projection plots

* facilitate selected datapoints download for Visualization stage

* facilitate selected datapoints download for Similarity stage

* disable "Download selected" buttons when 3d plotting enabled

* 147 app redesign v2 (#162)

* unify plots view, add loaders

* add page blockers

* divide eos/echo loaders

* remove unnecessary comments

* change select file color

* correct heatmap loader

* alter upload text

* add info icon

* alter info icon position

* fix info icon

* Add ML experiment setup (#176)

* Add ml experiment setup

* Add feature selection, hp tuning and docs

* Split projection stage (#174)

* split stages

* add projections processes descriptions

* closes 166 minor styling (#175)

* unify precision in screening process

* fix unit display for concentration50

* add kaleido dependency

* unify precision in data projection process

* add thousands delimiter

* restyle controls to include process name

* replace screening statistics charts with bar plots

* adjust styling for tooltip

* allow to extend tooltip with custom styling

* add bottom padding to page container

* add tooltips to hit validation process

* move tooltip annotation to components module

* add tooltips to Screening process

* reduce process title size

* add tooltips to data projection process

* extend docstring of the annotating function

* add tooltips to correlation process

* adjust concentration slider desc

* update sliders tooltip descriptions for correlation

* adjust coloring of mean value bar plots

* add missing information in various descriptions

* render error message when user uploads less than 3 screening files in data projection process

* readd missing stage

* restore controls chart to scatter plot

* Update version (#179)

* Update version

* Remove dev

* fix responsiveness (#181)

* Add reproducibility (#177)

* Reproducing Screening and Correlation

* Reproducing Hit Validation

* Remove checkbox changning

* Change gitignore

* Add alerts

* Resolve

* Reports refactor (#178)

* Reproducing Screening and Correlation

* Reproducing Hit Validation

* Remove checkbox changning

* Create Header in reports

* Merge develop

* restore changes from broken branch (#185)

* After testing adjustments (#184)

* add projections smiles info

* add modulation_50/concentration_50 to report

* add low quality plate csv

* fix test

* correct typos/pca_smiles_summary

* remove pca_smiles_summary

* Add activity filtering (#171)

* Add activity filtering

* Update layout

* Add top and bottom thresholds

* Add lines and separate threshold change

* Add save button

* Move button and rename cols

* Update button

* Refactor uploading files (#187)

* Add text on upload

* Individual text

* Refactor

* Add missing words

* Resolve merge problem

* Bump version (#188)

---------

Co-authored-by: Bartosz Stachowiak <[email protected]>
Co-authored-by: Bartosz Stachowiak <[email protected]>
Co-authored-by: azywot <[email protected]>
Co-authored-by: AndrzejKaj <[email protected]>
Co-authored-by: Agata <[email protected]>
Co-authored-by: njytwf <[email protected]>

* Add option to save processed dataset

* Update model params

---------

Co-authored-by: Bartosz Stachowiak <[email protected]>
Co-authored-by: Bartosz Stachowiak <[email protected]>
Co-authored-by: azywot <[email protected]>
Co-authored-by: AndrzejKaj <[email protected]>
Co-authored-by: Agata <[email protected]>
Co-authored-by: njytwf <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update correlation plot
3 participants