Remove connections of connecivity matrix before applying SIFT2

Hi,

I am using SIFT2 to build my connectomes, however I would like first to remove the streamlines that do not connect 2 GM ROIs. I guess this can be achieved by using tck2connectome and connectome2tck, for the first command I use:

tck2connectome tracks.tck nodes_init.mif connectome.csv -out_assignments assignments.txt

nodes_init.mif is the same file I would use for the final connectome, but including the brainstem. The second part, I’m not completelly sure:

connectome2tck tracks.tck assignments.txt tracks_out -nodes 1,...,85 -files single

Is this command doing what I think it does? removing all the unassigned connections?

Finally:

tcksift2 tracks_out.tck wmfod_norm.mif sift2_weights.txt -act 5tt.mif

tck2connectome tracks_out.tck nodes.mif connectome.csv -zero_diagonal -symmetric -sift2_weights.txt

With node.mif not containing the brainstem. Does this process make sense? Thanks in advance!

Best regards,

Manuel

Hey Manuel,

Without having done this myself, the code seems to remove unassigned streamlines.

One way to verify this might be to run the code (to get streamlines that were successfully assigned to a node pair). Then, get all streamlines that were not successfully assigned to a node pair:

connectome2tck tracks.tck assignments.txt unassigned.tck -nodes 0 -keep_self -files single (taken from connectome2tck)

Then check that none of the streamlines that are found in unassigned.tck are present in tracks_out.tck

Hope this helps :slight_smile:
Arkiev