Batching

63 views
Skip to first unread message

Arian Klows

unread,
Apr 26, 2022, 10:59:58 AM4/26/22
to dsi-s...@googlegroups.com
Hello Frank,

I was trying to explore the network measures in dsi studio. 

I figured out how to derive the network measures such as clustering coefficient, local efficiency etc for each subject. But don’t know how to do it for multiple subjects. 

Is there a way to extract the network measures using a batch function? Please help. Thanks. 

Frank Yeh

unread,
Apr 26, 2022, 11:10:05 AM4/26/22
to dsi-s...@googlegroups.com

--
You received this message because you are subscribed to the Google Groups "DSI Studio" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dsi-studio+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dsi-studio/CAE5BcJ%3Dp7JT_HpB5pFVXJRDP03iOmFpgkdR2KE8KAfNxfrWv7g%40mail.gmail.com.

Arian Klows

unread,
Apr 26, 2022, 11:19:17 AM4/26/22
to dsi-s...@googlegroups.com

Arian Klows

unread,
Apr 26, 2022, 12:03:31 PM4/26/22
to dsi-s...@googlegroups.com
Hi Frank,

For deriving network measures from multiple subjects, I created a folder with all FIB files. Inside the folder, I created another .bat file with the following:
path=C:/Users/ARIAN/Desktop/dsi_studio
for /f "delims=" %%x in ('dir *.fib.gz /b /d /s') do (
    call dsi_studio.exe --action=trk --source="%%x" --seed_count=1000000 --thread_count=8 --output=no_file --connectivity=AAL > "%%x.log.txt"
)

Then I pressed run command line and selected the folder with FIB files and .bat, but nothing happened. Am I doing something wrong?

Frank Yeh

unread,
Apr 26, 2022, 12:07:22 PM4/26/22
to dsi-s...@googlegroups.com
If this is your first time using the DSI Studio command line, I would suggest trying other simpler commands first just to make sure it works.
Best regards,
Frank


Arian Klows

unread,
Apr 26, 2022, 12:12:43 PM4/26/22
to dsi-s...@googlegroups.com
I just simply typed 

path=C:/Users/ARIAN/Desktop/dsi_studio

But it’s throwin an error 
Cannot parse:path

Why is it so? Any suggestions?

Frank Yeh

unread,
Apr 26, 2022, 12:31:29 PM4/26/22
to dsi-s...@googlegroups.com
Sorry, this is beyond the scope of DSI Studio.
You can check out videos teaching how to use Windows batch. (e.g.
search windows batch on Youtube).

Frank
> To view this discussion on the web visit https://groups.google.com/d/msgid/dsi-studio/CAE5BcJnPkBKRNVsmnuWag2n%2BfmQbtf6cvnAXeE%3DZ447Fwh_LwQ%40mail.gmail.com.

Arian Klows

unread,
Apr 26, 2022, 12:56:47 PM4/26/22
to dsi-s...@googlegroups.com
I figured it out. Thanks.

The script is working. But there is an error. I don’t have aal atlas in my dsi studio folder. 

searching AAL from the atlas pool...
ERROR: did not find atlas at C:/Users/ARIAN/Desktop/dsi_studio/atlas/AAL.nii.gz
ERROR: file or atlas does not exist:AAL

The folder which has atlas looks like the attached image.



ICBM152 folder has AAl atlas though. Should I copy past it outside this folder and rename it? 



Frank Yeh

unread,
Apr 26, 2022, 1:12:28 PM4/26/22
to dsi-s...@googlegroups.com
You may check the Atlas button at Step T3a to see what atlases are available.
Frank

Arian Klows

unread,
Apr 26, 2022, 1:22:53 PM4/26/22
to dsi-s...@googlegroups.com
Thanks Frank and sorry to bother you with my problems. 

I put the atlas to the path and it started running. But the output is so strange with 0s and nans :(

Any idea why is it so? 

Frank Yeh

unread,
Apr 26, 2022, 1:41:36 PM4/26/22
to dsi-s...@googlegroups.com
Could you post the full command you use and the log output?

Arian Klows

unread,
Apr 26, 2022, 3:20:16 PM4/26/22
to dsi-s...@googlegroups.com
The full command was

path=C:/Users/ARIAN/Desktop/dsi_studio
for /f "delims=" %%x in ('dir *.fib.gz /b /d /s') do (
    call dsi_studio.exe --action=trk --source="%%x" --seed_count=1000000 --thread_count=8 --output=no_file --connectivity=AAL2 > "%%x.log.txt"
)
  Attaching the output. Thank you. 
3104.src.gz.icbm152.qsdr.1.25.R71.fib.gz.log.txt
3104.src.gz.icbm152.qsdr.1.25.R71.fib.gz.tt.gz.AAL2.count.end.connectogram.txt
3104.src.gz.icbm152.qsdr.1.25.R71.fib.gz.tt.gz.AAL2.count.end.network_measures.txt

Frank Yeh

unread,
Apr 26, 2022, 3:29:10 PM4/26/22
to dsi-s...@googlegroups.com
The data seems to have quality issues. Please check DWI and
tractography quality: https://www.youtube.com/watch?v=stL4GMeTC1I
You will also need to verify the accuracy using GUI before going for
the command line.
Hop this helps,
Frank

Arian Klows

unread,
Apr 27, 2022, 12:48:16 PM4/27/22
to dsi-s...@googlegroups.com

Thank you very much for letting me know. 
--
You received this message because you are subscribed to the Google Groups "DSI Studio" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dsi-studio+...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages