{"action":"created","issue":{"url":"https://api.github.com/repos/pymzml/pymzML/issues/98","repository_url":"https://api.github.com/repos/pymzml/pymzML","labels_url":"https://api.github.com/repos/pymzml/pymzML/issues/98/labels{/name}","comments_url":"https://api.github.com/repos/pymzml/pymzML/issues/98/comments","events_url":"https://api.github.com/repos/pymzml/pymzML/issues/98/events","html_url":"https://github.com/pymzml/pymzML/issues/98","id":362568966,"node_id":"MDU6SXNzdWUzNjI1Njg5NjY=","number":98,"title":"Averaging spectra","user":{"login":"CAWarmerdam","id":43466011,"node_id":"MDQ6VXNlcjQzNDY2MDEx","avatar_url":"https://avatars0.githubusercontent.com/u/43466011?v=4","gravatar_id":"","url":"https://api.github.com/users/CAWarmerdam","html_url":"https://github.com/CAWarmerdam","followers_url":"https://api.github.com/users/CAWarmerdam/followers","following_url":"https://api.github.com/users/CAWarmerdam/following{/other_user}","gists_url":"https://api.github.com/users/CAWarmerdam/gists{/gist_id}","starred_url":"https://api.github.com/users/CAWarmerdam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CAWarmerdam/subscriptions","organizations_url":"https://api.github.com/users/CAWarmerdam/orgs","repos_url":"https://api.github.com/users/CAWarmerdam/repos","events_url":"https://api.github.com/users/CAWarmerdam/events{/privacy}","received_events_url":"https://api.github.com/users/CAWarmerdam/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-09-21T11:14:43Z","updated_at":"2018-10-26T07:19:25Z","closed_at":null,"author_association":"NONE","body":"I am very new to pymzml and I would like to average all spectra from a file within a given time range to analyse this further. On the (outdated?) docs (http://pymzml.github.io/usage.html#advanced-usage) is an example that shows how to average the spectra, but this doesn't seem to work.\r\n\r\nInitializing an empty spectrum as done in the example throws an error:\r\n`    t += spec / spec['total ion current']\r\n  File \"pymzml\\spec.py\", line 516, in __add__\r\n    self.set_peaks(self._reprofile_Peaks(), 'reprofiled')\r\n  File \"pymzml\\spec.py\", line 1139, in _reprofile_Peaks\r\n    for mz, i in self.peaks('centroided'):\r\n  File \"pymzml\\spec.py\", line 994, in peaks\r\n    mz_params = self._get_encoding_parameters('m/z array')\r\n  File \"pymzml\\spec.py\", line 199, in _get_encoding_parameters\r\n    array_type_accession = self.calling_instance.OT[array_type]['id']\r\nAttributeError: 'NoneType' object has no attribute 'OT'`\r\n\r\nAnd adapting the code so no empty new instance is made halts advancements in the program without any erros.\r\n`first_spec = None\r\n        for n, spec in enumerate(self.ms_run):\r\n            if first_spec is None:\r\n                first_spec = spec / spec['total ion current']\r\n            else:\r\n                first_spec += spec / spec['total ion current']`\r\n\r\nWhat is currently the correct procedure for creating the average spectrum?"},"comment":{"url":"https://api.github.com/repos/pymzml/pymzML/issues/comments/433311863","html_url":"https://github.com/pymzml/pymzML/issues/98#issuecomment-433311863","issue_url":"https://api.github.com/repos/pymzml/pymzML/issues/98","id":433311863,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMzMxMTg2Mw==","user":{"login":"fu","id":234842,"node_id":"MDQ6VXNlcjIzNDg0Mg==","avatar_url":"https://avatars0.githubusercontent.com/u/234842?v=4","gravatar_id":"","url":"https://api.github.com/users/fu","html_url":"https://github.com/fu","followers_url":"https://api.github.com/users/fu/followers","following_url":"https://api.github.com/users/fu/following{/other_user}","gists_url":"https://api.github.com/users/fu/gists{/gist_id}","starred_url":"https://api.github.com/users/fu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fu/subscriptions","organizations_url":"https://api.github.com/users/fu/orgs","repos_url":"https://api.github.com/users/fu/repos","events_url":"https://api.github.com/users/fu/events{/privacy}","received_events_url":"https://api.github.com/users/fu/received_events","type":"User","site_admin":false},"created_at":"2018-10-26T07:19:25Z","updated_at":"2018-10-26T07:19:25Z","author_association":"MEMBER","body":"Hi Robert,\r\n\r\nyes, spec averaging did not make it into the newest pymzML version although we at Cellzome have developed an advanced version of it, which, however, needs some more evaluation.\r\nI hope we can bring back that feature in v 2.1 .Sorry about that :( I guess we should at least update the docu for v2.0 and remove that script for the time being.\r\n\r\nCheers\r\n\r\n.c\r\n"}}
{"actor":{"display_login":"fu"}}