Age | Commit message (Collapse) | Author |
|
|
|
|
|
In excel, "\n\n" is replaced with ",,,," during upload.
|
|
* Fix linting errors like:
- Unused variables
- Undeclared variable errors (mostly caused by typos, and wrong names)
- Missing documentation strings for functions
etc.
|
|
Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/partial-correlations.gmi
* Migrate the
`web.webqtl.correlation.PartialCorrDBPage.getPartialCorrelationsNormal`
function in GN1.
* Remove function obsoleted by newer implementation of the code
|
|
Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/partial-correlations.gmi
* Document functions for posterity.
|
|
Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/partial-correlations.gmi
* Add some tests for the query builders to ensure that the queries are built
up correctly.
|
|
Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/partial-correlations.gmi
* Migrate the
`web.webqtl.correlation.CorrelationPage.fetchAllDatabaseData` function from
GN1 to GN3.
|
|
Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/partial-correlations.gmi
* To make the code more composable down the line, make the database connection
argument the first argument for functions that access the database, since
they will always require the connection.
|
|
Partial correlations
|
|
* README.md, guix.scm: Replace guix environment with guix shell.
|
|
* guix.scm: Do not recommend GUIX_PACKAGE_PATH.
|
|
* guix.scm: Remove gemma specific instructions.
|
|
* guix.scm (genenetwork3)[propagated-inputs]: Sort.
|
|
* guix.scm (genenetwork3)[propagated-inputs]: Remove python-plotly.
|
|
Notes:
https://github.com/genenetwork/genenetwork3/pull/56#issuecomment-973798918
* As mentioned in the notes, rather than rounding to an arbitrary number of
decimal places, it is a much better practice to use approximate comparisons
of floats for the tests.
|
|
Notes:
https://github.com/genenetwork/genenetwork3/pull/56#issuecomment-973798918
* From the notes above, the assert_allclose is a better function for figuring
out what failed, unlike the allclose that simply just returns a True/False
value.
This commit restores the use of the assert_allclose function, and then
disables the linter error due to the fact that there is no use of the `self`
keyword.
|
|
Notes:
https://github.com/genenetwork/genenetwork3/pull/56#issuecomment-973798918
* Pingouin 0.3.12 is buggy, as noted in the comment noted above. One of the
bugs is that the Spearman correlations might give the wrong results under
some circumstances.
This commit removes the pinned version so that the system gets the latest
version for testing.
|
|
Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/partial-correlations.gmi
* Fix some obvious linting errors and remove obsolete code
|
|
Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/partial-correlations.gmi
* Replace the code that was in the process of being migrated from R in
GeneNetwork1 with calls to pingouin functions that achieve the same thing.
Since the functions in this case are computing correlations and partial
correlations, rather than having home-rolled functions to do that, this
commit makes use of the tried and tested pingouin functions.
This avoids complicating our code with edge-case checks, and leverages the
performance optimisations done in pingouin.
|
|
* gn3/settings.py (SQLALCHEMY_TRACK_MODIFICATIONS): Delete variable.
* guix.scm (genenetwork3)[propagated-inputs]: Remove python-sqlalchemy-stubs.
* setup.py: Remove sqlalchemy-stubs from install_requires.
|
|
* 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.
|
|
partial-correlations
|
|
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.
|
|
* 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.
|
|
* gn3/authentication.py (get_user_info_by_key): Reformat so that condition is
on a single line.
|
|
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.
|
|
partial-correlations
|
|
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.
|
|
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.
|
|
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.
|
|
* gn3/computations/correlations2.py: Remove import of reduce from functools.
(__items_with_values): Reimplement using list comprehension.
|
|
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.
|
|
|
|
|
|
|
|
|
|
|
|
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.
|
|
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.
|
|
|
|
* guix.scm (genenetwork3)[propagated-inputs]: Remove python-flask-cors.
|
|
* guix.scm: Indent use-modules better, the more conventional way.
|
|
Semantic versioning begins at 0.1.0, not 0.0.1.
* guix.scm: Set genenetwork package version to 0.1.0.
|
|
* guix.scm: Name source checkout in the store to "genenetwork3-checkout".
|
|
* 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.
|
|
|
|
partial-correlations
|
|
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
|
|
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.
|