Dcm2bids "Sidecar Pairing: No pairing Was Found"

I am in the process of trying to use dcm2bids to convert a new dataset to NifTI in the BIDS format. This is my first time using a fully BIDS compliant format. I successfully installed dcm2bids and ran the entire tutorial found here: First steps - dcm2bids documentation so I think the software is working correctly.

I attempted to test in on my own data starting with a single resting state scan, both the data and the configuration file are in a file structure generated by dcm2bids_scaffold:

Here’s my code: dcm2bids -d sourcedata/F001_002_30D -p F001002 -s 30D -c code/dcm2bids_config.json --auto_extract_entities

I get this warning:

INFO    | SIDECAR PAIRING
WARNING | NO PAIRING WAS FOUND. BIDS FOLDER "/USERS/RACHEL.SHARKEY1/DOCUMENTS/CODETEST/SHREDTEST/BIDSTEST1/SUB-F001002/SES-30D" WON'T BE CREATED. CHECK YOUR CONFIG FILE.

This is what my config file looks like:


{
  "descriptions": [
    {
      "id": "task-rest",
      "datatype": "func",
      "suffix": "bold",
      "custom_entities": "task-rest",
      "criteria": {
        "SeriesDescription": "fMRI_Resting_State_AP"
      }
    }
  ]
}

I tested this in a JSON validator and it says its valid. when I convert the DICOM files using dcm2niix it appears to work fine and the command grep “fMRI_Resting_State_AP” *.json returns the single file I’m expecting.

I’m totally at a loss, I don’t understand why this isn’t working, what else I could to to test it or where I can get more information.

Hi @RSharkey and welcome to neurostars!

We would need to see the contents of the json you are trying to pair. Please provide it, formatted as code by using the </> button in the text editor.

Best,
Steven

Sorry about that

This is the JSON

{
	"Modality": "MR",
	"MagneticFieldStrength": 3,
	"ImagingFrequency": 127.774,
	"Manufacturer": "GE",
	"PulseSequenceName": "multiband/mux_epi",
	"InternalPulseSequenceName": "EPI",
	"ManufacturersModelName": "DISCOVERY MR750",
	"BodyPartExamined": "BRAIN",
	"PatientPosition": "HFS",
	"SoftwareVersions": "27\\LX\\MR Software release:DV26.0_R03_1831.b",
	"MRAcquisitionType": "2D",
	"SeriesDescription": "fMRI_Resting_State_AP",
	"ProtocolName": "Research - SHRED update",
	"ScanningSequence": "EP\\RM",
	"SequenceVariant": "NONE",
	"ScanOptions": "EDR_GEMS\\MP_GEMS\\EPI_GEMS\\HYPERBAND_GEMS",
	"ImageType": ["ORIGINAL", "PRIMARY", "OTHER"],
	"SeriesNumber": 4,
	"AcquisitionTime": "15:01:2.000000",
	"AcquisitionNumber": 1,
	"TriggerDelayTime": 3267,
	"SliceThickness": 3,
	"SpacingBetweenSlices": 3,
	"SAR": 0.117309,
	"EchoTime": 0.03,
	"RepetitionTime": 0.6,
	"FlipAngle": 52,
	"PhaseEncodingPolarityGE": "Unflipped",
	"CoilString": "Nova32ch",
	"MultibandAccelerationFactor": 6,
	"PercentPhaseFOV": 100,
	"PercentSampling": 100,
	"AcquisitionMatrixPE": 80,
	"ReconMatrixPE": 80,
	"EffectiveEchoSpacing": 0.000484,
	"TotalReadoutTime": 0.038236,
	"PixelBandwidth": 6250,
	"PhaseEncodingDirection": "j-",
	"SliceTiming": [
		0,
		0.333333,
		0.0666667,
		0.4,
		0.133333,
		0.466667,
		0.2,
		0.533333,
		0.266667,
		0,
		0.333333,
		0.0666667,
		0.4,
		0.133333,
		0.466667,
		0.2,
		0.533333,
		0.266667,
		0,
		0.333333,
		0.0666667,
		0.4,
		0.133333,
		0.466667,
		0.2,
		0.533333,
		0.266667,
		0,
		0.333333,
		0.0666667,
		0.4,
		0.133333,
		0.466667,
		0.2,
		0.533333,
		0.266667,
		0,
		0.333333,
		0.0666667,
		0.4,
		0.133333,
		0.466667,
		0.2,
		0.533333,
		0.266667,
		0,
		0.333333,
		0.0666667,
		0.4,
		0.133333	],
	"ImageOrientationPatientDICOM": [
		0.99513,
		-0.09677,
		0.01854,
		0.09758,
		0.94186,
		-0.32154	],
	"InPlanePhaseEncodingDirectionDICOM": "COL",
	"ConversionSoftware": "dcm2niix",
	"ConversionSoftwareVersion": "v1.0.20220505"
}

Can you make sure you’re using the most recent versions of dcm2bids and dcm2niix?

2024-08-15 15:35:00.955 - INFO     - dcm2bids.main | OS version: macOS-14.6-arm64-arm-64bit
2024-08-15 15:35:00.955 - INFO     - dcm2bids.main | Python version: 3.12.4 (v3.12.4:8e8a4baf65, Jun  6 2024, 17:33:18) [Clang 13.0.0 (clang-1300.0.29.30)]
2024-08-15 15:35:00.956 - INFO     - dcm2bids.main | dcm2bids version: 3.2.0
2024-08-15 15:35:00.993 - INFO     - dcm2bids.main | dcm2niix version: v1.0.20220505

