Using a custom atlas in QSIprep - unrecognized argument?

Summary of what happened:

Dear neurostars experts,

I’m trying to use a custom atlas in QSIprep. I think I did all the things (followed: Reconstruction — qsiprep 0.21.5.dev1+g934bb0c documentation and QSIPrep problem about custom atlas:) but when I tried to get it to run, I received an error that said my argument was unrecognized (notably, the argument (–custom-atlases /path/to/atlas/) I was instructed to use here Reconstruction — qsiprep 0.21.5.dev1+g934bb0c documentation doesn’t seem to appear in Usage — qsiprep 0.21.4 documentation ? I don’t think? but definitely absolutely for sure could have missed something).

Any thoughts or suggestions anyone might have to provide would be so greatly appreciated :slight_smile: Thanks so much!

Command used (and if a helper script was used, a link to the helper script or the command generated):

Command run:
apptainer run --cleanenv qsiprep-0.19.1.sif /home/harrioem/Desktop/qsiprepdata /home/harrioem/Desktop/qsiprepdata/derivatives participant -w /home/harrioem/Desktop/qsiprepworkdir --fs-license-file /home/harrioem/Desktop/qsiprepadmin/FS720license --recon-spec /home/harrioem/Desktop/qsiprepadmin/jsonfiles/mrtrix_singleshell_ss3t_ACT-hsvs_edit.json --output-resolution 1.3 --freesurfer-input /home/harrioem/Desktop/qsiprepdata/derivatives/freesurfer --custom-atlases /home/harrioem/Desktop/qsiprepadmin/atlas/qsirecon_atlases

Version:

0.19.1

Environment (Docker, Singularity / Apptainer, custom installation):

Singularity

Data formatted according to a validatable standard? Please provide the output of the validator:

PASTE VALIDATOR OUTPUT HERE

Relevant log outputs (up to 20 lines):

Error received:
qsiprep: error: unrecognized arguments: --custom-atlases /home/harrioem/Desktop/qsiprepadmin/atlas/qsirecon_atlases

Screenshots / relevant information:

Hi @emilymharriott,

The custom atlases argument is only in the special wrapper functions (qsiprep-docker or qsiprep-singularity). If just using regular singularity you can run export SINGULARITYENV_ QSIRECON_ATLAS=/path/to/my/atlases and make sure to mount that path accordingly.

Best,
Steven

1 Like

Thank you so very much for your help!!! I tried this and got this seemingly unspecific error?

export APPTAINERENV_QSIRECON_ATLAS=/home/harrioem/Desktop/qsiprepadmin/atlas/qsirecon_atlases

apptainer run --cleanenv \
    --bind /home/harrioem/Desktop/qsiprepdata:/mnt/qsiprepdata \
    --bind /home/harrioem/Desktop/qsiprepdata/derivatives:/mnt/qsiprepdata/derivatives \
    --bind /home/harrioem/Desktop/qsiprepworkdir:/mnt/qsiprepworkdir \
    --bind /home/harrioem/Desktop/qsiprepadmin/FS720license:/mnt/qsiprepadmin/FS720license \
    --bind /home/harrioem/Desktop/qsiprepadmin/jsonfiles/mrtrix_singleshell_ss3t_ACT-hsvs_edit.json:/mnt/qsiprepadmin/jsonfiles/mrtrix_singleshell_ss3t_ACT-hsvs_edit.json \
    --bind /home/harrioem/Desktop/qsiprepdata/derivatives/freesurfer:/mnt/qsiprepdata/derivatives/freesurfer \
    --bind /home/harrioem/Desktop/qsiprepadmin/atlas/qsirecon_atlases:/mnt/qsiprepadmin/atlas/qsirecon_atlases \
    qsiprep-0.19.1.sif /mnt/qsiprepdata /mnt/qsiprepdata/derivatives participant \
    -w /mnt/qsiprepworkdir \
    --fs-license-file /mnt/qsiprepadmin/FS720license \
    --recon-spec /mnt/qsiprepadmin/jsonfiles/mrtrix_singleshell_ss3t_ACT-hsvs_edit.json \
    --output-resolution 1.3 \
    --freesurfer-input /mnt/qsiprepdata/derivatives/freesurfer

Things seemed to be running well until we got here:

