FAIRDataTeam/FAIRDataPoint

Unable to get data

xiaofengleo opened this issue · 3 comments

I Login as admin, albert.einstein@example.com

I add a resource CovidDataset as child of Catalog, as shown below:
image

before that, I already defined its shape as below:
Name: CovidDataset
Definition:

@prefix : <http://fairdatapoint.org/> . 
@prefix dash: <http://datashapes.org/dash#> . 
@prefix dcat: <http://www.w3.org/ns/dcat#> . 
@prefix dct: <http://purl.org/dc/terms/> . 
@prefix foaf: <http://xmlns.com/foaf/0.1/> . 
@prefix sh: <http://www.w3.org/ns/shacl#> . 
@prefix dcat-ext: <http://purl.org/biosemantics-lumc/ontologies/dcat-extension/> . 
@prefix ex: <http://www.example.com/resources/> . 
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> . 
@prefix con: <http://www.w3.org/2000/10/swap/pim/contact#> . 
@prefix vcard: <http://www.w3.org/2006/vcard/ns> . 
@prefix gnd: <http://d-nb.info/standards/elementset/gnd> . 
@prefix frapo: <http://purl.org/cerif/frapo/> . 
@prefix obo: <http://purl.obolibrary.org/obo/> . 
@prefix sio: <http://semanticscience.org/resource/> . 
@prefix eda: <http://edamontology.org/> .

:CovidDatasetShape a sh:NodeShape ; 
sh:targetClass dcat-ext:CovidDataset ; 
sh:property[ 
sh:name "Study Subject" ; 
sh:path obo:NCIT_C41189 ; 
sh:nodeKind sh:Literal ; 
sh:maxCount 2 ; 
dash:editor dash:TextFieldEditor ; 
], [ 
sh:name "Patient" ; 
sh:path obo:NCIT_C16960 ; 
sh:nodeKind sh:Literal ; 
sh:maxCount 2 ; 
dash:editor dash:TextFieldEditor ; 
], [
sh:name "Symptoms Consistent with COVID-19" ; 
sh:path obo:NCIT_C173069 ; 
sh:nodeKind sh:Literal ; 
sh:maxCount 2 ; 
dash:editor dash:TextFieldEditor ; 
], [ 
sh:name "COVID-19" ; 
sh:path obo:MONDO_0100096 ; 
sh:nodeKind sh:Literal ; 
sh:maxCount 2 ; 
dash:editor dash:TextFieldEditor ; 
] , [ 
sh:name "Sex" ; 
sh:path obo:NCIT_C28421 ; 
sh:nodeKind sh:Literal ; 
sh:maxCount 2 ; 
dash:editor dash:TextFieldEditor ; 
] , [ 
sh:name "Age-Years" ; 
sh:path obo:NCIT_C37908 ; 
sh:nodeKind sh:Literal ; 
sh:maxCount 2 ; 
dash:editor dash:TextFieldEditor ;
], [ 
sh:name "Patient Status" ; 
sh:path ex:InvestigationContact; 
sh:nodeKind sh:Literal ; 
sh:maxCount 2 ; 
dash:editor dash:TextFieldEditor ; 
], [ 
sh:name "ICU" ; 
sh:path obo:NCIT_C53511; 
sh:nodeKind sh:Literal ; 
sh:maxCount 2 ; 
dash:editor dash:TextFieldEditor ; 
], [ 
sh:name "Study DOI" ; 
sh:path eda:data_1188; 
sh:nodeKind sh:IRI ; 
dash:editor dash:URIEditor ; 
], [ 
sh:name "Ethnicity" ; 
sh:path obo:GECKO_0000061 ; 
sh:nodeKind sh:Literal ; 
sh:maxCount 2 ; 
dash:editor dash:TextFieldEditor ; 
], [ 
sh:name "BMI" ; 
sh:path obo:ExO_0000105 ; 
sh:nodeKind sh:Literal ; 
sh:maxCount 2 ; 
dash:editor dash:TextFieldEditor ; 
], [ 
sh:name "Smoking" ; 
sh:path obo:NCIT_C154329 ; 
sh:nodeKind sh:Literal ; 
sh:maxCount 2 ; 
dash:editor dash:TextFieldEditor ; 
], [ 
sh:name "COVID-19 Disease Severity (WHO Ordinal) Scale" ; 
sh:path obo:NCIT_C178899 ; 
sh:nodeKind sh:Literal ; 
sh:maxCount 2 ; 
dash:editor dash:TextFieldEditor ; 
], [ 
sh:name "Charlson Comorbidity Index" ; 
sh:path obo:NCIT_C176422 ; 
sh:nodeKind sh:Literal ; 
sh:maxCount 2 ; 
dash:editor dash:TextFieldEditor ; 
], [ 
sh:name "APACHE II Score" ; 
sh:path obo:NCIT_C121113 ; 
sh:nodeKind sh:Literal ; 
sh:maxCount 2 ; 
dash:editor dash:TextFieldEditor ; 
], [ 
sh:name "Mechanical Ventilation" ; 
sh:path obo:NCIT_C70909 ; 
sh:nodeKind sh:Literal ; 
sh:maxCount 2 ; 
dash:editor dash:TextFieldEditor ; 
], [ 
sh:name "Asthma" ; 
sh:path obo:NCIT_C28397 ; 
sh:nodeKind sh:Literal ; 
sh:maxCount 2 ; 
dash:editor dash:TextFieldEditor ; 
], [ 
sh:name "COPD" ; 
sh:path obo:HP_0006510 ; 
sh:nodeKind sh:Literal ; 
sh:maxCount 2 ; 
dash:editor dash:TextFieldEditor ; 
], [ 
sh:name "DM" ; 
sh:path obo:NCIT_C2985 ; 
sh:nodeKind sh:Literal ; 
sh:maxCount 2 ; 
dash:editor dash:TextFieldEditor ; 
], [ 
sh:name "CRP (mg/L)" ; 
sh:path obo:NCIT_C64548 ; 
sh:nodeKind sh:Literal ; 
sh:maxCount 2 ; 
dash:editor dash:TextFieldEditor ; 
], [ 
sh:name "Ferritin (ng/mL)" ; 
sh:path obo:NCIT_C74737 ; 
sh:nodeKind sh:Literal ; 
sh:maxCount 2 ; 
dash:editor dash:TextFieldEditor ; 
], [ 
sh:name "IL6" ; 
sh:path obo:NCIT_C74834 ; 
sh:nodeKind sh:Literal ; 
sh:maxCount 2 ; 
dash:editor dash:TextFieldEditor ; 
] .

