aboutsummaryrefslogtreecommitdiff
path: root/gn3/db
AgeCommit message (Collapse)Author
2021-07-29Retrieve 'ProbeSet' trait nameMuriithi 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-10gn3: db: Use correct type for columns arg in fetch functionsBonfaceKilz
2021-07-10Fix pylint issuesBonfaceKilz
2021-07-10gn3: db: Add extra argument to specify column in fetch statementsBonfaceKilz
2021-07-10db: phenotypes: Add Probeset data structuresBonfaceKilz
* gn3/db/phenotypes.py (Probeset): New dataclass. (probeset_mapping): New dict. * gn3/db/__init__.py: Add probeset_mapping and Probeset.
2021-06-07Rename json_data column to json_diff_dataBonfaceKilz
2021-06-07gn3: db: Fix how columns from tables is resolvedBonfaceKilz
2021-06-07gn3: db: Add "id_" property to metadata_audit class and mappingBonfaceKilz
2021-06-07gn3: db: Add "fetchall" method.BonfaceKilz
2021-06-07gn3: metadata_audit: Make props for MetadataAudit class optionalBonfaceKilz
2021-06-07gn3: db: Make "WHERE" clause optionalBonfaceKilz
* gn3/db/__init__.py (fetchone): Make "WHERE" an Optional arg.
2021-06-07gn3: db: Use correct DATACLASSMAP entry from metadata_auditBonfaceKilz
2021-06-07gn3: db: sort importsBonfaceKilz
2021-06-03gn3: db: Remove "escape_string" from importsBonfaceKilz
We use prepared statements, so no need to have this.
2021-06-03Use prepared statements for FETCH sql functionBonfaceKilz
2021-06-03gn3: db: Replace items() with keys()BonfaceKilz
* gn3/db/__init__.py (diff_from_dict): We only use the keys of the dict!
2021-06-03Use prepared statements for UPDATE sql functionBonfaceKilz
2021-06-03gn3: db: Add new function for doing sql INSERTBonfaceKilz
2021-06-03Add data structures for the table metadata_auditBonfaceKilz
2021-06-03gn3: db: Add spacing before around "AND" in sql clauseBonfaceKilz
2021-06-03Get the diff between 2 dicts and return that as a dictBonfaceKilz
2021-06-03gn3: db: Return None if data and where are emptyBonfaceKilz
2021-05-26Move the methods, "update" and "fetch", to gn3.dbBonfaceKilz
2021-05-26db: phenotypes: Fix publication_mappingBonfaceKilz
2021-05-26db: phenotypes: Fix typoBonfaceKilz
2021-05-20db: phenotypes: Add function for fetching a single resultBonfaceKilz
* gn3/db/phenotypes.py (fetchone): New function.
2021-05-20db: phenotypes: Add a dataclass mapBonfaceKilz
Maps a string to it's dataclass.
2021-05-20db: phenotypes: Add Publication table mappingBonfaceKilz
2021-05-20db: phenotypes: Rename phenotype_column_mappingBonfaceKilz
2021-05-20db: phenotypes: Add Publication dataclass and mappingBonfaceKilz
2021-05-20db: phenotypes: Generalise the update functionBonfaceKilz
* gn3/db/phenotypes.py (update_phenotype): Delete it. (update): New, more general function.
2021-05-20db: phenotypes: Map a table to it's relevant dict mappingBonfaceKilz
2021-05-20db: phenotypes: Add type for DataclassBonfaceKilz
See: https://www.py4u.net/discuss/188952
2021-05-20db: phenotypes: Put mapping def after dataclassBonfaceKilz
2021-05-20db: phenotypes: Add phenotype table mappingBonfaceKilz
2021-05-20db: phenotypes: Add dataclass to represent PublishXRefBonfaceKilz
2021-05-20db: phenotype: Make "pylint: disable=[R0902]" global for fileBonfaceKilz
2021-05-20db: phenotypes: Add a way of updating the Phenotype tableBonfaceKilz
* gn3/db/phenotypes.py (Phenotype): New dataclass. (update_phenotype): New function. [phenotype_column_mapping]: New variable.
2021-05-10db: species: Add method for fetching all speciesBonfaceKilz
2021-05-08db: species: Fetch chromosomes using a group or species nameBonfaceKilz
* gn3/db/species.py (get_chromosome): New function.
2021-05-08Fix pep-8 errorsBonfaceKilz
2021-05-08db: traits: Add extra method for looking up webqtl datasetsBonfaceKilz
2021-05-08db: traits: Update method for inserting publication methodBonfaceKilz
2021-05-08Add method for inserting publication_dataBonfaceKilz
2021-05-08Add webqtlCaseData DS to keep track of case data in one traitBonfaceKilz
2021-05-08Replace namedtuple with a dataclassBonfaceKilz
2021-05-08Add method for inserting phenotypesBonfaceKilz
2021-05-08Add method for inserting publicationsBonfaceKilz
2021-05-08Add method to fetch riset name and idBonfaceKilz
2021-03-16delete unwanted correlation stuff (#5)Alexander Kabui
* delete unwanted correlation stuff * Refactor/clean up correlations (#4) * initial commit for Refactor/clean-up-correlation * add python scipy dependency * initial commit for sample correlation * initial commit for sample correlation endpoint * initial commit for integration and unittest * initial commit for registering correlation blueprint * add and modify unittest and integration tests for correlation * Add compute compute_all_sample_corr method for correlation * add scipy to requirement txt file * add tissue correlation for trait list * add unittest for tissue correlation * add lit correlation for trait list * add unittests for lit correlation for trait list * modify lit correlarion for trait list * add unittests for lit correlation for trait list * add correlation metho in dynamic url * add file format for expected structure input while doing sample correlation * modify input data structure -> add trait id * update tests for sample r correlation * add compute all lit correlation method * add endpoint for computing lit_corr * add unit and integration tests for computing lit corr * add /api/correlation/tissue_corr/{corr_method} endpoint for tissue correlation * add unittest and integration tests for tissue correlation Co-authored-by: BonfaceKilz <bonfacemunyoki@gmail.com> * update guix scm file * fix pylint error for correlations api Co-authored-by: BonfaceKilz <bonfacemunyoki@gmail.com>