SPARQL query in the FMA

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

SPARQL query in the FMA

Sagar Jain
Hi All,

I would like to request for help (ASAP- have a project due tomorrow). I am trying to query in the FMA on Protege using SPARQL. 

I need help understanding concepts such as: 

?x rdf:type owl:AnnotationProperty .

*What I do not understand is, how does the programmer know what options are available under the RDF and OWL prefixes. If I open RDF URI for example, I do see options such as type, property, etc but how do I know which to use. 

My current goal is to retrieve FMA IDs and Preferred names to match with annotations I have in an excel spreadsheet.
ie- Urinary Bladder, would be able to map the Preferred Name, and ID strings from FMA using SPARQL. 

Any help is greatly appreciated,
Sagar 

_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|

Re: SPARQL query in the FMA

Lorenz Buehmann
You know which to use if you know about Semantic Web, RDF, OWL, ...

Without it's not that easy to create SPARQL queries.
On 29.01.2015 23:10, Sagar Jain wrote:
Hi All,

I would like to request for help (ASAP- have a project due tomorrow). I am trying to query in the FMA on Protege using SPARQL. 

I need help understanding concepts such as: 

?x rdf:type owl:AnnotationProperty .

*What I do not understand is, how does the programmer know what options are available under the RDF and OWL prefixes. If I open RDF URI for example, I do see options such as type, property, etc but how do I know which to use. 

My current goal is to retrieve FMA IDs and Preferred names to match with annotations I have in an excel spreadsheet.
ie- Urinary Bladder, would be able to map the Preferred Name, and ID strings from FMA using SPARQL. 

Any help is greatly appreciated,
Sagar 


_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user


_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|

Re: SPARQL query in the FMA

Sagar Jain
Hi Thanks for the response Lorenz. I would like to request if you can help me with the following query

?x rdf:type owl:AnnotationProperty .

This example above gives me a list of Annotations I have currently in the FMA using Protege. How can I find out a list of additional terms I can use within the RDF: type, value, etc?

Thanks,
Sagar

On Fri, Jan 30, 2015 at 8:07 AM, Lorenz Buehmann <[hidden email]> wrote:
You know which to use if you know about Semantic Web, RDF, OWL, ...

Without it's not that easy to create SPARQL queries.

On 29.01.2015 23:10, Sagar Jain wrote:
Hi All,

I would like to request for help (ASAP- have a project due tomorrow). I am trying to query in the FMA on Protege using SPARQL. 

I need help understanding concepts such as: 

?x rdf:type owl:AnnotationProperty .

*What I do not understand is, how does the programmer know what options are available under the RDF and OWL prefixes. If I open RDF URI for example, I do see options such as type, property, etc but how do I know which to use. 

My current goal is to retrieve FMA IDs and Preferred names to match with annotations I have in an excel spreadsheet.
ie- Urinary Bladder, would be able to map the Preferred Name, and ID strings from FMA using SPARQL. 

Any help is greatly appreciated,
Sagar 


_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user


_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user



_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|

Re: SPARQL query in the FMA

Matthew Horridge-2
Administrator
Hi Sagar,

This will give you a list of annotation properties (not annotations that you have in the FMA).

Can you express what you want to query for in natural language?  If so, which version of the FMA are you using?  Can you point us to a copy of it?

Cheers,

Matthew


On 2 Feb 2015, at 09:52, Sagar Jain <[hidden email]> wrote:

Hi Thanks for the response Lorenz. I would like to request if you can help me with the following query

?x rdf:type owl:AnnotationProperty .

This example above gives me a list of Annotations I have currently in the FMA using Protege. How can I find out a list of additional terms I can use within the RDF: type, value, etc?

Thanks,
Sagar

On Fri, Jan 30, 2015 at 8:07 AM, Lorenz Buehmann <[hidden email]> wrote:
You know which to use if you know about Semantic Web, RDF, OWL, ...

Without it's not that easy to create SPARQL queries.

On 29.01.2015 23:10, Sagar Jain wrote:
Hi All,

I would like to request for help (ASAP- have a project due tomorrow). I am trying to query in the FMA on Protege using SPARQL. 

I need help understanding concepts such as: 

?x rdf:type owl:AnnotationProperty .

*What I do not understand is, how does the programmer know what options are available under the RDF and OWL prefixes. If I open RDF URI for example, I do see options such as type, property, etc but how do I know which to use. 

