Age | Commit message (Collapse) | Author |
|
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
|
|
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
|
|
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.
|
|
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.
|
|
|
|
|
|
* gn3/db/traits.py (update_sample_data): New function.
* tests/unit/db/test_traits.py: New test cases for ^^.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
|
|
* gn3/db/__init__.py (update_raw): New function.
|
|
|
|
|
|
|
|
|
|
|
|
* gn3/db/phenotypes.py (Probeset): New dataclass.
(probeset_mapping): New dict.
* gn3/db/__init__.py: Add probeset_mapping and Probeset.
|
|
|
|
|
|
|
|
|
|
|
|
* gn3/db/__init__.py (fetchone): Make "WHERE" an Optional arg.
|
|
|
|
|
|
We use prepared statements, so no need to have this.
|
|
|
|
* gn3/db/__init__.py (diff_from_dict): We only use the keys of the dict!
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* gn3/db/phenotypes.py (fetchone): New function.
|
|
Maps a string to it's dataclass.
|
|
|
|
|
|
|
|
* gn3/db/phenotypes.py (update_phenotype): Delete it.
(update): New, more general function.
|
|
|
|
See: https://www.py4u.net/discuss/188952
|
|
|
|
|
|
|