Age | Commit message (Expand) | Author |
2021-11-15 | Fix bugs in recursive partial correlations...* gn3/computations/partial_correlations.py: Remove rounding. Fix computation
of remaining covariates
*
tests/unit/computations/partial_correlations_test_data/pcor_rec_blackbox_test.txt:
reduce the number of covariates to between one (1) and three (3)
* tests/unit/computations/test_partial_correlations.py: fix some minor bugs
It turns out that the computation complexity increases exponentially, with
the number of covariates. Therefore, to get a somewhat sensible test time,
while retaining a large-ish number of tests, this commit reduces the number
of covariates to between 1 and 3.
| Frederick Muriuki Muriithi |
2021-11-15 | Merge branch 'main' of github.com:genenetwork/genenetwork3 into partial-corre... | Frederick Muriuki Muriithi |
2021-11-15 | Fix the columns in built data frame...Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/partial-correlations.gmi
* When the z value is a Sequence of sequences of values, each of the internal
sequences should form a column of its own, and not a row, as it was
originally set up to do.
| Frederick Muriuki Muriithi |
2021-11-13 | Do not shadow global symbol uuid....* gn3/authentication.py (get_groups_by_user_uid): Rename local symbol uuid to
group_uuid.
(get_user_info_by_key): Rename local symbol uuid to user_uuid.
| Arun Isaac |
2021-11-13 | Reformat condition on a single line....* gn3/authentication.py (get_user_info_by_key): Reformat so that condition is
on a single line.
| Arun Isaac |
2021-11-13 | Do not use dangerous default argument []....Default arguments get evaluated only once when the function is defined, and
are then shared across all instances of the function. If the argument is then
mutated, this can cause hard to find bugs. See
https://docs.python.org/3/tutorial/controlflow.html#default-argument-values
* gn3/authentication.py (create_group): Do not use [] as the default argument.
| Arun Isaac |
2021-11-12 | Merge branch 'main' of github.com:genenetwork/genenetwork3 into partial-corre... | Frederick Muriuki Muriithi |
2021-11-12 | Pass in parser function for flexibility...Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/partial-correlations.gmi
* To improve the usefulness of already existing code, provide the parser
function as an argument to the `parse_input_line` function.
This was found to be useful when writing code to compare the `pcor.test`
function in GN1 and the `pingouin.partial_corr` function.
The format of the data generated when getting results for the `pcor.test`
function shared a lot with that of the `pcor.rec` function, but it was
different in a few, places, and the differences were non-trivial, needing
different parsing processes.
In such a case, it was found necessary to just pass in the function to do
the actual parsing, rather than create code with the same form as the
existing one, save for the function being called.
| Frederick Muriuki Muriithi |
2021-11-11 | Remove redundant check on the Pearson correlation coefficient....The Pearson correlation coefficient always has a value between -1 and 1. So,
this check is redundant.
* gn3/heatmaps.py (cluster_traits.__compute_corr): Remove redundant check on
the Pearson correlation coefficient.
| Arun Isaac |
2021-11-11 | Reimplement correlations2.compute_correlation using pearsonr....correlations2.compute_correlation computes the Pearson correlation
coefficient. Outsource this computation to scipy.stats.pearsonr. When the
inputs are constant, the Pearson correlation coefficient does not exist and is
represented by NaN. Update the tests to reflect this.
* gn3/computations/correlations2.py: Remove import of sqrt from math.
(compute_correlation): Reimplement using scipy.stats.pearsonr.
* tests/unit/computations/test_correlation.py: Import math.
(TestCorrelation.test_compute_correlation): When inputs are constant, set
expected correlation coefficient to NaN.
| Arun Isaac |
2021-11-11 | Reimplement __items_with_values using list comprehension....* gn3/computations/correlations2.py: Remove import of reduce from functools.
(__items_with_values): Reimplement using list comprehension.
| Arun Isaac |
2021-11-11 | Compare floats approximately....Floating point numbers should only be compared approximately. Different
implementations of functions might produce slightly different results.
* tests/unit/computations/test_correlation.py: Import assert_almost_equal from
numpy.testing.
(TestCorrelation.test_compute_correlation): Compare floats using
assert_almost_equal instead of assertEqual.
* tests/unit/test_heatmaps.py: Import assert_allclose from numpy.testing.
(TestHeatmap.test_cluster_traits): Use assert_allclose instead of assertEqual.
| Arun Isaac |
2021-11-11 | pep8 formatting;update unittests | Alexander Kabui |
2021-11-11 | pylint fixes and pep8 formatting | Alexander Kabui |
2021-11-11 | fix target and base sample data order | Alexander Kabui |
2021-11-11 | fix:spawned processes memory issues | Alexander Kabui |
2021-11-11 | replace list with generators | Alexander Kabui |
2021-11-11 | Disuse absolute paths to guix....It is safe to assume that the user has correctly set up guix in their PATH.
* README.md: Disuse absolute paths to guix in command invocations.
| Arun Isaac |
2021-11-11 | Disuse GUIX_PACKAGE_PATH....guix-bioinformatics is a Guix channel that is set up by `guix pull'. There is
no need to specify it explicitly using GUIX_PACKAGE_PATH.
* README.md: Do not explicitly set GUIX_PACKAGE_PATH for any command.
| Arun Isaac |
2021-11-11 | Update PULL_REQUEST_TEMPLATE.md. | Arun Isaac |
2021-11-10 | Remove repeated input python-flask-cors....* guix.scm (genenetwork3)[propagated-inputs]: Remove python-flask-cors.
| Arun Isaac |
2021-11-10 | Indent guix.scm use-modules better....* guix.scm: Indent use-modules better, the more conventional way.
| Arun Isaac |
2021-11-10 | Set version to 0.1.0....Semantic versioning begins at 0.1.0, not 0.0.1.
* guix.scm: Set genenetwork package version to 0.1.0.
| Arun Isaac |
2021-11-10 | Name source checkout in the store....* guix.scm: Name source checkout in the store to "genenetwork3-checkout".
| Arun Isaac |
2021-11-10 | Use git-predicate in guix.scm....* guix.scm: Do not import (srfi srfi-1), (srfi srfi-26), (ice-9 match), (ice-9
popen) and (ice-9 rdelim). Use git-predicate instead of git-file?.
(git-file?): Delete function.
| Arun Isaac |
2021-11-09 | Add functions for updating groups | BonfaceKilz |
2021-11-09 | Merge branch 'main' of github.com:genenetwork/genenetwork3 into partial-corre... | Frederick Muriuki Muriithi |
2021-11-09 | Implement remaining part of `partial_correlation_recursive` function...Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/partial-correlations.gmi
* gn3/computations/partial_correlations.py: implement remaining portion of
`partial_correlation_recursive` function.
* tests/unit/computations/test_partial_correlations.py: add parsing for new
data format and update tests
| Frederick Muriuki Muriithi |
2021-11-09 | Update test data: have both vectors and matrices...Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/partial-correlations.gmi
* Delete the older test data that was only testing with `z` being a vector and
replace it with data that has `z` being a vector or matrix from data item to
data item.
| Frederick Muriuki Muriithi |
2021-11-09 | Add new data processing utility...Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/partial-correlations.gmi
* gn3/data_helpers.py: New function (`partition_by`)
* tests/unit/test_data_helpers.py: Tests for new function
Add a function that approximates Clojure's `partition-by` function, to help
with processing the data in a more functional way.
| Frederick Muriuki Muriithi |
2021-11-09 | Fix bug: if three columns, ensure last is "z"...Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/partial-correlations.gmi
* Fix a bug, caught when the function is called in a recursive form, with the
"z*" columns reducing for each cycle through the recursive form.
As it was, the last cycle through the recursive form would end up with a
DataFrame with the columns "x", "y", and "z0" rather than the columns "x",
"y", "z".
This commit handles that edge case to ensure that the column name is changed
from "z0" to simply "z".
| Frederick Muriuki Muriithi |
2021-11-04 | test_partial_correlations: skip failing tests...Fix these later. I need a passing test suite so as to update the gn2 docker
image.
| BonfaceKilz |
2021-11-04 | Create blackbox tests for some functions migrated from R...Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/partial-correlations.gmi
* gn3/computations/partial_correlations.py: new stub
functions (partial_correlation_matrix, partial_correlation_recursive)
*
tests/unit/computations/partial_correlations_test_data/pcor_mat_blackbox_test.csv:
blackbox sample data and results for variance-covariance matrix method
*
tests/unit/computations/partial_correlations_test_data/pcor_rec_blackbox_test.csv:
blackbox sample data and results for recursive method
* tests/unit/computations/test_partial_correlations.py: Tests for new function
Provide some blackbox testing sample data for checking the operation of the
functions migrated from R.
| Frederick Muriuki Muriithi |
2021-11-04 | Add pingouin as a dependency...* The missing dependency is causing the check pipeline to fail.
| Frederick Muriuki Muriithi |
2021-11-04 | Stub `determine_partials`...Issue:
* Stub out `determine_partials` which is a migration of
`web.webqtl.correlation.correlationFunction.determinePartialsByR` in GN1.
The function in GN1 has R code from line 188 to line 344. This will need to
be converted over to Python.
This function will also need tests.
| Frederick Muriuki Muriithi |
2021-11-04 | Implement `compute_partial_correlations_fast`...Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/partial-correlations.gmi
* Implement `compute_partial_correlations_fast` that is a partial migration of
`web.webqtl.correlation.PartialCorrDBPage.getPartialCorrelationsFast` in
GN1.
This function will probably be reworked once the dependencies are fully
migrated.
It also needs tests to be added.
| Frederick Muriuki Muriithi |
2021-11-04 | Retrieve indices of the selected samples...Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/partial-correlations.gmi
* gn3/computations/partial_correlations.py: New
function (good_dataset_samples_indexes).
* tests/unit/computations/test_partial_correlations.py: Tests for new
function (good_dataset_samples_indexes)
Get the indices of the selected samples. This is a partial migration of the
`web.webqtl.correlation.PartialCorrDBPage.getPartialCorrelationsFast`
function in GN1.
| Frederick Muriuki Muriithi |
2021-11-04 | Fix some linting errors...Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/partial-correlations.gmi
| Frederick Muriuki Muriithi |
2021-11-04 | Parse single line from CSV file...Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/partial-correlations.gmi
* gn3/data_helpers.py: New function (parse_csv_line)
* tests/unit/test_data_helpers.py: Add tests for new function (parse_csv_line)
Add a function to parse a single line from a CSV file.
| Frederick Muriuki Muriithi |
2021-11-04 | Add some condition checking functions...Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/partial-correlations.gmi
* Add the `check_for_literature_info` and
`check_symbol_for_tissue_correlation` functions to check for the presence of
specific data.
| Frederick Muriuki Muriithi |
2021-11-04 | Explicitly round the values...* Explicitly round the values to prevent issues with the type-checker
| Frederick Muriuki Muriithi |
2021-11-04 | Specify ten (10) decimal places...Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/partial-correlations.gmi
* gn3/computations/partial_correlations.py: specify 10 decimal places
* tests/unit/computations/test_partial_correlations.py: update examples
Slight differences in python implementations, possibly hardware and
operating systems could cause the value of float (double) values to be
different in the less significant parts of the decimal places.
This commit limits the usable part of the decimals to the first 10 decimal
places for now.
| Frederick Muriuki Muriithi |
2021-11-04 | Fix linting and typing errors...Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/partial-correlations.gmi
| Frederick Muriuki Muriithi |
2021-11-04 | Rework sorting: remove `compare_tissue_correlation_absolute_values`...Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/partial-correlations.gmi
* gn3/db/correlations.py: Remove the
`compare_tissue_correlation_absolute_values` function which is no longer
needed.
| Frederick Muriuki Muriithi |
2021-11-04 | Complete `build_temporary_tissue_correlations_table`...Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/partial-correlations.gmi
* gn3/computations/partial_correlations.py: Remove comments after updating
usage of the function at call point
* gn3/db/correlations.py: Complete the implementation of the
`build_temporary_tissue_correlations_table` function
| Frederick Muriuki Muriithi |
2021-11-04 | Complete implementation of `batch_computed_tissue_correlation`...Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/partial-correlations.gmi
* Complete the implementation of the `batch_computed_tissue_correlation`
function
| Frederick Muriuki Muriithi |
2021-11-04 | Fix some linting errors...Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/partial-correlations.gmi
| Frederick Muriuki Muriithi |
2021-11-04 | Move `correlations_of_all_tissue_traits`...Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/partial-correlations.gmi
* gn3/computations/partial_correlations.py: new
function (`correlations_of_all_tissue_traits`).
* gn3/db/correlations.py: delete
function (`correlations_of_all_tissue_traits`).
Move the function to `gn3.computations.partial_correlations` module and
comment out the db-access code.
Rework it to receive, as arguments, the data it previously fetched from the
database, and add comments on future rework to get the function working
again.
| Frederick Muriuki Muriithi |
2021-11-04 | Add missing comma...Issue: https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/partial-correlations.gmi
| Frederick Muriuki Muriithi |
2021-11-04 | Implement `tissue_correlation` function...Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/partial-correlations.gmi
* gn3/computations/partial_correlations.py: New function (tissue_correlation)
* tests/unit/test_partial_correlations.py ->
tests/unit/computations/test_partial_correlations.py: Move module. Implement
tests for new function
Migrate the `cal_tissue_corr` function embedded in the
`web.webqtl.correlation.correlationFunction.batchCalTissueCorr` function in
GN1 and implement tests to ensure it works correctly.
| Frederick Muriuki Muriithi |