{"action":"reopened","issue":{"url":"https://api.github.com/repos/ontodev/robot/issues/401","repository_url":"https://api.github.com/repos/ontodev/robot","labels_url":"https://api.github.com/repos/ontodev/robot/issues/401/labels{/name}","comments_url":"https://api.github.com/repos/ontodev/robot/issues/401/comments","events_url":"https://api.github.com/repos/ontodev/robot/issues/401/events","html_url":"https://github.com/ontodev/robot/issues/401","id":378770174,"node_id":"MDU6SXNzdWUzNzg3NzAxNzQ=","number":401,"title":"Issue using term files with filter command","user":{"login":"zoependlington","id":36990116,"node_id":"MDQ6VXNlcjM2OTkwMTE2","avatar_url":"https://avatars3.githubusercontent.com/u/36990116?v=4","gravatar_id":"","url":"https://api.github.com/users/zoependlington","html_url":"https://github.com/zoependlington","followers_url":"https://api.github.com/users/zoependlington/followers","following_url":"https://api.github.com/users/zoependlington/following{/other_user}","gists_url":"https://api.github.com/users/zoependlington/gists{/gist_id}","starred_url":"https://api.github.com/users/zoependlington/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zoependlington/subscriptions","organizations_url":"https://api.github.com/users/zoependlington/orgs","repos_url":"https://api.github.com/users/zoependlington/repos","events_url":"https://api.github.com/users/zoependlington/events{/privacy}","received_events_url":"https://api.github.com/users/zoependlington/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-11-08T15:00:37Z","updated_at":"2018-11-08T15:37:00Z","closed_at":null,"author_association":"NONE","body":"Hello!\r\n\r\nI have been using the filter command to create a slim as suggested in another ticket (#263). I received a request to develop a way to extract a desired subset minus any terms deemed \"unwanted\", i.e. a simplification of a subset. Both the subset and the unwanted terms are unfixed, relying heavily on text files as inputs and term files.\r\n\r\nThe filter command I'm using is modified from the ticket above as I have a list of unwanted terms to remove from the ontology, but wanting to preserve the ancestors, descendants and the hierarchy. Here I have a MIREOT extract subset of CHEBI as my input (using nicotinic antagonist as my extract term), have a text file with unwanted terms (unwanted.txt) and the output remove.owl:\r\n\r\n`robot filter --input chebi-annotated.owl --term-file unwanted.txt --select \"ancestors descendants annotations\" --output remove.owl`\r\n\r\nI'm testing @rctauber's \"gaps\" branch as I want to preserve the structure. It works wonderfully when I test it with one term in my term file (neurotransmitter agent). It removes the term and preserves the structure in exactly the way I'd like. My original file is on the left, the result of the filter command (remove.owl) is on the right:\r\n\r\n![image](https://user-images.githubusercontent.com/36990116/48205446-26ae6c00-e364-11e8-8c12-c05ae25ceaef.png)\r\n\r\nHowever, when I add another term (pharmaceutical) to the unwated.txt file so it now contains the two IDs on separate lines:\r\nCHEBI:52217\r\nCHEBI:35942\r\n\r\nThe command ceases to remove anything (again, original on the left, the remove.owl on the right):\r\n\r\n![image](https://user-images.githubusercontent.com/36990116/48205556-55c4dd80-e364-11e8-8049-ba3495616228.png)\r\n\r\nTo check this was not due to the version I was using, I tested this using ROBOT version 1.2.0-alpha-1. Using the --term-file command, even if the unwanted.txt contained only one term, resulted in no removal of the desired neurotransmitter agent term i.e. no action:\r\n![image](https://user-images.githubusercontent.com/36990116/48205957-24004680-e365-11e8-8e2c-dfdae3e47e8b.png)\r\n\r\nWhile `robot filter --input chebi-annotated.owl --term CHEBI:35942  --select \"ancestors descendants annotations\" --output remove.owl` expectantly produced the removal of neurotransmitter agent (even without preservation of structure):\r\n\r\n![image](https://user-images.githubusercontent.com/36990116/48206006-47c38c80-e365-11e8-858e-e24da6c37b2b.png)\r\n\r\nIn other instances testing the filter command, I have also been unable to use the --term-file option, but have been able to use multiple --term options in the same filter command. However, this seems to not be working in this situation (which I'm guessing is due to not selecting \"self\"? This is the only difference between my two pipelines using filter) with either version of ROBOT.\r\n\r\nAm I doing something wrong for the term file not to work? Any other suggestions for this problem?\r\n\r\nThank you!\r\n"}}
{"actor":{"display_login":"rctauber"}}