brain-life / o3d-code Goto Github PK
View Code? Open in Web Editor NEWOpen Derivatives Diffusion Data scripts used to generate and organize the data
Open Derivatives Diffusion Data scripts used to generate and organize the data
The naming convention for filename is a collection of attribute-value pair.
The separator of pair is the character '_' the separator of attribute and value is '-' (dash).
Currently the naming is 'run01', it should be fixed in 'run-01'
The init script should create the folder whether it doesn't exist. No more required the run in advance of o3d_tree.py script.
In both scripts init_dissection_afq_trk and init_dissection_afq_tck the mapping for "hcp3t" is erroneously coded as "STN"
In all the scripts related to tractography:
init_tracking_dtidet_trk
init_tracking_csddet_trk
init_tracking_csdprob_trk
dissection_afq_trk
init_tracking_dtidet_tck
init_tracking_csddet_tck
init_tracking_csdprob_tck
dissection_afq_tck
the reference anatomy should be the dwi nifti image in [..]/derivative/preprocess folder.
It means that it will be not possible to call the script above before init_preprocessing.
I have already include this dependency in all_pipeline.sh
configure main with following arguments
Currently there is a redundant prepending of the O3D_ prefix to the dataset (for example O3D_O3D_STN or O3D_O3D_HCP3T). There is a clash between the hypothesis that the dataset name is simply the lower case code, and the mapping of dataset_root dictionary. Probably the issue is located in the getAnatomy function in the copy_template.py module.
The init_dissection_afq_trk generate all the files related to the dissection of main tracts, one for each of them. This operation is currently applied only to one type of tractography: "dtidet". The other two types of tractography are missing: "csddet" and "csdprob".
We have two options: (i) replicate the scripts, as done for init_tracking or (ii) include two additional calls in the current script.
just the util script to merge (not the init in o3d tree)
simply one copy of labels coding
Instead of creating the full tree of data, the script should test (no more 'touch') whether the file exists. The script should report all the missing files.
The tag for the attribute '_subset-' should be renamed in '_set-'. The change occurs both for files to be generated and in the script of o3d_tree.py.
The filename is omitting the subject ID: 'sub-b-2000[...]' rather than 'sub-001_b-2000_[...]'
From 'sub-001' to 'sub-0001'.
The init_dissection_afq_tck script gets the files generated by init_dissection_afq_trk and produces the correspondent file with the suffix ".tck" instead of ".trk".
The file currently generated by init_dissection_afq_trk is:
sub-0001_dwi_DTI_var_dtidetlife_run-01_tract_subset-ARCl_tract.trk
while the script init_dissection_afq_tck is looking for
sub-0001_dwi_DTI_var_dtidetlife_run-01_tract_var-afq_set-ATRl_track.trk
This second filename is the correct one. The script init_dissection_afq_trk should be fixed to generated the correct file name.
The files ".bvecs" and ".bvals" shouldn't be simply copied. The comma char has to be replaced by a whitespace. The replacement can be managed as follows:
sed 's/,/\ /g' input-file > output-file
This step is applied to hcp7t dataset only.
The scripts init_preprocessing and init_recon_models copy nifti (nii.gz) files.
The simple copy should be replaced by a call to change the orientation of images from 'neurological' to 'radiological'. This step applies only to STN and HCP3 (not HCHP7).
The change of orientation can be operated by the following call:
mri_convert -iid -1 0 0 <input_file> <output_file>
The init_tracking* and init_dissection* script should refer to these images in such a way also the tractograms will be in the radiological orientation.
In all init_tracking_* scripts the call "getAnatomy" raises an issue because the key of dataset is not mapped to the proper name of the dataset, for example "stn" is converted to "STN" rather than "O3D_STN".
one for all the three tractographies
This issue is related to the issue #34
Need a script to copy files to the freesurfer pipeline.
The file naming convention is to separate the pair attribute/value by a "dash" like attribute-value. For example:
sub-0001_dwi_DTI_var_dtidetlife_run-01_tract_subset-ARCl_tract.trk (current)
sub-0001_dwi_DTI_var-dtidetlife_run-01_tract_subset-ARCl_tract.trk (correct)
The images of HCP7T in 'recon_model' pipeline folder should be masked:
sub-{108323, 109123, 131217, 910241}_b-2000_dwi.bvec
sub-{108323, 109123, 131217, 910241}_b-2000_dwi_FA.nii.gz
sub-{108323, 109123, 131217, 910241}_b-2000_dwi_DTI.nii.gz
sub-{108323, 109123, 131217, 910241}_b-2000_dwi_ODF.nii.gz
The command line to apply the mask is the following
fslmaths <input_file> -mas <mask_file> <output_file>
The masks for each subject are here
DIR: /N/dc2/projects/lifebid/HCP7/
FILES: {108323, 109123, 131217, 910241}/diffusion_data/nodif_brain_mask.nii.gz
Move the following files
sub-001_b-2000_dwi.nii.gz
sub-001_b-2000_dwi.bval
sub-001_b-2000_dwi.bvec
from this folder
O3D_{STN,HCP3T,HCP7T}/derivatives/recon_models/sub-/dwi
to the following folder
O3D_{STN,HCP3T,HCP7T}/derivatives/preprocess/sub-/dwi
Use '_'(underscore) instead of '-' (dash) to separate two attribute/value pair in filename.
In all init_tracking* script replace
'var-dtidet-run-01' with 'var-dtidet_run-01'
'var-csddet-run-01' with 'var-csddet_run-01'
'var-csdprob-run-01' with 'var-csdprob_run-01'
and so on also for the '*life' variant.
Take as argument the root
The tag for the attribute '_trial-' should be renamed in '_run-'. The change occurs both for files to be generated and in the script of o3d_tree.py.
Delete the following files
sub-001_dwi.nii.gz
sub-001_dwi.bval
sub-001_dwi.bvec
from the following folder
O3D_{STN,HCP3T,HCP7T}/derivatives/preprocess/sub-***/dwi
The input file for the "hcp3t" dataset in in the following folder
/N/dc2/projects/lifebid/code/ccaiafa/Caiafa_Pestilli_paper2015/Results/ETC_Dec2015/Single_TC/
with the following name
fe_structure_105115_STC_run01_500000_tensor__connNUM01_TRACTS.mat
while the current wrong name is
fe_structure_105115_stc_run01_500000_tensor__connNUM01_TRACTS.mat
The one report above is just an example for the pattern of file name.
one for each kind of tractogram (dtidet, csddet, csdprob)
one for each three kind of tractography
The tag for the attribute '_variant-' should be renamed in '_var-'. The change occurs both for files to be generated and in the script of o3d_tree.py.
Need a script for copying files into the life-struct pipeline.
Lifebid version looks cropped with respect to the original one from HCP.
Add missing files
Need to write a script to generate all dissection tractograms. Should make use of utils/afq2trk.m
The conversion of ODF files fails. The result is a ascii text file instead of a nifti file.
Add these missing files
the init_preprocess script use 'bvals' and 'bvecs' while o3d_tree.py uses 'bval' and 'bvec'. Revision of o3d_tree.py according to init_preprocess.
The init_preprocessing doesn't work for hcp7t. The diagnostic message is not meaningful. Looking at the code it looks like there is a step of applying the mask to .bvecs and .bvals. These two kind of files should be simply copied. The mask should be applied only to the diffusion .nii.gz.
include repetions of trial in filename
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.