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

How do I run with a session? #88

Open
dkp opened this issue Nov 15, 2020 · 1 comment
Open

How do I run with a session? #88

dkp opened this issue Nov 15, 2020 · 1 comment

Comments

@dkp
Copy link

dkp commented Nov 15, 2020

Hi Robert,

I am using the version of MRtrix3_connectome from Dockerhub, having converted it to a Singularity container. I am running on our HPC. I guess I have never tried to run it on a participant directory with a nested session (it is also under Datalad control).

I get back complaints that it cannot find the dwi or fmap directories:

mrtrix3_connectome.py:
mrtrix3_connectome.py: Note that this script makes use of commands / algorithms that have relevant articles for citation; INCLUDING FROM EXTERNAL SOFTWARE PACKAGES. Please consult the help page (-help option) for more information.
mrtrix3_connectome.py:
Command: bids-validator /bids_dataset
mrtrix3_connectome.py: Commencing execution for subject sub-219
mrtrix3_connectome.py: N4BiasFieldCorrection and ROBEX found; will use for bias field correction and brain extraction
mrtrix3_connectome.py: Generated temporary directory: /home/u7/dkp/mrtrix3_connectome.py-tmp-BT1W22/
mrtrix3_connectome.py: Importing DWI data into temporary directory
mrtrix3_connectome.py: [ERROR] Inadequate data for pre-processing of subject 'sub-219': No phase-encoding contrast in input DWIs, and no fmap/ directory, so EPI distortion correction cannot be performed
mrtrix3_connectome.py: Contents of temporary directory kept, location: /home/u7/dkp/mrtrix3_connectome.py-tmp-BT1W22/
Your group dkp has been charged 0:01:20 (0:00:05 X 16 cpus).
You previously had 7000:00:00. You now have 6999:58:40 of el_standard_time remaining

========================

Here is what the directory structure looks like:

sub-219/ses-itbs:
anat
dwi
fmap
func
sub-219_ses-itbs_scans.json
sub-219_ses-itbs_scans.tsv

sub-219/ses-itbs/anat:
sub-219_ses-itbs_T1w.json
sub-219_ses-itbs_T1w.nii.gz
sub-219_ses-itbs_acq-tse_T2w1.json
sub-219_ses-itbs_acq-tse_T2w1.nii.gz
sub-219_ses-itbs_acq-tse_T2w2.json
sub-219_ses-itbs_acq-tse_T2w2.nii.gz

sub-219/ses-itbs/dwi:
sub-219_ses-itbs_acq-AP_dwi.bval
sub-219_ses-itbs_acq-AP_dwi.bvec
sub-219_ses-itbs_acq-AP_dwi.json
sub-219_ses-itbs_acq-AP_dwi.nii.gz

sub-219/ses-itbs/fmap:
sub-219_ses-itbs_dir-PA_epi.json
sub-219_ses-itbs_dir-PA_epi.nii.gz
sub-219_ses-itbs_magnitude1.json
sub-219_ses-itbs_magnitude1.nii.gz
sub-219_ses-itbs_magnitude2.json
sub-219_ses-itbs_magnitude2.nii.gz
sub-219_ses-itbs_phasediff.json
sub-219_ses-itbs_phasediff.nii.gz

sub-219/ses-itbs/func:
sub-219_ses-itbs_acq-asl_run-01.json
sub-219_ses-itbs_acq-asl_run-01.nii.gz
sub-219_ses-itbs_acq-asl_run-02.json
sub-219_ses-itbs_acq-asl_run-02.nii.gz
sub-219_ses-itbs_task-rest_run-01_bold.json
sub-219_ses-itbs_task-rest_run-01_bold.nii.gz
sub-219_ses-itbs_task-rest_run-01_events.tsv
sub-219_ses-itbs_task-rest_run-02_bold.json
sub-219_ses-itbs_task-rest_run-02_bold.nii.gz
sub-219_ses-itbs_task-rest_run-02_events.tsv

My script looks like this (no explicit mention of sessions, but I do not see that option in your help):

# Define a variable to point to the directory you want to work in
# This is not strictly necessary, but may be helpful
export STUFF=/groups/dkp/
export MRIS=${STUFF}/Nifti

# Just to be safe, create the mrtrix_hcpmmp1 directory if it does not exist.
if [ ! -d ${MRIS}/derivatives/mrtrix_hcpmmp1 ]; then
mkdir -p ${MRIS}/derivatives/mrtrix_hcpmmp1
fi

module load singularity

Subject=${sub}

singularity run --cleanenv --bind ${MRIS}:/bids_dataset --bind ${MRIS}/derivatives/mrtrix_hcpmmp1:/outputs ${SIF}/mrtrix3_connectome.sif /bids_dataset /outputs participant --participant_label ${Subject} --parcellation hcpmmp1 --output_verbosity 3

=================

Just to make sure I'm not crazy, I'm running my script on a simpler version of the same dataset (no nested session), and it is chugging along.

Thoughts?

Thank you,

Dianne

@Lestropie
Copy link
Collaborator

Hi Dianne,

"mrtrix3_connectome.py: Commencing execution for subject sub-219"

This is not running the 0.5.0 code. You can see here in the code that that version refers to a "session" being processed, not a "subject", regardless of whether or not there are multiple sessions for any particular subject.

My script looks like this (no explicit mention of sessions, but I do not see that option in your help):

The 0.5.0 code offers the "--session_label" command-line option, which operates in the same way as the --participant_label option. My guess is that you were looking at the documentation on DockerHub, which appears as though it was not automatically updated with the contents of README.md when I pushed the update, and therefore contained outdated information; I've updated that now.

Rob

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

No branches or pull requests

2 participants