{"action":"created","issue":{"url":"https://api.github.com/repos/bids-standard/bids-matlab/issues/2","repository_url":"https://api.github.com/repos/bids-standard/bids-matlab","labels_url":"https://api.github.com/repos/bids-standard/bids-matlab/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/bids-standard/bids-matlab/issues/2/comments","events_url":"https://api.github.com/repos/bids-standard/bids-matlab/issues/2/events","html_url":"https://github.com/bids-standard/bids-matlab/issues/2","id":373365420,"node_id":"MDU6SXNzdWUzNzMzNjU0MjA=","number":2,"title":"query does not cover 'acq' and 'rec'","user":{"login":"Remi-Gau","id":6961185,"node_id":"MDQ6VXNlcjY5NjExODU=","avatar_url":"https://avatars3.githubusercontent.com/u/6961185?v=4","gravatar_id":"","url":"https://api.github.com/users/Remi-Gau","html_url":"https://github.com/Remi-Gau","followers_url":"https://api.github.com/users/Remi-Gau/followers","following_url":"https://api.github.com/users/Remi-Gau/following{/other_user}","gists_url":"https://api.github.com/users/Remi-Gau/gists{/gist_id}","starred_url":"https://api.github.com/users/Remi-Gau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Remi-Gau/subscriptions","organizations_url":"https://api.github.com/users/Remi-Gau/orgs","repos_url":"https://api.github.com/users/Remi-Gau/repos","events_url":"https://api.github.com/users/Remi-Gau/events{/privacy}","received_events_url":"https://api.github.com/users/Remi-Gau/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-10-24T08:33:47Z","updated_at":"2018-10-24T09:15:32Z","closed_at":null,"author_association":"COLLABORATOR","body":"Playing around with a dataset that has different `acq` for the bold data and I realized that bids.query does not cover that parameter (nor `rec`).\r\n\r\nIt would be useful to have the possibility to just do:\r\nfullbrain_bold_ls = bids.query(BIDS, 'data', 'sub', '01', 'type', 'bold', **'acq', 'fullbrain'**).\r\n\r\n`acq` and `rec` are already listed in the structure returned by `layout` should it should be fairly straightforward. @gllmflndn you know those functions better so do you want to have a go or should I have a crack at it?"},"comment":{"url":"https://api.github.com/repos/bids-standard/bids-matlab/issues/comments/432579535","html_url":"https://github.com/bids-standard/bids-matlab/issues/2#issuecomment-432579535","issue_url":"https://api.github.com/repos/bids-standard/bids-matlab/issues/2","id":432579535,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMjU3OTUzNQ==","user":{"login":"gllmflndn","id":5950855,"node_id":"MDQ6VXNlcjU5NTA4NTU=","avatar_url":"https://avatars0.githubusercontent.com/u/5950855?v=4","gravatar_id":"","url":"https://api.github.com/users/gllmflndn","html_url":"https://github.com/gllmflndn","followers_url":"https://api.github.com/users/gllmflndn/followers","following_url":"https://api.github.com/users/gllmflndn/following{/other_user}","gists_url":"https://api.github.com/users/gllmflndn/gists{/gist_id}","starred_url":"https://api.github.com/users/gllmflndn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gllmflndn/subscriptions","organizations_url":"https://api.github.com/users/gllmflndn/orgs","repos_url":"https://api.github.com/users/gllmflndn/repos","events_url":"https://api.github.com/users/gllmflndn/events{/privacy}","received_events_url":"https://api.github.com/users/gllmflndn/received_events","type":"User","site_admin":false},"created_at":"2018-10-24T09:15:32Z","updated_at":"2018-10-24T09:15:32Z","author_association":"COLLABORATOR","body":"Hi @Remi-Gau,\r\n\r\nThe code would deserve serious refactoring and documenting but this feature should already be available. It is implemented here:\r\nhttps://github.com/bids-standard/bids-matlab/blob/master/%2Bbids/query.m#L77-L81\r\n\r\nI just tried on the example dataset `7t_trt` and it seems to work for me:\r\n````\r\n>> bids.query(BIDS,'data','sub','01','ses','1','type','bold','acq','fullbrain')\r\n\r\nans =\r\n\r\n  2x1 cell array\r\n\r\n    {'/BIDS-examples/7t_trt/sub-01/ses-1/func/sub-01_ses-1_task-rest_acq-fullbrain_run-1_bold.nii.gz'}\r\n    {'/BIDS-examples/7t_trt/sub-01/ses-1/func/sub-01_ses-1_task-rest_acq-fullbrain_run-2_bold.nii.gz'}\r\n````\r\n\r\nDo you get an empty output for the same query?"}}
{"actor":{"display_login":"gllmflndn"}}