Age | Commit message (Collapse) | Author |
|
* gn3/computations/qtlreaper.py: Provide a function to organise the results by
trait for easier use down the line.
* tests/unit/computations/test_qtlreaper.py: provide a test to ensure that the
organising function works as expected.
|
|
Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/clustering.gmi
* The "Chr" value seems to be mostly a name of some sort, despite it being,
seemingly an number. This commit parses the "Chr" value as a string.
It also updates the tests to expec a string, rather than a number for "Chr"
values.
|
|
* gn3/computations/qtlreaper.py: handle exceptions
Sometimes, the values being parsed are plain strings and cannot be cast to
the float types. This commit handles that by casting only those values that
can be cast to float, and returning the others as strings.
|
|
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.
|
|
Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/clustering.gmi
|
|
Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/clustering.gmi
* gn3/db/genotypes.py: parse genotype files
* tests/unit/db/test_genotypes.py: test parsing is correct
Add the overall genotype files parsing function and tests to check that the
parsing works as expected.
|
|
Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/clustering.gmi
* gn3/db/genotypes.py: parse data lines in file to genetic markers.
* tests/unit/db/test_genotypes.py: test that parsing works.
Add some tests to check that the parsing of the markers works as expected,
and add the code to actually parse the markers.
|
|
* gn3/db/genotypes.py: parse data header
* tests/unit/db/test_genotypes.py: check that header's parse works correctly.
Add tests to check that the parser works as expected. Add code to implement
the parsing and pass the tests.
|
|
Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/clustering.gmi
* gn3/db/genotypes.py: parse genotype labels
* tests/unit/db/test_genotypes.py: test that genotype labels are parsed
correctly
As part of parsing the genotype files into usable python data structures,
this commit adds a function to parse the label lines (beginning with "@")
into the appropriate values.
|
|
* 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
* The number of the arguments to the function changed, and so the tests for
the function needed to be updated.
|
|
Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/clustering.gmi
* gn3/computations/qtlreaper.py: pass output files
* tests/unit/computations/data/qtlreaper/main_output_sample.txt: sample test
data
* tests/unit/computations/data/qtlreaper/permu_output_sample.txt: sample test
data
* tests/unit/computations/test_qtlreaper.py: add tests
Add code to parse the QTLReaper output data files.
|
|
heatmap_generation
|
|
Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/clustering.gmi
* gn3/computations/qtlreaper.py: Fix some bugs
* qtlfilesexport.py: Test out running rust-qtlreaper
Test out the qtlreaper interface code and fix some bugs caught in the
process.
|
|
Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/clustering.gmi
* gn3/db/genotypes.py: New module
* gn3/settings.py: Add new configuration variable
* qtlfilesexport.py: Test out new code
Add a module containing functions dealing with the genotype files.
Add a configuration variable to point to the location of the genotype files.
|
|
* Provide documentation on downloading and using the genotype files.
|
|
* README.md: update header: Traits ==> Trait
* gn3/computations/qtlreaper.py: update header: Traits ==> Trait
* qtlfilesexport.py: Choose only BXD strains
Rename the first column header from "Traits" to "Trait" to correspond with
what `rust-qtlreaper` expects.
Choose only the BXD strains for the proof-of-concept example - this helped
bring out the fact that the traits file SHOULD NOT contain a strain column
for a strain that does not exist in the genotype file in consideration.
If the traits file has a strain column which does not exist in the genotype
file, then `rust-qtlreaper` fails with a panic, since, from what I can tell,
it tries to get a value from the genotype file for the non-existent strain,
which results to a `None` type. Subsequent attempts at running an operation
on the `None` type lead to the panic.
|
|
Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/clustering.gmi
* Remove empty line at the end of the traits file
|
|
|
|
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
* gn3/heatmaps/heatmaps.py: document format of the traits file
To assist future developers, and development of the system, this commit
documents some of the hard-won knowledge about the operation of the system
to ease future development of the system.
The documentation, if good, might also help with future onboarding of new
developers to the system.
|
|
|
|
|
|
stratified permutations + covariates
|
|
Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/clustering.gmi
* As part of the development effort, this commit provides a proof-of-concept
as a reference for generating the traits data file.
It might be useful for verifying that the functions that are called are
working as is expected.
|
|
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
* guix.scm: (gn packages golang) ==> (gnu packages golang)
csvdiff has moved to upstream guix and been removed from latest
guix-bioinformatics.
|
|
Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/clustering.gmi
* guix.scm: new dependency (rust-qtlreaper)
|
|
heatmap_generation
|
|
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.
|
|
* fix key error for (*tissue_cor) tissue correlation
* update tests for tissue correlation
* rename speed_compute to fast_compute
* pep8 formatting
|
|
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.
|
|
* Fix linting errors that do not change the function of the code.
|
|
Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/clustering.gmi
* Since the `slink` function assigns values to the `listcopy` variable and its
children, this commit ensures that the sequence is a list to allow for the
assignment.
If the child-sequence is a tuple, that would lead to an exception.
|
|
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.
|
|
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
* Call the `cursor.fetchone()` function to get results. Without the
parenthesis, the code was trying to use the function itself as the results,
which was a bug, and would lead to failure.
|
|
Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/clustering.gmi
* gn3/heatmaps/heatmaps.py: Initialise the module with some code to be used to
test out plotly features on the command-line.
* guix.scm: Add `python-plotly` and `python-pandas` as dependencies.
|
|
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.
|
|
* Fix linting errors that do not change the function of the code.
|
|
Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/clustering.gmi
* Since the `slink` function assigns values to the `listcopy` variable and its
children, this commit ensures that the sequence is a list to allow for the
assignment.
If the child-sequence is a tuple, that would lead to an exception.
|
|
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.
|
|
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
* Call the `cursor.fetchone()` function to get results. Without the
parenthesis, the code was trying to use the function itself as the results,
which was a bug, and would lead to failure.
|