Skip to content

Closes #923 Subject ID format#944

Merged
MichaelStritt merged 3 commits intodevelopfrom
bug-#923_SubjectMissingBIDS2Legacy
Nov 26, 2021
Merged

Closes #923 Subject ID format#944
MichaelStritt merged 3 commits intodevelopfrom
bug-#923_SubjectMissingBIDS2Legacy

Conversation

@MichaelStritt
Copy link
Contributor

@MichaelStritt MichaelStritt commented Nov 25, 2021

Linked issue

Check out #923

How to test

Run the flavors import.

@MichaelStritt MichaelStritt self-assigned this Nov 25, 2021
@MichaelStritt MichaelStritt linked an issue Nov 25, 2021 that may be closed by this pull request
@MichaelStritt MichaelStritt added the import Related to data import module label Nov 25, 2021
@MichaelStritt

This comment has been minimized.

@MichaelStritt
Copy link
Contributor Author

@jan-petr: Please have a look at d4e689b. It is supposed to help with modularity & getting the subject id to the bids format. DCM2NII depends on the sourceStructure.json, but NII2BIDS, Deface and BIDS2Legacy have to be independent. This should work with this commit. In addition, the subject IDs are made BIDS compliant within DCM2NII now. This is done using an "export id" for the directory name. Think the code is quite clean and helps with comments from here and is somewhat related to this.

@MichaelStritt MichaelStritt changed the title Closes #923 (Subject ID format) Closes #923 Subject ID format Nov 26, 2021
@MichaelStritt
Copy link
Contributor Author

@jan-petr: This is kind of related to #945, so it would be nice to merge this (maybe today?), so that I can get some work done for #945. I'm testing right now if #923 doesn't break other flavors.

Copy link
Contributor

@jan-petr jan-petr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor reporting comment.

@MichaelStritt
Copy link
Contributor Author

@jan-petr: Okay, so if we ignore the PAR REC datasets and the Hadamards as well, then there's only a few left.

