pnlbwh / dMRIharmonization

Multi-site dMRI harmonization
Other
43 stars 14 forks source link

Different data for template creation and harmonization, how to find the goodness of harmonization by observing the number after harmonization #77

Closed jwchen03 closed 5 months ago

jwchen03 commented 3 years ago

Hi Tashrif,

Because I used a small list of images (18 subjects) named target_caselist.txt to --tar_list during template creation and used a complete list of images (35 subjects) named target_caselist_complete.txt to --tar_list during data harmonization, I did --create and --process separately. Here is my script:

python ../harmonization.py \
--bvalMap 1000 \
--template test_data/template/ \
--ref_list test_data/ref_caselist.txt  \
--tar_list test_data/target_caselist.txt \
--ref_name REF \
--tar_name TAR \
--nshm 6 \
--nproc 8 \
--force \
--create --debug

python ../harmonization.py \
--tar_list test_data/target_caselist_complete.txt \
--tar_name TAR \
--template test_data/template/ \
--force \
--process --debug

python fa_skeleton_test.py \
--input test_data/ref_caselist.txt.modified \
--site REF \
--template test_data/template/

python fa_skeleton_test.py \
--input test_data/target_caselist_complete.txt  \
--site TAR \
--template test_data/template/

python fa_skeleton_test.py \
--input test_data/target_caselist_complete.txt.modified.harmonized \
--site TAR \
--template test_data/template/

python ../harmonization.py \
--ref_list test_data/ref_caselist.txt.modified \
--ref_name REF \
--tar_list test_data/target_caselist_complete.txt \
--tar_name TAR \
--harm_list test_data/target_caselist_complete.txt.modified.harmonized \
--template test_data/template/ \
--stats

However, I got the statistical result below:

Dir30 (18 images) | 0.420955297 | 0.039905816
Dir64_before (35 images) | 0.406928812 | 0.052123941
Dir64_after (35 images) | 0.391751043 | 0.051277831

meanFAstat_ebarplot

I could not get the expected results showed in your README.md. Thus, I tried to extract the mean FA of images from target_caselist.txt and the result is like:

Dir64_before (18 images) | 0.432272058 | 0.041378025

Although I could observe the expected result, I still could not visualize this result automatically by harmonization.py because I did not have target_caselist.txt.modified.harmonized.

I was wondering that are "target_caselist.txt" in (i) Create template and "target_caselist.txt" in (ii) Harmonize data the same list in Debugging section if I had different data for template creation and harmonization?

Many thanks

tashrifbillah commented 3 years ago
  1. Can you do:
cd dMRIharmonization
git log -3

to make sure you got the latest commits? We did some updates recently which should presumably improve results.

  1. For separate --create and --process, you did the following right:
cmds ``` python fa_skeleton_test.py \ --input test_data/ref_caselist.txt.modified \ --site REF \ --template test_data/template/ python fa_skeleton_test.py \ --input test_data/target_caselist_complete.txt \ --site TAR \ --template test_data/template/ python fa_skeleton_test.py \ --input test_data/target_caselist_complete.txt.modified.harmonized \ --site TAR \ --template test_data/template/ ```

The above cmds should give you three separate csvs and plots. There is no combined csv or plot for them. So just open the plots side-by-side to compare them 🗡️

  1. Get rid of the following, it is only for combined --create --process result re-generation:
    cmd
python ../harmonization.py \
--ref_list test_data/ref_caselist.txt.modified \
--ref_name REF \
--tar_list test_data/target_caselist_complete.txt \
--tar_name TAR \
--harm_list test_data/target_caselist_complete.txt.modified.harmonized \
--template test_data/template/ \
--stats

jwchen03 commented 3 years ago

Thanks, Tashrif. I've checked and updated to the latest version and re-run the harmonization again. Look forward to better results. I really appreciate your explanation. However, I still have a problem with the unequal number of subjects in the diagram I provided before. I didn't think that diagram can demonstrate the results of harmonization and am not sure what the usage of that diagram was.

I think the diagram below from White matter abnormalities across the lifespan of schizophrenia: a harmonized multi-site diffusion MRI study. Your team used an equal number of subjects to demonstrate that the harmonization results were good enough. image

Thus, how can I plot the same diagram as that above to demonstrate the results?

Thanks

tashrifbillah commented 3 years ago

Even though there is an unequal number of subjects in the reference and target sites, harmonization.py --create --process --debug will yield a plot like the one you have attached in the issue description. Given that, I do not understand:

However, I still have a problem with the unequal number of subjects in the diagram I provided before.

If needed, email tbillah@bwh.harvard.edu to obtain my office hour schedule to have a discussion with me.

jwchen03 commented 3 years ago

Sorry for the vague question. I thought that the difference of meanFA between the same number of matched controls at two sites could be eliminated by finding scale maps, which could find the goodness of harmonization. In my plot, these scale maps were created using the two small lists of subjects (18 subjects). However, the plot I provided earlier only showed the difference of meanFA between the unequal number of controls (18 vs. 35 subjects) and Dir64 meanFA moved away from that of Dir30 meanFA after harmonization. Thus, I could not conclude whether harmonization is good enough from that plot.

I could try to create a bar plot below manually. In this plot, 18 data points of meanFA in each bar and I could observe Dir64 meanFA came closer to that of Dir30 meanFA after harmonization. I thought this bar plot could show the goodness of harmonization but the plot I provided could not.

image

If I still could not ask this question clearly, just feel free to tell me. Thanks for the contact information you provided.