aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-01-01guix_deployPjotr Prins
2021-12-24Fix typing errorsFrederick Muriuki Muriithi
2021-12-24Fix linting errorsFrederick Muriuki Muriithi
2021-12-24Fix sortingFrederick Muriuki Muriithi
Issue: https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/partial-correlations.gmi * Update the sorting algorithm, for literature and tissue correlations so that it sorts the results by the correlation value first then by the p-value next.
2021-12-24Return the correlation method usedFrederick Muriuki Muriithi
Issue: https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/partial-correlations.gmi * Return the correlation method used
2021-12-24Replace `NaN` with `null` in JSON stringFrederick Muriuki Muriithi
Issue: https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/partial-correlations.gmi * `NaN` is not a valid JSON value, and leads to errors in the code. This commit replaces all `NaN` values with `null`.
2021-12-24Encode the data to JSON and set the status codeFrederick Muriuki Muriithi
Issue: https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/partial-correlations.gmi * Encode bytes objects to string * Encode NaN values to "null" * gn3/api/correlation.py:
2021-12-24Reduce the total amount of data to be outputFrederick Muriuki Muriithi
Issue: https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/partial-correlations.gmi * There is a lot of data that is not necessary in the final result. This commit removes that data, retaining only data relevant for the display.
2021-12-24Add dataset type to the resultsFrederick Muriuki Muriithi
Issue: https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/partial-correlations.gmi * The dataset type is relevant for the display of the data, therefore, this commit presents the dataset type as part of the results.
2021-12-24Add API endpoint for partial correlationsFrederick Muriuki Muriithi
Issue: https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/partial-correlations.gmi * Add an API endpoint for the partial correlation. * gn3/api/correlation.py:
2021-12-23db: Assist mypy with explicit type declaration.Arun Isaac
* gn3/db/datasets.py (dataset_metadata): Assist mypy by explicitly declaring type of return dictionary.
2021-12-23db: Fix sparql_query return type.Arun Isaac
* gn3/db/datasets.py: Import List from typing. (sparql_query): Set return type to List[Dict[str, Any]].
2021-12-23db: Fix wrong continued indentation.Arun Isaac
* gn3/db/datasets.py (dataset_metadata): Fix wrong continued indentation.
2021-12-23pylintrc: Disable fixme check.Arun Isaac
fixme notes such as TODO, FIXME, etc. are good practice, and should not be discouraged. * .pylintrc (disable): Add fixme.
2021-12-22Refactor wgcna (#63)Alexander Kabui
* add r as a gn3 input * calculate powers from user input * fix merge conflict
2021-12-17Add "success" status to final computation resultsFrederick Muriuki Muriithi
Issue: https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/partial-correlations.gmi
2021-12-17Add API endpoint for partial correlationsFrederick Muriuki Muriithi
Issue: https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/partial-correlations.gmi * Add an API endpoint for the partial correlation.
2021-12-14linting: Fix obvious linting issuesFrederick Muriuki Muriithi
2021-12-14Fix bug: expects int, gets object - Fixed.Frederick Muriuki Muriithi
2021-12-14mypy: ignore some imports and errorsFrederick Muriuki Muriithi
* Ignore some missing library stubs * Ignore some typing errors * Fix obvious typing errors
2021-12-14Provide expected values to use for testsFrederick Muriuki Muriithi
2021-12-14TO REVERT: Add logging to see data frameFrederick Muriuki Muriithi
2021-12-14Remove any items with less than 3 samplesFrederick Muriuki Muriithi
Issue: https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/partial-correlations.gmi * pingouin raises an exception whenever one attempts to use it to compute the partial correlation with data that has less than 3 samples.
2021-12-14Fix dataset: use target dataset not primaryFrederick Muriuki Muriithi
Issue: https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/partial-correlations.gmi * Use the target dataset to load the target traits, not the primary trait's dataset, since they might differ.
2021-12-14Set explicit formatting for sequences in queriesFrederick Muriuki Muriithi
Issue: https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/partial-correlations.gmi * the mysqlclient is sometimes finicky with the format specifiers, especially in the `WHERE ... IN ...` clauses where a sequence of values is provided. This commit explicitly sets the format specifiers for such clauses so as to avoid sporadic failures due to differences in the form of data from one query to the next.
2021-12-13Provide missing functionFrederick Muriuki Muriithi
Issue: https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/partial-correlations.gmi * Import the missing function.
2021-12-13Fix the removal of controls for corresponding Nones in targetsFrederick Muriuki Muriithi
Issue: https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/partial-correlations.gmi * Fix the code, so that it removes all control values, whose corresponding target values are None, without throwing an error.
2021-12-13Return the primary and control traits in addition to resultsFrederick Muriuki Muriithi
Issue: https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/partial-correlations.gmi * In addition to the partial correlation results, this commit enables the return of the chosen primary trait and the selected control traits. This data is required for presentation on the results page.
2021-12-13Run partial correlations against chosen databaseFrederick Muriuki Muriithi
Issue: https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/partial-correlations.gmi * Run the partial correlations against the database that the user selects, and not the one from which the primary trait is. This was a bug in the code.
2021-12-13Fix errors with queryFrederick Muriuki Muriithi
Issue: https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/partial-correlations.gmi * Use the correct format string paradigm: put f before opening quote. * Provide missing space just before 'FROM' clause
2021-12-10Remove pull request template.Arun Isaac
People are not using the pull request template properly. Often, the fields remain unfilled, and the placeholders are not deleted. This is cognitively taxing for reviewers. Also, most of our changes are better described in the commit log than in the pull request description. And, our reviews are quite cursory and don't need a detailed pull request description for the reviewer to act on. * .github/PULL_REQUEST_TEMPLATE.md: Delete file.
2021-12-10Fix parametersFrederick Muriuki Muriithi
Issue: https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/partial-correlations.gmi * Provide parameters as a dict of items (which works for MySQL), rather than as keywork arguments (as works in PostgreSQL).
2021-12-10format normalize function doc stringAlexander Kabui
2021-12-10minor pr fixesAlexander Kabui
2021-12-10rename variablesAlexander Kabui
2021-12-10try and catch for non matching sample keysAlexander Kabui
2021-12-10update function docs for normalizing strain valuesAlexander Kabui
2021-12-10refactor sample r unittestsAlexander Kabui
2021-12-10refactor unittest for normalizing sample valuesAlexander Kabui
2021-12-10fix bug:unpacking error when generator returns empty listAlexander Kabui
2021-12-09README: Link CI badge to CI status page.Arun Isaac
* README.md: Link CI badge to CI status page.
2021-12-09README: Add CI badge.Arun Isaac
* README.md: Add CI badge.
2021-12-09guix.scm: Inherit from (gn packages genenetwork).Arun Isaac
We base this off the genenetwork3 package defined in (gn packages genenetwork). That way, we don't have to duplicate the package definition in multiple places. * guix.scm (genenetwork3): Inherit from genenetwork3 package definition in (gn packages genenetwork).
2021-12-09Prevent error on no result. Fix indexingFrederick Muriuki Muriithi
Issue: https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/partial-correlations.gmi * If the dataset name is not found, don't cause an exception, instead, return the provided search name. * Use the correct inner object
2021-12-09Provide clearer error messageFrederick Muriuki Muriithi
Issue: https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/partial-correlations.gmi * To help with debugging error conditions, provide the original name to help with figuring out why the error was raised
2021-12-08Provide group from primary traitFrederick Muriuki Muriithi
Issue: https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/partial-correlations.gmi * From the collections page, the group is not present, so this commit retrieves the group value from the primary trait.
2021-12-06Merge branch 'main' of github.com:genenetwork/genenetwork3Frederick Muriuki Muriithi
2021-12-06Merge branch 'partial-correlations'Frederick Muriuki Muriithi
2021-12-02Add a Guix operating-system configuration.Arun Isaac
* guix-system.scm: New file.
2021-12-02Implement dataset metadata API endpoint.Arun Isaac
* guix.scm: Import (gnu packages rdf). (genenetwork3)[propagated-inputs]: Add python-sparqlwrapper. * gn3/settings.py (SPARQL_ENDPOINT): New variable. * gn3/api/general.py: Import datasets from gn3.db. (dataset_metadata): New API endpoint. * gn3/db/datasets.py: Import re, Template from string, Dict and Optional from typing, JSON and SPARQLWrapper from SPARQLWrapper, SPARQL_ENDPOINT from gn3.settings. (sparql_query, dataset_metadata): New functions.