Giter Site home page Giter Site logo

oesteban / bidsapp-behavioral-example Goto Github PK

View Code? Open in Web Editor NEW

This project forked from poldrack/bidsapp-behavioral-example

0.0 2.0 0.0 66 KB

This is an example of how to build a BIDS app for behavioral data analysis using pybids

License: Apache License 2.0

Dockerfile 8.12% Makefile 4.91% Perl 17.85% Python 69.11%

bidsapp-behavioral-example's Introduction

An example BIDS App using pybids

This is a fork of the original BIDS Apps example, which was built prior to the existence of pybids. At the participant level, the entry point script (run.py) will:

  • validates and loads a BIDS dataset using pybids
  • finds all of the event.tsv files
  • computes the mean of the specified response time column (default='RT')
  • saves the run means to derivatives/rt/sub-XX/func/sub-XX_task-XX_runMeanRT.tsv

At the group level, it will load all of the participant run mean files, compute the overall mean for each subject, and save them to derivatives/rt/participants.tsv

For more information about the specification of BIDS Apps see here.

Usage

This App has the following command line arguments:

	usage: run.py [-h]
	              [--participant_label PARTICIPANT_LABEL [PARTICIPANT_LABEL ...]]
	              bids_dir output_dir {participant,group}

	Example BIDS App entry point script.

	positional arguments:
	  bids_dir              The directory with the input dataset formatted
	                        according to the BIDS standard.
	  {participant,group}   Level of the analysis that will be performed. Multiple
	                        participant level analyses can be run independently
	                        (in parallel).

	optional arguments:
	  -h, --help            show this help message and exit
	  --output_dir          The directory where the output files should be stored.
	                        If you are running a group level analysis, this folder
	                        should be prepopulated with the results of
	                        the participant level analysis.
	  --participant_label PARTICIPANT_LABEL [PARTICIPANT_LABEL ...]
	                        The label(s) of the participant(s) that should be
	                        analyzed. The label corresponds to
	                        sub-<participant_label> from the BIDS spec (so it does
	                        not include "sub-"). If this parameter is not provided
	                        all subjects will be analyzed. Multiple participants
	                        can be specified with a space separated list.
		--rt_var_name VARIABLE_NAME
													name for response time variable in events file
                				default='RT'

To build the dockerfile (creating an image called "rt"):

make docker-build

To run it in participant level mode (for all participants):

docker run -i --rm \
	-v <local path to bids dataset>:/bids_dataset \
	rt /bids_dataset participant

To run the group level:

docker run -i --rm \
	-v <local path to bids dataset>:/bids_dataset \
	rt /bids_dataset group

Example

For a working example, download ds001715 from OpenNeuro and then use that directory as the local BIDS dataset path.

bidsapp-behavioral-example's People

Contributors

bennet-umich avatar chrisgorgo avatar gkiar avatar glatard avatar oesteban avatar poldrack avatar yarikoptic avatar

Watchers

 avatar  avatar

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.