[BUG]: PIOP2 dataset does not filter by task #105

Closed
opened 2022-10-23 11:08:41 +00:00 by fraimondo · 1 comment
fraimondo commented 2022-10-23 11:08:41 +00:00 (Migrated from github.com)

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

It is uncofirmed, but setting the tasks parameter in the DataladAOMICPIOP2 dataset won't have any effect.

Expected Behavior

It should filter by tasks.

Steps To Reproduce

from junifer.datagrabber.aomic import DataladAOMICPIOP2
dg = DataladAOMICPIOP2(tasks="restingstate")

with dg:
    print(dg.get_elements())

You will see something like this:

[('0138', 'workingmemory'), ('0115', 'stopsignal'), ('0049', 'restingstate'), ('0022', 'workingmemory'), ('0002', 'restingstate'), ('0048', 'stopsignal'), ('0175', 'emomatching'), ('0065', 'workingmemory'), ('0125', 'emomatching'), ('0139', 'emomatching'), ('0104', 'emomatching'), ('0122', 'workingmemory'), ('0081', 'stopsignal'), ('0044', 'emomatching'), ('0141', 'workingmemory'), ('0138', 'restingstate'), ('0088', 'workingmemory'), ('0127', 'stopsignal'), ('0169', 'stopsignal'), ('0022', 'restingstate'), ('0162', 'stopsignal'), ('0117', 'workingmemory'), ('0198', 'emomatching'), ('0066', 'emomatching'), ('0028', 'emomatching'), ('0195', 'restingstate'), ('0146', 'restingstate'), ('0193', 'emomatching'), ('0225', 'stopsignal'), ('0122', 'restingstate'), ('0141', 'restingstate'), ('0180', 'workingmemory'), ('0088', 'restingstate'), ('0111', 'stopsignal'), ('0166', 'emomatching'), ('0155', 'stopsignal'), ('0032', 'workingmemory'), ('0036', 'stopsignal'), ('0097', 'workingmemory'), ('0117', 'restingstate'), ('0220', 'workingmemory'), ('0143', 'emomatching'), ('0102', 'stopsignal'), ('0010', 'stopsignal'), ('0172', 'emom

Environment

(junifer) bnbmac76 ➜  docs git:(docs_extending) ✗ junifer wtf
junifer:
  version: 0.0.1.dev343
python:
  version: 3.10.4
  implementation: CPython
dependencies:
  click: 8.0.4
  numpy: 1.22.3
  datalad: 0.17.2
  pandas: 1.4.3
  nibabel: 4.0.1
  nilearn: 0.9.1
  sqlalchemy: 1.4.39
  yaml: '6.0'
system:
  platform: macOS-12.6-arm64-arm-64bit
environment:
  LC_CTYPE: UTF-8
  PATH: /Users/fraimondo/anaconda3/envs/junifer/bin:/Users/fraimondo/anaconda3/condabin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin

Relevant log output

No response

Anything else?

Check the DataladAOMICPIOP2, I think it's missing to re-implement the get_elements function.

### Is there an existing issue for this? - [X] I have searched the existing issues ### Current Behavior It is uncofirmed, but setting the `tasks` parameter in the `DataladAOMICPIOP2` dataset won't have any effect. ### Expected Behavior It should filter by tasks. ### Steps To Reproduce ``` from junifer.datagrabber.aomic import DataladAOMICPIOP2 dg = DataladAOMICPIOP2(tasks="restingstate") with dg: print(dg.get_elements()) ``` You will see something like this: ``` [('0138', 'workingmemory'), ('0115', 'stopsignal'), ('0049', 'restingstate'), ('0022', 'workingmemory'), ('0002', 'restingstate'), ('0048', 'stopsignal'), ('0175', 'emomatching'), ('0065', 'workingmemory'), ('0125', 'emomatching'), ('0139', 'emomatching'), ('0104', 'emomatching'), ('0122', 'workingmemory'), ('0081', 'stopsignal'), ('0044', 'emomatching'), ('0141', 'workingmemory'), ('0138', 'restingstate'), ('0088', 'workingmemory'), ('0127', 'stopsignal'), ('0169', 'stopsignal'), ('0022', 'restingstate'), ('0162', 'stopsignal'), ('0117', 'workingmemory'), ('0198', 'emomatching'), ('0066', 'emomatching'), ('0028', 'emomatching'), ('0195', 'restingstate'), ('0146', 'restingstate'), ('0193', 'emomatching'), ('0225', 'stopsignal'), ('0122', 'restingstate'), ('0141', 'restingstate'), ('0180', 'workingmemory'), ('0088', 'restingstate'), ('0111', 'stopsignal'), ('0166', 'emomatching'), ('0155', 'stopsignal'), ('0032', 'workingmemory'), ('0036', 'stopsignal'), ('0097', 'workingmemory'), ('0117', 'restingstate'), ('0220', 'workingmemory'), ('0143', 'emomatching'), ('0102', 'stopsignal'), ('0010', 'stopsignal'), ('0172', 'emom ``` ### Environment ```markdown (junifer) bnbmac76 ➜ docs git:(docs_extending) ✗ junifer wtf junifer: version: 0.0.1.dev343 python: version: 3.10.4 implementation: CPython dependencies: click: 8.0.4 numpy: 1.22.3 datalad: 0.17.2 pandas: 1.4.3 nibabel: 4.0.1 nilearn: 0.9.1 sqlalchemy: 1.4.39 yaml: '6.0' system: platform: macOS-12.6-arm64-arm-64bit environment: LC_CTYPE: UTF-8 PATH: /Users/fraimondo/anaconda3/envs/junifer/bin:/Users/fraimondo/anaconda3/condabin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin ``` ### Relevant log output _No response_ ### Anything else? Check the DataladAOMICPIOP2, I think it's missing to re-implement the `get_elements` function.
LeSasse commented 2022-10-24 16:07:27 +00:00 (Migrated from github.com)

Yes, realised this when implementing the enki datagrabber and solved it like this on the enki branch (in the get elements method)

Yes, realised this when implementing the enki datagrabber and solved it like this [on the enki branch](https://github.com/juaml/junifer/blob/add_enki_datagrabber/junifer/configs/juseless/datagrabbers/enki.py) (in the get elements method)
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
juaml/junifer#105
No description provided.