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

Fails conversion with tonii_all #140

Open
mschneider1711 opened this issue Sep 29, 2023 · 9 comments
Open

Fails conversion with tonii_all #140

mschneider1711 opened this issue Sep 29, 2023 · 9 comments
Assignees
Labels
bug Something isn't working

Comments

@mschneider1711
Copy link

mschneider1711 commented Sep 29, 2023

Describe the bug
A clear and concise description of what the bug is.
When I want to convert multiple datasets with tonii_all at the same time I get a bug that the input folder is not valid.
image
When I comment out the section where it checks if the parent folder is a pv_dataset it works and all my files are converted into nifti.
My folder structur is:
image

Expected behavior
In my case the BidsData folder should not be recognized as a pv_dataset and therefore the script should not stop at this point.

Desktop (please complete the following information):

  • Windows 11
  • Version v.0.3.10

@Aswendt-Lab
@arefks
@maswendt

@gdevenyi
Copy link
Collaborator

gdevenyi commented Oct 2, 2023

Please share the complete command you are using.

@mschneider1711
Copy link
Author

That's the command I'm using:

image

@gdevenyi
Copy link
Collaborator

gdevenyi commented Oct 3, 2023

And what are the contents of one of the subfolders of BidsData?

@mschneider1711
Copy link
Author

It is the raw dataset.

image

@gdevenyi
Copy link
Collaborator

gdevenyi commented Oct 3, 2023

Ok, the error is as expected. The tonii_all command is intended to be run on a single dataset, whereas you are running it on multiple datasets.

The error could be better in terms of what it says, since it wrongly indicates you're running on a single scan.

I think the solution here is an optional flag to tonii_all --recursive which will recurse down directories.

@mschneider1711
Copy link
Author

Unfortunately I get the same error when using it on a single dataset:

image

@dvm-shlee
Copy link
Member

@mschneider1711, apologies for the delayed response. Have you managed to resolve the issue? If not, could you please share the contents of the /Data folder located under /BidsData?

It seems there might be a misunderstanding causing the brkraw tonii_all command to treat BidsData as a single raw data set, whereas your initial method should have worked as expected. I am actively working on addressing issues within the BrkRaw package and expect to have enhancements ready by mid-May. If you're still encountering problems, I can assist you in testing with the new module, which should present fewer issues than the current version. Please consider that the complete code will be ready by May 15th.

@dvm-shlee dvm-shlee added this to the v0.4.0 release milestone May 15, 2024
@dvm-shlee dvm-shlee moved this to In Progress in BrkRaw v0.4 May 15, 2024
@dvm-shlee dvm-shlee self-assigned this May 15, 2024
@dvm-shlee dvm-shlee added the bug Something isn't working label May 15, 2024
@MrImaging
Copy link

I experienced this issue as well and could resolve it/work around it by zipping the raw data sets/folders, which then allowed me to apply tonii_all to multiple subjects and sessions simultaneuosly

@neginnes
Copy link

neginnes commented Jan 24, 2025

Hi,
I face the same issue as described here. This is while when using brkraw v0.2.14 I am able to use tonii_all to convert full study (it generates a new data folder and categorizes the converted outputs in Anat, DWI and Func folders). However v0.2.14 doesn't provide bval and bvec files for DWI and therefor I switched to v0.3.11. Unfortunately, zipping the entire study or the scans within it also didn't help me with using this version of brkraw to successfully convert the whole study. Has anyone found a solution to this problem?
Is there any way to get the same output at brkraw v0.2.14 from the latest version?

Below, I am sharing the raw folder structure and my error.

