Age | Commit message (Expand) | Author |
2021-08-18 | Provide top-level `riset` key-value pair...Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/clustering.gmi
* Provide the expected, top-level `riset` key-value pair and eliminate the
redundant key-value pair.
| Muriithi Frederick Muriuki |
2021-08-18 | Fix errors: add in missing parenthesis...Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/clustering.gmi
* Call the `cursor.fetchone()` function to get results. Without the
parenthesis, the code was trying to use the function itself as the results,
which was a bug, and would lead to failure.
| Muriithi Frederick Muriuki |
2021-08-09 | Set up the trait dataset type correctly...* gn3/db/traits.py: setup `trait_dataset_type`
* tests/unit/db/test_traits.py: fix tests
The type ('Temp', 'Geno', 'Publish', and 'ProbeSet') relate to a trait's
dataset, and not the trait itself. This commit updates the code to take this
into consideration.
The dataset type is also set up from a trait's full name, therefore this
commit removes the `trait_type` argument from the `retrieve_trait_info`
function.
| Muriithi Frederick Muriuki |
2021-08-09 | Retrieve the trait data...Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/clustering.gmi
* Add functions to retrieve the `value`, `variance`, and `ndata` values for
any given trait.
| Muriithi Frederick Muriuki |
2021-08-09 | Add missing arguments. Fix typo....Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/clustering.gmi
* Fix minor bugs in the code.
| Muriithi Frederick Muriuki |
2021-08-09 | Fix linting errors...Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/clustering.gmi
* Add module, class and function docstrings
* Deactivate some irrelevant pylint errors
* Fix indentations and line-lengths
| Muriithi Frederick Muriuki |
2021-08-08 | Only load extra data if the traits have basic info...Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/clustering.gmi
* Only load the extra trait data if the basic trait information is found.
| Muriithi Frederick Muriuki |
2021-08-08 | Merge branch 'main' of github.com:genenetwork/genenetwork3 into heatmap_decom... | Muriithi Frederick Muriuki |
2021-08-05 | db: traits: Return unique values when fetching sample data | BonfaceKilz |
2021-08-05 | Reorganise the database code...Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/clustering.gmi
* Reorganise the code to separate the datasets from the traits, and to more
closely conform to the same flow as that in GN1
| Muriithi Frederick Muriuki |
2021-08-05 | Build up trait_name items from full name...Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/clustering.gmi
* The full name of the traits from search contains multiple parts to it, and
as such, we use it to retrieve the appropriate data and set it up in the
final trait_info dictionary that is produced.
| Muriithi Frederick Muriuki |
2021-08-04 | Fix issues caught by pylint...* gn3/computations/slink.py: remove unused imports
* gn3/db/traits.py: remove unnecessary `else` clauses
* tests/unit/db/test_traits.py: add docstrings for functions
| Muriithi Frederick Muriuki |
2021-08-04 | Retrieve the RISet and RISet ID values...Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/clustering.gmi
* Retrieve the RISet and RISet ID values from the database.
| Muriithi Frederick Muriuki |
2021-08-04 | Add tests for post-processing functions...Issues:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/clustering.gmi
* Add missing tests for some post-processing functions
| Muriithi Frederick Muriuki |
2021-08-04 | Avoid string interpolation: use prepared statement...Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/clustering.gmi
* Following Arun's comment at
https://github.com/genenetwork/genenetwork3/pull/31#issuecomment-890915813
this commit eliminates string interpolation, and adds a map of tables for
the various types of traits dataset names
| Muriithi Frederick Muriuki |
2021-07-30 | Rework db functions to enable postprocessing...Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/clustering.gmi
* Rework the database functions to return a dict of key-value pairs, which
eases the postprocessing of the trait information.
The postprocessing is mainly to try an maintain data compatibility with the
code that is at the following locations:
https://github.com/genenetwork/genenetwork1/blob/master/web/webqtl/base/webqtlTrait.py
https://github.com/genenetwork/genenetwork1/blob/master/web/webqtl/base/webqtlDataset.py
https://github.com/genenetwork/genenetwork1/blob/master/web/webqtl/heatmap/Heatmap.py
This was mainly a proof-of-concept, and the functions do not have testing
added for them: there is therefore need to add testing for the new
functions, and probably even rework them if they are found to be
complicated.
| Muriithi Frederick Muriuki |
2021-07-30 | Return dict from query functions...Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/clustering.gmi
* gn3/db/traits.py: return dicts rather than tuples/list
* tests/unit/db/test_traits.py: Update tests
Return dicts with the key-value pairs set up so as to ease with the data
manipulation down the pipeline.
This is also useful to help with the retrieval of all other extra
information that was left out in the first iteration.
This commit also updates the tests by ensuring they expect dicts rather than
tuples.
| Muriithi Frederick Muriuki |
2021-07-29 | Merge branch 'main' into Feature/Update-db-from-csv-data | BonfaceKilz |
2021-07-29 | Delete "update_raw" and it's test-cases | BonfaceKilz |
2021-07-29 | Add method for updating values from a sample dataset...* gn3/db/traits.py (update_sample_data): New function.
* tests/unit/db/test_traits.py: New test cases for ^^.
| BonfaceKilz |
2021-07-29 | Add type annotations to the function...Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/clustering.gmi
* Add some type annotations to the functions to reduce the chances of bugs
creeping into the code.
| Muriithi Frederick Muriuki |
2021-07-29 | Retrieve trait information...Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/clustering.gmi
* gn3/db/traits.py: add functions to retrieve traits information
* tests/unit/db/test_traits.py: add tests for new function
Add functions to retrieve traits information as is done in genenetwork1
https://github.com/genenetwork/genenetwork1/blob/master/web/webqtl/base/webqtlTrait.py#L397-L456
At this point, the data retrieval functions are probably incomplete, as
there is more of the `retrieveInfo` function in GN1 that has not been
considered as of this commit.
| Muriithi Frederick Muriuki |
2021-07-29 | Make name retrieval more general...Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/clustering.gmi
* gn3/db/traits.py: make function more general
* tests/unit/db/test_traits.py: parametrize the tests
Make the name retrieval more general for the different types of traits by
changing the column specification and table as appropriate.
| Muriithi Frederick Muriuki |
2021-07-29 | Retrieve 'ProbeSet' trait name...Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/clustering.gmi
* gn3/db/traits.py: new function (retrieve_probeset_trait_name)
* tests/unit/db/test_traits.py: test(s) for new function
Add a function to retrieve the name of a 'ProbeSet' trait in a manner
similar to genenetwork1's retrieval of the same, as implemented here
https://github.com/genenetwork/genenetwork1/blob/master/web/webqtl/base/webqtlDataset.py#L140-154
Unlike in genenetwork1, we do not mutate an object, instead, we return the
values as retrieved from the database, and the caller will deal with the
returned values as appropriate.
| Muriithi Frederick Muriuki |
2021-07-29 | db: traits: Remove publishdata column | BonfaceKilz |
2021-07-26 | gn3: db: Create a raw update query...* gn3/db/__init__.py (update_raw): New function.
| BonfaceKilz |
2021-07-26 | db: traits: Fetch sample_data from a trait in csv form | BonfaceKilz |
2021-07-26 | db: traits: Remove unused functions | BonfaceKilz |
2021-07-10 | gn3: db: Use correct type for columns arg in fetch functions | BonfaceKilz |
2021-07-10 | Fix pylint issues | BonfaceKilz |
2021-07-10 | gn3: db: Add extra argument to specify column in fetch statements | BonfaceKilz |
2021-07-10 | db: phenotypes: Add Probeset data structures...* gn3/db/phenotypes.py (Probeset): New dataclass.
(probeset_mapping): New dict.
* gn3/db/__init__.py: Add probeset_mapping and Probeset.
| BonfaceKilz |
2021-06-07 | Rename json_data column to json_diff_data | BonfaceKilz |
2021-06-07 | gn3: db: Fix how columns from tables is resolved | BonfaceKilz |
2021-06-07 | gn3: db: Add "id_" property to metadata_audit class and mapping | BonfaceKilz |
2021-06-07 | gn3: db: Add "fetchall" method. | BonfaceKilz |
2021-06-07 | gn3: metadata_audit: Make props for MetadataAudit class optional | BonfaceKilz |
2021-06-07 | gn3: db: Make "WHERE" clause optional...* gn3/db/__init__.py (fetchone): Make "WHERE" an Optional arg.
| BonfaceKilz |
2021-06-07 | gn3: db: Use correct DATACLASSMAP entry from metadata_audit | BonfaceKilz |
2021-06-07 | gn3: db: sort imports | BonfaceKilz |
2021-06-03 | gn3: db: Remove "escape_string" from imports...We use prepared statements, so no need to have this.
| BonfaceKilz |
2021-06-03 | Use prepared statements for FETCH sql function | BonfaceKilz |
2021-06-03 | gn3: db: Replace items() with keys()...* gn3/db/__init__.py (diff_from_dict): We only use the keys of the dict!
| BonfaceKilz |
2021-06-03 | Use prepared statements for UPDATE sql function | BonfaceKilz |
2021-06-03 | gn3: db: Add new function for doing sql INSERT | BonfaceKilz |
2021-06-03 | Add data structures for the table metadata_audit | BonfaceKilz |
2021-06-03 | gn3: db: Add spacing before around "AND" in sql clause | BonfaceKilz |
2021-06-03 | Get the diff between 2 dicts and return that as a dict | BonfaceKilz |
2021-06-03 | gn3: db: Return None if data and where are empty | BonfaceKilz |
2021-05-26 | Move the methods, "update" and "fetch", to gn3.db | BonfaceKilz |