Reply – Can't add annotation property
Your Name
Subject
Message
or Cancel
In Reply To
Can't add annotation property
— by Citlalli Citlalli
Hi,

I'm trying to generate dynamically some classes along with their labels with the following script:

for clas in small_OGG.classes():
    for Class in small_GO.classes():
        if labelOGG in clas.label  and str(Class) == GO_ID:
            with GOnamespace:
                New_Class = types.new_class(str(clas).split('.')[1], (Class,))
                New_Class.label = [label for label in clas.label]

 
I can generate the new ontology with the new cross ontology subclasses, but label is not generated. From the documentation I understood that adding labels to a new class is done by means of a list of strings, which is what I was trying, but it doesn't work. Is there anything I'm not understanding?