Closed chrisgorgo closed 7 years ago
Yes, how can I extract the study name from the json file? Should I get "Name" from dataset_description.json and then get "TaskName" from task-${Name}_bold.json ?
For the rhyme judgment dataset, "Name" is "Rhyme judgment" and not "rhymejudgment"
2016-08-31 20:18 GMT+02:00 Chris Filo Gorgolewski notifications@github.com :
Currently the task name is hardcoded as rhymejudgement. It would be better to iterate over all tasks for each subject:
https://github.com/wanderine/BROCCOLI/blob/master/code/ bids/broccolipipeline.sh#L137
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/wanderine/BROCCOLI/issues/28, or mute the thread https://github.com/notifications/unsubscribe-auth/AEGryJ57dF_PV6YgRz_EL-1XOfrpnq_3ks5qlcWNgaJpZM4Jx6Jg .
Anders Eklund, PhD
Sorry, is there a file that contains all task names?
2016-08-31 20:33 GMT+02:00 Anders Eklund andek034@gmail.com:
Yes, how can I extract the study name from the json file? Should I get "Name" from dataset_description.json and then get "TaskName" from task-${Name}_bold.json ?
For the rhyme judgment dataset, "Name" is "Rhyme judgment" and not "rhymejudgment"
2016-08-31 20:18 GMT+02:00 Chris Filo Gorgolewski < notifications@github.com>:
Currently the task name is hardcoded as rhymejudgement. It would be better to iterate over all tasks for each subject:
https://github.com/wanderine/BROCCOLI/blob/master/code/bids/ broccolipipeline.sh#L137
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/wanderine/BROCCOLI/issues/28, or mute the thread https://github.com/notifications/unsubscribe-auth/AEGryJ57dF_PV6YgRz_EL-1XOfrpnq_3ks5qlcWNgaJpZM4Jx6Jg .
Anders Eklund, PhD
Anders Eklund, PhD
The most reliable and quickest way to get task labels is to get them from the file names themselves. This bash command will get you all of the task labels for a dataset in the current working directory:
find . -name "*_bold.nii*" | grep -oP "task-([a-zA-Z0-9]+)" | cut -d "-" -f 2 | uniq
However in your case I would recommend refactoring the analyze_subject function to take three files:
This way you can iterate over subjects, find T1w (if there are more than one grab the first one for now) perform skullstripping, find all _bold.nii* files and for each one find the corresponding _events.tsv and call the analyze_subject.
Would it make sense to put all task names (and the number of runs per task) in the main json file?
2016-08-31 22:30 GMT+02:00 Chris Filo Gorgolewski notifications@github.com :
The most reliable and quickest way to get task labels is to get them from the file names themselves. This bash command will get you all of the task labels for a dataset in the current working directory:
find . -name "_bold.nii" | grep -oP "task-([a-zA-Z0-9]+)" | cut -d "-" -f 2 | uniq
However in your case I would recommend refactoring the analyze_subject function to take three files:
- skullstripped T1w (you would do it onece per subject not once per _bold file as you are doing now)
- _bold.nii* file
- _events.tsv file
This way you can iterate over subjects, find T1w (if there are more than one grab the first one for now) perform skullstripping, find all _bold.nii* files and for each one find the corresponding _events.tsv and call the analyze_subject.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/wanderine/BROCCOLI/issues/28#issuecomment-243891136, or mute the thread https://github.com/notifications/unsubscribe-auth/AEGryDb-SAvvMG-Rt4vDuusO8k3mC949ks5qleRQgaJpZM4Jx6Jg .
Anders Eklund, PhD
It's technically possible, but it would provide a redundant piece of information and (most importantly) making this new field compulsory would break backwards compatibility rendering already distributed BIDS dataset invalid.
Did the command I sent you not work?
It works, but the task names seems like such important information that it should be included in the main json file...
2016-09-06 16:30 GMT+02:00 Chris Filo Gorgolewski notifications@github.com :
It's technically possible, but it would provide a redundant piece of information and (most importantly) making this new field compulsory would break backwards compatibility rendering already distributed BIDS dataset invalid.
Did the command I sent you not work?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/wanderine/BROCCOLI/issues/28#issuecomment-244968356, or mute the thread https://github.com/notifications/unsubscribe-auth/AEGryPm8Lf531L4yNybU8k6G40NW0b4Lks5qnXjrgaJpZM4Jx6Jg .
Anders Eklund, PhD
Currently the task name is hardcoded as
rhymejudgement
. It would be better to iterate over all tasks for each subject:https://github.com/wanderine/BROCCOLI/blob/master/code/bids/broccolipipeline.sh#L137