Age | Commit message (Expand) | Author |
2022-01-10 | Convert keys to string...* Some traits have a name composed of all numerals, which leads to the names
being interpreted as numbers. This commit forces them to string to avoid
subtle bugs where the code fails.
| Frederick Muriuki Muriithi |
2022-01-10 | Remove all pairs with 'None' as the value...* Remove all key-value pairs whose value is None.
| Frederick Muriuki Muriithi |
2022-01-10 | Fix error in query: Replace '=' with 'IN' | Frederick Muriuki Muriithi |
2022-01-10 | Replace unoptimised function with optimised one...Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/partial-correlations.gmi
* Replace unoptimised function with one optimised to give better performance.
The optimisation done here is to fetch multiple items/traits from the
database per query, rather than the original form, which fetched a single
item/trait from the database per query.
| Frederick Muriuki Muriithi |
2022-01-10 | Silence `duplicate-code` linting notifications | Frederick Muriuki Muriithi |
2022-01-10 | Convert NaN to None...Issue: https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/partial-correlations.gmi
Comment:
https://github.com/genenetwork/genenetwork3/pull/67#issuecomment-1000828159
* Convert NaN values to None to avoid possible bugs with the string replace
method used before.
| Frederick Muriuki Muriithi |
2022-01-10 | Add optimised entry for partial correlations...Issue:
* Function
`gn3.computations.partial_correlations_optimised.partial_correlations_entry`
is a copy of the
`gn3.computations.partial_correlation.partial_correlations_entry`
function that is optimised for better performance.
The optimised function is intended to replace the unoptimised one, but it is
included in this commit for comparison purposes, and to maintain some
historical context for doing it this way.
| Frederick Muriuki Muriithi |
2022-01-10 | Rework database functions to fetch multiple items...Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/partial-correlations.gmi
* In an attempt to optimise the performance of the partial correlations
feature, this commit reworks some database access functions to fetch
multiple items from the database, per query, unlike their original forms
which would fetch a single item per query.
This reduces queries to the database, and should hopefully improve the
responsiveness of the partial correlations feature.
| Frederick Muriuki Muriithi |
2022-01-05 | Merge pull request #64 from jgarte/type-hint-normalize-values...Adds type hint for normalize_values function | BonfaceKilz |
2022-01-05 | Merge pull request #69 from genenetwork/fix/check-for-duplicates-before-delet......Fix/check for duplicates before deletions or insertions | BonfaceKilz |
2022-01-05 | Merge branch 'main' into fix/check-for-duplicates-before-deletions-or-insertions | BonfaceKilz |
2022-01-05 | Fix pylint errors | BonfaceKilz |
2022-01-05 | test_traits.py: Update failing test | BonfaceKilz |
2022-01-04 | traits.py: Don't use "value" to check if a record exists...The problem with using the "value" record is that it's a floating point
number. See
<https://www.bonfacemunyoki.com/post/2021-10-21-comparing-floating-point-numbers/>
on why comparing floating point numbers can be an issue.
| BonfaceKilz |
2022-01-04 | traits.py: Return early during an insert if the give record exists...Sometimes, a user will try to insert data twice, on in some instances, 2
different users will attempt the same inserts of the same records separately.
In such cases, ignore the insert, and return early.
| BonfaceKilz |
2022-01-04 | traits.py Delete a record only if it exists...In the case when the user tries to delete the same data twice, prior to this
commit, an error was being generated. This commit remedies this by checking
if a record exists prior to deleting it.
| BonfaceKilz |
2022-01-01 | guix_deploy | Pjotr Prins |
2022-01-01 | guix_deploy | Pjotr Prins |
2021-12-24 | Fix typing errors | Frederick Muriuki Muriithi |
2021-12-24 | Fix linting errors | Frederick Muriuki Muriithi |
2021-12-24 | Fix sorting...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.
| Frederick Muriuki Muriithi |
2021-12-24 | Return the correlation method used...Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/partial-correlations.gmi
* Return the correlation method used
| Frederick Muriuki Muriithi |
2021-12-24 | Replace `NaN` with `null` in JSON string...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`.
| Frederick Muriuki Muriithi |
2021-12-24 | Encode the data to JSON and set the status code...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:
| Frederick Muriuki Muriithi |
2021-12-24 | Reduce the total amount of data to be output...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.
| Frederick Muriuki Muriithi |
2021-12-24 | Add dataset type to the results...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.
| Frederick Muriuki Muriithi |
2021-12-24 | Add API endpoint for partial correlations...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:
| Frederick Muriuki Muriithi |
2021-12-23 | db: Assist mypy with explicit type declaration....* gn3/db/datasets.py (dataset_metadata): Assist mypy by explicitly declaring
type of return dictionary.
| Arun Isaac |
2021-12-23 | db: Fix sparql_query return type....* gn3/db/datasets.py: Import List from typing.
(sparql_query): Set return type to List[Dict[str, Any]].
| Arun Isaac |
2021-12-23 | db: Fix wrong continued indentation....* gn3/db/datasets.py (dataset_metadata): Fix wrong continued indentation.
| Arun Isaac |
2021-12-23 | pylintrc: Disable fixme check....fixme notes such as TODO, FIXME, etc. are good practice, and should not be
discouraged.
* .pylintrc (disable): Add fixme.
| Arun Isaac |
2021-12-22 | Refactor wgcna (#63)...* add r as a gn3 input
* calculate powers from user input
* fix merge conflict | Alexander Kabui |
2021-12-17 | Add "success" status to final computation results...Issue: https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/partial-correlations.gmi
| Frederick Muriuki Muriithi |
2021-12-17 | Add API endpoint for partial correlations...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.
| Frederick Muriuki Muriithi |
2021-12-14 | linting: Fix obvious linting issues | Frederick Muriuki Muriithi |
2021-12-14 | Fix bug: expects int, gets object - Fixed. | Frederick Muriuki Muriithi |
2021-12-14 | mypy: ignore some imports and errors...* Ignore some missing library stubs
* Ignore some typing errors
* Fix obvious typing errors
| Frederick Muriuki Muriithi |
2021-12-14 | Adds type hint for normalize_values function | jgart |
2021-12-14 | Provide expected values to use for tests | Frederick Muriuki Muriithi |
2021-12-14 | TO REVERT: Add logging to see data frame | Frederick Muriuki Muriithi |
2021-12-14 | Remove any items with less than 3 samples...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.
| Frederick Muriuki Muriithi |
2021-12-14 | Fix dataset: use target dataset not primary...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.
| Frederick Muriuki Muriithi |
2021-12-14 | Set explicit formatting for sequences in queries...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.
| Frederick Muriuki Muriithi |
2021-12-13 | Provide missing function...Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/partial-correlations.gmi
* Import the missing function.
| Frederick Muriuki Muriithi |
2021-12-13 | Fix the removal of controls for corresponding Nones in targets...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.
| Frederick Muriuki Muriithi |
2021-12-13 | Return the primary and control traits in addition to results...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.
| Frederick Muriuki Muriithi |
2021-12-13 | Run partial correlations against chosen database...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.
| Frederick Muriuki Muriithi |
2021-12-13 | Fix errors with query...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
| Frederick Muriuki Muriithi |
2021-12-10 | Remove pull request template....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.
| Arun Isaac |
2021-12-10 | Fix parameters...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).
| Frederick Muriuki Muriithi |