SPARC-FAIR-Codeathon / sparc-me

A python tool to explore, enhance, and expand SPARC datasets and their descriptions
Apache License 2.0
7 stars 6 forks source link

Tutorial 4 update #53

Closed PrasadBabarendaGamage closed 2 years ago

PrasadBabarendaGamage commented 2 years ago

Hi @LIN810116, Hoping if you could please replace the last section of tutorial 4 starting with "Extend metadata - adding a new field", with the following:

# [markdown] Extending the metadata to include Data Use Ontology tags.
# [markdown] The Data Use Ontology (DUO) allows to semantically tag datasets with restrictions about their usage, making them discoverable automatically based on the authorization level of users, or intended usage. For further information, please see [this link](https://github.com/EBISPOT/DUO).

# [markdown] The original SDS schema will first be extended to include a DUO tags as shown below.

category = "dataset_description"
element = "Data use limitation"
dataset.add_element(category=category, element=element)
dataset.save(save_dir=save_dir.joinpath("template"))
# Update schema
property = {
    "type": "string",
    "required": "Y",
    "description": "The (GA4GH) Data Use Ontology (DUO) terms for describing data use conditions of this dataset.",
    "Example": "GRU"
}
schema.add_property(property_name=element, property=property)
schema.save(save_dir=save_dir.joinpath("schema"), category="dataset_description")

# [markdown] sparc-me can then be used to programmatically set the "Data use limitation" field for and SDS dataset that uses this new schema e.g. with a value of GRU, which indicates that the data is available for future general research use. An example of how SDS metadata fields can be set is described in Tutorial 2.

I've indicated above what sections bit need to be in markdown cells.

Thanks!

chinchien-lin commented 2 years ago

links to #59

chinchien-lin commented 2 years ago

Resolved by #59. only small changes so merged without requesting a review