[RESOLVED] HCP diffusion mapping file error


When running create_session_info for preprocessing, we ran into an error with the HCP mapping file. The command that we used worked on another mapping file – the error we encountered was with the diffusion mapping file.
We first made sure that the session that we were working with has a diffusion file. We also tried changing overwrite=no to yes, and specifying the container version, moving the mapping file from a different site folder to the same site folder that we were processing, but all of that did not work.
We tried editing that diffusion mapping file (by copying and pasting the text from the mapping file that worked and editing it to a diffusion mapping file) and creating an entirely new diffusion mapping file. With the new mapping file, we tried to include just the diffusion, which did not work. We created another new mapping file with just the T1w and T2w, and the command still worked, but as soon as we added diffusion below that, the command gave an error.
Any help on this issue would be greatly appreciated. Thank you!


qunex create_session_info

Location of command: /gpfs/gibbs/pi/n3/Studies/ABCD/site03/processing/logs/runlogs/Log-create_session_info_NDARINVGPH4CP68_baselineYear1Arm1_2023-03-01_14.12.47.776343

QuNex container version used: 97.0

Path to the error diffusion mapping file: /gpfs/gibbs/pi/n3/Studies/ABCD/site21/sessions/specs/hcp_mapping_diffusion.txt

Path to the mapping file that worked with the command: /gpfs/gibbs/pi/n3/Studies/ABCD/site21/sessions/specs/hcp_mapping.txt

Path to the diffusion mapping file that we created from scratch: /gpfs/gibbs/pi/n3/Studies/ABCD/site21/sessions/specs/hcp_mapping_T1wT2w.txt

Location of the specific session that we are working on: /gpfs/gibbs/pi/n3/Studies/ABCD/site03/sessions/NDARINVGPH4CP68_baselineYear1Arm1


call: gmri create_session_info sessionsfolder="/gpfs/gibbs/pi/n3/Studies/ABCD/site03/sessions" sourcefile="session.txt" targetfile="session_hcp_diffusion.txt" sessions="NDARINVGPH4CP68_baselineYear1Arm1" overwrite="no" mapping="/gpfs/gibbs/pi/n3/Studies/ABCD/site21/sessions/specs/hcp_mapping_diffusion.txt"
Running create_session_info
 ... Reading pipeline mapping from /gpfs/gibbs/pi/n3/Studies/ABCD/site21/sessions/specs/hcp_mapping_diffusion.txt

===> ERROR in completing create_session_info:
     Invalid mapping file.
     Please check the specified file [/gpfs/gibbs/pi/n3/Studies/ABCD/site21/sessions/specs/hcp_mapping_diffusion.txt].
     Syntax error: unexpected number of tokens

Path to log file: /gpfs/gibbs/pi/n3/Studies/ABCD/site03/processing/logs/comlogs/error_create_session_info_NDARINVGPH4CP68_baselineYear1Arm1_2023-03-01_14.12.47.776343

It seems like your mapping file is missing the dir data for DWI:

ABCD-DTI, SIEMENS, mosaic, original (baseline_year_1_arm_1) => DWI

This should be something like:

ABCD-DTI, SIEMENS, mosaic, original (baseline_year_1_arm_1) => DWI:dir98_AP

Cheers, Jure

@zoeypham please let us know if this fixed your issue. Thanks!

Yes, this is resolved! Thank you so much for your help :slight_smile:

Thank you so much for your help @demsarjure !

For data from another site that we previously processed (in 2022). We just used DWI to specify diffusion acquisitions (because we only have one DWI acquisition for each session) and it seemed to pass. I wondered if anything has changed since then on QuNex that has made it not ok for us to just use DWI now? The project that we are working on only collected on single diffusion and, currently, we are not quite sure about what type it is. Do you have any suggestions?


yes, the algorithm for parsing mapping file is now more strict and robust. Previous implementation had several issues and was buggy, because the grammar was not that well defined and strictly followed. Which is why direction is now a mandatory parameter for DWI, something that should be known in any case.

If I am not mistaken, you only have one DWI and not a pos/neg pair. In this case you will probably use the dwi_legacy pipeline? In that case the direction should not matter. You can try specifying:

ABCD-DTI, SIEMENS, mosaic, original (baseline_year_1_arm_1) => DWI:dir

Let me know how this goes.