[

Node] Finished "create_5tt_hsvs", elapsed time 1762.76883s.
240523-18:44:36,960 nipype.workflow INFO:
	 [Node] Setting-up "qsirecon_wf.sub-01_mrtrix_singleshell_ss3_hsvst.anat_ingress_wf.apply_header_to_5tt" in "/mnt/qsiprepworkdir/qsirecon_wf/sub-01_mrtrix_singleshell_ss3_hsvst/anat_ingress_wf/apply_header_to_5tt".
240523-18:44:36,965 nipype.workflow INFO:
	 [Node] Executing "apply_header_to_5tt" <qsiprep.interfaces.mrtrix.TransformHeader>
240523-18:44:38,392 nipype.workflow INFO:
	 [Node] Finished "apply_header_to_5tt", elapsed time 1.425779s.
Errors occurred while generating reports for participants: 01 (1).
Sentry is attempting to send 1 pending events
Waiting up to 2 seconds
Press Ctrl-C to quit
INFO:    Cleaning up image...

And if I go into /home/harrioem/Desktop/qsiprepdata/derivatives/qsirecon/sub-01/ I only see subfolders for /anat/ and /figures/ and /log/ no /dwi/ which is what I think I’m usually looking for?

Thank you so very much for your help – any further thoughts you have would be so greatly appreciated!

If it helps,
here is my mrtrix_singleshell_ss3t_ACT-hsvs_edit.json:

{
  "name": "mrtrix_singleshell_ss3_hsvst",
  "space": "T1w",
  "atlases": ["BrainnetomeChild224", "schaefer100", "schaefer200", "schaefer400", "brainnetome246", "aicha384", "gordon333", "aal116"],
  "anatomical": ["mrtrix_5tt_hsvs"],
  "nodes": [
    {
      "name": "ss3t_csd",
      "software": "MRTrix3",
      "action": "csd",
      "qsirecon_suffix": "MRtrix3_fork-SS3T_act-HSVS",
      "input": "qsiprep",
      "parameters": {
        "mtnormalize": true,
        "response": {
          "algorithm": "dhollander"
        },
        "fod": {
          "algorithm": "ss3t"
        }
      }
    },
    {
      "name": "track_ifod2",
      "software": "MRTrix3",
      "action": "tractography",
      "qsirecon_suffix": "MRtrix3_fork-SS3T_act-HSVS",
      "input": "ss3t_csd",
      "parameters": {
        "use_5tt": true,
        "method_5tt": "hsvs",
        "use_sift2": true,
        "tckgen":{
          "algorithm": "iFOD2",
          "select": 1e7,
          "max_length": 250,
          "min_length": 30,
          "power":0.33,
          "crop_at_gmwmi": true,
          "backtrack": true,
          "quiet": true
        },
        "sift2":{}
      }
    },
    {
      "name": "mrtrix_conn",
      "software": "MRTrix3",
      "action": "connectivity",
      "qsirecon_suffix": "MRtrix3_fork-SS3T_act-HSVS",
      "input": "track_ifod2",
      "parameters":{
        "tck2connectome": [
          {
            "zero_diagonal": false,
            "search_radius": 2,
            "scale_invnodevol": true,
            "symmetric": true,
            "use_sift_weights": true,
            "stat_edge": "sum",
            "measure": "sift_invnodevol_radius2_count"
          },
          {
            "zero_diagonal": false,
            "search_radius": 2,
            "scale_invnodevol": false,
            "symmetric": true,
            "length_scale": "length",
            "use_sift_weights": false,
            "stat_edge": "mean",
            "measure": "radius2_meanlength"
          },
          {
            "zero_diagonal": false,
            "search_radius": 2,
            "scale_invnodevol": false,
            "symmetric": true,
            "use_sift_weights": false,
            "stat_edge": "sum",
            "measure": "radius2_count"
          },
          {
            "zero_diagonal": false,
            "search_radius": 2,
            "scale_invnodevol": false,
            "symmetric": true,
            "use_sift_weights": true,
            "stat_edge": "sum",
            "measure": "sift_radius2_count"
          }
        ]
      }
    }
  ]
}

and here is the new addition to atlas_config.json:

