Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Q re JSON-LD output structure #153

Open
mih opened this issue May 9, 2019 · 9 comments
Open

Q re JSON-LD output structure #153

mih opened this issue May 9, 2019 · 9 comments

Comments

@mih
Copy link
Contributor

mih commented May 9, 2019

Looking at the structure of the current output, I see that I get essentially three @graph, two of which are nested into the third:

{
  "@context: {...},
  "@graph": [
    {
      "@graph": [...]
    },
    {
      "@graph": [...]
    }
]
}

I wonder what the motivation is to use this particular structure over

  1. a single @graph with all the documents
  2. somehow named or identified nested graph that enable an easy decision which one has the prov info on nidmresult generation, and which one has the real thing

Regarding a semantic interpretation both modifications should not have an impact, but a simple script eating these data would have an easier time looping through a single list, than having to consider a possibly implicit structure in the node array of the top-level graph.

Thx!

@satra
Copy link

satra commented May 9, 2019

@mih - can you post a ttl file and the corresponding jsonld file somewhere i can take a look at? i suspect this is all a function of the @context, which may need to be changed . i thought we essentially had a list of records for the top graph, rather than a list of graphs. unless the ttl file is a trig file (a set of graphs), in which case we need to possibly fix things a bit.

@mih
Copy link
Contributor Author

mih commented May 9, 2019

Here are the two files that I get after a run (renamed to be .txt for upload).

nidm.json.txt
nidm.ttl.txt

Thx!

@satra
Copy link

satra commented May 9, 2019

@mih - this is indeed a trig based representation and there are two graphs in it.

  1. a graph describing the dataset/bundle of the provenance of the generation process
  2. the provenance of the glm.

is there a trig file created?

@mih
Copy link
Contributor Author

mih commented May 9, 2019

I don't see one:

mih@meiner /tmp/nidmfslout.nidm % ll
total 3.4M
-rw-rw-r-- 1 mih mih  23K May  9 09:24 ClusterLabels.nii.gz
-r--r--r-- 1 mih mih 376K May  9 09:24 Contrast.nii.gz
-rw-rw-r-- 1 mih mih 364K May  9 09:24 ContrastStandardError.nii.gz
-rw-rw-r-- 1 mih mih  100 May  9 09:24 DesignMatrix.csv
-r--r--r-- 1 mih mih  612 May  9 09:24 DesignMatrix.png
-r--r--r-- 1 mih mih 102K May  9 09:24 ExcursionSet.nii.gz
-r--r--r-- 1 mih mih  73K May  9 09:24 ExcursionSet.png
-r--r--r-- 1 mih mih 900K May  9 09:24 GrandMean.nii.gz
-r--r--r-- 1 mih mih 8.4K May  9 09:24 Mask.nii.gz
-rw-rw-r-- 1 mih mih  48K May  9 09:24 nidm.json
-rw-rw-r-- 1 mih mih  33K May  9 09:24 nidm.ttl
-r--r--r-- 1 mih mih 376K May  9 09:24 ParameterEstimate_001.nii.gz
-rw-rw-r-- 1 mih mih 374K May  9 09:24 ResidualMeanSquares.nii.gz
-r--r--r-- 1 mih mih 8.4K May  9 09:24 SearchSpaceMask.nii.gz
-r--r--r-- 1 mih mih 376K May  9 09:24 TStatistic.nii.gz
-r--r--r-- 1 mih mih 372K May  9 09:24 ZStatistic.nii.gz

@satra
Copy link

satra commented May 9, 2019

ok - i'll take a closer look at the turtle file.

@cmaumet
Copy link
Member

cmaumet commented May 9, 2019

@mih: The JSON-LD structure you are looking at is the outdated one, i.e. not the one using our new context file a.k.a the "nice" JSON-LD.

I still have to update the exporter to generate the nice serialisation (#143).

@satra
Copy link

satra commented May 9, 2019

@cmaumet - thanks for the clarification :)

@cmaumet
Copy link
Member

cmaumet commented May 13, 2019

Discussed w/ @mih today, I need to:

  • update the FSL exporter with the current context to get nice JSON-LD.

@cmaumet
Copy link
Member

cmaumet commented May 15, 2019

Now implemented at incf-nidash/nidmresults#55, if the tests pass, then we will be able to use this is the FSL NIDM exporter and get the JSON-LD 1.1. serialization.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants