Git Product home page Git Product logo

Comments (5)

mwalzer avatar mwalzer commented on August 16, 2024

So, it would be nice to have a definite description in the cv term definition, but still a somewhat self-explanatory and insta-parsable content in the cv term representation. My biggest concern here would be units because having them together with the values makes good for a lot of validation. Not all our values have a unit, but we still might want to enforce unit on every value and accept these cases where we have to put "no-unit" there and then

from mzqc.

mwalzer avatar mwalzer commented on August 16, 2024

I think there are more than the two options if you consider term definition + units and current schema, then you could choose
Sub element:

[Term]
id: QC:xxxxxxxx
name: Interval Acquisition range m/z
def: "TODO: description of this NIST metric group" [PSI:QC]
is_a: QC:3000016 ! QC metric
is_a: QC:xxxxxxxx ! tuple with unit 

[Schema]
<qualityParameter ID="METRIC001" cvRef="PSI-QC-CV" accession="QC:xxxxxxxx" name="Interval Acquisition range m/z"> 
    <content cvRef="PSI-QC-CV" accession="n - tuple" value='2'>{'MS:1000043':[400,1500]}</content>
</qualityParameter>

Explicit units:

[Term]
id: QC:xxxxxxxx
name: Interval Acquisition range m/z
def: "TODO: description of this NIST metric group" [PSI:QC]
is_a: QC:3000016 ! QC metric
is_a: QC:xxxxxxxx ! tuple 

[Schema]
<qualityParameter ID="METRIC001" cvRef="PSI-QC-CV" accession="QC:xxxxxxxx" name="Interval Acquisition range m/z" value="{'MS:1000043':[400,1500]}" /> 

Implicit 1:

[Term]
id: QC:xxxxxxxx
name: Interval Acquisition range m/z
def: "TODO: description of this NIST metric group" [PSI:QC]
is_a: QC:3000016 ! QC metric
is_a: QC:xxxxxxxx ! tuple with unit MS:1000043

[Schema]
<qualityParameter ID="METRIC001" cvRef="PSI-QC-CV" accession="QC:xxxxxxxx" name="Interval Acquisition range m/z" value="{[400,1500]}" /> 

Implicit 2:

[Term]
id: QC:xxxxxxxx
name: Interval Acquisition range m/z
def: "TODO: description of this NIST metric group" [PSI:QC]
is_a: QC:3000016 ! QC metric
is_a: QC:xxxxxxxx ! unit MS:1000043

[Schema]
<qualityParameter ID="METRIC001" cvRef="PSI-QC-CV" accession="QC:xxxxxxxx" name="Interval Acquisition range m/z" value="{"1": 400, "2": 1500]}" /> 

from mzqc.

mwalzer avatar mwalzer commented on August 16, 2024

I guess what speaks against the implicit ones is that a good practice is keeping the attribute value short. Also, we would most likely run into (differing) length limitations, based on the XML parsing tool used -although the xml standard does not impose any length limitations afaik.

from mzqc.

bittremieux avatar bittremieux commented on August 16, 2024

I'd definitely prefer a list over key-value pairs, certainly if the keys are just indices as in the "Implicit 2" example.

Explicitly specifying the units seems like good practice to me. Most units in mass spec are standardized, so usually there shouldn't be any confusion, but still, sometimes people like to do things differently. Some people are just contrarian. 🙄 In that case explicitly specifying a unit could save us from a lot of trouble.

I'm not sure what the advantage of the sub element approach would be? This just adds extra complexity but wouldn't really make validation or other things easier as far as I can discern right now.

from mzqc.

bittremieux avatar bittremieux commented on August 16, 2024

XML-JSON no longer relevant after change to full JSON. See #45 for the discussion on how to store multiple values in JSON.

from mzqc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.