Age | Commit message (Expand) | Author |
2021-09-16 | pylint fixes | Alexander Kabui |
2021-09-16 | Add WGCNA_SCRIT env to settings | Alexander Kabui |
2021-09-16 | init tests for wgcna | Alexander Kabui |
2021-09-16 | pass user input to call script | Alexander Kabui |
2021-09-16 | Intergrate the heatmap generation with the API...Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/clustering.gmi
* Intergrate the heatmap generation code on the /api/heatmaps/clustered
endpoint.
The endpoint should take a json query of the form:
{"traits_names": [ ... ] }
where the "traits_name" value is a list of the full names of traits.
A sample query to the endpoint could be something like the following:
curl -i -X POST "http://localhost:8080/api/heatmaps/clustered" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"traits_names": [
"UCLA_BXDBXH_CARTILAGE_V2::ILM103710672",
"UCLA_BXDBXH_CARTILAGE_V2::ILM2260338",
"UCLA_BXDBXH_CARTILAGE_V2::ILM3140576",
"UCLA_BXDBXH_CARTILAGE_V2::ILM5670577",
"UCLA_BXDBXH_CARTILAGE_V2::ILM2070121",
"UCLA_BXDBXH_CARTILAGE_V2::ILM103990541",
"UCLA_BXDBXH_CARTILAGE_V2::ILM1190722",
"UCLA_BXDBXH_CARTILAGE_V2::ILM6590722",
"UCLA_BXDBXH_CARTILAGE_V2::ILM4200064",
"UCLA_BXDBXH_CARTILAGE_V2::ILM3140463"
]
}'
which should respond with a json response containing the raw binary string
for the png format and possibly another for the svg format.
| Frederick Muriuki Muriithi |
2021-09-16 | Fix minor bugs...Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/clustering.gmi
* Fix a few minor bugs left over from the integration of code from the
proof-of-concept code.
| Frederick Muriuki Muriithi |
2021-09-16 | Add missing imports...Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/clustering.gmi
* Add missing imports that are needed in the code.
| Frederick Muriuki Muriithi |
2021-09-16 | run cmd and add exception handler | Alexander Kabui |
2021-09-16 | register wgcna blueprint | Alexander Kabui |
2021-09-16 | add initial endpoint for wgcna | Alexander Kabui |
2021-09-16 | add function to compose and run wgcna script | Alexander Kabui |
2021-09-16 | function to parse form data and write to json file | Alexander Kabui |
2021-09-15 | initial test file for wgcna | Alexander Kabui |
2021-09-15 | init wgcna file to run r script and preprocess data | Alexander Kabui |
2021-09-15 | remove golang package causing build failure | Alexander Kabui |
2021-09-15 | Update entry-point function for heatmap generation...Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/clustering.gmi
* Copy over code from the proof-of-concept implementation and clean it up a
little for the entry-point function for heatmap generation via the API
| Frederick Muriuki Muriithi |
2021-09-15 | Generate heatmaps in a single plot...Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/clustering.gmi
* Add a function to generate the heatmaps for each chromosome into a single
plot.
| Frederick Muriuki Muriithi |
2021-09-15 | Process data into format usable by heatmaps...* gn3/heatmaps.py: implement `process_traits_data_for_heatmap` function, that
will process the data into a form usable by heatmaps.
* tests/unit/test_heatmaps.py: check that the function processes the data into
the correct form.
| Frederick Muriuki Muriithi |
2021-09-15 | Integrate get_lsr_from_chr function...* gn3/heatmaps.py: copy over function
* tests/unit/test_heatmaps.py: add tests
Copy function over from proof of concept and add some tests to ensure it
works as expected.
| Frederick Muriuki Muriithi |
2021-09-15 | Reorganise modules...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.
| Frederick Muriuki Muriithi |
2021-09-15 | Fix format of arguments and expected values...* tests/unit/computations/test_heatmap.py: ordering is not longer provided as
a list of tuples; the ordering values are just a list of numbers now. This
commit updates the test to take this into consideration.
* tests/unit/computations/test_qtlreaper.py: the 'Chr' value if numeric, is
represented by an actual number, not a string. This commit updates the code
to take this into consideration.
| Frederick Muriuki Muriithi |
2021-09-15 | Add missing sample file for tests...* tests/unit/db/data/genotypes/genotype_sample1.geno: new file
Add a missing sample data file needed for unit tests.
| Frederick Muriuki Muriithi |
2021-09-15 | minor fixes | Alexander Kabui |
2021-09-15 | rename variables && delete debugs | Alexander Kabui |
2021-09-15 | Fetch IMAGE_DIR env and add img location | Alexander Kabui |
2021-09-14 | remove debug statements | Alexander Kabui |
2021-09-14 | function to generate rand str for image | Alexander Kabui |
2021-09-14 | plot plotDendroAndColors and generate png | Alexander Kabui |
2021-09-14 | construct gene co-expression network & module detection | Alexander Kabui |
2021-09-14 | compute the softthreshhold | Alexander Kabui |
2021-09-14 | Checking data for excessive missing values | Alexander Kabui |
2021-09-14 | load the required data for analysis | Alexander Kabui |
2021-09-14 | init commit for wgcna script | Alexander Kabui |
2021-09-09 | Update proof-of-concept code...* Add individual heatmaps
* Add dendograms
* Merge multiple heatmaps to single plot
Updated the proof of concept code to provide a sample of what is needed to
generate the appropriate heatmaps.
To generate the sample heatmaps, one can run something like:
env SQL_URI="mysql://webqtlout:webqtlout@127.0.0.1:3306/db_webqtl" \
python3 qtlfilesexport.py
assuming that the database can be accessed at 127.0.0.1:3306
| Muriithi Frederick Muriuki |
2021-09-08 | Ease search for traits and chromosomes...Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/clustering.gmi
* Return a dict of values rather than list for the traits and chromosomes to
ease searching through the data.
| Muriithi Frederick Muriuki |
2021-09-08 | Parse Chr value as int where possible...* To ease sorting of data by numerical order down the line, sort the "Chr"
values by numerical order.
| Muriithi Frederick Muriuki |
2021-09-08 | Remove extraneous text to ease sorting...Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/clustering.gmi
* Change the id from 'T<n>' to simply '<n>' to ease sorting of the trait
results by numerical order rather than string order.
| Muriithi Frederick Muriuki |
2021-09-08 | Fix the traits order computations for clustering...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.
| Muriithi Frederick Muriuki |
2021-09-06 | Provide function to organise parsed QTLReaper results...* 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.
| Muriithi Frederick Muriuki |
2021-09-06 | Leave "Chr" value as string when parsing...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.
| Muriithi Frederick Muriuki |
2021-09-06 | Handle type-coercion exceptions...* 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.
| Muriithi Frederick Muriuki |
2021-09-06 | Find nearest marker...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.
| Muriithi Frederick Muriuki |
2021-09-03 | Add covarstruct as a possible keyword for the rqtl_wrapper.R script (not inte... | zsloan |
2021-09-01 | Fix linting and typing issues...Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/clustering.gmi
| Muriithi Frederick Muriuki |
2021-09-01 | Built top-level genotype file parsing function...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.
| Muriithi Frederick Muriuki |
2021-09-01 | Parse data lines into markers...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.
| Muriithi Frederick Muriuki |
2021-09-01 | Parse the genotype file's data header...* 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.
| Muriithi Frederick Muriuki |
2021-09-01 | Implement parsing of genotype labels...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.
| Muriithi Frederick Muriuki |
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 |