Princeton-LSI-ResearchComputing / tracebase

Mouse Metabolite Tracing Data Repository for the Rabinowitz Lab
MIT License
4 stars 1 forks source link

Updated loaders and tests to never set polarity or scan range in MSRunSample placeholder records #966

Closed hepcat72 closed 1 month ago

hepcat72 commented 1 month ago

Summary Change Description

Now that we enforce a single placeholder record per sequence and sample, this PR adds a check in the clean() method to ensure polarity, mz_min, and mz_max are never set when ms_data_file is null.

A bunch of tests and the various loaders had to be updated. The load scripts no longer have command line options for these values and the json/yaml schema was updated, as well as the lcms_metadata files and code.

The edits to the accucor loading code and lcms metadata code were somewhat heavy-handed and sub optimal, because those scripts are due for a refactor. The only goal was a working intermediate state that would not set those values. For example, the code that holds defaults for these values still exists, but they all only ever contain None values now.

Affected Issues/Pull Requests

Review Notes

See comments in-line.

Checklist

This pull request will be merged once the following requirements are met. The author and/or reviewers should uncheck any unmet requirements:

hepcat72 commented 1 month ago

Just pushed a rebase. Waiting for tests to pass.

hepcat72 commented 1 month ago

@lparsons - Just a heads up. I went a little crazy with merging PRs. I merged this one before thinking about the necessary changes to the rabinowitz repo. If you continue your loading tomorrow, I suggest using the disable_msruns_loader_cache branch until I update the stuff in rabinowitz. It was rebased on main just before this merge, so it will have all the PRs I merged today except this one.