.
├── 1
│   ├── acqp
│   ├── AdjRefgProfiles.dat
│   ├── AdjStatePerScan
│   ├── configscan
│   ├── fid
│   ├── method
│   ├── pdata
│   │   └── 1
│   │       ├── 2dseq
│   │       ├── id
│   │       ├── methreco
│   │       ├── procs
│   │       ├── reco
│   │       └── visu_pars
│   ├── pulseprogram
│   ├── specpar
│   ├── spnam0
│   ├── spnam40
│   ├── uxnmr.info
│   ├── uxnmr.par
│   └── visu_pars
├── 10
│   ├── acqp
│   ├── AdjStatePerScan
│   ├── configscan
│   ├── fid
│   ├── method
│   ├── pdata
│   │   └── 1
│   │       ├── 2dseq
│   │       ├── id
│   │       ├── procs
│   │       ├── reco
│   │       └── visu_pars
│   ├── pulseprogram
│   ├── specpar
│   ├── spnam0
│   ├── uxnmr.info
│   ├── uxnmr.par
│   └── visu_pars
├── 11
│   ├── acqp
│   ├── AdjStatePerScan
│   ├── configscan
│   ├── fid
│   ├── method
│   ├── pdata
│   │   └── 1
│   │       ├── 2dseq
│   │       ├── id
│   │       ├── procs
│   │       ├── reco
│   │       └── visu_pars
│   ├── pulseprogram
│   ├── specpar
│   ├── spnam0
│   ├── uxnmr.info
│   ├── uxnmr.par
│   └── visu_pars
├── 12
│   ├── acqp
│   ├── AdjStatePerScan
│   ├── configscan
│   ├── fid
│   ├── method
│   ├── pdata
│   │   ├── 1
│   │   │   ├── 2dseq
│   │   │   ├── id
│   │   │   ├── methreco
│   │   │   ├── procs
│   │   │   ├── reco
│   │   │   ├── roi
│   │   │   └── visu_pars
│   │   └── 2
│   │       ├── 2dseq
│   │       ├── d3proc
│   │       ├── id
│   │       ├── isa
│   │       ├── roi
│   │       └── visu_pars
│   ├── pulseprogram
│   ├── specpar
│   ├── spnam40
│   ├── uxnmr.info
│   ├── uxnmr.par
│   └── visu_pars
├── 13
│   ├── acqp
│   ├── AdjRefgProfiles.dat
│   ├── AdjStatePerScan
│   ├── configscan
│   ├── fid
│   ├── method
│   ├── pdata
│   │   └── 1
│   │       ├── 2dseq
│   │       ├── id
│   │       ├── methreco
│   │       ├── procs
│   │       ├── reco
│   │       └── visu_pars
│   ├── pulseprogram
│   ├── specpar
│   ├── spnam0
│   ├── spnam40
│   ├── uxnmr.info
│   ├── uxnmr.par
│   └── visu_pars
├── 14
│   ├── acqp
│   ├── AdjRefgProfiles.dat
│   ├── AdjStatePerScan
│   ├── configscan
│   ├── fid
│   ├── method
│   ├── pdata
│   │   └── 1
│   │       ├── 2dseq
│   │       ├── id
│   │       ├── methreco
│   │       ├── procs
│   │       ├── reco
│   │       └── visu_pars
│   ├── pulseprogram
│   ├── specpar
│   ├── spnam0
│   ├── spnam40
│   ├── uxnmr.info
│   ├── uxnmr.par
│   └── visu_pars
├── 15
│   ├── acqp
│   ├── AdjStatePerScan
│   ├── configscan
│   ├── fid
│   ├── method
│   ├── pdata
│   │   └── 1
│   │       ├── 2dseq
│   │       ├── id
│   │       ├── methreco
│   │       ├── procs
│   │       ├── reco
│   │       └── visu_pars
│   ├── pulseprogram
│   ├── specpar
│   ├── spnam0
│   ├── uxnmr.info
│   ├── uxnmr.par
│   └── visu_pars
├── 2
│   ├── acqp
│   ├── AdjStatePerScan
│   ├── configscan
│   ├── method
│   ├── pdata
│   │   └── 1
│   │       ├── id
│   │       ├── methreco
│   │       └── reco
│   ├── pulseprogram
│   ├── specpar
│   ├── spnam0
│   ├── uxnmr.info
│   └── uxnmr.par
├── 3
│   ├── acqp
│   ├── AdjStatePerScan
│   ├── configscan
│   ├── fid
│   ├── method
│   ├── pdata
│   │   └── 1
│   │       ├── 2dseq
│   │       ├── id
│   │       ├── procs
│   │       ├── reco
│   │       └── visu_pars
│   ├── pulseprogram
│   ├── specpar
│   ├── spnam1
│   ├── uxnmr.info
│   ├── uxnmr.par
│   └── visu_pars
├── 4
│   ├── acqp
│   ├── AdjStatePerScan
│   ├── configscan
│   ├── fid
│   ├── method
│   ├── pdata
│   │   └── 1
│   │       ├── 2dseq
│   │       ├── id
│   │       ├── procs
│   │       ├── reco
│   │       └── visu_pars
│   ├── pulseprogram
│   ├── specpar
│   ├── uxnmr.info
│   ├── uxnmr.par
│   └── visu_pars
├── 5
│   ├── acqp
│   ├── AdjStatePerScan
│   ├── configscan
│   ├── fid
│   ├── method
│   ├── pdata
│   │   └── 1
│   │       ├── 2dseq
│   │       ├── id
│   │       ├── procs
│   │       ├── reco
│   │       └── visu_pars
│   ├── pulseprogram
│   ├── specpar
│   ├── uxnmr.info
│   ├── uxnmr.par
│   └── visu_pars
├── 6
│   ├── acqp
│   ├── AdjStatePerScan
│   ├── configscan
│   ├── fid
│   ├── method
│   ├── pdata
│   │   └── 1
│   │       ├── 2dseq
│   │       ├── id
│   │       ├── procs
│   │       ├── reco
│   │       └── visu_pars
│   ├── pulseprogram
│   ├── specpar
│   ├── uxnmr.info
│   ├── uxnmr.par
│   └── visu_pars
├── 7
│   ├── acqp
│   ├── AdjStatePerScan
│   ├── configscan
│   ├── fid
│   ├── method
│   ├── pdata
│   │   └── 1
│   │       ├── 2dseq
│   │       ├── id
│   │       ├── procs
│   │       ├── reco
│   │       └── visu_pars
│   ├── pulseprogram
│   ├── specpar
│   ├── spnam40
│   ├── uxnmr.info
│   ├── uxnmr.par
│   └── visu_pars
├── 8
│   ├── acqp
│   ├── AdjStatePerScan
│   ├── configscan
│   ├── fid
│   ├── method
│   ├── pdata
│   │   └── 1
│   │       ├── 2dseq
│   │       ├── id
│   │       ├── procs
│   │       ├── reco
│   │       └── visu_pars
│   ├── pulseprogram
│   ├── specpar
│   ├── spnam1
│   ├── spnam40
│   ├── uxnmr.info
│   ├── uxnmr.par
│   └── visu_pars
├── 9
│   ├── acqp
│   ├── AdjStatePerScan
│   ├── configscan
│   ├── fid
│   ├── method
│   ├── pdata
│   │   └── 1
│   │       ├── 2dseq
│   │       ├── id
│   │       ├── procs
│   │       ├── reco
│   │       └── visu_pars
│   ├── pulseprogram
│   ├── specpar
│   ├── spnam0
│   ├── uxnmr.info
│   ├── uxnmr.par
│   └── visu_pars
├── AdjResult
│   ├── 2.16.756.5.5.100.279771525.10448.1725383903.18
│   │   └── result.jcamp
│   ├── 2.16.756.5.5.100.279771525.14755.1725384542.18
│   │   └── result.jcamp
│   ├── 2.16.756.5.5.100.279771525.18160.1725384808.18
│   │   └── result.jcamp
│   ├── 2.16.756.5.5.100.279771525.21172.1725385167.18
│   │   └── result.jcamp
│   ├── 2.16.756.5.5.100.279771525.21497.1725382381.11
│   │   └── result.jcamp
│   ├── 2.16.756.5.5.100.279771525.21497.1725382381.12
│   │   └── result.jcamp
│   ├── 2.16.756.5.5.100.279771525.21497.1725382381.13
│   │   └── result.jcamp
│   ├── 2.16.756.5.5.100.279771525.21497.1725382381.14
│   │   └── result.jcamp
│   ├── 2.16.756.5.5.100.279771525.22653.1725385466.19
│   │   └── result.jcamp
│   ├── 2.16.756.5.5.100.279771525.24293.1725385764.20
│   │   └── result.jcamp
│   ├── 2.16.756.5.5.100.279771525.25000.1725382610.15
│   │   └── result.jcamp
│   ├── 2.16.756.5.5.100.279771525.25000.1725382610.16
│   │   └── result.jcamp
│   ├── 2.16.756.5.5.100.279771525.25000.1725382610.17
│   │   └── result.jcamp
│   ├── 2.16.756.5.5.100.279771525.25000.1725382610.18
│   │   └── result.jcamp
│   ├── 2.16.756.5.5.100.279771525.26645.1725386224.21
│   │   └── result.jcamp
│   ├── 2.16.756.5.5.100.279771525.28505.1725382870.19
│   │   └── result.jcamp
│   ├── 2.16.756.5.5.100.279771525.7087.1725383497.22
│   │   └── result.jcamp
│   ├── 2.16.756.5.5.100.279771525.8357.1725381337.10
│   │   └── result.jcamp
│   ├── 2.16.756.5.5.100.279771525.8357.1725381337.7
│   │   └── result.jcamp
│   ├── 2.16.756.5.5.100.279771525.8357.1725381337.8
│   │   └── result.jcamp
│   ├── 2.16.756.5.5.100.279771525.8357.1725381337.9
│   │   └── result.jcamp
│   ├── 2.16.756.5.5.100.279771525.8508.1725383642.18
│   │   └── result.jcamp
│   └── 2.16.756.5.5.100.279771525.9476.1725383773.18
│       └── result.jcamp
├── AdjStatePerStudy
├── ResultState
├── ScanProgram.scanProgram
└── subject
brkraw tonii_all Raw/
[Error] Invalid input path: Raw/
         The input path indicates raw data itself. 
        You must input the parents folder instead of path of the raw data
        If you want to convert single session raw data, use (tonii) instead.