COMPARISON TABLE:
                        flavor                                dataset                      name                                            message                              
    _______________________________________________    ______________________    ________________________    ___________________________________________________________________

    'Philips_PCASL_2DEPI_3.2.2.1_2'                    'Both'                    'Different file content'    'Different file content: dataset_description.json'                 
    'Philips_PCASL_2DEPI_PARREC_1'                     'rawdata'                 'Missing folder'            '\sub-Sub01\ses-1\anat'                                            
    'Philips_PCASL_2DEPI_PARREC_1'                     'rawdata'                 'Missing file'              '\sub-Sub01\ses-1\anat\sub-Sub01_ses-1_T1w.json'                   
    'Philips_PCASL_2DEPI_PARREC_1'                     'rawdata'                 'Missing file'              '\sub-Sub01\ses-1\anat\sub-Sub01_ses-1_T1w.nii.gz'                 
    'Philips_PCASL_2DEPI_PARREC_1'                     'rawdata'                 'Missing file'              '\sub-Sub01\ses-1\perf\sub-Sub01_ses-1_asl.json'                   
    'Philips_PCASL_2DEPI_PARREC_1'                     'rawdata'                 'Missing file'              '\sub-Sub01\ses-1\perf\sub-Sub01_ses-1_asl.nii.gz'                 
    'Philips_PCASL_2DEPI_PARREC_1'                     'rawdata'                 'Missing file'              '\sub-Sub01\ses-1\perf\sub-Sub01_ses-1_aslcontext.tsv'             
    'Philips_PCASL_2DEPI_PARREC_2'                     'rawdata'                 'Missing file'              '\sub-Sub01\perf\sub-Sub01_asl.json'                               
    'Philips_PCASL_2DEPI_PARREC_2'                     'rawdata'                 'Missing file'              '\sub-Sub01\perf\sub-Sub01_asl.nii.gz'                             
    'Philips_PCASL_2DEPI_PARREC_2'                     'rawdata'                 'Missing file'              '\sub-Sub01\perf\sub-Sub01_aslcontext.tsv'                         
    'Siemens_PCASL_3DGRASE_VD13A_Hadamard4-FME_1'      'rawdata'                 'Missing file'              '\sub-Sub1\perf\sub-Sub1_asl.json'                                 
    'Siemens_PCASL_3DGRASE_VD13A_Hadamard4-FME_1'      'rawdata'                 'Missing file'              '\sub-Sub1\perf\sub-Sub1_asl.nii.gz'                               
    'Siemens_PCASL_3DGRASE_VD13A_Hadamard4-FME_1'      'rawdata'                 'Missing file'              '\sub-Sub1\perf\sub-Sub1_aslcontext.tsv'                           
    'Siemens_PCASL_3DGRASE_VD13A_Hadamard4-FME_1'      'rawdata'                 'Missing file'              '\sub-Sub1\perf\sub-Sub1_m0scan.json'                              
    'Siemens_PCASL_3DGRASE_VD13A_Hadamard4-FME_1'      'rawdata'                 'Missing file'              '\sub-Sub1\perf\sub-Sub1_m0scan.nii.gz'                            
    'Siemens_PCASL_3DGRASE_VD13A_Hadamard8-FME_1'      'rawdata'                 'Missing file'              '\sub-Sub1\perf\sub-Sub1_asl.json'                                 
    'Siemens_PCASL_3DGRASE_VD13A_Hadamard8-FME_1'      'rawdata'                 'Missing file'              '\sub-Sub1\perf\sub-Sub1_asl.nii.gz'                               
    'Siemens_PCASL_3DGRASE_VD13A_Hadamard8-FME_1'      'rawdata'                 'Missing file'              '\sub-Sub1\perf\sub-Sub1_aslcontext.tsv'                           
    'Siemens_PCASL_3DGRASE_VD13A_Hadamard8-FME_1'      'rawdata'                 'Missing file'              '\sub-Sub1\perf\sub-Sub1_m0scan.json'                              
    'Siemens_PCASL_3DGRASE_VD13A_Hadamard8-FME_1'      'rawdata'                 'Missing file'              '\sub-Sub1\perf\sub-Sub1_m0scan.nii.gz'                            
    'GE_PCASL_3Dspiral_24.0LX_WIP_1'                   'derivativesReference'    'Missing folder'            '\ExploreASL\temp'                                                 
    'GE_PCASL_3Dspiral_25.0LX_ADNI3_027_S_5079_1'      'derivativesReference'    'Missing file'              '\ExploreASL\sub-001\ASL_1\ASL4D.nii.gz'                           
    'GE_PCASL_3Dspiral_25.0LX_ADNI3_027_S_5079_1'      'derivativesReference'    'Missing file'              '\ExploreASL\sub-001\ASL_1\ASL4D_aslcontext.tsv'                   
    'GE_PCASL_3Dspiral_25.0LX_ADNI3_027_S_5079_1'      'derivatives'             'Missing file'              '\ExploreASL\sub-001\ASL_1\ASL4D.nii'                              
    'GE_PCASL_3Dspiral_25.0LX_ADNI3_027_S_5079_1'      'derivatives'             'Missing file'              '\ExploreASL\sub-001\ASL_1\ASL4D_Source.json'                      
    'GE_PCASL_3Dspiral_25.0LX_ADNI3_027_S_5079_1'      'derivatives'             'Missing file'              '\ExploreASL\sub-001\ASL_1\ASL4D_Source.nii'                       
    'GE_PCASL_3Dspiral_25.0LX_ADNI3_027_S_5079_1'      'derivatives'             'Missing file'              '\ExploreASL\sub-001\ASL_1\ASL4D_Source_aslcontext.tsv'            
    'GE_PCASL_3Dspiral_25.0LX_ADNI3_027_S_5079_1'      'derivatives'             'Missing file'              '\ExploreASL\sub-001\ASL_1\M0.json'                                
    'GE_PCASL_3Dspiral_25.0LX_ADNI3_027_S_5079_1'      'derivatives'             'Missing file'              '\ExploreASL\sub-001\ASL_1\M0.nii'                                 
    'GE_PCASL_3Dspiral_25.0LX_ADNI3_027_S_5079_1'      'Both'                    'Different file content'    'Different file content: \ExploreASL\sub-001\ASL_1\ASL4D.json'     
    'Philips_PASL_2DEPI_5.4.1.0_ADNI3_006_S_6681_1'    'Both'                    'Different file content'    'Different file content: \ExploreASL\sub-001\ASL_1\ASL4D.json'     
    'Philips_PCASL_2DEPI_3.2.2.1_2'                    'derivativesReference'    'Missing folder'            '\ExploreASL\temp'                                                 
    'Philips_PCASL_2DEPI_3.2.2.1_2'                    'Both'                    'Different file content'    'Different file content: \ExploreASL\dataset_description.json'     
    'Philips_PCASL_2DEPI_3.2.2.1_2'                    'Both'                    'Different file content'    'Different file content: \ExploreASL\sub-EMI301_1\ASL_1\ASL4D.json'
    'Philips_PCASL_2DEPI_3.2.2.1_2'                    'Both'                    'Different file content'    'Different file content: \ExploreASL\sub-EMI301_1\ASL_1\M0.json'   
    'Philips_PCASL_2DEPI_3.2.2.1_2'                    'Both'                    'Different file content'    'Different file content: \ExploreASL\sub-EMI301_1\FLAIR.json'      
    'Philips_PCASL_2DEPI_3.2.2.1_2'                    'Both'                    'Different file content'    'Different file content: \ExploreASL\sub-EMI301_1\T1.json'         
    'Philips_PCASL_2DEPI_5.1.9.1_GMB_1'                'derivativesReference'    'Missing folder'            '\ExploreASL\temp'                                                 
    'Philips_PCASL_2DEPI_PARREC_1'                     'derivativesReference'    'Missing folder'            '\ExploreASL\temp'                                                 
    'Philips_PCASL_2DEPI_PARREC_1'                     'derivatives'             'Missing folder'            '\ExploreASL\sub-Sub01\ASL_1'                                      
    'Philips_PCASL_2DEPI_PARREC_1'                     'derivativesReference'    'Missing file'              '\ExploreASL\temp\dcm2niiCatchedErrors.json'                       
    'Philips_PCASL_2DEPI_PARREC_1'                     'derivativesReference'    'Missing file'              '\ExploreASL\temp\dcm2niiCatchedErrors.mat'                        
    'Philips_PCASL_2DEPI_PARREC_1'                     'derivatives'             'Missing file'              '\ExploreASL\sub-Sub01\ASL_1\ASL4D.json'                           
    'Philips_PCASL_2DEPI_PARREC_1'                     'derivatives'             'Missing file'              '\ExploreASL\sub-Sub01\ASL_1\ASL4D.nii.gz'                         
    'Philips_PCASL_2DEPI_PARREC_1'                     'derivatives'             'Missing file'              '\ExploreASL\sub-Sub01\ASL_1\ASL4D_aslcontext.tsv'                 
    'Philips_PCASL_2DEPI_PARREC_1'                     'derivatives'             'Missing file'              '\ExploreASL\sub-Sub01\T1.json'                                    
    'Philips_PCASL_2DEPI_PARREC_1'                     'derivatives'             'Missing file'              '\ExploreASL\sub-Sub01\T1.nii.gz'                                  
    'Philips_PCASL_2DEPI_PARREC_2'                     'derivativesReference'    'Missing folder'            '\ExploreASL\temp'                                                 
    'Philips_PCASL_2DEPI_PARREC_2'                     'derivatives'             'Missing folder'            '\ExploreASL\sub-Sub01_1\ASL_1'                                    
    'Philips_PCASL_2DEPI_PARREC_2'                     'derivativesReference'    'Missing file'              '\ExploreASL\temp\dcm2niiCatchedErrors.json'                       
    'Philips_PCASL_2DEPI_PARREC_2'                     'derivativesReference'    'Missing file'              '\ExploreASL\temp\dcm2niiCatchedErrors.mat'                        
    'Philips_PCASL_2DEPI_PARREC_2'                     'derivatives'             'Missing file'              '\ExploreASL\sub-Sub01_1\ASL_1\ASL4D.json'                         
    'Philips_PCASL_2DEPI_PARREC_2'                     'derivatives'             'Missing file'              '\ExploreASL\sub-Sub01_1\ASL_1\ASL4D.nii.gz'                       
    'Philips_PCASL_2DEPI_PARREC_2'                     'derivatives'             'Missing file'              '\ExploreASL\sub-Sub01_1\ASL_1\ASL4D_aslcontext.tsv'               
    'Philips_PCASL_3DGRASE_5.4.0.2_1'                  'derivativesReference'    'Missing folder'            '\ExploreASL\temp'                                                 
    'Siemens_PASL_2DEPI_VB15A_ADNI2_941_S_4764_1'      'Both'                    'Different file content'    'Different file content: \ExploreASL\dataPar.json'                 
    'Siemens_PCASL_3DGRASE_VD13A_Hadamard4-FME_1'      'derivativesReference'    'Missing folder'            '\ExploreASL\temp'                                                 
    'Siemens_PCASL_3DGRASE_VD13A_Hadamard4-FME_1'      'derivatives'             'Missing folder'            '\ExploreASL\sub-Sub1_1\ASL_1'                                     
    'Siemens_PCASL_3DGRASE_VD13A_Hadamard4-FME_1'      'derivativesReference'    'Missing file'              '\ExploreASL\temp\dcm2niiCatchedErrors.json'                       
    'Siemens_PCASL_3DGRASE_VD13A_Hadamard4-FME_1'      'derivativesReference'    'Missing file'              '\ExploreASL\temp\dcm2niiCatchedErrors.mat'                        
    'Siemens_PCASL_3DGRASE_VD13A_Hadamard4-FME_1'      'derivatives'             'Missing file'              '\ExploreASL\sub-Sub1_1\ASL_1\ASL4D.json'                          
    'Siemens_PCASL_3DGRASE_VD13A_Hadamard4-FME_1'      'derivatives'             'Missing file'              '\ExploreASL\sub-Sub1_1\ASL_1\ASL4D.nii.gz'                        
    'Siemens_PCASL_3DGRASE_VD13A_Hadamard4-FME_1'      'derivatives'             'Missing file'              '\ExploreASL\sub-Sub1_1\ASL_1\ASL4D_aslcontext.tsv'                
    'Siemens_PCASL_3DGRASE_VD13A_Hadamard4-FME_1'      'derivatives'             'Missing file'              '\ExploreASL\sub-Sub1_1\ASL_1\M0.json'                             
    'Siemens_PCASL_3DGRASE_VD13A_Hadamard4-FME_1'      'derivatives'             'Missing file'              '\ExploreASL\sub-Sub1_1\ASL_1\M0.nii.gz'                           
    'Siemens_PCASL_3DGRASE_VD13A_Hadamard8-FME_1'      'derivativesReference'    'Missing folder'            '\ExploreASL\temp'                                                 
    'Siemens_PCASL_3DGRASE_VD13A_Hadamard8-FME_1'      'derivatives'             'Missing folder'            '\ExploreASL\sub-Sub1_1\ASL_1'                                     
    'Siemens_PCASL_3DGRASE_VD13A_Hadamard8-FME_1'      'derivativesReference'    'Missing file'              '\ExploreASL\temp\dcm2niiCatchedErrors.json'                       
    'Siemens_PCASL_3DGRASE_VD13A_Hadamard8-FME_1'      'derivativesReference'    'Missing file'              '\ExploreASL\temp\dcm2niiCatchedErrors.mat'                        
    'Siemens_PCASL_3DGRASE_VD13A_Hadamard8-FME_1'      'derivatives'             'Missing file'              '\ExploreASL\sub-Sub1_1\ASL_1\ASL4D.json'                          
    'Siemens_PCASL_3DGRASE_VD13A_Hadamard8-FME_1'      'derivatives'             'Missing file'              '\ExploreASL\sub-Sub1_1\ASL_1\ASL4D.nii.gz'                        
    'Siemens_PCASL_3DGRASE_VD13A_Hadamard8-FME_1'      'derivatives'             'Missing file'              '\ExploreASL\sub-Sub1_1\ASL_1\ASL4D_aslcontext.tsv'                
    'Siemens_PCASL_3DGRASE_VD13A_Hadamard8-FME_1'      'derivatives'             'Missing file'              '\ExploreASL\sub-Sub1_1\ASL_1\M0.json'                             
    'Siemens_PCASL_3DGRASE_VD13A_Hadamard8-FME_1'      'derivatives'             'Missing file'              '\ExploreASL\sub-Sub1_1\ASL_1\M0.nii.gz'                           
    'Siemens_PCASL_3DGRASE_VE11C_1'                    'derivativesReference'    'Missing folder'            '\ExploreASL\temp'                                                 

