Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

image of mean FA is not appropriate #90

Open
ShivyaGupta14 opened this issue Jul 5, 2024 · 9 comments
Open

image of mean FA is not appropriate #90

ShivyaGupta14 opened this issue Jul 5, 2024 · 9 comments

Comments

@ShivyaGupta14
Copy link

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
Copy link
Collaborator

#89 (comment)

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
Copy link
Author

ShivyaGupta14 commented Jul 5, 2024 via email

@ShivyaGupta14
Copy link
Author

ShivyaGupta14 commented Jul 5, 2024 via email

@tashrifbillah
Copy link
Collaborator

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

@ShivyaGupta14
Copy link
Author

ShivyaGupta14 commented Jul 5, 2024 via email

@ShivyaGupta14
Copy link
Author

ShivyaGupta14 commented Jul 5, 2024 via email

@tashrifbillah
Copy link
Collaborator

tashrifbillah commented Jul 5, 2024

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
Copy link
Author

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
Copy link
Collaborator

suheyla2 commented Jul 9, 2024

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
  1. 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants