empty strings in contextual metadata field values are now converted into None
if a contextual metadata field always have value None for all samples, it is now dropped from the export. this improves UI on Galaxy end, as the blank fields won't appear in drop-down for NMDS plot
filename of Zip downloads are now '.biom.zip', this should make it clearer what the underlying filetype is
the galaxy filetype 'biom1' is now set when pushing the data to Galaxy
performance: had a look at why downloads of large BIOM files took a long time to start returning data. matching_otus was doing an unnecessary cross-join; using the approach from matching_samples with a subquery to apply contextual filters, and eliding the subquery when possible, greatly improved performance. the previous query required postgres to spool out temporary files before returning any results (hence the long pause); the new query doesn't and commences returning results immediatelyr
Note that a flake8 has been run as well (hence some of the whitespace changes, apologies).
Addresses feedback from the last sprint review:
matching_otus
was doing an unnecessary cross-join; using the approach frommatching_samples
with a subquery to apply contextual filters, and eliding the subquery when possible, greatly improved performance. the previous query required postgres to spool out temporary files before returning any results (hence the long pause); the new query doesn't and commences returning results immediatelyrNote that a flake8 has been run as well (hence some of the whitespace changes, apologies).