Age | Commit message (Collapse) | Author |
|
Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/clustering.gmi
* The heatmap generation does not fall cleanly within the computations or db
modules. This commit moves it to the higher level gn3 module.
|
|
Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/clustering.gmi
* gn3/computations/heatmap.py: Fix ordering function
* tests/unit/computations/test_heatmap.py: update test
The order of the traits is important for the clustering algorithm, since the
clustering seems to use the distance of one trait from another to determine
how to order them.
This commit also gets rid of the xoffset argument that is not important to
the ordering, and was used in the older GN1 to determine how to draw the
clustering lines.
|
|
Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/clustering.gmi
* Migrate the `web.webqtl.heatmap.Heatmap.getNearestMarker` function in GN1 to
GN3.
|
|
* 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.
|
|
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
|
|
|
|
Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/clustering.gmi
* gn3/computations/heatmap.py: move `generate_traits_file` function to new
module
* gn3/computations/qtlreaper.py: new module to interface with the
`rust-qtlreaper` utility.
* gn3/settings.py: Provide setting for the path to the `rust-qtlreaper`
utility
* qtlfilesexport.py: Move `random_string` function to new module. Update to
use functions in new module.
Provide a module with functions to be used to interface with
`rust-qtlreaper`. This module essentially contains all the functions that
are needed to build the files needed for, and to run the qtlreaper utility.
|
|
Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/clustering.gmi
* Seeing as not every requirement/feature has been migrated over at this time,
this commit just provides all the intermediate data representations in the
final return of the function for later use down the line.
|
|
Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/clustering.gmi
* Provide a function to export the given strains and traits data into a traits
file for use with `rust-qtlreaper`.
|
|
Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/clustering.gmi
* Rework the strains and values retrieval function to more closely correspond
to the working of the original code in GN1
|
|
Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/clustering.gmi
* gn3/computations/heatmap.py: Use `Sequence` type not `Iterator` type
|
|
Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/clustering.gmi
* gn3/computations/heatmap.py: add function to get strains with values
* tests/unit/computations/test_heatmap.py: new tests
Add function to get the strains whose values are not `None` from the
`trait_data` object passed in.
This migrates
https://github.com/genenetwork/genenetwork1/blob/master/web/webqtl/heatmap/Heatmap.py#L215-221
into a separate function that can handle that and be tested independently of
any other code.
|
|
Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/clustering.gmi
* gn3/computations/heatmap.py: implement new ordering function
* tests/unit/computations/test_heatmap.py: add new tests
Implement the ordering function to migrate the setup of the `neworder`
variable from GN1 to GN3.
This migration is incomplete, since there is dependence on the return from
the `web.webqtl.heatmap.Heatmap.draw` function in form of the `d_1` variable
in some of the paths.
The thing is, this `d_1` variable, and the `xoffset` variable seem to be
used for laying out things on the drawn heatmap, and might actually end up
not being needed for the new system using plotly, which has other ways of
laying out things on the drawing.
For now though, this commit "shims" the presence of these values until when
the use of these variables is confirmed as present or absent in the new GN3
system.
|
|
Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/clustering.gmi
* gn3/computations/heatmap.py: Fix clustering bugs
* tests/unit/computations/test_heatmap.py: Add new tests. Fix linting issues.
Test and fix the clustering function.
|
|
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
|
|
Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/clustering.gmi
* Fix some errors caught by the linter.
|
|
Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/clustering.gmi
* Import some missing definitions.
|
|
Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/clustering.gmi
* Add code to compute and organise the data that will be used to draw the
final heatmap.
This varies significantly in how it works from the original, but it still
tries to retain the general flow of data.
|