Age | Commit message (Collapse) | Author |
|
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.
|
|
* 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
|
|
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.
|
|
* 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
|
|
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
|
|
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
|
|
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.
|
|
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.
|
|
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.
|
|
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 ☝🏾.
|
|
|
|
|
|
filename argument (not sure why running unit tests locally doesn't detect this)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* gn3/computations/parsers.py (parse_genofile): New procedure.
* tests/unit/computations/test_parsers.py: New test files for above.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- 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
|
|
|
|
|
|
|
|
modify unittest and integration tests for datasets
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* 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>
|
|
|
|
|