{"action":"created","issue":{"url":"https://api.github.com/repos/OpenMS/OpenMS/issues/1901","repository_url":"https://api.github.com/repos/OpenMS/OpenMS","labels_url":"https://api.github.com/repos/OpenMS/OpenMS/issues/1901/labels{/name}","comments_url":"https://api.github.com/repos/OpenMS/OpenMS/issues/1901/comments","events_url":"https://api.github.com/repos/OpenMS/OpenMS/issues/1901/events","html_url":"https://github.com/OpenMS/OpenMS/issues/1901","id":145741223,"number":1901,"title":"Refactoring of Kernel classes: MassTrace","user":{"login":"timosachsenberg","id":5803621,"avatar_url":"https://avatars.githubusercontent.com/u/5803621?v=3","gravatar_id":"","url":"https://api.github.com/users/timosachsenberg","html_url":"https://github.com/timosachsenberg","followers_url":"https://api.github.com/users/timosachsenberg/followers","following_url":"https://api.github.com/users/timosachsenberg/following{/other_user}","gists_url":"https://api.github.com/users/timosachsenberg/gists{/gist_id}","starred_url":"https://api.github.com/users/timosachsenberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timosachsenberg/subscriptions","organizations_url":"https://api.github.com/users/timosachsenberg/orgs","repos_url":"https://api.github.com/users/timosachsenberg/repos","events_url":"https://api.github.com/users/timosachsenberg/events{/privacy}","received_events_url":"https://api.github.com/users/timosachsenberg/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/OpenMS/OpenMS/labels/refactoring","name":"refactoring","color":"f7c6c7"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2016-04-04T16:52:02Z","updated_at":"2016-04-05T18:35:25Z","closed_at":null,"body":"I provide here some personal opinions and open for discussion:\r\nIn my view the current MassTrace implementation is too specialized, has inflexible design and is rather heave. It should be broken down in at least two classes.\r\n1. A lightweight, minimal mass trace class which e.g. does not store both trace peaks and smoothed trace peaks, no additional statistics like centroid mz or sd, FWHM, quant method or label. Only a small set of members of general use should be provided (e.g. getIntensityWeightedCentroidMZ()) which compute information on the fly without storing them.\r\n2. A specialized, heavy mass trace implementation which uses the lightweight class (e.g. via dependency injection) and e.g. may store computational expensive statistics etc like the current implementation."},"comment":{"url":"https://api.github.com/repos/OpenMS/OpenMS/issues/comments/205937835","html_url":"https://github.com/OpenMS/OpenMS/issues/1901#issuecomment-205937835","issue_url":"https://api.github.com/repos/OpenMS/OpenMS/issues/1901","id":205937835,"user":{"login":"hroest","id":464014,"avatar_url":"https://avatars.githubusercontent.com/u/464014?v=3","gravatar_id":"","url":"https://api.github.com/users/hroest","html_url":"https://github.com/hroest","followers_url":"https://api.github.com/users/hroest/followers","following_url":"https://api.github.com/users/hroest/following{/other_user}","gists_url":"https://api.github.com/users/hroest/gists{/gist_id}","starred_url":"https://api.github.com/users/hroest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hroest/subscriptions","organizations_url":"https://api.github.com/users/hroest/orgs","repos_url":"https://api.github.com/users/hroest/repos","events_url":"https://api.github.com/users/hroest/events{/privacy}","received_events_url":"https://api.github.com/users/hroest/received_events","type":"User","site_admin":false},"created_at":"2016-04-05T18:35:25Z","updated_at":"2016-04-05T18:35:25Z","body":"hmm I am not so sure what we should solve all our problems through inheritance ... \r\n\r\nI think it can also make sense to have well defined data structures for a certain type of algorithm and to have data structures that map 1:1 to the XML. I think one of the issues with OpenMS is that we tried to have both and now we are stuck with inefficient data structures but we are very good at reading and writing XML. So I think we should get away from finding a \"one fits all solution\" and *reduce* inheritance and complexity rather than increase it. We discussed this in Izmir, see all the good ideas\r\n\r\n- https://github.com/OpenMS/OpenMS/wiki/OpenMS-2.0-Kernel-Whitepaper\r\n- https://github.com/OpenMS/OpenMS/wiki/OpenMS-2.0-Planing-Interfaces-MSExperiment\r\n\r\nand the sample code in #762 and  #763"}}