Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Biscuit BIDS-aware #17

Open
2 of 3 tasks
monkeyman192 opened this issue Nov 27, 2018 · 2 comments
Open
2 of 3 tasks

Make Biscuit BIDS-aware #17

monkeyman192 opened this issue Nov 27, 2018 · 2 comments
Labels
enhancement New feature or request

Comments

@monkeyman192
Copy link
Collaborator

monkeyman192 commented Nov 27, 2018

Being able to understand that a folder is in BIDS format would be very useful as we can then see what data is contained and Biscuit could be used to view BIDS compatible MEG data as well as produce it.

There are a number of functions required for this functionality:

  • Understand a folder contains BIDS data
  • Ability to merge in folders containing BIDS data into other folders.
  • Search BIDS folders and export the results to another location

Doing so will require writing separate code similar to how pybids works, but for MEG data.
The API should be able to handle calls like:

p = Project('P1234')
# assign some subjects/scans etc.
p.subjects # would return a list of Subject objects
p.subject('123') # would be the subject in the project with subject id of '123'
p.subject('123').scans # list of Scan objects

etc.

@monkeyman192 monkeyman192 added the enhancement New feature or request label Nov 27, 2018
@monkeyman192
Copy link
Collaborator Author

Some ideas:

General process:

  • If in folder level above Projects, get list of projects.
  • For each project:
  • Parse the subjects.tsv file to get a list of subjects included.
  • (compare list of subjects to folders - they should match!)
  • For each subject:
  • Get list of sessions - Check to see if the sub folders within the subject
    folder are all ses-<name>
  • For each session:
    - Get paths to events, channels, etc etc.

Properties Scans object needs to have:

  • Session : Session object
  • acquisition : string
  • run : int
  • subject : Subject object
  • project : Project object
  • raw_files : list of paths
  • events : path
  • channels : path
  • metadata : path (maybe read in to some other properties?)
    Maybe Scan.metadata[] and have metadata as a dict?

Everything needs to be able to be merged/split at any level.
So if you move a single scan from a participant to a different location,
rebuilding it in that location will modify the Project and subject in tha new
location.
These objects should describe the local states.

Importing/exporting:
Needs to have the ability to import in data.
Import:

  • have the option to move or copy the files into the local tree.
  • Should be able to import fragments of BIDS repositories to add to the
    current one.
    Export:
  • Able to export fragments at any level, so export individual project,
    subject, session or scan, and produce a BIDS compliant file structure.
    (Will produce a new BIDSStructure object)

Internals/class structure:
possibly have a BIDSObject base class which all Subject, Project etc are
subclassed from?

The API can be integrated seamlessly into Biscuit by having each sid in the
filetree be associated with either a Project, Subject, Session or Scan like
how the preloaded data works.
Specific information can then be retreived and displayed in different tabs
(eg. SessionTab, SubjectTab etc.) like how data is currently displayed.

@monkeyman192
Copy link
Collaborator Author

This will be handled completely by BIDSHandler

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant