linikujp / owltools

Automatically exported from code.google.com/p/owltools
0 stars 0 forks source link

Command line version produces strange file names when the source ontology is not in current directory #20

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Start the command line version  on an ontology file that is not located in 
the current directory.

For instance:

> bin/ontology-release-runner ../../../ontology/human-phenotype-ontology.obo

produces files such as 
"..%2F..%2F..%2Fontology%2Fhuman-phenotype-ontology-merged.obo" in the current 
directory. This is under Linux. Apparently there is some URL transformation 
going on.

I would expect that by default all output is placed within the current working 
directory with proper names.

Original issue reported on code.google.com by Sebastia...@charite.de on 2 Dec 2011 at 9:18

GoogleCodeExporter commented 9 years ago
The strange file names are generated, due to the fact, that there is no 
ontology id present in the source file. 
It is strongly recommended to have an ontology id. The ontology id is specified 
in the ontology header using the 'ontology' tag. (For more details, please see 
the OBOFormat documentation 
http://www.geneontology.org/GO.format.obo-1_4.shtml#S.2.1)

The output file name is generated using the ontology. If not present the path 
is used to generate an ID, which result in this strange file name.

Original comment by HDie...@lbl.gov on 3 Dec 2011 at 12:38

GoogleCodeExporter commented 9 years ago
While appreciate this comment, please notice that this tag is new for OBO 1.4 
as far as I can see it and even there it is not declared as required (only as 
should). In absence of this tag, I suggest to take only the last component of 
the path as the ontology when operating on a local filesystem, otherwise the 
tool behaves differently than many other build tools (e.g., gcc).

Original comment by Sebastia...@charite.de on 3 Dec 2011 at 8:59

GoogleCodeExporter commented 9 years ago
Implemented suggested change. Now OORT checks the file name (if available) and 
removes the '.obo' or '.owl' suffix to create a default ontology id (committed 
in revision 394).

Original comment by HDie...@lbl.gov on 6 Dec 2011 at 1:43

GoogleCodeExporter commented 9 years ago

Original comment by HDie...@lbl.gov on 12 Jan 2012 at 11:32