Age | Commit message (Expand) | Author |
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-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 | 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-09 | Add functions for updating groups | 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 | 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 | 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 |
2021-11-04 | Move the function to computations module...Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/partial-correlations.gmi
* The function `batch_computed_tissue_correlation` is a pure computations
function with no expressions accessing the database, as far as I can tell,
therefore, this commit moves the function over to the
gn3.computations.partial_correlations module that holds the pure computation
functions.
| Frederick Muriuki Muriithi |
2021-11-04 | Move the partial_correlations module to gn3.computations...* Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/partial-correlations.gmi
* Move the partial_correlations.py module to the gn3.computations module,
since it contains the computations for partial correlations.
| Frederick Muriuki Muriithi |
2021-11-04 | Remove if clauses: replace with dict...Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/partial-correlations.gmi
* Remove the if clauses to simplify the code flow: use a dictionary of queries
and select the appropriate query from the dictionary instead.
| Frederick Muriuki Muriithi |
2021-11-04 | Stub out `batch_computed_tissue_correlation` function...Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/partial-correlations.gmi
* Stub out `batch_computed_tissue_correlation` function to be used in
implementing the function down the line.
| Frederick Muriuki Muriithi |
2021-11-04 | Complete `correlations_of_all_tissue_traits`...Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/partial-correlations.gmi
* Complete the implementation of the `correlations_of_all_tissue_traits`
function by providing a call to a non-implemented function.
| Frederick Muriuki Muriithi |
2021-11-04 | Implement `fetch_gene_symbol_tissue_value_dict_for_trait`...Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/partial-correlations.gmi
* Implement `fetch_gene_symbol_tissue_value_dict_for_trait` function which is
a migration of the
`web.webqtl.correlation.correlationFunction.getGeneSymbolTissueValueDictForTrait`
function in GeneNetwork1.
| Frederick Muriuki Muriithi |
2021-11-01 | Fix mypy issues | BonfaceKilz |
2021-11-01 | Fix pylint issues in gn3.authentication | BonfaceKilz |
2021-11-01 | Add auth module | BonfaceKilz |
2021-10-29 | Feature/biweight reimplementation (#47)...* add biweight reimplementation with pingouin
* delete biweight scripts and tests
* add python-pingouin to guix file
* delete biweight paths
* mypy fix:pingouin mising imports
* pep8 formatting && pylint fixes | Alexander Kabui |
2021-10-25 | Start implementation of `fetch_tissue_correlations` and dependencies...* compare_tissue_correlation_absolute_values: New function. Complete. Used for
sorting of tissue correlation values
* fetch_symbol_value_pair_dict: New function. Complete. Maps gene symbols to
tissue expression data
* fetch_gene_symbol_tissue_value_dict: New function. Complete. Wrapper for
`gn3.db.correlations.fetch_symbol_value_pair_dict` function
* fetch_tissue_probeset_xref_info: New function. Complete. Retrieves the
Probeset XRef information for tissues from the database.
* correlations_of_all_tissue_traits: Stub. Dependencies not completed yet.
* build_temporary_tissue_correlations_table: Stub. Dependencies not completed
yet.
* fetch_tissue_correlations: New function. Incomplete. This function calls (a)
stub(s) function(s) which is/are under development still.
| Frederick Muriuki Muriithi |
2021-10-25 | Implement `partition_all` function...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_all)
* tests/unit/test_data_helpers.py: tests for function
`gn3.data_helpers.partition_all`
As part of migrating some functions that access the database, this commit
extracts generic processes that can be accomplished on data, and implements
the `partition_all` function, that is equivalent to Clojure's
`partition-all` function.
| Frederick Muriuki Muriithi |
2021-10-25 | Merge branch 'main' of github.com:genenetwork/genenetwork3 into partial-corre... | Frederick Muriuki Muriithi |
2021-10-25 | mypy:Incompatible types in assignment fix | Alexander Kabui |
2021-10-25 | mypy fix for none stdout | Alexander Kabui |
2021-10-25 | pylint and pep8 formatting | Alexander Kabui |
2021-10-25 | fix unittests | Alexander Kabui |
2021-10-25 | minor modification for emitting data:add namespaces | Alexander Kabui |
2021-10-25 | pep8 formatting,pylint fixes | Alexander Kabui |
2021-10-25 | add socket obj and emit process | Alexander Kabui |
2021-10-25 | fix issues serializing byte string | Alexander Kabui |
2021-10-25 | rename key to image_data | Alexander Kabui |
2021-10-25 | add function to process images | Alexander Kabui |
2021-10-25 | add function to capture output in real time | Alexander Kabui |
2021-10-25 | Implement `fetch_literature_correlations` and depedencies...Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/partial-correlations.gmi
* Migrate:
* `web.webqtl.correlation.CorrelationPage.getTempLiteratureTable`
* `web.webqtl.correlation.CorrelationPage.fetchLitCorrelations`
from GeneNetwork1.
The first function creates and populates a temporary table with the
literature correlations data.
The second function uses the data in the newly created temporary table to
link the trait with the correlation value.
| Frederick Muriuki Muriithi |