{"action":"created","issue":{"url":"https://api.github.com/repos/sneumann/mzR/issues/187","repository_url":"https://api.github.com/repos/sneumann/mzR","labels_url":"https://api.github.com/repos/sneumann/mzR/issues/187/labels{/name}","comments_url":"https://api.github.com/repos/sneumann/mzR/issues/187/comments","events_url":"https://api.github.com/repos/sneumann/mzR/issues/187/events","html_url":"https://github.com/sneumann/mzR/issues/187","id":386137451,"node_id":"MDU6SXNzdWUzODYxMzc0NTE=","number":187,"title":"What does `scans` argument to peaks query?","user":{"login":"glormph","id":2255410,"node_id":"MDQ6VXNlcjIyNTU0MTA=","avatar_url":"https://avatars2.githubusercontent.com/u/2255410?v=4","gravatar_id":"","url":"https://api.github.com/users/glormph","html_url":"https://github.com/glormph","followers_url":"https://api.github.com/users/glormph/followers","following_url":"https://api.github.com/users/glormph/following{/other_user}","gists_url":"https://api.github.com/users/glormph/gists{/gist_id}","starred_url":"https://api.github.com/users/glormph/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/glormph/subscriptions","organizations_url":"https://api.github.com/users/glormph/orgs","repos_url":"https://api.github.com/users/glormph/repos","events_url":"https://api.github.com/users/glormph/events{/privacy}","received_events_url":"https://api.github.com/users/glormph/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-11-30T10:54:07Z","updated_at":"2018-11-30T12:21:49Z","closed_at":null,"author_association":"NONE","body":"I'm pretty much a `mzR` newbie (so this is probably a question and not a bug) but one of our lab's scripts uses the `peaks` function. I have created some testdata by filtering \"quality\" MS2 scans from an mzML, and this broke the `peaks` functionality:\r\n```\r\nIndex whichScan out of bounds [1 ... 191]\r\n```\r\n\r\nMy question is, am I correct in assuming that the `scans` argument actually fetches a scan by some sort of index? My scan numbers in the mzML files go way higher than 191."},"comment":{"url":"https://api.github.com/repos/sneumann/mzR/issues/comments/443187948","html_url":"https://github.com/sneumann/mzR/issues/187#issuecomment-443187948","issue_url":"https://api.github.com/repos/sneumann/mzR/issues/187","id":443187948,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0MzE4Nzk0OA==","user":{"login":"lgatto","id":384198,"node_id":"MDQ6VXNlcjM4NDE5OA==","avatar_url":"https://avatars3.githubusercontent.com/u/384198?v=4","gravatar_id":"","url":"https://api.github.com/users/lgatto","html_url":"https://github.com/lgatto","followers_url":"https://api.github.com/users/lgatto/followers","following_url":"https://api.github.com/users/lgatto/following{/other_user}","gists_url":"https://api.github.com/users/lgatto/gists{/gist_id}","starred_url":"https://api.github.com/users/lgatto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lgatto/subscriptions","organizations_url":"https://api.github.com/users/lgatto/orgs","repos_url":"https://api.github.com/users/lgatto/repos","events_url":"https://api.github.com/users/lgatto/events{/privacy}","received_events_url":"https://api.github.com/users/lgatto/received_events","type":"User","site_admin":false},"created_at":"2018-11-30T12:21:49Z","updated_at":"2018-11-30T12:21:49Z","author_association":"COLLABORATOR","body":"From the message above, it looks like your file contains 191 scans, and the `peaks` function retrieves them by their index. For example `peaks(x, 1)` gets you a matrix of M/Z and intensities. If you use `peaks(x)` or `peaks(x, 1:10)` you get a list of matrices. \r\n\r\nI would suggest you look into using the `MSnExp` object from `MSnbase`. It uses the code from `mzR` but with a much richer and nicer interface. "}}
{"actor":{"display_login":"lgatto"}}