rdflib::as_rdf only recognizes some IRIs

77 Views Asked by At

I am trying to convert a dataframe to RDF. The dataframe contains literals as well as IRIs.

I'm doing

test_withangles.rdf <-
  rdflib::as_rdf(x = test_withangles,
                 key = 'uuid')
rdf_serialize(rdf = test_withangles.rdf, doc = "test_withangles.ttl")

on

+--------------------------------------+-----------------------------------------------+------------------------------------------------------+
| uuid                                 | source_ontology                               | source_term                                          |
+--------------------------------------+-----------------------------------------------+------------------------------------------------------+
| 7ca250c1-0747-4db0-b613-a1bb45848711 | <http://192.168.0.233:8080/ontologies/RXNORM> | <http://purl.bioontology.org/ontology/RXNORM/706898> |
+--------------------------------------+-----------------------------------------------+------------------------------------------------------+
| e10acb95-e9d9-4804-a227-844f3e551c78 | <http://192.168.0.233:8080/ontologies/RXNORM> | <http://purl.bioontology.org/ontology/RXNORM/214081> |
+--------------------------------------+-----------------------------------------------+------------------------------------------------------+

and getting

@base <localhost://> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .

<df:7ca250c1-0747-4db0-b613-a1bb45848711>
    <df:source_ontology> <http://192.168.0.233:8080/ontologies/RXNORM> ;
    <df:source_term> "<http://purl.bioontology.org/ontology/RXNORM/706898>" .

<df:e10acb95-e9d9-4804-a227-844f3e551c78>
    <df:source_ontology> <http://192.168.0.233:8080/ontologies/RXNORM> ;
    <df:source_term> "<http://purl.bioontology.org/ontology/RXNORM/214081>" .

Why is it interpreting my source_term column as strings, instead of IRIs?

0

There are 0 best solutions below