Open jcmatese opened 1 year ago
IMO, it should be H
and the mass_number
should be 2
. (I'd always thought that the regular form of any element had the same number of neutrons as protons, but I had to look up that hydrogen's regular form doesn't have a neutron because it's too small to accommodate it, so the mass number of deuterium is not 3 as I would have assumed - it's 2.)
All the other elements we keep are represented as isotopes using their mass number alone, e.g. 14C
as opposed to the regular 12C
. Hydrogen is somewhat of a special case, as noted above, but I feel like handling the special case differently would cause some people to input 2D
and some to input 2H
, which would make it less searchable, so if we stick with 1 representation, we avoid complexity.
Maybe we should accept D
in the datafile, but the loader should change it to H
in the database? Perhaps we should make similar accommodations in search and display(/templates)... In either case, there should be 1 representation in the DB. I know that the advanced search uses a select list for elements/labels and in that context, we could have the list item label display deuterium and tritium, etc in parens.
I would agree that we should have one representation in the database, but we should recognize the D
if that is what (El-)Maven exports. It might be nice to make some accommodations within search too, but that is lower priority that the loading code, imo.
I would agree that we should have one representation in the database, but we should recognize the
D
if that is what (El-)Maven exports. It might be nice to make some accommodations within search too, but that is lower priority that the loading code, imo.
Not sure the reason for the "but". It sounds like you completely agree with me. And I agree that the interface representation is lower priority.
FEATURE REQUEST
Inspiration
Recently saw some datafiles where the labeled element was
D
(as in deuterium)Currently, we are expecting
H
, and if the data file is not edited by hand, it throws an error.Description
Accept
D
in the data file, but store anH
the database.Alternatives
None
Dependencies
This issue cannot be started until the completion of the following issue(s)/ pull request(s):
issue_number_1
pull_request_1
Comment
Making some accommodations within search would be nice, but will be part of a separate, lower priority, effort.
ISSUE OWNER SECTION
Assumptions
Limitations
Affected Components
https://github.com/Princeton-LSI-ResearchComputing/tracebase/blob/80e8c3659951b3bca050ef3bb86d3694e537f6e5/DataRepo/models/element_label.py#L5-L20
https://github.com/Princeton-LSI-ResearchComputing/tracebase/blob/80e8c3659951b3bca050ef3bb86d3694e537f6e5/DataRepo/utils/accucor_data_loader.py#L80-L93
https://github.com/Princeton-LSI-ResearchComputing/tracebase/blob/80e8c3659951b3bca050ef3bb86d3694e537f6e5/DataRepo/utils/accucor_data_loader.py#L230-L233
Requirements
DESIGN
Interface Change description
None provided
Code Change Description
None provided
Tests