GithubHelp home page GithubHelp logo

Comments (6)

wanderine avatar wanderine commented on July 1, 2024

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 [email protected]
:

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
#28, or mute the thread
https://github.com/notifications/unsubscribe-auth/AEGryJ57dF_PV6YgRz_EL-1XOfrpnq_3ks5qlcWNgaJpZM4Jx6Jg
.

Anders Eklund, PhD

from broccoli.

wanderine avatar wanderine commented on July 1, 2024

Sorry, is there a file that contains all task names?

2016-08-31 20:33 GMT+02:00 Anders Eklund [email protected]:

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 <
[email protected]>:

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
#28, or mute the thread
https://github.com/notifications/unsubscribe-auth/AEGryJ57dF_PV6YgRz_EL-1XOfrpnq_3ks5qlcWNgaJpZM4Jx6Jg
.

Anders Eklund, PhD

Anders Eklund, PhD

from broccoli.

chrisgorgo avatar chrisgorgo commented on July 1, 2024

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:

  1. skullstripped T1w (you would do it onece per subject not once per _bold file as you are doing now)
  2. _bold.nii* file
  3. _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.

from broccoli.

wanderine avatar wanderine commented on July 1, 2024

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 [email protected]
:

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:

  1. skullstripped T1w (you would do it onece per subject not once per _bold
    file as you are doing now)
  2. _bold.nii* file
  3. _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
#28 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AEGryDb-SAvvMG-Rt4vDuusO8k3mC949ks5qleRQgaJpZM4Jx6Jg
.

Anders Eklund, PhD

from broccoli.

chrisgorgo avatar chrisgorgo commented on July 1, 2024

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?

from broccoli.

wanderine avatar wanderine commented on July 1, 2024

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 [email protected]
:

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
#28 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AEGryPm8Lf531L4yNybU8k6G40NW0b4Lks5qnXjrgaJpZM4Jx6Jg
.

Anders Eklund, PhD

from broccoli.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.