Age | Commit message (Collapse) | Author | |
---|---|---|---|
2021-07-30 | Return dict from query functions | Muriithi Frederick Muriuki | |
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. | |||
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 | BonfaceKilz | |
* gn3/db/traits.py (update_sample_data): New function. * tests/unit/db/test_traits.py: New test cases for ^^. | |||
2021-07-29 | Add type annotations to the function | Muriithi Frederick Muriuki | |
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. | |||
2021-07-29 | Retrieve trait information | Muriithi Frederick Muriuki | |
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. | |||
2021-07-29 | Make name retrieval more general | Muriithi Frederick Muriuki | |
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. | |||
2021-07-29 | Retrieve 'ProbeSet' trait name | Muriithi Frederick Muriuki | |
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. | |||
2021-07-29 | db: traits: Remove publishdata column | BonfaceKilz | |
2021-07-26 | gn3: db: Create a raw update query | BonfaceKilz | |
* gn3/db/__init__.py (update_raw): New function. | |||
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 | BonfaceKilz | |
* gn3/db/phenotypes.py (Probeset): New dataclass. (probeset_mapping): New dict. * gn3/db/__init__.py: Add probeset_mapping and Probeset. | |||
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 | BonfaceKilz | |
* gn3/db/__init__.py (fetchone): Make "WHERE" an Optional arg. | |||
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 | BonfaceKilz | |
We use prepared statements, so no need to have this. | |||
2021-06-03 | Use prepared statements for FETCH sql function | BonfaceKilz | |
2021-06-03 | gn3: db: Replace items() with keys() | BonfaceKilz | |
* gn3/db/__init__.py (diff_from_dict): We only use the keys of the dict! | |||
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 | |
2021-05-26 | db: phenotypes: Fix publication_mapping | BonfaceKilz | |
2021-05-26 | db: phenotypes: Fix typo | BonfaceKilz | |
2021-05-20 | db: phenotypes: Add function for fetching a single result | BonfaceKilz | |
* gn3/db/phenotypes.py (fetchone): New function. | |||
2021-05-20 | db: phenotypes: Add a dataclass map | BonfaceKilz | |
Maps a string to it's dataclass. | |||
2021-05-20 | db: phenotypes: Add Publication table mapping | BonfaceKilz | |
2021-05-20 | db: phenotypes: Rename phenotype_column_mapping | BonfaceKilz | |
2021-05-20 | db: phenotypes: Add Publication dataclass and mapping | BonfaceKilz | |
2021-05-20 | db: phenotypes: Generalise the update function | BonfaceKilz | |
* gn3/db/phenotypes.py (update_phenotype): Delete it. (update): New, more general function. | |||
2021-05-20 | db: phenotypes: Map a table to it's relevant dict mapping | BonfaceKilz | |
2021-05-20 | db: phenotypes: Add type for Dataclass | BonfaceKilz | |
See: https://www.py4u.net/discuss/188952 | |||
2021-05-20 | db: phenotypes: Put mapping def after dataclass | BonfaceKilz | |
2021-05-20 | db: phenotypes: Add phenotype table mapping | BonfaceKilz | |
2021-05-20 | db: phenotypes: Add dataclass to represent PublishXRef | BonfaceKilz | |
2021-05-20 | db: phenotype: Make "pylint: disable=[R0902]" global for file | BonfaceKilz | |
2021-05-20 | db: phenotypes: Add a way of updating the Phenotype table | BonfaceKilz | |
* gn3/db/phenotypes.py (Phenotype): New dataclass. (update_phenotype): New function. [phenotype_column_mapping]: New variable. | |||
2021-05-10 | db: species: Add method for fetching all species | BonfaceKilz | |