eastgenomics / Genetics_Ark

Django source code for Genetics Ark and associated apps
1 stars 0 forks source link

Handle sp prefix #86

Closed corbin-chris closed 1 month ago

corbin-chris commented 1 month ago

Changes

To close #84 and #85 Added 'restart: always' to every container in docker-compose.yml Changed the IGV tool, so that when a user tries to search with a term starting with 'SP-' (note hyphen not underscore), Genetics Ark will remove the 'SP-' before continuing

Test set up

Make web Docker container On development environment, run most recent versions of 'main' Docker containers, plus the changed web container Check website is up and working

Tests

Test that a vague search matching many results, will work PASS

Searched for sample '100' and then 'SP-100' for BAMs = get the same number of results Searched for sample '100' and then 'SP-100' for CNV samples = get the same number of results

This is a pass as SP- is omitted from search. Previously this would've given 'sample not found' errors. Note that the results message says '# files found for ' instead of '# files found for '. We can't decide whether one strategy is better than the other, and changing it would double the work involved, so in the interest of time we're leaving it.

Test that a non-existent number throws errors in each case PASS

Search for a fake number, BAM - 'Sample not found' error Search for a fake number, CNV - 'Sample not found' error Search for a fake number starting with SP-, BAM - 'Sample (with SP- removed) not found' error Search for a fake number starting with SP-, CNV - 'Sample (with SP- removed) not found' error

This is a pass. SP- is removed for the search, but we leave it in for the error message shown to the scientist.

Test that SP- search results behave normally when you click on them PASS

The result is opened, and can be viewed in IGV as usual. It says 'Search term:' with the SP- omitted underneath.


This change is Reviewable

pep8speaks commented 1 month ago

Hello @corbin-chris! Thanks for opening this PR. We checked the lines you've touched for PEP 8 issues, and found:

Line 167:1: E302 expected 2 blank lines, found 1 Line 317:80: E501 line too long (86 > 79 characters)