aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-09-28Merge pull request #38 from genenetwork/feature/wgcna_analysisBonfaceKilz
script for wgcna analysis
2021-09-27modify unittestsAlexander Kabui
2021-09-27modify integration testsAlexander Kabui
2021-09-27add file not found exceptionAlexander Kabui
2021-09-27add tests for calling wgcna_scriptAlexander Kabui
2021-09-27return str error for exceptionAlexander Kabui
2021-09-27fix merge conflictsAlexander Kabui
2021-09-27remove unnecessary comments and variablesAlexander Kabui
2021-09-27Merge pull request #37 from genenetwork/heatmap_generationBonfaceKilz
Heatmap generation
2021-09-27Remove unnecessary variable.Frederick Muriuki Muriithi
Issue: https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/clustering.gmi * Fix issue according to review https://github.com/genenetwork/genenetwork3/pull/37#discussion_r714549781
2021-09-27Narrow the exception and add commentsFrederick Muriuki Muriithi
Issue: https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/clustering.gmi * Only catch the `FileExistsError` allowing any other exception to pass through. This tries to conform a little to the review at https://github.com/genenetwork/genenetwork3/pull/37#discussion_r714552696
2021-09-27Update terminology: `riset` to `group`Frederick Muriuki Muriithi
Issue: https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/clustering.gmi * Update terminology to use the appropriate domain terminology according to Zachary's direction at https://github.com/genenetwork/genenetwork3/pull/37#issuecomment-926041744
2021-09-27Update terminology: `strain` to `sample`Frederick Muriuki Muriithi
Issue: https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/clustering.gmi * Update the terminology used: use `sample` in place of `strain` according to Zachary's direction at https://github.com/genenetwork/genenetwork3/pull/37#issuecomment-926043306
2021-09-25minor fixes for unittestsAlexander Kabui
2021-09-23add traits as columns names and pass as json inputAlexander Kabui
2021-09-23minor fixes for endpointAlexander Kabui
2021-09-23Return r error if returncode!=0Alexander Kabui
2021-09-23read generated files from r and return outputAlexander Kabui
2021-09-23check for na powerEst and use a default valueAlexander Kabui
2021-09-23append input to outputAlexander Kabui
2021-09-23sample output dataAlexander Kabui
2021-09-23validate required outputAlexander Kabui
2021-09-23add mock test data for scriptAlexander Kabui
2021-09-23pass json file path as an argAlexander Kabui
2021-09-23pass other variables from user input for network constrAlexander Kabui
2021-09-23add rjson dependencyAlexander Kabui
2021-09-23load data from json file and and convert to dtAlexander Kabui
2021-09-23Add missing dependencies causing pylint to failFrederick Muriuki Muriithi
* Add some dependencies used by the system that were missing in the test environment, leading to the pylint step failing.
2021-09-23Refactor: Move common sample data to separate fileFrederick Muriuki Muriithi
Issue: https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/clustering.gmi * Move common sample test data into a separate file where it can be imported from, to prevent pylint error R0801 which proved tricky to silence in any other way.
2021-09-22Fix more pylint errorsFrederick Muriuki Muriithi
2021-09-22Fix typing issuesFrederick Muriuki Muriithi
* Ignore some errors * Update typing definitions for some portions of code * Add missing imports
2021-09-22Fix pylint errorsFrederick Muriuki Muriithi
* Add missing function and module docstrings * Remove unused imports * Fix import order * Rework some code sections to fix issues * Disable some pylint errors.
2021-09-22Update check: Heatmaps need at least 2 itemsFrederick Muriuki Muriithi
Issue: https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/clustering.gmi * Update the check to look for at least 2 traits before trying to generate the heatmap.
2021-09-22Return serialized plotly figureFrederick Muriuki Muriithi
Issue: https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/clustering.gmi * gn3/api/heatmaps.py: Serialize the figure to JSON * gn3/heatmaps.py: Return the figure object Serialize the Plotly figure into JSON, and return that, so that it can be used on the client to display the image.
2021-09-22add init tests for call to scriptAlexander Kabui
2021-09-22add required wgcna dependencies to guix.scmAlexander Kabui
2021-09-22jsonify resultsAlexander Kabui
2021-09-22init endpoint tests for wgcnaAlexander Kabui
2021-09-20Enable Cross-Origin Resource SharingFrederick Muriuki Muriithi
Issue: https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/clustering.gmi * gn3/api/heatmaps.py: Fix bugs in data parsing * gn3/app.py: enable CORS * gn3/settings.py: add flask-cors configurations * guix.scm: Add flask-cors dependency For easier testing of the heatmaps generation feature, this commit activates the cross-origin resource sharing for all "localhost" origins.
2021-09-20Remove proof-of-concept test codeFrederick Muriuki Muriithi
Issue: https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/clustering.gmi * Remove the proof-of-concept CLI-only module that was used to learn how the heatmaps work and identify the appropriate data for use with them.
2021-09-20Return only the dataFrederick Muriuki Muriithi
Issue: https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/clustering.gmi * gn3/api/heatmaps.py: Parse incoming data to build up correct trait names and respond with only the computed heatmap data. * gn3/heatmaps.py: Return only the computed data for heatmaps and clustering. Since GN3 is supposed to handle only the data, and db-access, this commit ensures that GN3 responds to the client with only the computed heatmap data, and does not try to generate the heatmaps themselves. The generation of the heatmaps will be delegated to the UI clients, such as GeneNetwork2.
2021-09-17Fix a number of linting issuesFrederick Muriuki Muriithi
Issue: https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/clustering.gmi
2021-09-17Return path to generated filename for nowFrederick Muriuki Muriithi
Issue: https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/clustering.gmi * To help with demonstrating that the code is producing the expected output, for now, we return the path to the generated html file that displays the interactive heatmap. At this point, it is mostly useful in the development environment. Moving forward, we might have to actually stream the raw html, or if we can get the Kaleido library packaged for GNU Guix, stream the images binary data instead.
2021-09-17Fix some layout issues and update colorscaleFrederick Muriuki Muriithi
Issue: https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/clustering.gmi * Update the plot layouts and size to display the dendrogram and individual chromosome heatmaps side by side * Update the colour scale to begin with the grays rather than absolute black
2021-09-17Create dendrogram to show clustering treeFrederick Muriuki Muriithi
Issue: https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/clustering.gmi * Provide the clustering data to be used for the creation of the clustering dendrogram in the final clustered heatmap plot.
2021-09-16pylint fixesAlexander Kabui
2021-09-16Add WGCNA_SCRIT env to settingsAlexander Kabui
2021-09-16init tests for wgcnaAlexander Kabui
2021-09-16pass user input to call scriptAlexander Kabui
2021-09-16Intergrate the heatmap generation with the APIFrederick Muriuki Muriithi
Issue: https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/clustering.gmi * Intergrate the heatmap generation code on the /api/heatmaps/clustered endpoint. The endpoint should take a json query of the form: {"traits_names": [ ... ] } where the "traits_name" value is a list of the full names of traits. A sample query to the endpoint could be something like the following: curl -i -X POST "http://localhost:8080/api/heatmaps/clustered" \ -H "Accept: application/json" \ -H "Content-Type: application/json" \ -d '{ "traits_names": [ "UCLA_BXDBXH_CARTILAGE_V2::ILM103710672", "UCLA_BXDBXH_CARTILAGE_V2::ILM2260338", "UCLA_BXDBXH_CARTILAGE_V2::ILM3140576", "UCLA_BXDBXH_CARTILAGE_V2::ILM5670577", "UCLA_BXDBXH_CARTILAGE_V2::ILM2070121", "UCLA_BXDBXH_CARTILAGE_V2::ILM103990541", "UCLA_BXDBXH_CARTILAGE_V2::ILM1190722", "UCLA_BXDBXH_CARTILAGE_V2::ILM6590722", "UCLA_BXDBXH_CARTILAGE_V2::ILM4200064", "UCLA_BXDBXH_CARTILAGE_V2::ILM3140463" ] }' which should respond with a json response containing the raw binary string for the png format and possibly another for the svg format.