Skip to content
This repository has been archived by the owner on Mar 28, 2024. It is now read-only.

Example command? #9

Open
ddshin opened this issue Aug 7, 2017 · 3 comments
Open

Example command? #9

ddshin opened this issue Aug 7, 2017 · 3 comments

Comments

@ddshin
Copy link

ddshin commented Aug 7, 2017

Hello NIAK Bids App Administrator,

So far, I have successfully tested Niak in a Jupyter Notebook and in a terminal using the test data I pulled with the "niak_wget('data_test_niak_nii')" command. Very promising app!

Now I am ready to test the pipeline on a BIDS-validated dataset, but there isn't enough documentation to figure out how to get started. Once I pull the bids docker image, I made my best guess and ran the following command:

docker run -i --rm -v /Users/David/tmp:/bids_dataset:ro -v /Users/David/tmp/outputs:/outputs bids/niak /bids_dataset /outputs participant --participant_label 01

This returns an error as shown below:

Traceback (most recent call last):
File "/code/run.py", line 15, in
import pyniak.load_pipeline
ImportError: No module named pyniak.load_pipeline

Any ideas? Please help. Thank you.

@poquirion
Copy link
Contributor

There was a major refactoring of the bids app. It should be out pretty soon, But there will be a extensive help to help control the inputs. Here is a teaser:

docker run -it --read-only -v ${HOME}/outputs:/outputs -v ${HOME}/data/sample_test:/bids_dataset bids participant /bids_dataset /outputs --help
/code/util/bin/bids_app.py participant /bids_dataset /outputs -h
usage: bids_app.py [-h] [-v] [--config_file CONFIG_FILE]
                   [--participant_label PARTICIPANT_LABEL [PARTICIPANT_LABEL ...]]
                   [--n_thread N_THREAD] [--type_scaner TYPE_SCANER]
                   [--type_acquisition {manual,sequential ascending,sequential descending,interleaved ascending,interleaved descending}]
                   [--delay_in_tr DELAY_IN_TR] [--suppress_vol SUPPRESS_VOL]
                   [--skip_slice_timing] [--hp HP] [--lp LP]
                   [--t1_preprocess_nu_correct T1_PREPROCESS_NU_CORRECT]
                   [--smooth_vol_fwhm SMOOTH_VOL_FWHM]
                   {participant,group} bids_dir output_dir

Run a niak script

positional arguments:
  {participant,group}   Level of the analysis that will be performed. Multiple
                        participant level analyses can be run independently
                        (in parallel) using the same output_dir.
  bids_dir              The directory with the input dataset formatted
                        according to the BIDS standard.
  output_dir            The directory where the output files should be stored.
                        If you are running group level analysis this folder
                        should be prepopulated with the results of
                        theparticipant level analysis.

optional arguments:
  -h, --help            show this help message and exit
  -v, --version         show program's version number and exit
  --config_file CONFIG_FILE, -c CONFIG_FILE
                        a yaml config file with the preprocessing configs
                        (default: None)
  --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 should be analyzed. Multiple participants
                        can be specified with a space separated list.
                        (default: None)
  --n_thread N_THREAD   Number of threads to compute niak (default: 1)
  --type_scaner TYPE_SCANER
                        Type of MR scanner. The only value that will change
                        something to the processing here is 'Siemens', which
                        has different conventions for interleaved
                        acquisitions. (default: )
  --type_acquisition {manual,sequential ascending,sequential descending,interleaved ascending,interleaved descending}
                        Type of acquisition used by the scanner. Possible
                        choices are 'manual', 'sequential ascending',
                        'sequential descending', 'interleaved ascending',
                        'interleaved descending' (default: interleaved
                        ascending)
  --delay_in_tr DELAY_IN_TR
                        The delay (s) between the last slice of the first
                        volume and the first slice of the following volume.
                        (default: 0)
  --suppress_vol SUPPRESS_VOL
                        The number of volumes that are suppressed at the
                        begining of the time series (default: 0)
  --skip_slice_timing   Skip all slice timing procedure (default: False)
  --hp HP               Cut-off frequency for high pass (default: 0.01)
  --lp LP               Cut-off frequency for low pass (default: inf)
  --t1_preprocess_nu_correct T1_PREPROCESS_NU_CORRECT
                        Non-uniformity corrections distance. Sets the N3
                        spline distance in mm: suggested values: 200 for 1.5T
                        scan, 50 for 3T scan. (default: 50)
  --smooth_vol_fwhm SMOOTH_VOL_FWHM
                        Full width at half max of the Gaussian kernel (mm)
                        used for smoothing (default: 6)

@ddshin
Copy link
Author

ddshin commented Sep 28, 2017

@poquirion - Looks great! Can't wait to try using it on our BIDS data sets.

@poquirion
Copy link
Contributor

poquirion commented Nov 27, 2017

@ddshin
At last all is in place!

just try the preprocessing on a bids dataset.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants