Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(core-types): add annotation component types #225

Merged
merged 7 commits into from
Jun 11, 2024

Conversation

sanjayankur31
Copy link
Member

Fixes #224

@sanjayankur31
Copy link
Member Author

This is what an example annotation looks like:

            <rdf:RDF
              xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
              xmlns:bqbiol="http://biomodels.net/biology-qualifiers/"
              xmlns:dc="http://purl.org/dc/elements/1.1/"
              xmlns:dcterms="http://purl.org/dc/terms/"
              xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
              xmlns:scoro="http://purl.org/spar/scoro"
              xmlns:bqmodel="http://biomodels.net/model-qualifiers/"
              xmlns:collex="http://www.collex.org/schema"
              xmlns:prism="http://prismstandard.org/namespaces/basic/2.0/"
            >
              <rdf:Description rdf:about="http://omex-library.org/ArchiveName.omex/model.nml">
                <dc:title>None</dc:title>
                <dcterms:abstract>lol, something nice</dcterms:abstract>
                <dc:description>A tests model</dc:description>
                <prism:keyword>something</prism:keyword>
                <prism:keyword>and something</prism:keyword>
                <collex:thumbnail rdf:resource="http://omex-library.org/ArchiveName.omex/lol.png"/>
                <bqbiol:hasTaxon>
                  <rdf:Bag>
                    <rdf:li rdf:resource="http://identifiers.org/taxonomy/4896"/>
                  </rdf:Bag>
                </bqbiol:hasTaxon>
                <bqbiol:encodes>
                  <rdf:Bag>
                    <rdf:li rdf:resource="http://identifiers.org/GO:0009653"/>
                  </rdf:Bag>
                </bqbiol:encodes>
                <bqbiol:encodes>
                  <rdf:Bag>
                    <rdf:li rdf:resource="http://identifiers.org/kegg:ko04111"/>
                  </rdf:Bag>
                </bqbiol:encodes>
                <dc:source>
                  <rdf:Bag>
                    <rdf:li rdf:resource="https://github.com/lala"/>
                  </rdf:Bag>
                </dc:source>
                <bqmodel:isDerivedFrom>
                  <rdf:Bag>
                    <rdf:li rdf:resource="http://omex-library.org/BioSim0001.omex/model.xml"/>
                  </rdf:Bag>
                </bqmodel:isDerivedFrom>
                <rdfs:seeAlso>
                  <rdf:Bag>
                    <rdf:li rdf:resource="http://link.com"/>
                  </rdf:Bag>
                </rdfs:seeAlso>
                <dcterms:references>
                  <rdf:Bag>
                    <rdf:li rdf:resource="http://reference.com"/>
                  </rdf:Bag>
                </dcterms:references>
                <dc:creator>
                  <rdf:Bag>
                    <rdf:li>John Doe</rdf:li>
                    <rdf:li>https://someurl.com</rdf:li>
                    <rdf:li>https://anotherurl</rdf:li>
                  </rdf:Bag>
                </dc:creator>
                <dc:creator>
                  <rdf:Bag>
                    <rdf:li>Jane Smith</rdf:li>
                  </rdf:Bag>
                </dc:creator>
                <dc:contributor>
                  <rdf:Bag>
                    <rdf:li>Jane Smith</rdf:li>
                  </rdf:Bag>
                </dc:contributor>
                <dc:contributor>
                  <rdf:Bag>
                    <rdf:li>Jane Doe</rdf:li>
                  </rdf:Bag>
                </dc:contributor>
                <dc:contributor>
                  <rdf:Bag>
                    <rdf:li>John Smith</rdf:li>
                  </rdf:Bag>
                </dc:contributor>
                <dcterms:license>
                  <rdf:Bag>
                    <rdf:li rdf:resource="CC0"/>
                  </rdf:Bag>
                </dcterms:license>
                <scoro:funder>
                  <rdf:Bag>
                    <rdf:li rdf:resource="http://afundingbody.org"/>
                  </rdf:Bag>
                </scoro:funder>
                <dcterms:created>
                  <rdf:Description>
                    <dcterms:W3CDTF>2024-04-18</dcterms:W3CDTF>
                  </rdf:Description>
                </dcterms:created>
                <dcterms:modified>
                  <rdf:Description>
                    <dcterms:W3CDTF>2024-04-18</dcterms:W3CDTF>
                    <dcterms:W3CDTF>2024-04-19</dcterms:W3CDTF>
                  </rdf:Description>
                </dcterms:modified>
              </rdf:Description>
            </rdf:RDF>

Here's the pyneuroml code that will create it:

https://github.com/NeuroML/pyNeuroML/blob/development/pyneuroml/annotations.py#L90

Not entirely sure if these bits should also be in bags:

                <dc:title>None</dc:title>
                <dcterms:abstract>lol, something nice</dcterms:abstract>
                <dc:description>A tests model</dc:description>
                <prism:keyword>something</prism:keyword>
                <prism:keyword>and something</prism:keyword>
                <collex:thumbnail rdf:resource="http://omex-library.org/ArchiveName.omex/lol.png"/>

@sanjayankur31 sanjayankur31 added T: enhancement Type: enhancement C: NeuroML2 standard Component: NeuroML 2 standard labels Apr 29, 2024
@sanjayankur31
Copy link
Member Author

Update: any entry that can have multiple values goes into a "bag" in the MIRIAM way of doing things. So that's what we'll follow. RDF seems to be quite flexible when it comes to how information is represented, so this is the convention we'll use for reading/writing NeuroML.

This is required for NeuroML/pyNeuroML#354

Not sure why this is given that Child is meant to mean "one and only
one" and Children mean "one or more". But, using Children causes tests
to fail in org.neuroml.export etc. when building jNeuroML.

This needs looking into.

See also #54
sanjayankur31 added a commit to sanjayankur31/243446 that referenced this pull request May 7, 2024
Requires jNeuroML with these changes so that new annotations are known
to LEMS: NeuroML/NeuroML2#225
@pgleeson pgleeson merged commit 9044162 into development Jun 11, 2024
13 checks passed
@sanjayankur31 sanjayankur31 deleted the feat/annotations branch September 17, 2024 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: NeuroML2 standard Component: NeuroML 2 standard T: enhancement Type: enhancement
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

LEMS does not like RDF metadata (while using pynml-channelanalysis)?
2 participants