LOGGING TABLE:
  • Siemens_PCASL_3DGRASE_VE11C_1: Seems like it just didn't fully delete temp. The directory is there but it is empty.
  • Philips_PCASL_3DGRASE_5.4.0.2_: Same here.
  • Philips_PCASL_2DEPI_5.1.9.1_GMB_1: Same here.
  • GE_PCASL_3Dspiral_24.0LX_WIP_1: Same here.
  • Philips_PCASL_2DEPI_3.2.2.1_2: Seems like here there's just the version information of ExploreASL in the JSONs and that one differs.
  • GE_PCASL_3Dspiral_25.0LX_ADNI3_027_S_5079_1: Weirdly the ASL4D source NIFTI isn't there and the M0 is missing too, did we change something there?

Copy link
Contributor

@jan-petr jan-petr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK.

DCM2NII depends on sourceStructure.json, but NII2BIDS, Deface and BIDS2Legacy have to be independent. This should work with this commit. In addition, the subject IDs are made BIDS compliant within DCM2NII now.
@MichaelStritt MichaelStritt force-pushed the bug-#923_SubjectMissingBIDS2Legacy branch from 2511317 to 1ae5b03 Compare November 26, 2021 11:32
@MichaelStritt MichaelStritt merged commit 1ae5b03 into develop Nov 26, 2021
@MichaelStritt MichaelStritt deleted the bug-#923_SubjectMissingBIDS2Legacy branch November 26, 2021 11:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

import Related to data import module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BIDS2Legacy issue with certain subject names

2 participants