aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-03-17Lint some test filesBonfaceKilz
2022-03-17Fix failing testBonfaceKilz
2022-03-17Create a db connection correctlyBonfaceKilz
* wqflask/maintenance/quantile_normalize.py: Fix how the cursor is created.
2022-03-17Skip unittestsBonfaceKilz
These tests touch on core data-structures in gn2; and there's a chance that refactoring said data-structures may break many things.
2022-03-17Replace "g.db" object with a proper database connectionBonfaceKilz
* wqflask/tests/unit/wqflask/api/test_correlation.py: Use proper database connection instead of the db connection attached at "g.db". * wqflask/tests/unit/wqflask/snp_browser/test_snp_browser.py: Ditto. * wqflask/wqflask/api/correlation.py: Ditto. * wqflask/wqflask/snp_browser/snp_browser.py: Ditto.
2022-03-17Delete dead codeBonfaceKilz
2022-03-17Delete unused "logger" importBonfaceKilz
* wqflask/wqflask/snp_browser/snp_browser.py: Remove "getLogger".
2022-03-17Document how to run testsFrederick Muriuki Muriithi
Add documentation on how to run the tests - this was no clear from the existing documentation up to this point.
2022-03-17Provide path to default settings/configuration file as a fallbackFrederick Muriuki Muriithi
If the GN2_SETTINGS environment variable, is for some reason, not set, and the application actually ever tries to get a connection to the database, then use the default settings/configuration file.
2022-03-16Remove unnecessary print statementzsloan
2022-03-16Replace top comment with docstringzsloan
2022-03-16Add code generating the new genotype fileszsloan
Also made a large number of other fixes that proved necessary during testing
2022-03-16Generate JSON file for target genotypeszsloan
Also store parents/type metadata from source genofiles
2022-03-16Fix the way target/source genofiles were being processed + some other changeszsloan
- I was mixing up source/target genofiles previously; the JSON file is for the source genofiles - references to the app context are removed in favor of just taking input as arguments or environment variables - Updated example commands
2022-03-16Add function for mapping strain to sample pos + begin creating ↵zsloan
generate_new_genofiles function
2022-03-16Add function for getting strain name from sample namezsloan
2022-03-16Change EOL from CRLF to LFzsloan
2022-03-16Minor changes/bug fixeszsloan
- Removed some unused code - Strip marker genotype to avoid newline character at end - Convert zip to list for marker genotypes - Add typing to group_samples - Rename strain_genofile to source_genofile
2022-03-16Add in-progress gen_ind_genofiles.pyzsloan
gen_ind_genofiles.py is a command line script to generate genotype files for groups of individuals/samples, taking a source .geno or .json file and a target 'dummy' .geno file as input
2022-03-16Delete unused issue templatesBonfaceKilz
* .github/ISSUE_TEMPLATE/: Delete this directory.
2022-03-16Delete GitHub CI runnerBonfaceKilz
We have moved to Laminar. See: <https://penguin2.genenetwork.org/> * .github/workflows/main.yml: Delete it.
2022-03-14instantiate plotly objectAlexander Kabui
2022-03-14add custom configs for scree plotAlexander Kabui
2022-03-14add scree plot dataAlexander Kabui
2022-03-14add scree plot layoutAlexander Kabui
2022-03-14add plotlyAlexander Kabui
2022-03-14init scree plot templateAlexander Kabui
2022-03-14Warn when someone uploads a csv file that has columns not in the dbBonfaceKilz
* wqflask/wqflask/metadata_edits.py: Import "extract_invalid_csv_headers" and "get_allowable_sampledata_headers". (display_phenotype_metadata): Pass the allowable headers to the template. (update_phenotype): If a user uploads data with a column header that's not in the db, don't upload the file, and send a warning message. * wqflask/wqflask/templates/edit_phenotype.html: List the allowable headers in the template.
2022-03-14Remove button for "Edit Privileges"BonfaceKilz
This is a WIP.
2022-03-14Reword link text for downloading csv sample dataBonfaceKilz
2022-03-12Use "database_connection" within a context-managerBonfaceKilz
Using "database_connection" within a context-manager makes sure that the SQL connection that is created is closed. * wqflask/wqflask/metadata_edits.py (display_probeset_metadata): Connect to the db within a context-manager. (update_phenotype): Ditto. (update_probeset): Ditto. (approve_data): Ditto.
2022-03-12Remove unused importsBonfaceKilz
2022-03-12Close a connection after it's useBonfaceKilz
* wqflask/wqflask/metadata_edits.py (approve_data): Explicitly close a connection after it is used.
2022-03-12Use updated `update_sample_data` from gn3BonfaceKilz
2022-03-12Use updated `delete_sample_data` from gn3BonfaceKilz
2022-03-12Use updated `insert_sample_data` from gn3BonfaceKilz
2022-03-12Fix broken f-stringsBonfaceKilz
* wqflask/wqflask/metadata_edits.py (approve_data): Update query strings.
2022-03-12Replace `db.traits` with `db.sample_data`BonfaceKilz
* wqflask/wqflask/metadata_edits.py: Replace imports that start with `db.traits` with `db.sample_data`.
2022-03-12display_diffs.html: Display the csv columns header in the diffs pageBonfaceKilz
2022-03-12metadata_edits.py: Use `csv_diff` and `remove_insignificant_edits`BonfaceKilz
* wqflask/wqflask/metadata_edits (update_phenotype): The logic was for generating csv_diff and removing insignificant values in the edits was moved to gn3; use those functions instead of the manual way.
2022-03-12metadata_edits.py: Use "create_dirs_if_not_exists" for creating dirsBonfaceKilz
2022-03-12doc: Update query for fetching case attribute dataBonfaceKilz
* doc/database.org: Also join on StrainId for case-attribute data.
2022-03-11Add updated version of script for adding new expression sample datazsloan
2022-03-11Fix error with calling database_connection in gen_dropdown_menuzsloan
2022-03-11Add imports to database.py for 4a7e2c1602ed82aabd7d04953067ba49cb1cebffzsloan
2022-03-11Break dependence on `wqflask.utility.tools` to fix circular importsFrederick Muriuki Muriithi
Remove the `wqflask.utility.tools` and retrieve the `SQL_URI` setting directly from the environment or the settings file. This breaks the circular imports and makes the `wqflask.database` module standalone. Move the `parse_db_url` function to the `wqflask.database` module, where it is more sensible to be.
2022-03-10Use context manager with database connectionFrederick Muriuki Muriithi
Use the `with` context manager with database connections and cursors to ensure that they are closed once they are no longer needed. Where it was not feasible to use the `with` context manager without a huge refactor/rewrite, the cursors and connections are closed manually.
2022-03-10Use one-step process for the partial correlations computationspartial_corr_ui_reworkFrederick Muriuki Muriithi
This commit gets rid of the multi-step partial correlations process replacing it with a single-step process. Summary of changes: * wqflask/wqflask/collect.py: Add function to format the trait details in a format that is usable for the partial correlations system. * wqflask/wqflask/database.py: Provide function to create a connection to the database * wqflask/wqflask/partial_correlations_views.py: Rework the code to enable the one-step process for the partial correlations computations * wqflask/wqflask/static/new/javascript/partial_correlations.js: Get rid of code that supported the multi-step process * wqflask/wqflask/templates/collections/view.html: Remove inconsistent UI elements. Attach traits info in a form usable for the partial correlations * wqflask/wqflask/templates/partial_correlations.html: delete html template * wqflask/wqflask/templates/partial_correlations/pcorrs_error.html: provide a html template to display errors in the partial correlations computation process * wqflask/wqflask/templates/partial_correlations/pcorrs_poll_results.html: UI template to provide user with feedback as the computations continue in the background * wqflask/wqflask/templates/partial_correlations/pcorrs_results_presentation.html: UI template to present the results of successful computation * wqflask/wqflask/templates/partial_correlations/pcorrs_select_operations.html: UI template to trigger the partial correlations computations * wqflask/wqflask/templates/tool_buttons.html: Add the partial correlations button to the template to ensure a consistent look and feel
2022-03-07Fix/caching (#679)Alexander Kabui
* unlink file for JSONDecodeError * fix for avoiding caching empty dicts * fix for checking null dicts
2022-02-28Fix fulltext search for certain searcheszsloan
Hyphens in fulltext searches were causing problems, but a recent commit I made to fix the issue apparently had some side effects for other types of searches, in addition to make such searches someewhat slower Apparently the issue wasn't just the hyphens, but also the text to either side of the hyphen being lower than the minimum word length (which is either 2 or 3 for us, can't remember). To try and address this, I did a regular expression check for a pattern with text of <3 legnth to either side of a hyphen, and when that's the case I add quotes from the search term plus an asterisk, which seeems to be necessary to get it to not treat the hyphen as a delimiter and to correctly detect the search term