Search Mailing List Archives

Limit search to: Subject & Body Subject Author
Sort by: Reverse Sort
Limit to: All This Week Last Week This Month Last Month
Select Date Range     through    

[bioontology-support] Adding a group to an ontology

Michael Dorf mdorf at
Wed Dec 4 11:42:01 PST 2019

Hi Sina,

Agreed, that functionality would indeed be very useful. I’ve created a Github issue for it so that, at the very least, we keep track of it and possibly prioritize it for some near future development:

My colleague tells me that our reason for not publishing that functionality may have been intentional to prevent ontology authors to randomly assign their ontologies to special groups like “OBO Foundry”. That makes sense, though it should still be available, possibly in the “Admin” mode for VM users.

As far as removing a group from an ontology, this code should do the trick:

Remove Ontology from Group
gr_to_remove = LinkedData::Models::Group.find("TESTGROUP").first
ont = LinkedData::Models::Ontology.find("MYONT").first
groups =
groups.delete_if { |gr| === } = groups

Let me know if you require further assistance.



On Dec 4, 2019, at 9:31 AM, Madani, Sina <Sina.Madani at<mailto:Sina.Madani at>> wrote:

Thank you very much Michael

It did the trick!
Is there a way to “un-assign” a “Group” for a given ontology as well?
A graphical interface like the one used for “categories” under Edit Ontology Information panel would be very practical for “groups” as well ☺


From: Michael Dorf <mdorf at<mailto:mdorf at>>
Date: Tuesday, December 3, 2019 at 10:12 PM
To: "Madani, Sina" <Sina.Madani at<mailto:Sina.Madani at>>
Cc: "support at<mailto:support at>" <support at<mailto:support at>>
Subject: Re: [bioontology-support] Adding a group to an ontology

Hi Sina,

Thank you for contacting us. You were on the right track, it just requires a little more code. Group is an object rather than a string, and an ontology may belong to multiple groups. Here is the code for both creating a group and assigning ontology to it:

Create Group
gr ={acronym: "TESTGROUP", name: "Test Group", description: "Test Group Description", created: DateTime.parse("2019-12-03T09:26:30-08:00")})

gr = LinkedData::Models::Group.find("TESTGROUP").first

Assign Ontology to Group
ont = LinkedData::Models::Ontology.find("MYONT").first
groups =
groups << gr = groups

Let me know if this works for you.



Michael Dorf
Chief Software Architect
The National Center for Biomedical Ontology
Stanford Biomedical Informatics Research
mdorf at<mailto:mdorf at>
O: 650-723-0357
M: 650-995-4374

On Dec 3, 2019, at 4:27 PM, Madani, Sina <Sina.Madani at<mailto:Sina.Madani at>> wrote:


How can we add a “group” to an ontology in our local OntoPortal instance?
I tried below commands within ruby console but it was unsuccessful:

ontology  = LinkedData::Models::Ontology.find("MyOntology").first = ”MyGroup”

“MyGroup” group already exists in our BioPortal instance (created in ruby console)

I tried command at the end as well as but no success.


bioontology-support mailing list
bioontology-support at<mailto:bioontology-support at><>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the bioontology-support mailing list