This is what’s listed in the log file

It looks like there’s a newer version of dcm2niix available.

Just to make sure, is the argument you’re passing into -d the folder that contains the dicoms or the dcm2niix output? Did you run dcm2bids_helper on this subject before making the config?

-d is aimed at the folder containing the dicoms and yes I did run the helper on this subject (although in a separate folder).

I am looking for this now but I can’t figure out how to update the software without installing it from scratch. When I run the command it says “looking for software updates failed because you’re probably not connected to the internet” but I am, in fact, connected to the internet.

Can you share the full dcm2bids log from your original command?

Here’s the log:

2024-08-15 15:35:00.945 - INFO     - dcm2bids.main | --- dcm2bids start ---
2024-08-15 15:35:00.946 - INFO     - dcm2bids.main | Running the following command: /Library/Frameworks/Python.framework/Versions/3.12/bin/dcm2bids -d sourcedata/F01_002_B0 -p F001002 -s B0 -c code/dcm2bids_config.json --auto_extract_entities
2024-08-15 15:35:00.955 - INFO     - dcm2bids.main | OS version: macOS-14.6-arm64-arm-64bit
2024-08-15 15:35:00.955 - INFO     - dcm2bids.main | Python version: 3.12.4 (v3.12.4:8e8a4baf65, Jun  6 2024, 17:33:18) [Clang 13.0.0 (clang-1300.0.29.30)]
2024-08-15 15:35:00.956 - INFO     - dcm2bids.main | dcm2bids version: 3.2.0
2024-08-15 15:35:00.993 - INFO     - dcm2bids.main | dcm2niix version: v1.0.20220505
2024-08-15 15:35:00.993 - INFO     - dcm2bids.main | Checking for software update
2024-08-15 15:35:01.131 - WARNING  - tools.check_github_latest | Checking latest version of UNFmontreal/Dcm2Bids was not possible, your machine is probably not connected to the Internet.
2024-08-15 15:35:01.131 - DEBUG    - tools.check_github_latest | Reason [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1000)
2024-08-15 15:35:01.361 - WARNING  - tools.check_github_latest | Checking latest version of rordenlab/dcm2niix was not possible, your machine is probably not connected to the Internet.
2024-08-15 15:35:01.362 - DEBUG    - tools.check_github_latest | Reason [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1000)
2024-08-15 15:35:01.362 - INFO     - dcm2bids.main | participant: sub-F001002
2024-08-15 15:35:01.362 - INFO     - dcm2bids.main | session: ses-B0
2024-08-15 15:35:01.363 - INFO     - dcm2bids.main | config: /Users/rachel.sharkey1/Documents/CodeTest/SHredTest/BIDSTest1/code/dcm2bids_config.json
2024-08-15 15:35:01.363 - INFO     - dcm2bids.main | BIDS directory: /Users/rachel.sharkey1/Documents/CodeTest/SHredTest/BIDSTest1
2024-08-15 15:35:01.363 - INFO     - dcm2bids.main | Auto extract entities: True
2024-08-15 15:35:01.363 - INFO     - dcm2bids.main | Reorder entities: True
2024-08-15 15:35:01.363 - INFO     - dcm2bids.main | Validate BIDS: False

2024-08-15 15:35:01.365 - INFO     - utils.run_shell_command | Running: dcm2niix -b y -ba y -z y -f %3s_%f_%p_%t -o /Users/rachel.sharkey1/Documents/CodeTest/SHredTest/BIDSTest1/tmp_dcm2bids/sub-F001002_ses-B0 sourcedata/F01_002_B0
2024-08-15 15:35:01.424 - DEBUG    - dcm2niix_gen.execute | 
Compression will be faster with 'pigz' installed http://macappstore.org/pigz/
Chris Rorden's dcm2niiX version v1.0.20220505  Clang15.0.0 ARM (64-bit MacOS)

2024-08-15 15:35:01.424 - INFO     - dcm2niix_gen.execute | Check log file for dcm2niix output

2024-08-15 15:35:01.425 - INFO     - sidecar.build_acquisitions | SIDECAR PAIRING
2024-08-15 15:35:01.425 - WARNING  - dcm2bids_gen.run | NO PAIRING WAS FOUND. BIDS FOLDER "/USERS/RACHEL.SHARKEY1/DOCUMENTS/CODETEST/SHREDTEST/BIDSTEST1/SUB-F001002/SES-B0" WON'T BE CREATED. CHECK YOUR CONFIG FILE.

2024-08-15 15:35:01.425 - INFO     - dcm2bids.main | Logs saved in /Users/rachel.sharkey1/Documents/CodeTest/SHredTest/BIDSTest1/tmp_dcm2bids/log/sub-F001002_ses-B0_20240815-153500.log
2024-08-15 15:35:01.425 - INFO     - dcm2bids.main | --- dcm2bids end ---

I’ve gone back in and run this again on a totally clean set of files and it seems to work on those, weirdly, I didn’t rerun helper, I used the specifications from this fileset. So I’m wondering if this set of files, specifically, is corrupted, or misconverted somehow.

Maybe :confused: would it be possible to share a subject’s dicoms?

Hi @RSharkey ,

Did you fix your issue ? One thing Steven forgot to mention, you can also give a try to our new container.
It’s an easy way to make everything run smoothly without having to install anything.

Like Steven said if you could share some dicoms it would be easier to help you,

Best,
Arnaud