Beispiel #1
0
se = SchemaExplorer()
"""
######################################################
# first add the classes w/o dependencies to the schema
######################################################
"""
'''
adding children classes to the Biosample class in biothing
'''

class_req_add = get_class("BiosampleType",\
                              description = "The type of source material for the biosample",\
                              subclass_of = ["Biosample"],
                              requires_value = True
                          )
se.update_class(class_req_add)


class_req_add = get_class("BiosampleID",\
                              description = "Unique identifier for the biosample source material",\
                              subclass_of = ["Biosample"]
                          )
se.update_class(class_req_add)
'''
adding children nodes of BiosampleType
'''
class_req_add = get_class("Donor",\
                              description = "A role which inheres in an organism or part thereof from which any part including cell, organ or tissue is removed with the intention that the donated part will be placed into another organism and/or cultured in vitro.<OBI_1110087>",\
                              subclass_of = ["BiosampleType"]
                          )
se.update_class(class_req_add)  # note: use update_class to add a new class
                   view=True)
print("Done")

print("Adding psychENCODE nodes...")
'''
# add classes matching psychENCODE manifest specifications to biothings base ontology
# for now we are hard-coding definitions; however, in the future we should have URI for each term and definition used in a dictionary
# e.g. see https://schema.org/docs/schema_org_rdfa.html
'''

# please check if these class already exist in the masterSage schema
new_class = get_class("DataEntity",\
          description = "A data derived entity and attributes.",\
          subclass_of = "EvidenceType"\
)
se.update_class(new_class)


new_class = get_class("Data",\
          description = "A piece of data (e.g. from an assay).",\
          subclass_of = "DataEntity"\
)
se.update_class(new_class)

new_class = get_class("BehavioralEntity",\
          description = "Entity and attributes derived from a Behavior",\
          subclass_of = "Thing"\
)
se.update_class(new_class)