Age | Commit message (Collapse) | Author |
|
The queries run in the `get_trait_csv_sample_data` and
`retrieve_publish_trait_data` functions in the `gn3.db.traits` module were
mostly similar. This commit changes that, by making the
`get_trait_csv_sample_data` function make use of the results from calling the
`retrieve_publish_trait_data` function.
|
|
Issue: https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/partial-correlations.gmi
|
|
Issue: https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/partial-correlations.gmi
|
|
|
|
* 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.
|
|
|
|
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.
|
|
|
|
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.
|
|
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.
|
|
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.
|
|
* gn3/db/datasets.py (dataset_metadata): Assist mypy by explicitly declaring
type of return dictionary.
|
|
* gn3/db/datasets.py: Import List from typing.
(sparql_query): Set return type to List[Dict[str, Any]].
|
|
* gn3/db/datasets.py (dataset_metadata): Fix wrong continued indentation.
|
|
|
|
|
|
* Ignore some missing library stubs
* Ignore some typing errors
* Fix obvious typing errors
|
|
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.
|
|
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
|
|
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).
|
|
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
|
|
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
|
|
|
|
* 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.
|
|
|
|
Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/partial-correlations.gmi
|
|
Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/partial-correlations.gmi
* Provide the entry-point function to the partial correlation feature. This is
the function that ochestrates the fetching of the data, and processing it
for output by the API endpoint (to be implemented).
|
|
Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/partial-correlations.gmi
* Process the db_name and db_type values.
* Return data correctly
|
|
Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/partial-correlations.gmi
* Return the complete filename when found, or the boolean value False, when it
is not found.
|
|
Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/partial-correlations.gmi
* Return the values from the database, not the tuples.
|
|
Issue: https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/partial-correlations.gmi
|
|
Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/partial-correlations.gmi
* Pass parameters to the query the way the MySQL driver expects.
|
|
Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/partial-correlations.gmi
* Migrate the `web.webqtl.dbFunction.webqtlDatabaseFunction.retrieveSpecies`
in GeneNetwork1 to `gn3.db.species.species_name` in GeneNetwork3 to enable
the retrieval of the species name, given the group name (formerly RISet).
|
|
|
|
|
|
In excel, "\n\n" is replaced with ",,,," during upload.
|
|
|
|
|
|
In excel, "\n\n" is replaced with ",,,," during upload.
|
|
* Fix linting errors like:
- Unused variables
- Undeclared variable errors (mostly caused by typos, and wrong names)
- Missing documentation strings for functions
etc.
|
|
Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/partial-correlations.gmi
* Document functions for posterity.
|
|
Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/partial-correlations.gmi
* Add some tests for the query builders to ensure that the queries are built
up correctly.
|
|
Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/partial-correlations.gmi
* Migrate the
`web.webqtl.correlation.CorrelationPage.fetchAllDatabaseData` function from
GN1 to GN3.
|
|
Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/partial-correlations.gmi
* To make the code more composable down the line, make the database connection
argument the first argument for functions that access the database, since
they will always require the connection.
|
|
Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/partial-correlations.gmi
* Add the `check_for_literature_info` and
`check_symbol_for_tissue_correlation` functions to check for the presence of
specific data.
|
|
Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/partial-correlations.gmi
|
|
Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/partial-correlations.gmi
* gn3/db/correlations.py: Remove the
`compare_tissue_correlation_absolute_values` function which is no longer
needed.
|
|
Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/partial-correlations.gmi
* gn3/computations/partial_correlations.py: Remove comments after updating
usage of the function at call point
* gn3/db/correlations.py: Complete the implementation of the
`build_temporary_tissue_correlations_table` function
|
|
Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/partial-correlations.gmi
* gn3/computations/partial_correlations.py: new
function (`correlations_of_all_tissue_traits`).
* gn3/db/correlations.py: delete
function (`correlations_of_all_tissue_traits`).
Move the function to `gn3.computations.partial_correlations` module and
comment out the db-access code.
Rework it to receive, as arguments, the data it previously fetched from the
database, and add comments on future rework to get the function working
again.
|
|
Issue: https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/partial-correlations.gmi
|