Q and A:

SPARQL workshop organized by BiGCaT Maastricht University


Q and A:

HOME

Several questions were asked during the workshop. Below, you can find these questions and answers:

Q1: How can I perform a federated query from Wikidata to WikiPathways, when the URLs/IRIs do not match?

We have some example queries available to perform a federated query from Wikidata to WikiPathways, or vice versa. However, the links (URLs or IRIs) between Wikidata and WikiPathways are different, and need to be rewritten. For an example, see the biomarker query


##The IRI from Wikidata starts with http:// , where the one from WikiPathways starts with https:// , so we need to rewrite the IRI
    BIND(                      # Bind the created IRI into a new variable (called ?newIRI)
        IRI(                   # Convert the string back to an IRI
          CONCAT(              # Concatenate item 1 and 2 together as one string
               "https",        # First item to concat (more items can be added with a comma
              #Second item to concat:
               SUBSTR(         # Obtain a substring
                 STR(?geneID), # Convert the geneID IRI from Wikidata to a string,
                 5)            # removing the first 5 characters (<http)
        )) AS ?newIRI          # Name for the new variable 
    )