pnlbwh / dMRIharmonization

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

image of mean FA is not appropriate #90

Open ShivyaGupta14 opened 2 months ago

ShivyaGupta14 commented 2 months ago

Hello, There is this problem coming. So, I have data from 4 sites, and there are about 30 participants in each site. We selected 30 participants from Site 1 as reference site and put the remaining 90 participants as target. Also, there is no difference in the demographics and all participants were collected with same imaging parameters on 4 different scanners. there were no travelling heads. We ran the create template.py but our mean FA still looks weird. The picture is as below, Screenshot 2024-07-05 105501

And the command that we used for running the template is as below, lib/harmonization.py \ --ref_list test_data/ref_caselist.txt \ --tar_list test_data/target_caselist.txt \ --ref_name REF \ --tar_name TAR \ --template test_data/template/ \ --nshm 6 \ --bvalMap 1000 \ --resample 1.5x1.5x1.5 \ --nproc 8 \ --create

Could you please assist me with this, that what wrong are we doing. Thanks, Shivya.

tashrifbillah commented 2 months ago

https://github.com/pnlbwh/dMRIharmonization/issues/89#issuecomment-2211114965

Suheyla, note that the user did not use our preferred QballModel() dipy version. We do not know how dipy changed it since 2020. Feel free to comment what you think.

ShivyaGupta14 commented 2 months ago

Can you please tell me how and where to change the dipy version. Because I am thinking is the mean fa error might be coming as I did not change the version. It might be. Can you please tell me this.

Thanks, Shivya.

Get Outlook for iOShttps://aka.ms/o0ukef


