Repository navigation
feat(assignments): Assignment Quickcheck of sample assignments - #1579
Merged
Merged
Conversation
Validate 13C/1H assignments of a sample against nmrshiftdb2 predictions through the new NMRKit /validate/assignments endpoint. - Read assignments from the sample's NMRium workspace, Mnova SDF exports, NMReDATA files or manual rows into one AssignmentSet - Queue checks per sample, store the report with marks and verdict, and flag checks as stale when the NMRium assignments change - Let authors confirm the assignments, with a required note when the check disagrees - Public API for a sample's latest check, synchronous public Quickcheck endpoint (rate limited) and /quickcheck page - Quickcheck panel in the upload Assignments step and a badge on the public sample page
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## development #1579 +/- ##
=================================================
+ Coverage 81.03% 81.34% +0.30%
- Complexity 4916 5141 +225
=================================================
Files 315 331 +16
Lines 17985 18575 +590
=================================================
+ Hits 14575 15110 +535
- Misses 3410 3465 +55
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
NishaSharma14
approved these changes
Oct 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds an Assignment Quickcheck to nmrXiv. Authors check their ¹³C / ¹H assignments against predicted shifts for the sample structure. They get a score per nucleus, an atom-by-atom shift comparison and an assignment check, and can confirm the assignments. The confirmation is shown on the published sample.
The prediction and comparison happen in NMRKit: depends on NFDI4Chem/nmrkit#147 (
POST /latest/validate/assignments). The UI wording is engine-neutral, with no nmrshiftdb2 references, so the prediction engine can later be replaced by nmrXiv's own without changing the UI.What chemists get
<file-name-slug>-quickcheck-nmrxiv-<YYYY-MM-DD_HH-mm>.pdf.Inputs
CHEMICAL_SHIFTStagsNMREDATA_ASSIGNMENT,NMREDATA_1D_*)The check runs per sample (study), not per dataset. It needs the ¹³C and ¹H of one compound, which live in separate datasets, and the assignment UI and NMRium already work per sample.
Changes
assignment_validationstable,AssignmentValidationmodel, factory, andAssignmentValidationStatus/AssignmentSourceenums;Study::assignmentValidations()and the latest / latest-completed relations.App\Support\Nmr\AssignmentshasAssignmentSet, the NMRium, Mnova SDF and NMReDATA readers, a resolver and the NMRKit client.ValidateStudyAssignmentsjob:GET|POST dashboard/studies/{study}/assignment-validationandPOST …/{validation}/confirm(editors only)GET api/v1/samples/{study}/assignment-validation(public samples only)POST api/v1/quickcheck(synchronous, nothing stored; limited to 6 per minute and 200 per day per IP)GET /quickcheck(public page)QuickcheckReportplus the helpersUtils/quickcheck.js(labelled CXSMILES depiction and highlighting),Utils/quickcheckTerms.js(shared chemist-facing terms) andUtils/quickcheckReportDocument.js(the PDF).SampleQuickcheckPanelin the upload Assignments step (polls while queued),QuickcheckBadgeon the public sample page, andPages/Quickcheck.vuewith "Check other assignments" and "Print / save as PDF" side by side.nmrxiv.assignment_validation.*. The URL defaults toNMRKIT_URL+/latest/validate/assignments; override it withASSIGNMENT_VALIDATION_URL.Notes
mark_is_approximatein the API).Tests
php artisan test tests/Unit/Support/Nmr/Assignments tests/Feature/Study/StudyAssignmentValidationTest.php tests/Feature/API/AssignmentQuickcheckApiTest.php: 26 passed.npm run buildand ESLint pass.Deploy
php artisan migrate