{"action":"created","issue":{"url":"https://api.github.com/repos/monarch-initiative/phenol/issues/139","repository_url":"https://api.github.com/repos/monarch-initiative/phenol","labels_url":"https://api.github.com/repos/monarch-initiative/phenol/issues/139/labels{/name}","comments_url":"https://api.github.com/repos/monarch-initiative/phenol/issues/139/comments","events_url":"https://api.github.com/repos/monarch-initiative/phenol/issues/139/events","html_url":"https://github.com/monarch-initiative/phenol/issues/139","id":363845902,"node_id":"MDU6SXNzdWUzNjM4NDU5MDI=","number":139,"title":"Questions about MpGeneModel construction, how to merge annotation lists","user":{"login":"hannahblau","id":8484992,"node_id":"MDQ6VXNlcjg0ODQ5OTI=","avatar_url":"https://avatars1.githubusercontent.com/u/8484992?v=4","gravatar_id":"","url":"https://api.github.com/users/hannahblau","html_url":"https://github.com/hannahblau","followers_url":"https://api.github.com/users/hannahblau/followers","following_url":"https://api.github.com/users/hannahblau/following{/other_user}","gists_url":"https://api.github.com/users/hannahblau/gists{/gist_id}","starred_url":"https://api.github.com/users/hannahblau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hannahblau/subscriptions","organizations_url":"https://api.github.com/users/hannahblau/orgs","repos_url":"https://api.github.com/users/hannahblau/repos","events_url":"https://api.github.com/users/hannahblau/events{/privacy}","received_events_url":"https://api.github.com/users/hannahblau/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-09-26T03:38:30Z","updated_at":"2018-10-09T10:46:33Z","closed_at":null,"author_association":"MEMBER","body":"@pnrobinson \r\nif gene of component MpSimpleModel does not match the gene of the MpGeneModel, should I log an error or throw a PhenolException? (could skip over the faulty model and maybe build the MpGeneModel from the other components if there are any good ones)\r\n\r\nis it safe to assume that there are no ancestor/child pairs within the annotations of a single MpSimpleModel?\r\n\r\ntoss out any annotation that is negated (regardless of what is or is not already in the merged list of annotations)?\r\n\r\nneed an ontology object to tell me which termId is the descendant/ancestor of another; I assumed one would be provided as an argument to the constructor\r\n\r\nif two annotations for same MPO term, one sex-specific and the other not, keep the sex-specific one but do I salvage any PMIDs or anything else from the annotation I am tossing?\r\n\r\nif two annotations, both sex-specific, but one is male- and the other female- (could happen for the same MPO term if different genotypes involved) what to do?\r\n\r\nif two annotations, one child sex-specific = no, other is ancestor but sex-specific = yes, toss the ancestor?\r\n\r\nif all of the annotations for a particular MpSimpleModel are rejected, do I still add the genotype for that model to the list of components for the MpGeneModel under construction?\r\n\r\nif two annotations for same MPO term are not in conflict then they should be merged? or one tossed and the other kept?\r\n\r\nnaive algorithm is O(n**2) (n == total number of annotations in all models to be merged) --- is it worth the effort to be more clever?\r\n"},"comment":{"url":"https://api.github.com/repos/monarch-initiative/phenol/issues/comments/428146316","html_url":"https://github.com/monarch-initiative/phenol/issues/139#issuecomment-428146316","issue_url":"https://api.github.com/repos/monarch-initiative/phenol/issues/139","id":428146316,"node_id":"MDEyOklzc3VlQ29tbWVudDQyODE0NjMxNg==","user":{"login":"pnrobinson","id":4943420,"node_id":"MDQ6VXNlcjQ5NDM0MjA=","avatar_url":"https://avatars0.githubusercontent.com/u/4943420?v=4","gravatar_id":"","url":"https://api.github.com/users/pnrobinson","html_url":"https://github.com/pnrobinson","followers_url":"https://api.github.com/users/pnrobinson/followers","following_url":"https://api.github.com/users/pnrobinson/following{/other_user}","gists_url":"https://api.github.com/users/pnrobinson/gists{/gist_id}","starred_url":"https://api.github.com/users/pnrobinson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pnrobinson/subscriptions","organizations_url":"https://api.github.com/users/pnrobinson/orgs","repos_url":"https://api.github.com/users/pnrobinson/repos","events_url":"https://api.github.com/users/pnrobinson/events{/privacy}","received_events_url":"https://api.github.com/users/pnrobinson/received_events","type":"User","site_admin":false},"created_at":"2018-10-09T10:46:33Z","updated_at":"2018-10-09T10:46:33Z","author_association":"MEMBER","body":"I am getting an error because we are trying to remove an annotation from an immutable set\r\n```\r\nSet<TermId> ancestors = mpo.getAncestorTermIds(child, false);\r\n      // getAncestorTermIds method includes the starting vertex in the set of ancestors\r\n      ancestors.remove(child);\r\n```\r\nlead to\r\n```\r\nException in thread \"main\" java.lang.UnsupportedOperationException\r\n\tat com.google.common.collect.ImmutableCollection.remove(ImmutableCollection.java:238)\r\n```"}}
{"actor":{"display_login":"pnrobinson"}}