Age | Commit message (Collapse) | Author |
|
|
|
Change the code to fetch the group name by the dataset ID, since according to
usage[1] of the `retrieve_group_name` function, the value passed in is the
`dataset_id` and not the `group_id`.
Change the name from `retrieve_group_name` to `retrieve_phenotype_group_name`
to more clearly indicate that this function concerns itself with the groups
that relate to phenotypes.
[1](https://github.com/genenetwork/genenetwork2/blob/1bbb0430732b7fa5102d7dcbda80ebda252f5424/wqflask/wqflask/metadata_edits.py)
|
|
Remove extra colon (:) at the end of the name that was leading to the number
of cases not being presented as expected.
|
|
The `cursor.fetchone()` call that was used as the condition to the `if` was
called outside of the context manager, and therefore would always give a
non-truthy value at best and an inconsistent result at worst.
This commit gets the value before the context manager has exited and stores it
for later use.
|
|
Retrieve the configuration values from the application object, not from the
environment. We are assured of having the configuration values set in the
application - we do not have that assurance for the environment.
|
|
* gn3/api/metadata.py: Import get_genotype_metadata.
(genotype): New end-point.
* gn3/db/rdf.py (get_phenotype_metadata): New function.
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
|
|
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
|
|
* gn3/api/metadata.py: Import get_phenotype_metadata.
(phenotype): New end-point.
* gn3/db/rdf.py (get_phenotype_metadata): New function.
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
|
|
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
|
|
* gn3/api/metadata.py: Import get_publication_metadata
(publication): New endpoint.
* gn3/db/rdf.py (get_dataset_metadata): New function.
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
|
|
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
|
|
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
|
|
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
|
|
* gn3/db/rdf.py (sparql_query): Parse CONSTRUCTS and SELECTS
differently.
(strip_url): Rename to ...
(get_url_local_name): ... this.
(get_dataset_metadata): Fetch extra fields in RDF.
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
|
|
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
|
|
* gn3/db/rdf.py: Importh pymonad.Nothing.
(get_dataset_metadata): Replace SELECT with CONSTRUCT.
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
|
|
* gn3/db/rdf.py: Import unquote and urlparse.
(strip_url): New function.
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
|
|
|
|
|
|
|
|
|
|
Also set default value for os.environ.get("GENENETWORK_FILES")
|
|
|
|
initialized (if the genofile was empty, for example)
|
|
Initialize samplelist variable
|
|
|
|
This is necessary in order to allow for editing the values of samples that don't currently have values
|
|
There's probably a better way to fix this query (it was previously returning each sample twice), but DISTINCT was the easiest way I could come up with
|
|
|
|
|
|
after the recent changes to the DB
|
|
|
|
|
|
|
|
* gn3/api/metadata.py: Import Template, sparql_query and RDF_PREFIXES.
(get_genewiki_entries): New endpoint.
* gn3/db/rdf.py: Add new constant for storing rdf prefixes.
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
|
|
* gn3/db/sample_data.py: Remove 're' import.
(get_trait_csv_sample_data): Remove fetching sample data.
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
|
|
|
|
|
|
* gn3/db/matrix.py (get_total_versions, get_nth_matrix,
get_current_matrix): Open lmdb in readonly mode.
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
|
|
* gn3/db/rdf.py (get_dataset_metadata): New function.
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
|
|
* gn3/db/matrix.py (get_nth_matrix): New function.
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
|
|
* gn3/db/matrix.py (get_total_versions): New function.
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
|
|
* gn3/db/matrix.py: New file.
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
|
|
Rename the `gn3.random` module to gn3.chancy to avoid conflicts with Python's
`random` module.
* gn3/random.py -> gn3/chancy.py: rename module
* gn3/commands.py: update import
* gn3/computations/partial_correlations.py: update import
* gn3/computations/qtlreaper.py: update import
* gn3/computations/rust_correlation.py: update import
* gn3/db/correlations.py: update import
* gn3/db/traits.py: update import
* gn3/heatmaps.py: update import
* tests/integration/conftest.py: update import
|
|
|
|
* gn3/api/metadata.py (jsonify_dataset_metadata): Rewrite metadata
end-point to use a dataset's name instead of it's accession_id.
* gn3/db/rdf.py (get_dataset_metadata): Replace accession_id with
name. Use one single RDF query instead of multiple queries.
|
|
* gn3/db/rdf.py: Delete gn3.setting.SPARQL_ENDPOINT import.
(sparql_query): Inject SPARQLWrapper.
(get_dataset_metadata): Ditto.
|
|
* gn3/api/general.py: Replace gn3.db.datasets import with gn3.db.rdf.
(dataset_metadata) <jsonify>: Replace datasets.dataset_metadata with
rdf.get_dataset_metadata.
* gn3/db/datasets.py: Remove unused imports.
(sparql_query, dataset_metadata): Delete.
* gn3/db/rdf.py: (sparql_query, get_dataset_metadata): New functions.
|
|
* gn3/db/sample_data.py (get_trait_csv_sample_data): Pass __query
directly to cursor.execute. Rename value to _value in for loop to
make mypy pass.
* gn3/db_utils.py (Connection): Add class docstring.
(Connection.cursor): Add docstring.
* mypy.ini: Add an entry for xapian.
|
|
* gn3/db/__init__.py (update): Delete conn.commit() and conn.rollback()
(insert): Ditto.
* gn3/db/case_attributes.py (insert_case_attribute_audit): Ditto.
(reject_case_attribute): Ditto.
(approve_case_attribute): Ditto.
* gn3/db/sample_data.py (update_sample_data): Ditto.
(delete_sample_data): Ditto.
(insert_sample_data): Ditto.
|