Then I create a catalog named COVID as shown below:

image

in the COVID catalog, I see two items, one is CovidDataset, as shown below:

image

I choose CovidDataset and click 'Create', then in the page I fill in all the info, as shown below,

image
image
image

If I click "View RDF", I can see following triples:

@prefix dct: <http://purl.org/dc/terms/>.
@prefix fdp: <https://fdp.cmbi.umcn.nl/>.
@prefix dc: <http://purl.org/biosemantics-lumc/ontologies/dcat-extension/>.
@prefix ed: <http://edamontology.org/>.
@prefix obo: <http://purl.obolibrary.org/obo/>.
@prefix c: <https://fdp.cmbi.umcn.nl/catalog/>.
@prefix res: <http://www.example.com/resources/>.

fdp:new
    a dc:CovidDataset;
    ed:data_1188 <https://doi.org/10.1016/j.cell.2020.10.037>;
    obo:ExO_0000105 "33";
    obo:GECKO_0000061 "Caucasian";
    obo:HP_0006510 "No";
    obo:MONDO_0100096 "Yes";
    obo:NCIT_C121113 "none";
    obo:NCIT_C154329 "Never";
    obo:NCIT_C16960 "Yes";
    obo:NCIT_C173069 "Yes";
    obo:NCIT_C176422 "none";
    obo:NCIT_C178899 "3";
    obo:NCIT_C28397 "No";
    obo:NCIT_C28421 "Female";
    obo:NCIT_C2985 "none";
    obo:NCIT_C37908 "77";
    obo:NCIT_C41189 "INCOV001";
    obo:NCIT_C53511 "No";
    obo:NCIT_C64548 "none";
    obo:NCIT_C70909 "No";
    obo:NCIT_C74737 "none";
    obo:NCIT_C74834 "none";
    dct:isPartOf c:f9eabdd3-6e62-4c2a-89ee-07af897e30c3;
    res:InvestigationContact "Hospital".

Then I click the 'Save' button at the bottom, after that, I can see an error page say "Unable to get data", as shown below:

image

Context

  • FDP version:

Server

v1.12.0~859fe61
12. 8. 2021, 12:54

Client