{
  "BrainnetomeChild224": {
    "file": "CHILD_ATLAS_224.nii.gz",
    "node_names": [
      "SFG_L_1",
      "SFG_R_1",
      "SFG_L_2",
      "SFG_R_2",
      "SFG_L_3",
      "SFG_R_3",
      "SFG_L_4",
      "SFG_R_4",
      "SFG_L_5",
      "SFG_R_5",
      "SFG_L_6",
      "SFG_R_6",
      "MFG_L_1",
      "MFG_R_1",
      "MFG_L_2",
      "MFG_R_2",
      "MFG_L_3",
      "MFG_R_3",
      "MFG_L_4",
      "MFG_R_4",
      "MFG_L_5",
      "MFG_R_5",
      "MFG_L_6",
      "MFG_R_6",
      "MFG_L_7",
      "MFG_R_7",
      "IFG_L_1",
      "IFG_R_1",
      "IFG_L_2",
      "IFG_R_2",
      "IFG_L_3",
      "IFG_R_3",
      "IFG_L_4",
      "IFG_R_4",
      "IFG_L_5",
      "IFG_R_5",
      "IFG_L_6",
      "IFG_R_6",
      "OrG_L_1",
      "OrG_R_1",
      "OrG_L_2",
      "OrG_R_2",
      "OrG_L_3",
      "OrG_R_3",
      "OrG_L_4",
      "OrG_R_4",
      "OrG_L_5",
      "OrG_R_5",
      "OrG_L_6",
      "OrG_R_6",
      "PrG_L_1",
      "PrG_R_1",
      "PrG_L_2",
      "PrG_R_2",
      "PrG_L_3",
      "PrG_R_3",
      "PrG_L_4",
      "PrG_R_4",
      "PrG_L_5",
      "PrG_R_5",
      "PrG_L_6",
      "PrG_R_6",
      "PCL_L_1",
      "PCL_R_1",
      "PCL_L_2",
      "PCL_R_2",
      "STG_L_1",
      "STG_R_1",
      "STG_L_2",
      "STG_R_2",
      "STG_L_3",
      "STG_R_3",
      "STG_L_4",
      "STG_R_4",
      "STG_L_5",
      "STG_R_5",
      "STG_L_6",
      "STG_R_6",
      "MTG_L_1",
      "MTG_R_1",
      "MTG_L_2",
      "MTG_R_2",
      "MTG_L_3",
      "MTG_R_3",
      "MTG_L_4",
      "MTG_R_4",
      "ITG_L_1",
      "ITG_R_1",
      "ITG_L_2",
      "ITG_R_2",
      "ITG_L_3",
      "ITG_R_3",
      "ITG_L_4",
      "ITG_R_4",
      "ITG_L_5",
      "ITG_R_5",
      "FuG_L_1",
      "FuG_R_1",
      "FuG_L_2",
      "FuG_R_2",
      "FuG_L_3",
      "FuG_R_3",
      "PhG_L_1",
      "PhG_R_1",
      "PhG_L_2",
      "PhG_R_2",
      "PhG_L_3",
      "PhG_R_3",
      "PhG_L_4",
      "PhG_R_4",
      "PhG_L_5",
      "PhG_R_5",
      "PhG_L_6",
      "PhG_R_6",
      "pSTS_L_1",
      "pSTS_R_1",
      "pSTS_L_2",
      "pSTS_R_2",
      "SPL_L_1",
      "SPL_R_1",
      "SPL_L_2",
      "SPL_R_2",
      "SPL_L_3",
      "SPL_R_3",
      "IPL_L_1",
      "IPL_R_1",
      "IPL_L_2",
      "IPL_R_2",
      "IPL_L_3",
      "IPL_R_3",
      "IPL_L_4",
      "IPL_R_4",
      "IPL_L_5",
      "IPL_R_5",
      "IPL_L_6",
      "IPL_R_6",
      "PCun_L_1",
      "PCun_R_1",
      "PCun_L_2",
      "PCun_R_2",
      "PCun_L_3",
      "PCun_R_3",
      "PCun_L_4",
      "PCun_R_4",
      "PoG_L_1",
      "PoG_R_1",
      "PoG_L_2",
      "PoG_R_2",
      "PoG_L_3",
      "PoG_R_3",
      "PoG_L_4",
      "PoG_R_4",
      "Ins_L_1",
      "Ins_R_1",
      "Ins_L_2",
      "Ins_R_2",
      "Ins_L_3",
      "Ins_R_3",
      "CG_L_1",
      "CG_R_1",
      "CG_L_2",
      "CG_R_2",
      "CG_L_3",
      "CG_R_3",
      "CG_L_4",
      "CG_R_4",
      "CG_L_5",
      "CG_R_5",
      "MVOcC_L_1",
      "MVOcC_R_1",
      "MVOcC_L_2",
      "MVOcC_R_2",
      "MVOcC_L_3",
      "MVOcC_R_3",
      "MVOcC_L_4",
      "MVOcC_R_4",
      "MVOcC_L_5",
      "MVOcC_R_5",
      "LOcC_L_1",
      "LOcC_R_1",
      "LOcC_L_2",
      "LOcC_R_2",
      "LOcC_L_3",
      "LOcC_R_3",
      "LOcC_L_4",
      "LOcC_R_4",
      "LOcC_L_5",
      "LOcC_R_5",
      "Amyg_L_1",
      "Amyg_R_1",
      "Amyg_L_2",
      "Amyg_R_2",
      "Hipp_L_1",
      "Hipp_R_1",
      "Hipp_L_2",
      "Hipp_R_2",
      "BG_L_1",
      "BG_R_1",
      "BG_L_2",
      "BG_R_2",
      "BG_L_3",
      "BG_R_3",
      "BG_L_4",
      "BG_R_4",
      "BG_L_5",
      "BG_R_5",
      "BG_L_6",
      "BG_R_6",
      "Tha_L_1",
      "Tha_R_1",
      "Tha_L_2",
      "Tha_R_2",
      "Tha_L_3",
      "Tha_R_3",
      "Tha_L_4",
      "Tha_R_4",
      "Tha_L_5",
      "Tha_R_5",
      "Tha_L_6",
      "Tha_R_6",
      "Tha_L_7",
      "Tha_R_7",
      "Tha_L_8",
      "Tha_R_8",
    ],
    "node_ids": [
      1,
      2,
      3,
      4,
      5,
      6,
      7,
      8,
      9,
      10,
      11,
      12,
      13,
      14,
      15,
      16,
      17,
      18,
      19,
      20,
      21,
      22,
      23,
      24,
      25,
      26,
      27,
      28,
      29,
      30,
      31,
      32,
      33,
      34,
      35,
      36,
      37,
      38,
      39,
      40,
      41,
      42,
      43,
      44,
      45,
      46,
      47,
      48,
      49,
      50,
      51,
      52,
      53,
      54,
      55,
      56,
      57,
      58,
      59,
      60,
      61,
      62,
      63,
      64,
      65,
      66,
      67,
      68,
      69,
      70,
      71,
      72,
      73,
      74,
      75,
      76,
      77,
      78,
      79,
      80,
      81,
      82,
      83,
      84,
      85,
      86,
      87,
      88,
      89,
      90,
      91,
      92,
      93,
      94,
      95,
      96,
      97,
      98,
      99,
      100,
      101,
      102,
      103,
      104,
      105,
      106,
      107,
      108,
      109,
      110,
      111,
      112,
      113,
      114,
      115,
      116,
      117,
      118,
      119,
      120,
      121,
      122,
      123,
      124,
      125,
      126,
      127,
      128,
      129,
      130,
      131,
      132,
      133,
      134,
      135,
      136,
      137,
      138,
      139,
      140,
      141,
      142,
      143,
      144,
      145,
      146,
      147,
      148,
      149,
      150,
      151,
      152,
      153,
      154,
      155,
      156,
      157,
      158,
      159,
      160,
      161,
      162,
      163,
      164,
      165,
      166,
      167,
      168,
      169,
      170,
      171,
      172,
      173,
      174,
      175,
      176,
      177,
      178,
      179,
      180,
      181,
      182,
      183,
      184,
      185,
      186,
      187,
      188,
      189,
      190,
      191,
      192,
      193,
      194,
      195,
      196,
      197,
      198,
      199,
      200,
      201,
      202,
      203,
      204,
      205,
      206,
      207,
      208,
      209,
      210,
      211,
      212,
      213,
      214,
      215,
      216,
      217,
      218,
      219,
      220,
      221,
      222,
      223,
      224
    ]
  },

Hi @emilymharriott,

In the future, please format code/computer text files (e.g., JSONS) as code with the </> button in the text editor (or surround the text in tick marks (`).

Just to make sure we aren’t debugging an already addressed, please update versions and rerun with a fresh working directory.

I would also make sure the format of files of your custom atlas matches the files currently in the atlas folder.

Best,
Steven

1 Like