Automated generation of TSV from query for ontology release

0 views
Skip to first unread message

Becky Tauber

unread,
Dec 14, 2016, 10:25:01 AM12/14/16
to Stardog
Good morning -

I have a make file that we use to release our ontology monthly (https://github.com/evidenceontology/evidenceontology/blob/master/Makefile). It uses OWLTools (https://github.com/owlcollab/owltools) to generate files and reason. 

I would like to add in an automated loading of the ontology to Stardog, querying, and returning a .tsv file of the results during the same release generation (then immediately dropping the database). Is there a way to add this feature in to the make file? I don't have a problem loading the file and querying using the command line, I wasn't sure about returning a .tsv though.

On a side note, the query is very long. Can I provide a .rq file with the query in it, or does it need to be written out in the command line?
Last, is it possible to not include the first row (with the variables) from the file or does that need to be removed manually?

Thanks so much!

Evren Sirin

unread,
Dec 14, 2016, 11:01:05 AM12/14/16
to Stardog
On Wed, Dec 14, 2016 at 10:25 AM, Becky Tauber <becky....@ninepts.com> wrote:
> Good morning -
>
> I have a make file that we use to release our ontology monthly
> (https://github.com/evidenceontology/evidenceontology/blob/master/Makefile).
> It uses OWLTools (https://github.com/owlcollab/owltools) to generate files
> and reason.
>
> I would like to add in an automated loading of the ontology to Stardog,
> querying, and returning a .tsv file of the results during the same release
> generation (then immediately dropping the database). Is there a way to add
> this feature in to the make file? I don't have a problem loading the file
> and querying using the command line, I wasn't sure about returning a .tsv
> though.

You can use `-f tsv` or `--format tsv` with the `stardog query command
to output results in TSV.

>
> On a side note, the query is very long. Can I provide a .rq file with the
> query in it, or does it need to be written out in the command line?

You can pass either the file name or the query string. Both will work.

> Last, is it possible to not include the first row (with the variables) from
> the file or does that need to be removed manually?

That needs to be done separately. Something like `stardog query -f
tsv db queryFile | tail -n +2` should work.

Best,
Evren

>
> Thanks so much!
>
> --
> -- --
> You received this message because you are subscribed to the C&P "Stardog"
> group.
> To post to this group, send email to sta...@clarkparsia.com
> To unsubscribe from this group, send email to
> stardog+u...@clarkparsia.com
> For more options, visit this group at
> http://groups.google.com/a/clarkparsia.com/group/stardog?hl=en
Reply all
Reply to author
Forward
0 new messages