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

Documentation request #1

Open
matentzn opened this issue Feb 14, 2020 · 5 comments
Open

Documentation request #1

matentzn opened this issue Feb 14, 2020 · 5 comments

Comments

@matentzn
Copy link

@cmungall

  1. Please supply the run.sh file
  2. Add three lines of description of what rdf_matcher actually does internally - seems to be more than just label and synonym matching :)

Thanks

@wdduncan
Copy link

wdduncan commented Mar 2, 2020

Something about the docker file is not working right. When I run the commands:

docker run --rm cmungall/rdf_matcher -f tsv -i tests/data/basic.ttl match
docker run -d cmungall/rdf_matcher -f tsv -i tests/data/basic.ttl match
docker run -it cmungall/rdf_matcher -f tsv -i tests/data/basic.ttl match
docker run --rm cmungall/rdf_matcher -p x -f tsv -i tests/data/basic.ttl match

I receive the errors:

docker: Error response from daemon: OCI runtime create failed: container_linux.go:346: starting container process caused "exec: \"-f\": executable file not found in $PATH": unknown.

docker: Error response from daemon: OCI runtime create failed: container_linux.go:346: starting container process caused "exec: \"-p\": executable file not found in $PATH": unknown.

The difference in errors being with I passed a -f or p flag.

I opened and interactive session with the docker container using:

docker run -it cmungall/rdf_matcher /bin/bash

When I run this command runs within /tools directory:

swipl -p library=prolog ./bin/rdfmatch -h

I receive a message about flags to use with Prolog (e.g., --output, --format, etc.)

When I run this command:

swipl -p library=prolog ./bin/rdfmatch -p x -f tsv -i tests/data/basic.ttl match

It returns:

% Loaded "basic.ttl" in 0.00 sec; 153 triples
error(existence_error(procedure,io_utils:opt_if/3),context(io_utils:write_result/2,_22584))

I don't know how to debug this :(

@wdduncan
Copy link

wdduncan commented Mar 2, 2020

@cmungall
Another follow up:
From my command line in the root of the rdf_matcher repo I can run:

swipl -p library=prolog ./bin/rdfmatch -p x -f tsv -i tests/data/basic.ttl match

This starts outputting lines like:

x:eye	y:eye	UBERON:0000970	info(xref-xref,rdf(x:eye,oio:hasDbXref,UBERON:0000970)-rdf(y:eye,oio:hasDbXref,UBERON:0000970),null)
x:eye	z:eye	UBERON:0000970	info(xref-xref,rdf(x:eye,oio:hasDbXref,UBERON:0000970)-rdf(z:eye,oio:hasDbXref,UBERON:0000970),null)
x:eye	y:eye	UBERON:0000970	info(xref-xref,rdf(x:eye,oio:hasDbXref,UBERON:0000970)-rdf(y:eye,oio:hasDbXref,UBERON:0000970),null)
x:eye	y:eye	UBERON:0000970	info(xref-xref,rdf(x:eye,oio:hasDbXref,UBERON:0000970)-rdf(y:eye,oio:hasDbXref,UBERON:0000970),null)

However, although rdfmatch is in my path, I cannot run:

rdfmatch -p x -f tsv -i tests/data/basic.ttl match

This returns:

Warning: /Users/wdduncan/lib/swipl/pack/rdf_matcher/prolog/rdf_matcher.pl:64:
	:- table/1 is built-in.  library(tabling) is deprecated.
% Loaded "basic.ttl" in 0.00 sec; 153 triples
x:appendage	y:appendage	appendag	info(label-label,rdf(x:appendage,rdfs:label,appendage)-rdf(y:appendage,rdfs:label,appendages),stem)
error(existence_error(procedure,add_match_to_graph/3),context(write_result_wrap/2,_58882))

Is there some path setting I need to add so that the necessary modules can be found?

@cmungall
Copy link
Collaborator

cmungall commented Mar 5, 2020

Added run.sh with d973082

@cmungall
Copy link
Collaborator

cmungall commented Mar 5, 2020

docker run --rm cmungall/rdf_matcher -f tsv -i tests/data/basic.ttl match

yep, you are passing the -f etc to the docker command. You need to specify the command docker should run. See run.sh

@cmungall
Copy link
Collaborator

cmungall commented Mar 5, 2020

OK, it looks like you are getting the desired results running directly from swipl

Running outside the repo:

EITHER

  1. do a pack_install(rdf_matcher)

This will install from the latest release not github

OR

(this seems horrible but I haven't found a better way of doing this)

cd ~/lib/swipl/pack
ln -s ~/repos/rdf_matcher

The latter way is better if you want to make frequent changes to the rdf_matcher code

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