Age | Commit message (Expand) | Author |
2022-03-12 | Remove unused imports | BonfaceKilz |
2022-03-12 | Move operations on sample_data to it's own module | BonfaceKilz |
2022-03-12 | db: Fix error in SQL query...* gn3/db/traits.py (get_trait_csv_sample_data): Update SQL to fix runtime
errors.
| BonfaceKilz |
2022-03-12 | Fix pylint error | BonfaceKilz |
2022-03-12 | Append case attributes to csv data if they exist | BonfaceKilz |
2022-03-12 | db: Extend csv query to fetch case attributes...* gn3/db/traits.py (get_trait_csv_sample_data): Fetch case attribute data if
it exists.
| BonfaceKilz |
2022-03-12 | Revert "db: Fetch correct sample data"...This reverts commit 710769e84b3bc6a2bdd66effdbac0659272ed511.
| BonfaceKilz |
2022-02-21 | Fix minor issues introduced while fixing linting errors | Frederick Muriuki Muriithi |
2022-02-21 | Fix a myriad of linter issues...* Use `with` in place of plain `open`
* Use f-strings in place of `str.format()`
* Remove string interpolation from queries - provide data as query parameters
* other minor fixes
| Frederick Muriuki Muriithi |
2022-02-08 | db: traits: Enable deletion of individual sample values...If a user replaces an individual value with an "x", delete that date entry
from the respective table. Deletion here is the only option since by default
the Nstrain, PublishData and PublishSE don't accept null values. Note that
deleting all 3 values is equivalent to removing the sample from the CSV file.
* gn3/db/traits.py (update_sample_data): If a value is "x", delete it from the
respective table.
| BonfaceKilz |
2022-02-08 | db: traits: Allow insertions of "0" in resp. sample values tables...When editing values from "x" to "0"(or any other value) when editing data, an
"update" statement was being run; thereby no new value was being inserted. To
the end user, modifying an "x" value to something else meant that no value was
being inserted. This commit fixes that by doing an insert whenever a change
from "x" to "0" is performed.
* gn3/db/traits.py (update_sample_data): Add insert statements whenever an
"update" statement returns a 0 row-count.
| BonfaceKilz |
2022-02-08 | db: traits: Insert "count" instead of "error" in "NStrain" table | BonfaceKilz |
2022-02-03 | db: Fetch correct sample data | BonfaceKilz |
2022-02-02 | Remove PublishFreeze from retrieve_publish_trait_info query...The PublishFreeze table isn't necessary in phenotype queries, since
PublishFreeze.Id = InbredSet.Id (for the purposes of identifying traits,
at least)
| zsloan |
2022-02-02 | Fix bug where sample values of 0 were being treated as False...In line 91 of gn3/db/traits.py, there was an if statement "if
record[key] else 'x'" that was treating values of 0 as False, so I
changed it to explicitly check that values aren't None
| zsloan |
2022-02-02 | Fix retrieve_publish_trait_data query...The PublishFreeeze table is actually unnecessary for this query, since
the group ID (inbred_set_id) should be passed in and that ID is in the
PublishXRef table (so no neeed to join with PublishFreeze)
| zsloan |
2022-01-12 | Indent code correctly...Indent the code correctly.
| Frederick Muriuki Muriithi |
2022-01-12 | Deduplicate query to fetch data for 'Publish' traits...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.
| Frederick Muriuki Muriithi |
2022-01-04 | traits.py: Don't use "value" to check if a record exists...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.
| BonfaceKilz |
2022-01-04 | traits.py: Return early during an insert if the give record exists...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.
| BonfaceKilz |
2022-01-04 | traits.py Delete a record only if it exists...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.
| BonfaceKilz |
2021-12-14 | linting: Fix obvious linting issues | Frederick Muriuki Muriithi |
2021-12-09 | Provide clearer error message...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
| Frederick Muriuki Muriithi |
2021-11-29 | Merge branch 'main' into partial-correlations | Muriithi Frederick Muriuki |
2021-11-29 | Fix linting errors...Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/partial-correlations.gmi
| Frederick Muriuki Muriithi |
2021-11-29 | db: traits: Support additions and deletions from csv file | BonfaceKilz |
2021-11-29 | db: traits: Remove trailing ".0" in int values | BonfaceKilz |
2021-11-29 | db: traits: Remove "\n\n" when generating csv file...In excel, "\n\n" is replaced with ",,,," during upload.
| BonfaceKilz |
2021-11-25 | db: traits: Support additions and deletions from csv file | BonfaceKilz |
2021-11-24 | db: traits: Remove trailing ".0" in int values | BonfaceKilz |
2021-11-23 | db: traits: Remove "\n\n" when generating csv file...In excel, "\n\n" is replaced with ",,,," during upload.
| BonfaceKilz |
2021-10-19 | Move `export_informative` function to `gn3.db.traits` module...Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/partial-correlations.gmi
* gn3/db/traits.py: Move `export_informative` function here
* gn3/partial_correlations.py: Remove `export_informative` function
* tests/unit/db/test_traits.py: Move `export_informative` function tests here
* tests/unit/test_partial_correlations.py: Remove `export_informative`
function tests
The `export_informative` function relates more to the traits than to the
partial correlations, and could find use in more than just the partial
correlations stuff. This commit moves the function to the more
traits-specific `gn3.db.traits` module.
| Frederick Muriuki Muriithi |
2021-10-19 | Move 'export_trait_data' to 'gn3.db.traits' module...Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/partial-correlations.gmi
* gn3/db/traits.py: Move function `export_trait_data` here
* gn3/heatmaps.py: Remove function `export_trait_data`
* tests/unit/db/test_traits.py: Move function `export_trait_data` tests here
* tests/unit/test_heatmaps.py: Remove function `export_trait_data` here
Function `export_trait_data` more closely corresponds to the traits and is
used in more than just the `gn3.heatmaps` module. This commit moves the
relevant code over to the `gn3.db.traits` module and also moves the tests to
the corresponding tests modules.
| Frederick Muriuki Muriithi |
2021-09-27 | Update terminology: `riset` to `group`...Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/clustering.gmi
* Update terminology to use the appropriate domain terminology according to
Zachary's direction at
https://github.com/genenetwork/genenetwork3/pull/37#issuecomment-926041744
| Frederick Muriuki Muriithi |
2021-09-27 | Update terminology: `strain` to `sample`...Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/clustering.gmi
* Update the terminology used: use `sample` in place of `strain` according to
Zachary's direction at
https://github.com/genenetwork/genenetwork3/pull/37#issuecomment-926043306
| Frederick Muriuki Muriithi |
2021-09-22 | Fix typing issues...* Ignore some errors
* Update typing definitions for some portions of code
* Add missing imports
| Frederick Muriuki Muriithi |
2021-09-22 | Fix pylint errors...* Add missing function and module docstrings
* Remove unused imports
* Fix import order
* Rework some code sections to fix issues
* Disable some pylint errors.
| Frederick Muriuki Muriithi |
2021-08-31 | Fix linting errors, minor bugs and reorganise code...* Fix some linting errors and some minor bugs caught by the linter.
Move the `random_string` function to separate module for use in multiple
places in the code.
| Muriithi Frederick Muriuki |
2021-08-31 | Update `heatmap_data` function: remove extraneous data...Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/clustering.gmi
* gn3/computations/heatmap.py: update function
* gn3/db/traits.py: new function
Remove extraneous data and arguments from the function.
- Load the genotype file
- Generate traits file
- Provide both raw traits data, and exported traits data in return
| Muriithi Frederick Muriuki |
2021-08-17 | 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-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 |