From: Tashrif Billah @.> Sent: Friday, July 5, 2024 11:17:12 AM To: pnlbwh/dMRIharmonization @.> Cc: Gupta, Shivya @.>; Author @.> Subject: Re: [pnlbwh/dMRIharmonization] image of mean FA is not appropriate (Issue #90)

You don't often get email from @.*** Learn why this is importanthttps://aka.ms/LearnAboutSenderIdentification

89 (comment)https://github.com/pnlbwh/dMRIharmonization/issues/89#issuecomment-2211114965

Suheyla, note that the user did not use our preferred QballModel() dipy version. We do not know how dipy changed it since 2020. Feel free to comment what you think.

— Reply to this email directly, view it on GitHubhttps://github.com/pnlbwh/dMRIharmonization/issues/90#issuecomment-2211131269, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BJP2AWIPFJFHRY4FW5ZESDTZK3BIRAVCNFSM6AAAAABKNOHTOSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMJRGEZTCMRWHE. You are receiving this because you authored the thread.Message ID: @.***>

ShivyaGupta14 commented 2 months ago

I am not able to install dipy version 1.1.1

Get Outlook for iOShttps://aka.ms/o0ukef


From: Gupta, Shivya @.> Sent: Friday, July 5, 2024 11:21:33 AM To: pnlbwh/dMRIharmonization @.>; pnlbwh/dMRIharmonization @.> Cc: Author @.> Subject: Re: [pnlbwh/dMRIharmonization] image of mean FA is not appropriate (Issue #90)

Can you please tell me how and where to change the dipy version. Because I am thinking is the mean fa error might be coming as I did not change the version. It might be. Can you please tell me this.

Thanks, Shivya.

Get Outlook for iOShttps://aka.ms/o0ukef


From: Tashrif Billah @.> Sent: Friday, July 5, 2024 11:17:12 AM To: pnlbwh/dMRIharmonization @.> Cc: Gupta, Shivya @.>; Author @.> Subject: Re: [pnlbwh/dMRIharmonization] image of mean FA is not appropriate (Issue #90)

You don't often get email from @.*** Learn why this is importanthttps://aka.ms/LearnAboutSenderIdentification

89 (comment)https://github.com/pnlbwh/dMRIharmonization/issues/89#issuecomment-2211114965

Suheyla, note that the user did not use our preferred QballModel() dipy version. We do not know how dipy changed it since 2020. Feel free to comment what you think.

— Reply to this email directly, view it on GitHubhttps://github.com/pnlbwh/dMRIharmonization/issues/90#issuecomment-2211131269, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BJP2AWIPFJFHRY4FW5ZESDTZK3BIRAVCNFSM6AAAAABKNOHTOSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMJRGEZTCMRWHE. You are receiving this because you authored the thread.Message ID: @.***>

tashrifbillah commented 2 months ago

https://github.com/pnlbwh/dMRIharmonization/blob/cc6ce63bc4c825a03222c340d17d5392bb282637/environment.yml#L13

You need to change this line to dipy=1.1.1 , remove your current conda environment, and rebuild. Details can be Googled.

ShivyaGupta14 commented 2 months ago

There is no dipy v1.1.1 It is showing error.

Get Outlook for iOShttps://aka.ms/o0ukef


From: Tashrif Billah @.> Sent: Friday, July 5, 2024 11:29:56 AM To: pnlbwh/dMRIharmonization @.> Cc: Gupta, Shivya @.>; Author @.> Subject: Re: [pnlbwh/dMRIharmonization] image of mean FA is not appropriate (Issue #90)

https://github.com/pnlbwh/dMRIharmonization/blob/cc6ce63bc4c825a03222c340d17d5392bb282637/environment.yml#L13

You need to change this line to dipy=1.1.1 , remove your current conda environment, and rebuild. Details can be Googled.

— Reply to this email directly, view it on GitHubhttps://github.com/pnlbwh/dMRIharmonization/issues/90#issuecomment-2211145392, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BJP2AWNJX4H356ODX2EISTDZK3CYJAVCNFSM6AAAAABKNOHTOSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMJRGE2DKMZZGI. You are receiving this because you authored the thread.Message ID: @.***>

ShivyaGupta14 commented 2 months ago

So, what is happening, that when we are using the dipy v then there are errors coming in python version and other packages and when we are using the python version correctly then there are errors coming due to the dipy v. Is there any containerized version that we can run directly ?

Thanks, Shivya.

Get Outlook for iOShttps://aka.ms/o0ukef


From: Gupta, Shivya @.> Sent: Friday, July 5, 2024 11:37:47 AM To: pnlbwh/dMRIharmonization @.>; pnlbwh/dMRIharmonization @.> Cc: Author @.> Subject: Re: [pnlbwh/dMRIharmonization] image of mean FA is not appropriate (Issue #90)

There is no dipy v1.1.1 It is showing error.

Get Outlook for iOShttps://aka.ms/o0ukef


From: Tashrif Billah @.> Sent: Friday, July 5, 2024 11:29:56 AM To: pnlbwh/dMRIharmonization @.> Cc: Gupta, Shivya @.>; Author @.> Subject: Re: [pnlbwh/dMRIharmonization] image of mean FA is not appropriate (Issue #90)

https://github.com/pnlbwh/dMRIharmonization/blob/cc6ce63bc4c825a03222c340d17d5392bb282637/environment.yml#L13

You need to change this line to dipy=1.1.1 , remove your current conda environment, and rebuild. Details can be Googled.

— Reply to this email directly, view it on GitHubhttps://github.com/pnlbwh/dMRIharmonization/issues/90#issuecomment-2211145392, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BJP2AWNJX4H356ODX2EISTDZK3CYJAVCNFSM6AAAAABKNOHTOSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMJRGE2DKMZZGI. You are receiving this because you authored the thread.Message ID: @.***>

tashrifbillah commented 2 months ago

There is no dipy v1.1.1 It is showing error.

I would think dipy folks did not put that version in conda channel. You should try pip install dipy==1.1.1 . It is there certainly.

ShivyaGupta14 commented 2 months ago

Now when I'm trying to do pip install dipy==1.1.1 outside the env it's working and installing dipy-v1.1.1, but same when I'm changing the environment.yml with the dipy==1.1.1 is throwing me the error, moreover, if I'm installing the latest version of dipy using the environment.yml, and activate an environment, after that as well the command pip install dipy==1.1.1 is throwing me errors.

By any chance, do you have any environment.yml which follows all the required versions in such a way that it won't throw any error.

Because, in the dipy latest version file you shared QballBaseModel consist of calculating the value of L = -l_values x (l_values+1), while in the current lib/rish.py code in the dMRIharmonization, they are calling QballModel, and then using the variable (qb_model) which stores the QballModel Output calculates the value of L = qb_model.n x (qb_model.n + 1) and then after that you are taking L**2 (square of L, store in L) which goes for further calculations.

Since, I'm changing the old calculation of L by the new one, the code is running perfectly without any single error, but these are not giving me the preferred output as of Mean_TAR_FA.nii.gz.

Please let me know if some of the following things which I think could make difference:

  1. Does this change of calculating value of L is wrong?
  2. The config file parameters really plays important role while running harmonization.py file?
  3. Do we need the versions you mentioned as it is for all the libraries? Because none of them work together for python and other libraries!

Thank you so much, and please tell me how I can move forward with this.

Thanks, Shivya Gupta

suheyla2 commented 1 month ago

Hello Shivya,

We have not tested the new dipy package yet, so it's difficult to comment on QballBaseModel at this moment. However, we will be testing it soon.

In the meantime, please try setting up the software again with the following steps:

  1. Please remove the existing environment.

    conda deactivate
    conda remove -n harmonization --all
  2. Please update your environment.yml file by adding the versions of the packages. Remove ants and fsl lines if they are pre-installed.

name: harmonization

channels:
  - conda-forge
  - pnlbwh

dependencies:
  - python=3.8
  - ipython
  - numpy=1.16.2
  - nibabel=2.3.0
  - pandas
  - scipy=1.2.1
  - scikit-image=0.15.0
  - psutil
  - plumbum
  - ants=2.2.0
  - fsl=5.0.11
  - conda-build
  - git
  - pip
  - pip:
      - git+https://github.com/mhe/pynrrd.git
      - git+https://github.com/pnlbwh/conversion.git
      - git+https://github.com/reisert/unring.git
  1. First activate your environment, then install dipy using pip within the environment
    conda activate harmonization
    pip install dipy==1.1.1

Could you please also provide the b-values, number of gradients, and spatial resolution of your DWI data? This information will help me comment on the parameters.

Additionally, ensure that your DWI data and masks are correctly formatted and of good quality.

Best, Suheyla