Age | Commit message (Expand) | Author |
2021-08-17 | Add tests and fix errors caught with tests...Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/clustering.gmi
* gn3/computations/heatmap.py: fix errors
* tests/unit/computations/test_heatmap.py: new tests
Add new tests with the expected source data format, and expected results.
Fix all errors that were caught by running the tests
| Muriithi Frederick Muriuki |
2021-08-11 | use normal function for correlation (#34)...* use normal function for correlation + rename functions
* update test for sample correlation
* use normal function for tissue correlation + rename functions | Alexander Kabui |
2021-07-26 | Fix issues caught by pylint...Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/clustering.gmi
* Fix a myriad of issues caught by pylint to ensure the code passes all tests.
| Muriithi Frederick Muriuki |
2021-07-23 | Add data examples for `slink`. Implement function....Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/clustering.gmi
* gn3/computations/slink.py: Copy the function, mostly verbatim from
genenetwork1. See:
https://github.com/genenetwork/genenetwork1/blob/master/web/webqtl/heatmap/slink.py#L107-L138
* tests/unit/computations/test_slink.py: Add a test with some example data to
test that the implementation gives the same results as that in genenetwork1
| Muriithi Frederick Muriuki |
2021-07-23 | Add more test data...Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/clustering.gmi
| Muriithi Frederick Muriuki |
2021-07-23 | Fix issue caught in `nearest` while testing `slink`...Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/clustering.gmi
* While running tests for slink, to try and understand what it is doing in
order to write the appropriate tests for it, an issue arose that pointed a
blindspot in the former understanding of now `nearest` should work.
This commit fixes the issue found in both the expected data, and the code.
| Muriithi Frederick Muriuki |
2021-07-23 | New function (`slink`): return [] on exception...Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/clustering.gmi
* gn3/computations/slink.py: Add minimum code to pass new test
* tests/unit/computations/test_slink.py: new test
Add test to ensure that the new `slink` function return an empty list in
case and exception is raised.
Add the new `slink` function with minimum amount of code needed to pass the
test.
| Muriithi Frederick Muriuki |
2021-07-22 | Get shortest distance from two lists/tuples of member coordinates...* gn3/computations/slink.py: add code to ensure new test passes
* tests/unit/computations/test_slink.py: new test
This one is a little weird: from
https://github.com/genenetwork/genenetwork1/blob/master/web/webqtl/heatmap/slink.py#L57-L63
It gets rid of the last coordinates in both the lists of the member
coordinates, and uses the remaining coordinates to find the shortest
members.
For example, given the following member coordinates:
- i=[0,1,2] and j=[5,7,9], it uses [0,1] and [5,7]
- i=[3,6,1] and j=[7,13], it uses [3,6] and [7]
to find the shortest distances.
I (fredmanglis) am not sure why it does it this way, since I'd have expected
it to use all the coordinates, however, since at this time we need to retain
bug-compatibility with the older code, I have done it as it is done in the
old code.
I also add a statement to raise an exception in the case where i and j are
not lists of integers, or integers
| Muriithi Frederick Muriuki |
2021-07-22 | Test for shortest distance between members in a list and coordinate...Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/clustering.gmi
* gn3/computations/slink.py: add code to pass new test
* tests/unit/computations/test_slink.py: new test
Given a list of members in a group, and a coordinate for a member in the
same group, find the distance of the closest member from the given
coordinate in the group.
| Muriithi Frederick Muriuki |
2021-07-22 | Check that given list and both coordinates, we get shortest distance...* gn3/computations/slink.py: Add code to compute the distance given the
coordinate of both members on the parent list/tuple
* tests/unit/computations/test_slink.py:
* Change the name of the tests to more closely correspond to the business
requirement the test is checking for
* Update the comments to indicate some more things that might need to be
done in the future
| Muriithi Frederick Muriuki |
2021-07-22 | Check that all distances are positive or zero...Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/clustering.gmi
* gn3/computations/slink.py: check that all distances between the 'somethings'
are all either zero or positive.
* tests/unit/computations/test_slink.py:
* Remove data with all distances positive or zero, since it would fail the
test
* Change the expected message to more closely correspond to the business
logic
| Muriithi Frederick Muriuki |
2021-07-22 | Check that distance from A to B is same as from B to A...Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/clustering.gmi
* gn3/computations/slink.py: check that the distance from child A to B is the
same as distance from child B to A. If not, throw an exception.
* tests/unit/computations/test_slink.py:
* Change the name of the test to more closely correspond to the business
logic being tested.
* Update the data in a separate test such that it does not error out due to
failing to fulfill the expectations of separate requirement.
- pass tests
- Rename test
- Fix errors: distances same both directions
| Muriithi Frederick Muriuki |
2021-07-22 | Check that child distance from itself is zero...Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/clustering.gmi
* gn3/computations/slink.py: Check that a child's distance from itself is
zero. If not, throw an exception.
The children lists are a list of distances of "something" from other
"somethings". There is still some need to establish what those "somethings"
are, so that the test names can reflect the ideas that are actually being
tested for.
* tests/unit/computations/test_slink.py: Change the name of the test so that
it more closely corresponds to the business logic it is actually testing,
and not the mechanics of testing the idea.
| Muriithi Frederick Muriuki |
2021-07-21 | Extract tests from code in GN1...Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/clustering.gmi
* gn3/computations/slink.py: Add dummy `nearest' function
* tests/unit/computations/test_slink.py: Add some tests
This commit adds tests to try and reproduce the working of the `nearest'
function in:
https://github.com/genenetwork/genenetwork1/blob/master/web/webqtl/heatmap/slink.py
This commit might not yet have extracted all the expected behaviour of the
`nearest' function, and therefore, there is a possibility of a later commit
augmenting the work in this commit.
| Muriithi Frederick Muriuki |
2021-07-20 | Add test for code to move over from GN1...Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/clustering.gmi
* .gitignore: ignore emacs temporary files
* gn3/computations/correlations2.py: add a dummy function
* tests/unit/computations/test_correlation.py: add unit tests for the function
As part of the move of the clustering and heatmap code over from GN1 to GN3,
this commit begins by providing some unit tests for the correlation function
used to ensure that the implementation that is built up here corresponds,
and produces the same results as the original.
This tests and the function might change in the new system, but for now, we
try and maintain bug-to-bug compatibility.
| Muriithi Frederick Muriuki |
2021-06-29 | Add a diffing function...For now the diff function uses the Linux tool "diff" to generate the diff
since it is efficient and straightforward.
* gn3/computations/diff.py (generate_diff): New function.
* tests/unit/computations/test_diff.py: Test cases for ☝🏾.
| BonfaceKilz |
2021-06-20 | merge main | Alexander Kabui |
2021-06-20 | make requested changes to biweight | Alexander Kabui |
2021-06-18 | Fixed another error where test_generate_rqtl_command didn't include the filen... | zsloan |
2021-06-18 | Fixed file type from json to csv for test_generate_rqtl_command | zsloan |
2021-06-18 | Fixed test_rqtl.py to include Rscript in the command | zsloan |
2021-06-18 | fix index error (#16) | Alexander Kabui |
2021-06-14 | add biweight r script and tests | Alexander Kabui |
2021-05-30 | fix index error (#16) | Alexander Kabui |
2021-05-18 | Added unit test for computations/rqtl.py | zsloan |
2021-05-15 | index lit tuple result | Alexander Kabui |
2021-05-12 | delete unused functions | Alexander Kabui |
2021-05-12 | rename lit_correlation_for_trait_list to lit_correlation_for_trait | Alexander Kabui |
2021-05-12 | rename tissue_correlation_for_trait_list with tissue_correlation_for_trait | Alexander Kabui |
2021-05-12 | rename p_val ro tissue_p_value for tissue_results | Alexander Kabui |
2021-05-08 | Fix typo | BonfaceKilz |
2021-05-08 | Add extra procedure for parsing a genotype file...* gn3/computations/parsers.py (parse_genofile): New procedure.
* tests/unit/computations/test_parsers.py: New test files for above.
| BonfaceKilz |
2021-05-03 | minor fixes for tiss correlation tests and naming | Alexander Kabui |
2021-05-03 | replace database with conn | Alexander Kabui |
2021-05-02 | delete dataset and trait files | Alexander Kabui |
2021-04-18 | refactor:return trait_name in corr_results | Alexander Kabui |
2021-04-17 | ad pep8 formatting | Alexander Kabui |
2021-04-17 | refactor tests for lit | Alexander Kabui |
2021-04-15 | optimization for sample correlation | Alexander Kabui |
2021-04-12 | fix tests for lit correlation | Alexander Kabui |
2021-04-12 | fix merge conflict | Alexander Kabui |
2021-04-12 | Integrate correlation API...- add new api for gn2-gn3 sample r integration
- delete map for sample list to values
- add db util file
- add python msql-client dependency
- add db for fetching lit correlation results
- add unittests for db utils
- add tests for db_utils
- modify api for fetching lit correlation results
- refactor Mock Database Connector and unittests
- add sql url parser
- add SQL URI env variable
- refactor code for db utils
- modify return data for lit correlation
- refactor tissue correlation endpoint
- replace db_instance with conn | Alexander Kabui |
2021-04-06 | fix Docstrings | Alexander Kabui |
2021-04-06 | delete unnecessary functions and comments | Alexander Kabui |
2021-04-05 | fix for fetching dataset traits data | Alexander Kabui |
2021-04-04 | refactor code for trait data...modify unittest and integration tests for datasets
| Alexander Kabui |
2021-04-03 | add tests for getting trait data | Alexander Kabui |
2021-03-31 | add fetch dataset strain id,strain name and unittests | Alexander Kabui |
2021-03-31 | add datasets functions and endpoints | Alexander Kabui |
2021-03-30 | refactor retrieve trait sample data and tests | Alexander Kabui |