wb_command -cifti-export-dense-mapping may be useful for getting the voxel seeds in the correct order (for the surface, you may be able to just use the file from the HCP Pipelines global/templates/91282_Greyordinates folder).
I seem to recall that previously we did this in 3 probtrackx runs, and concatenated them back together afterwards. But, the best way to do this mostly depends on what probtrackx is capable of, which I don't really know. Tim On Fri, Nov 9, 2018 at 7:24 PM, Leonardo Tozzi <lto...@stanford.edu> wrote: > Dear Matt, > > > > In my previous call, I did get a matrix called fdt_matrix1.dot, which is > large (1.33 GB). I guess this is a dense matrix, but then I wonder again, > there might be something wrong there as well with the positioning of the > subcortical structures, since I used them as seeds. > > So I could make the same call as before, with the –avoid flag for the CSF > but I guess I would still at least need to input the GrayOrdinates.txt > which is still a list of seeds (-x option). How would I obtain the seed > list for the grayordinates? > Thank you, > > > > > > Leonardo Tozzi, MD, PhD > > Williams PanLab | Postdoctoral Fellow > > Stanford University | 401 Quarry Rd > <https://maps.google.com/?q=401+Quarry+Rd&entry=gmail&source=g> > > lto...@stanford.edu | (650) 5615738 > > > > > > *From: *"Glasser, Matthew" <glass...@wustl.edu> > *Date: *Friday, November 9, 2018 at 5:17 PM > *To: *Leonardo Tozzi <lto...@stanford.edu>, NEUROSCIENCE tim < > tsc...@mst.edu> > *Cc: *Stamatios Sotiropoulos <stamatios.sotiropou...@ndcn.ox.ac.uk>, > hcp-users <hcp-users@humanconnectome.org> > > *Subject: *Re: [HCP-Users] Diffusion connectivity matrix with cortical > and subcortical parcellation > > > > I think that --omatrix1 always outputs a dense matrix. > > > > Matt. > > > > *From: *Leonardo Tozzi <lto...@stanford.edu> > *Date: *Friday, November 9, 2018 at 7:15 PM > *To: *Timothy Coalson <tsc...@mst.edu> > *Cc: *Matt Glasser <glass...@wustl.edu>, Stamatios Sotiropoulos < > stamatios.sotiropou...@ndcn.ox.ac.uk>, hcp-users < > hcp-users@humanconnectome.org> > *Subject: *Re: [HCP-Users] Diffusion connectivity matrix with cortical > and subcortical parcellation > > > > Dear Timothy, > > > > Exactly, the goal was to have a structural connectome that has the same > parcels as a functional one and covers the whole brain. > > The problem with the surface ROI is that I would be missing the > subcortical structures, which I would like to retain. Maybe there is a > simpler way of doing this that I am missing. I could compute a dense > connectome and parcellate it in a second step maybe? I thought that doing a > ROI to ROI approach would be simpler, but I might have been mistaken. > > Looking at the tutorial document, it seems I can obtain a dense connectome > with the following call: > > probtrackx2 --samples=../T1w/Diffusion.bedpostX/merged > --mask=../T1w/Diffusion.bedpostX/nodif_brain_mask > --xfm=xfms/standard2acpc_dc --invxfm=xfms/acpc_dc2standard > --seedref=T1w_restore.2.nii.gz --loopcheck --forcedir -c 0.2 --sampvox=2 > --randfib=1 --stop=Connectome/stop --wtstop=Connectome/wtstop > –forcefirststep --waypoints=ROIs/Whole_Brain_Trajectory_ROI_2 -x > Connectomes/GrayOrdinates.txt --omatrix1 --dir=Connectomes > > I am just wondering, what are these inputs and how would I obtain them: > --stop=Connectome/stop, --wtstop=Connectome/wtstop, > waypoints=ROIs/Whole_Brain_Trajectory_ROI_2 and > Connectomes/GrayOrdinates.txt ? > > > > Thank you very much, > > > > > > Leonardo Tozzi, MD, PhD > > Williams PanLab | Postdoctoral Fellow > > Stanford University | 401 Quarry Rd > <https://maps.google.com/?q=401+Quarry+Rd&entry=gmail&source=g> > > lto...@stanford.edu | (650) 5615738 > > > > > > *From: *Timothy Coalson <tsc...@mst.edu> > *Date: *Friday, November 9, 2018 at 5:02 PM > *To: *Leonardo Tozzi <lto...@stanford.edu> > *Cc: *"Glasser, Matthew" <glass...@wustl.edu>, Stamatios Sotiropoulos < > stamatios.sotiropou...@ndcn.ox.ac.uk>, hcp-users < > hcp-users@humanconnectome.org> > *Subject: *Re: [HCP-Users] Diffusion connectivity matrix with cortical > and subcortical parcellation > > > > So, it gets a little complicated, because you have to be careful about > what order the different sections of seeds were put together in. I don't > know how specifying multiple ROIs to probtrackx works, keeping it simple > and doing a single combined surface ROI that covers all the areas you want > is more likely to be usable. The likely reason for the volume loop is > because in cifti, the different subcortical structures are stored as > separate sections, but the entire used part of a surface is stored > contiguously in vertex order. > > > > I am still missing the big picture here: why do you want to use labels to > constrain the tractography? Is what you actually want an all parcels by > all parcels matrix? > > > > Tim > > > > > > On Fri, Nov 9, 2018 at 6:37 PM, Leonardo Tozzi <lto...@stanford.edu> > wrote: > > Dear Timothy, > > > > Thank you very much for your quick response. > > To clarify some points: some ROIs were surface based and some voxel based. > To create them, I followed the steps I outlined along this thread, which I > am summarizing below: > > > > # creating cortical labels > > wb_command -cifti-separate merged.dlabel.nii COLUMN -label CORTEX_LEFT > cortL.label.gii > > wb_command -cifti-separate merged.dlabel.nii COLUMN -label CORTEX_RIGHT > cortR.label.gii > > > > # creating subcortical labels > > wb_command -cifti-separate merged.dlabel.nii COLUMN -volume-all > subcort.nii.gz > > > > # creating the cortical ROIs > > for region in R_V1_ROI R_MST_ROI (etc.) > > do > > wb_command -gifti-label-to-roi cortR.gii $PWD/ROIs/${region}.func.gii > -name $region > > wb_command -gifti-label-to-roi cortL.gii $PWD/ROIs/${region}.func.gii > -name $region > > done > > > > # creating the subcortical ROIs > > for region in L_Amygdala R_Amygdala (etc.) > > do > > wb_command -volume-label-to-roi subcort.nii.gz > $PWD/ROIs_subcort/${region}.nii.gz > -name $region > > done > > > > # converting cortical ROIs to ASCII > > for region in R_V1_ROI R_MST_ROI (etc.) > > do > > surf2surf -i /Users/leonardotozzi/Desktop/DiffusionConnectivityTest/ > conn008/MNINonLinear/fsaverage_LR32k/conn008.R.white.32k_fs_LR.surf.gii > -o $PWD/ROIs_cort/$region.asc --values=$PWD/ROIs_cort/$region.func.gii > --outputtype=ASCII > > done > > > > Then I added all these resulting ROIs (cortical + subcortical) into the > seeds.txt file, which is an input to probtrack. > > I am wondering if there is not something wrong with my surf2surf call. The > command seems to take caret as convention by default, but are the ROIs at > this point in Freesurfer space? The FDT help gives some info about > additional steps to use Freesurfer ROIs here (https://fsl.fmrib.ox.ac.uk/ > fsl/fslwiki/FDT/UserGuide) but I am unsure about whether these apply to > output of the HCP pipeline. I am having difficulties navigating between all > these different spaces (MNI, Freesurfer, diffusion etc.). Also, the > subcortical ROIs seem to be in MNI space, which makes me wonder in what > space the cortical ROIs are. > > > > About Matrix1, it’s not symmetric, I built a connectivity matrix by taking > the upper triangle. I think it should track from all my ROIs to all my > ROIs. > > Concerning wb_command -probtrackx-dot-convert, it requires a few inputs > but I am not sure what files to use. > > I hope this adds more information, thank you very much, > > > > > > > > Leonardo Tozzi, MD, PhD > > Williams PanLab | Postdoctoral Fellow > > Stanford University | 401 Quarry Rd > <https://maps.google.com/?q=401+Quarry+Rd&entry=gmail&source=g> > > lto...@stanford.edu | (650) 5615738 > > > > > > *From: *Timothy Coalson <tsc...@mst.edu> > *Date: *Friday, November 9, 2018 at 4:11 PM > *To: *Leonardo Tozzi <lto...@stanford.edu> > *Cc: *"Glasser, Matthew" <glass...@wustl.edu>, Stamatios Sotiropoulos < > stamatios.sotiropou...@ndcn.ox.ac.uk>, hcp-users < > hcp-users@humanconnectome.org> > > > *Subject: *Re: [HCP-Users] Diffusion connectivity matrix with cortical > and subcortical parcellation > > > > There is wb_command -probtrackx-dot-convert which should be able to > convert the fdt_matrix1.dot file, which should allow a better visualization > of the results. I'm not entirely clear on the arguments to your probtrackx > command, or what the actual ROIs you used are, but it looks like they were > purely voxel-based. You may need to take something the nodif_brain_mask > and turn it into a label volume with the label name set to "OTHER" (just as > a placeholder that should work), and then we can figure out whether each > voxel list needs to be on a row or a column option (you may need to do > something manually to get one of the voxel lists, depending on the details > of what matrix1 does). > > > > I don't know the specifics of matrix1, Stam or Matt can you give me the > details (is it symmetric, and if so is it stored as lower-triangle, what it > actually tracks from and to)? > > > > Tim > > > > > > On Fri, Nov 9, 2018 at 4:58 PM, Leonardo Tozzi <lto...@stanford.edu> > wrote: > > Dear Matthew, > > > > Thank you, I am rerunning the tractography with that flag (it will take a > while). > > In the meantime, I have taken the coordinate file from the output > (“coords_for_fdt_matrix1”, which I think for each seed reports its > coordinates and in which ROI it is), averaged all coordinates with the same > label and used Matlab graph plotting functions to see if the centers of the > seeds resembled a cortical surface. > > I am attaching a few images of this. Image 1 shows the nodes from a view > that does resemble a coronal section, with no nodes between the > hemispheres. Image2 shows the nodes from another perspective. Image3 shows > a graph with the nodes + edges from the connectivity matrix (thresholded at > >1000 fibers). > > All in all, I think I do get something that looks like a brain, but I am > concerned with a cluster of points that seem outliers with respect to their > coordinates. You can see them in all three images and they are especially > apparent in the 3rd, since they seem to be connected to many of the > cortical regions. My fear is that these could be the subcortical regions, > that for some reason have completely different coordinates. > > Does this make sense to you? Is there some transformation I should apply > to the subcortical volumes? The subcortical ROIs I enter in the analysis > are in MNI space and not in ascii format (they are .nii.gz). Maybe there is > something I am missing, and this could simply be an issue of visualization > of the output coordinates? > > I would welcome your help. > > Thank you very much, > > > > > > > > > > > > Leonardo Tozzi, MD, PhD > > Williams PanLab | Postdoctoral Fellow > > Stanford University | 401 Quarry Rd > <https://maps.google.com/?q=401+Quarry+Rd&entry=gmail&source=g> > > lto...@stanford.edu | (650) 5615738 > > > > > > *From: *"Glasser, Matthew" <glass...@wustl.edu> > *Date: *Thursday, November 8, 2018 at 6:48 PM > *To: *Leonardo Tozzi <lto...@stanford.edu>, Stamatios Sotiropoulos < > stamatios.sotiropou...@ndcn.ox.ac.uk>, "hcp-users@humanconnectome.org" < > hcp-users@humanconnectome.org> > > > *Subject: *Re: [HCP-Users] Diffusion connectivity matrix with cortical > and subcortical parcellation > > > > I would include --opd so you can see the sum of all tracts in the volume > and make sure that looks reasonable. > > > > Matt. > > > > *From: *<hcp-users-boun...@humanconnectome.org> on behalf of Leonardo > Tozzi <lto...@stanford.edu> > *Date: *Thursday, November 8, 2018 at 9:17 PM > *To: *Stamatios Sotiropoulos <stamatios.sotiropou...@ndcn.ox.ac.uk>, " > hcp-users@humanconnectome.org" <hcp-users@humanconnectome.org> > *Subject: *Re: [HCP-Users] Diffusion connectivity matrix with cortical > and subcortical parcellation > > > > Dear all, > > > > Following the very useful guide, I have managed to run the complete ROI to > ROI tractography. > > However, I am not sure how to visualize my tracts from the output of > probtrackx2. In particular, I would like to make sure that my seeds have > been imported in the correct space as well as my CSF mask for the avoid > flag. > > As in the manual, after running bedpostx, my call of probtrackx2 was as > follows: > > > > probtrackx2 > --samples=DiffusionConnectivityTest/conn008/Diffusion/data.bedpostX/merged > --mask=DiffusionConnectivityTest/conn008/Diffusion/data.bedpostX/nodif_brain_mask > --seed=DiffusionConnectivityTest/ROIcreation/allseeds.txt --xfm= > DiffusionConnectivityTest/conn008/MNINonLinear/xfms/standard2acpc_dc > --invxfm=DiffusionConnectivityTest/conn008/MNINonLinear/xfms/acpc_dc2standard > --seedref=DiffusionConnectivityTest/conn008/MNINonLinear/T1w_restore.2.nii.gz > --loopcheck --forcedir --network --omatrix1 --avoid= > DiffusionConnectivityTest/ROIcreation/T1w_restore_brain_seg_0.nii.gz -V 1 > --dir=Network > > > > allseeds.txt is the list of the ASCII converted surfaces and volumes. In > particular, I would like to be sure that I picked the right inputs for –xfm > and –invxfm. The outputs of bedpost and the masks I created are not in the > same space. As per manual, the segmented CSF is in standard MNI space. Am I > correct in assuming that the output of bedpost (after the minimal diffusion > preprocessing) is aligned with respect to the ACPC and what the command is > doing “under the hood” is taking the transformation from MNI to this space > and applying it to the masks I specified? Also, how are the ROIs affected > by all this, considering I created them with the surf2surf command giving > as input the conn008.R.white.32k_fs_LR.surf.gii and the gifti files from > the atlas? I am a bit confused about how all these images in different > space come together. > > Also, would anyone know of a way to visualize my masks and/or the tracts > to make sure the tractography ran as intended? After running probtrackx2 I > get the following outputs: > > > > coords_for_fdt_matrix1 > > fdt_matrix1.dot > > fdt_network_matrix > > probtrackx.log > > tmpnetmaskfile > > waytotal > > > > fdt_network_matrix is my connectivity matrix of interest, with what I > assume is the number of streamlines. I think the file I would need is > “coords_for_fdt_matrix1” would anyone have any tips on how to visualize > these coordinates on the diffusion data or any other suggestion to check > the positioning of the seeds and the tractography results? > > Thank you very much, > > > > > > Leonardo Tozzi, MD, PhD > > Williams PanLab | Postdoctoral Fellow > > Stanford University | 401 Quarry Rd > <https://maps.google.com/?q=401+Quarry+Rd&entry=gmail&source=g> > > lto...@stanford.edu | (650) 5615738 > > > > > > *From: *Stamatios Sotiropoulos <stamatios.sotiropou...@ndcn.ox.ac.uk> > *Date: *Wednesday, October 31, 2018 at 1:38 AM > *To: *"hcp-users@humanconnectome.org" <hcp-users@humanconnectome.org> > *Cc: *Leonardo Tozzi <lto...@stanford.edu> > *Subject: *Re: [HCP-Users] Diffusion connectivity matrix with cortical > and subcortical parcellation > > > > Hi > > > > The HCP course tractography practical would be a good way to start (see > page 386 onwards): > > > > https://wustl.app.box.com/s/wna2cu94pqgt8zskg687mj8zlmfj1pq7 > > > > Briefly, if you have a number of surfaces (need to convert them to ASCII > using surf2surf) and subcortical volumes you can merge them into text files > and use those as seeds. This will get you a dense connectome which you can > then parcellate using any parcellation scheme you would like. > > > > Best wishes > > Stam > > > > > > On 30 Oct 2018, at 23:35, Glasser, Matthew <glass...@wustl.edu> wrote: > > > > Also use the label ones to make GIFTI label files. > > > > Matt. > > > > *From: *Leonardo Tozzi <lto...@stanford.edu> > *Date: *Tuesday, October 30, 2018 at 6:34 PM > *To: *Matt Glasser <glass...@wustl.edu> > *Subject: *Re: [HCP-Users] Diffusion connectivity matrix with cortical > and subcortical parcellation > > > > Dear Matthew, > > > > Thank you for the very quick response. > > So for clarification, you would use the following command: > > > > wb_command -cifti-separate merged.dlabel.nii COLUMN -volume-all > subcort.nii.gz > > > > To obtain the subcortical volumes. > > What about the cortical ones? Is the file > Q1-Q6_RelatedValidation210.CorticalAreas_dil_Final_Final_Areas_Group_Colors.32k_fs_LR.dlabel.nii > already usable as input to FSL? I thought I would need a .gii file. Or do I > need to use the option in wb_command -cifti-separate: > > > > [-label] - repeatable - separate a surface model into a surface label file. > > In this case, what would be the argument for “<structure> - the structure to > output” ? > > Thank you very much, > > > > > > > > Leonardo Tozzi, MD, PhD > > Williams PanLab | Postdoctoral Fellow > > Stanford University | 401 Quarry Rd > <https://maps.google.com/?q=401+Quarry+Rd&entry=gmail&source=g> > > lto...@stanford.edu | (650) 5615738 > > > > > > *From: *"Glasser, Matthew" <glass...@wustl.edu> > *Date: *Tuesday, October 30, 2018 at 4:22 PM > *To: *Leonardo Tozzi <lto...@stanford.edu>, "hcp-users@humanconnectome.org" > <hcp-users@humanconnectome.org> > *Subject: *Re: [HCP-Users] Diffusion connectivity matrix with cortical > and subcortical parcellation > > > > I would separate the CIFTI file into GIFTI and NIFTI components with > wb_command -cifti-separate and follow the instructions for surface tracking > on FSL’s website. > > > > Matt. > > > > *From: *<hcp-users-boun...@humanconnectome.org> on behalf of Leonardo > Tozzi <lto...@stanford.edu> > *Date: *Tuesday, October 30, 2018 at 6:19 PM > *To: *"hcp-users@humanconnectome.org" <hcp-users@humanconnectome.org> > *Subject: *[HCP-Users] Diffusion connectivity matrix with cortical and > subcortical parcellation > > > > To Whom it may concern, > > > > I have created a dlabel file by adding to the Glasser Parcellation from BALSA > the subcortical regions of the Freesurfer atlas. > > Now my goal would be to run a tractography analysis and obtain structural > connectivity matrices using this cortical+subcortical parcellation. Could > you suggest the simplest way to go from my dlabel file to something that is > compatible with diffusion software? I know that probtrackx accepts GIFTIs > as input, but I was wondering about how to extend this to subcortical > areas. Or rather would the simplest solution be to convert each subject’s > parcellation into a series of NIFTI files in native/standard space and > input these as ROIs into probtrackx? In this case, could you recommend the > correct series of workbench commands? I am also open to other software > recommendations besides the FSL suite. > > Thank you very much, > > > > > > > > Leonardo Tozzi, MD, PhD > > Williams PanLab | Postdoctoral Fellow > > Stanford University | 401 Quarry Rd > <https://maps.google.com/?q=401+Quarry+Rd&entry=gmail&source=g> > > lto...@stanford.edu | (650) 5615738 > > > > _______________________________________________ > HCP-Users mailing list > HCP-Users@humanconnectome.org > http://lists.humanconnectome.org/mailman/listinfo/hcp-users > > > ------------------------------ > > The materials in this message are private and may contain Protected > Healthcare Information or other information of a sensitive nature. If you > are not the intended recipient, be advised that any unauthorized use, > disclosure, copying or the taking of any action in reliance on the contents > of this information is strictly prohibited. If you have received this email > in error, please immediately notify the sender via telephone or return mail. > > > > > ------------------------------ > > The materials in this message are private and may contain Protected > Healthcare Information or other information of a sensitive nature. If you > are not the intended recipient, be advised that any unauthorized use, > disclosure, copying or the taking of any action in reliance on the contents > of this information is strictly prohibited. If you have received this email > in error, please immediately notify the sender via telephone or return mail. > > _______________________________________________ > HCP-Users mailing list > HCP-Users@humanconnectome.org > http://lists.humanconnectome.org/mailman/listinfo/hcp-users > > > > _______________________________________________ > HCP-Users mailing list > HCP-Users@humanconnectome.org > http://lists.humanconnectome.org/mailman/listinfo/hcp-users > > > ------------------------------ > > The materials in this message are private and may contain Protected > Healthcare Information or other information of a sensitive nature. If you > are not the intended recipient, be advised that any unauthorized use, > disclosure, copying or the taking of any action in reliance on the contents > of this information is strictly prohibited. If you have received this email > in error, please immediately notify the sender via telephone or return mail. > > _______________________________________________ > HCP-Users mailing list > HCP-Users@humanconnectome.org > http://lists.humanconnectome.org/mailman/listinfo/hcp-users > > > > > > > ------------------------------ > > The materials in this message are private and may contain Protected > Healthcare Information or other information of a sensitive nature. If you > are not the intended recipient, be advised that any unauthorized use, > disclosure, copying or the taking of any action in reliance on the contents > of this information is strictly prohibited. If you have received this email > in error, please immediately notify the sender via telephone or return mail. > _______________________________________________ HCP-Users mailing list HCP-Users@humanconnectome.org http://lists.humanconnectome.org/mailman/listinfo/hcp-users