My current goal is to retrieve FMA IDs and Preferred names to match with annotations I have in an excel spreadsheet.
ie- Urinary Bladder, would be able to map the Preferred Name, and ID strings from FMA using SPARQL. 

Any help is greatly appreciated,
Sagar 


_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user


_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user


_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user


_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|

Re: SPARQL query in the FMA

Sagar Jain
Hi Matthew,

I have inserted the URI: http://purl.obolibrary.org/obo/fma.owl (FMA)
into: Protege v4.2

I am trying to query for: id: FMA:#### based on matching certain names in an Excel annotation spreadsheet.
ie. if annotation = 'Attribute entity', then return id: 85802.


Screenshot of this example:

Inline image 2

Please let me know if I can clarify further, thanks for your assistance.

Regards,
Sagar


On Mon, Feb 2, 2015 at 4:49 PM, Matthew Horridge <[hidden email]> wrote:
Hi Sagar,

This will give you a list of annotation properties (not annotations that you have in the FMA).

Can you express what you want to query for in natural language?  If so, which version of the FMA are you using?  Can you point us to a copy of it?

Cheers,

Matthew


On 2 Feb 2015, at 09:52, Sagar Jain <[hidden email]> wrote:

Hi Thanks for the response Lorenz. I would like to request if you can help me with the following query

?x rdf:type owl:AnnotationProperty .

This example above gives me a list of Annotations I have currently in the FMA using Protege. How can I find out a list of additional terms I can use within the RDF: type, value, etc?

Thanks,
Sagar

On Fri, Jan 30, 2015 at 8:07 AM, Lorenz Buehmann <[hidden email]> wrote:
You know which to use if you know about Semantic Web, RDF, OWL, ...

Without it's not that easy to create SPARQL queries.

On 29.01.2015 23:10, Sagar Jain wrote:
Hi All,

I would like to request for help (ASAP- have a project due tomorrow). I am trying to query in the FMA on Protege using SPARQL. 

I need help understanding concepts such as: 

?x rdf:type owl:AnnotationProperty .

*What I do not understand is, how does the programmer know what options are available under the RDF and OWL prefixes. If I open RDF URI for example, I do see options such as type, property, etc but how do I know which to use. 

My current goal is to retrieve FMA IDs and Preferred names to match with annotations I have in an excel spreadsheet.
ie- Urinary Bladder, would be able to map the Preferred Name, and ID strings from FMA using SPARQL. 

Any help is greatly appreciated,
Sagar 


_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user


_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user


_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user


_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user



_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|

Re: SPARQL query in the FMA

Ron Rudnicki

Sagar,

Try this for a list of labels with matching ID’s

 

Select ?label ?id

Where {

?class rdfs:label ?label .

?class fma:id ?id .   

}

 

You’ll need change the fma prefix to whichever one contains the id annotation property

 

and this for a match against a particular label

 

Select ?id

Where {

?class rdfs:label ?label .

FILTER (regex(?label, "attribute entity", "i")) .

?class fma:id ?id .  (again    

}

 

Again, you’ll need to  change the fma prefix to whichever one contains the id annotation property

 

From: protege-user [mailto:[hidden email]] On Behalf Of Sagar Jain
Sent: Monday, February 02, 2015 10:27 PM
To: User support for WebProtege and Protege Desktop
Subject: Re: [protege-user] SPARQL query in the FMA

 

Hi Matthew,

 

I have inserted the URI: http://purl.obolibrary.org/obo/fma.owl (FMA)

into: Protege v4.2

 

I am trying to query for: id: FMA:#### based on matching certain names in an Excel annotation spreadsheet.

ie. if annotation = 'Attribute entity', then return id: 85802.

 

 

Screenshot of this example:

 

Inline image 2

 

Please let me know if I can clarify further, thanks for your assistance.

 

Regards,

Sagar

 

 

On Mon, Feb 2, 2015 at 4:49 PM, Matthew Horridge <[hidden email]> wrote:

Hi Sagar,

 

This will give you a list of annotation properties (not annotations that you have in the FMA).

 

Can you express what you want to query for in natural language?  If so, which version of the FMA are you using?  Can you point us to a copy of it?

 

Cheers,

 

Matthew

 

 

On 2 Feb 2015, at 09:52, Sagar Jain <[hidden email]> wrote:

 

Hi Thanks for the response Lorenz. I would like to request if you can help me with the following query

 

?x rdf:type owl:AnnotationProperty .

 

This example above gives me a list of Annotations I have currently in the FMA using Protege. How can I find out a list of additional terms I can use within the RDF: type, value, etc?

 

Thanks,

Sagar

 

On Fri, Jan 30, 2015 at 8:07 AM, Lorenz Buehmann <[hidden email]> wrote:

You know which to use if you know about Semantic Web, RDF, OWL, ...

Without it's not that easy to create SPARQL queries.

 

On 29.01.2015 23:10, Sagar Jain wrote:

Hi All,

 

I would like to request for help (ASAP- have a project due tomorrow). I am trying to query in the FMA on Protege using SPARQL. 

 

I need help understanding concepts such as: 

 

?x rdf:type owl:AnnotationProperty .

 

*What I do not understand is, how does the programmer know what options are available under the RDF and OWL prefixes. If I open RDF URI for example, I do see options such as type, property, etc but how do I know which to use. 

 

My current goal is to retrieve FMA IDs and Preferred names to match with annotations I have in an excel spreadsheet.

ie- Urinary Bladder, would be able to map the Preferred Name, and ID strings from FMA using SPARQL. 

 

Any help is greatly appreciated,

Sagar 

 

_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user

 


_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user

 

_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user

 


_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user

 


_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|

Re: SPARQL query in the FMA

Sagar Jain
Hi Ron,

Thanks for your assistance. I have typed this into Protege SPARQL query tab as shown in the screenshot. The values don't appear, only variables we SELECTed for. Also for future ease of use, how can we become aware of options to call under prefixes for predicates. ie- rdfs:type, or label, etc.

Inline image 2

Thanks,
Sagar

On Tue, Feb 3, 2015 at 7:20 AM, Ron Rudnicki <[hidden email]> wrote:

Sagar,

Try this for a list of labels with matching ID’s

 

Select ?label ?id

Where {

?class rdfs:label ?label .

?class fma:id ?id .   

}

 

You’ll need change the fma prefix to whichever one contains the id annotation property

 

and this for a match against a particular label

 

Select ?id

Where {

?class rdfs:label ?label .

FILTER (regex(?label, "attribute entity", "i")) .

?class fma:id ?id .  (again    

}

 

Again, you’ll need to  change the fma prefix to whichever one contains the id annotation property

 

From: protege-user [mailto:[hidden email]] On Behalf Of Sagar Jain
Sent: Monday, February 02, 2015 10:27 PM
To: User support for WebProtege and Protege Desktop
Subject: Re: [protege-user] SPARQL query in the FMA

 

Hi Matthew,

 

I have inserted the URI: http://purl.obolibrary.org/obo/fma.owl (FMA)

into: Protege v4.2

 

I am trying to query for: id: FMA:#### based on matching certain names in an Excel annotation spreadsheet.

ie. if annotation = 'Attribute entity', then return id: 85802.

 

 

Screenshot of this example:

 

Inline image 2

 

Please let me know if I can clarify further, thanks for your assistance.

 

Regards,

Sagar

 

 

On Mon, Feb 2, 2015 at 4:49 PM, Matthew Horridge <[hidden email]> wrote:

Hi Sagar,

 

This will give you a list of annotation properties (not annotations that you have in the FMA).

 

Can you express what you want to query for in natural language?  If so, which version of the FMA are you using?  Can you point us to a copy of it?

 

Cheers,

 

Matthew

 

 

On 2 Feb 2015, at 09:52, Sagar Jain <[hidden email]> wrote:

 

Hi Thanks for the response Lorenz. I would like to request if you can help me with the following query

 

?x rdf:type owl:AnnotationProperty .

 

This example above gives me a list of Annotations I have currently in the FMA using Protege. How can I find out a list of additional terms I can use within the RDF: type, value, etc?

 

Thanks,

Sagar

 

On Fri, Jan 30, 2015 at 8:07 AM, Lorenz Buehmann <[hidden email]> wrote:

You know which to use if you know about Semantic Web, RDF, OWL, ...

Without it's not that easy to create SPARQL queries.

 

On 29.01.2015 23:10, Sagar Jain wrote:

Hi All,

 

I would like to request for help (ASAP- have a project due tomorrow). I am trying to query in the FMA on Protege using SPARQL. 

 

I need help understanding concepts such as: 

 

?x rdf:type owl:AnnotationProperty .

 

*What I do not understand is, how does the programmer know what options are available under the RDF and OWL prefixes. If I open RDF URI for example, I do see options such as type, property, etc but how do I know which to use. 

 

My current goal is to retrieve FMA IDs and Preferred names to match with annotations I have in an excel spreadsheet.

ie- Urinary Bladder, would be able to map the Preferred Name, and ID strings from FMA using SPARQL. 

 

Any help is greatly appreciated,

Sagar 

 

_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user

 


_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user

 

_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user

 


_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user

 


_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user



_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|

Re: SPARQL query in the FMA

Matthew Horridge-2
Administrator
Hi Sagar,




SELECT ?x ?id  WHERE {
?x rdfs:label "Attribute entity"^^xsd:string .
?x oboInOwl:id ?id
}

This query works.  Make sure that you type the label as an xsd:string (as above) as this is how they seem to be represented in this ontology.

Cheers,

Matthew


On 3 Feb 2015, at 10:43, Sagar Jain <[hidden email]> wrote:

Hi Ron,

Thanks for your assistance. I have typed this into Protege SPARQL query tab as shown in the screenshot. The values don't appear, only variables we SELECTed for. Also for future ease of use, how can we become aware of options to call under prefixes for predicates. ie- rdfs:type, or label, etc.

<Screen Shot 2015-02-03 at 10.41.22 AM.png>

Thanks,
Sagar

On Tue, Feb 3, 2015 at 7:20 AM, Ron Rudnicki <[hidden email]> wrote:

Sagar,

Try this for a list of labels with matching ID’s

 

Select ?label ?id

Where {

?class rdfs:label ?label .

?class fma:id ?id .   

}

 

You’ll need change the fma prefix to whichever one contains the id annotation property

 

and this for a match against a particular label

 

Select ?id

Where {

?class rdfs:label ?label .

FILTER (regex(?label, "attribute entity", "i")) .

?class fma:id ?id .  (again    

}

 

Again, you’ll need to  change the fma prefix to whichever one contains the id annotation property

 

From: protege-user [mailto:[hidden email]] On Behalf Of Sagar Jain
Sent: Monday, February 02, 2015 10:27 PM
To: User support for WebProtege and Protege Desktop
Subject: Re: [protege-user] SPARQL query in the FMA

 

Hi Matthew,

 

I have inserted the URI: http://purl.obolibrary.org/obo/fma.owl (FMA)

into: Protege v4.2

 

I am trying to query for: id: FMA:#### based on matching certain names in an Excel annotation spreadsheet.

ie. if annotation = 'Attribute entity', then return id: 85802.

 

 

Screenshot of this example:

 

<image003.png>

 

Please let me know if I can clarify further, thanks for your assistance.

 

Regards,

Sagar

 

 

On Mon, Feb 2, 2015 at 4:49 PM, Matthew Horridge <[hidden email]> wrote:

Hi Sagar,

 

This will give you a list of annotation properties (not annotations that you have in the FMA).

 

Can you express what you want to query for in natural language?  If so, which version of the FMA are you using?  Can you point us to a copy of it?

 

Cheers,

 

Matthew

 

 

On 2 Feb 2015, at 09:52, Sagar Jain <[hidden email]> wrote:

 

Hi Thanks for the response Lorenz. I would like to request if you can help me with the following query

 

?x rdf:type owl:AnnotationProperty .

 

This example above gives me a list of Annotations I have currently in the FMA using Protege. How can I find out a list of additional terms I can use within the RDF: type, value, etc?

 

Thanks,

Sagar

 

On Fri, Jan 30, 2015 at 8:07 AM, Lorenz Buehmann <[hidden email]> wrote:

You know which to use if you know about Semantic Web, RDF, OWL, ...

Without it's not that easy to create SPARQL queries.

 

On 29.01.2015 23:10, Sagar Jain wrote:

Hi All,

 

I would like to request for help (ASAP- have a project due tomorrow). I am trying to query in the FMA on Protege using SPARQL. 

 

I need help understanding concepts such as: 

 

?x rdf:type owl:AnnotationProperty .

 

*What I do not understand is, how does the programmer know what options are available under the RDF and OWL prefixes. If I open RDF URI for example, I do see options such as type, property, etc but how do I know which to use. 

 

My current goal is to retrieve FMA IDs and Preferred names to match with annotations I have in an excel spreadsheet.

ie- Urinary Bladder, would be able to map the Preferred Name, and ID strings from FMA using SPARQL. 

 

Any help is greatly appreciated,

Sagar 

 

_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user

 


_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user

 

_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user

 


_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user

 


_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user


_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user


_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user