v1.11.0~fbc3707
29. 6. 2021, 16:20

  • Docker Engine version:
    CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
    74642fd943b5 nginx:1.17.3 "nginx -g 'daemon of…" About an hour ago Up About an hour 0.0.0.0:80->80/tcp, :::80->80/tcp, 0.0.0.0:443->443/tcp, :::443->443/tcp fdp-production_proxy_1
    404616e3e1fa mongo:4.0.12 "docker-entrypoint.s…" About an hour ago Up About an hour 27017/tcp fdp-production_mongo_1
    df5214eeadba metaphacts/blazegraph-basic:2.2.0-20160908.003514-6 "/entrypoint.bash" About an hour ago Up About an hour 0.0.0.0:8080->8080/tcp, :::8080->8080/tcp fdp-production_blazegraph_1
    843e43cd2457 fairdata/fairdatapoint-client:1.11.0 "/docker-entrypoint.…" About an hour ago Up About an hour 80/tcp fdp-production_fdp-client_1
    a8994fb07ce7 fairdata/fairdatapoint:1.12.0 "/bin/sh -c 'java -j…" About an hour ago Up About an hour fdp-production_fdp_1

  • Operating System:
    Distributor ID: Ubuntu
    Description: Ubuntu 20.04.2 LTS
    Release: 20.04
    Codename: focal

I redo the above work on another FDP instance (https://fdp.x-omics.nl) and get the same error: unable to load data.

I also tried to create metadata by POST-ing the content to the appropriate endpoint. I use the example from https://fairdatapoint.readthedocs.io/en/latest/usage/api-usage.html#api-endpoint-listing,
I first create a file called metadata.ttl with following content:

@prefix dcat: <http://www.w3.org/ns/dcat#> .
@prefix dct: <http://purl.org/dc/terms/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .

<> a dcat:Dataset ;
    dct:title "test" ;
    dct:hasVersion "1.0" ;
    dct:publisher [ a foaf:Agent ; foaf:name "Example User" ] ;
    dcat:theme <http://www.wikidata.org/entity/Q14944328> ;
    dct:isPartOf <https://fdp.x-omics.nl/catalog/3d28f665-9403-4d10-af52-7178730d1aca> .

Then in command line run following cmd:

curl -H "Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJ......" -H "Content-Type: text/turtle" -d @metadata.ttl https://fdp.x-omics.nl/dataset

The cmd run succesfully and a dataset can be seen at the FDP website, as shown below:
image

After that I create a customized metadata, with following content:

@prefix dct: <http://purl.org/dc/terms/>.
@prefix fdp: <https://fdp.x-omics.nl/>.
@prefix dc: <http://purl.org/biosemantics-lumc/ontologies/dcat-extension/>.
@prefix ed: <http://edamontology.org/>.
@prefix obo: <http://purl.obolibrary.org/obo/>.
@prefix c: <https://fdp.x-omics.nl/catalog/>.
@prefix res: <http://www.example.com/resources/>.

fdp:new
    a dc:CovidDataset;
    ed:data_1188 <https://doi.org/10.1016/j.cell.2020.10.037>;
    obo:ExO_0000105 "33";
    obo:GECKO_0000061 "Caucasian";
    obo:HP_0006510 "No";
    obo:MONDO_0100096 "Yes";
    obo:NCIT_C121113 "none";
    obo:NCIT_C154329 "Never";
    obo:NCIT_C16960 "Yes";
    obo:NCIT_C173069 "Yes";
    obo:NCIT_C176422 "none";
    obo:NCIT_C178899 "3";
    obo:NCIT_C28397 "No";
    obo:NCIT_C28421 "Female";
    obo:NCIT_C2985 "none";
    obo:NCIT_C37908 "77";
    obo:NCIT_C41189 "INCOV001";
    obo:NCIT_C53511 "No";
    obo:NCIT_C64548 "none";
    obo:NCIT_C70909 "No";
    obo:NCIT_C74737 "none";
    obo:NCIT_C74834 "none";
    dct:isPartOf c:3d28f665-9403-4d10-af52-7178730d1aca;
    res:InvestigationContact "Hospital";
    dct:isPartOf <https://fdp.x-omics.nl/catalog/3d28f665-9403-4d10-af52-7178730d1aca> .

then I rerun the curl cmd with the endpoint changed, like following:

curl -H "Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJ...." -H "Content-Type: text/turtle" -d @metadata.ttl https://fdp.x-omics.nl/CovidDataset

again, the cmd runs successfully.
However, when I tried to view it in the web pages, it still shows the error: unable load data.
As shown below:
image

@xiaofengleo As we discussed offline. The cause of this problem is wrong configuration of resource description. Fix to this problem is add resource shape to resource description.