NoneType: None
Traceback (most recent call last):
  File "/home/negin/envs/my3env/bin/brkraw", line 11, in <module>
    load_entry_point('brkraw==0.3.10', 'console_scripts', 'brkraw')()
  File "/home/negin/envs/my3env/lib/python3.8/site-packages/brkraw/scripts/brkraw.py", line 219, in main
    raise InvalidApproach(invalid_error_message)
brkraw.lib.errors.InvalidApproach: [Error] Invalid input path: Raw/

I also tried using 'info' but that also failed:

brkraw info Raw/
Traceback (most recent call last):
  File "/home/negin/envs/my3env/bin/brkraw", line 11, in <module>
    load_entry_point('brkraw==0.3.10', 'console_scripts', 'brkraw')()
  File "/home/negin/envs/my3env/lib/python3.8/site-packages/brkraw/scripts/brkraw.py", line 111, in main
    study.info()
  File "/home/negin/envs/my3env/lib/python3.8/site-packages/brkraw/lib/loader.py", line 721, in info
    dim, cls = self._get_dim_info(visu_pars)
  File "/home/negin/envs/my3env/lib/python3.8/site-packages/brkraw/lib/loader.py", line 867, in _get_dim_info
    if not all(map(lambda x: x == 'spatial', dim_desc)):
TypeError: 'NoneType' object is not iterable

@dvm-shlee

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: In Progress
Development

No branches or pull requests

5 participants