CBICA / niCHART

The neuro-imaging brain aging chart [niCHART] is a comprehensive solution to analyze standard structural and functional brain MRI data across studies. [niCHART] and the associated pre-processing tools implement computational morphometry, functional signal analysis, quality control, statistical harmonization, data standardization, interactive visual
https://cbica.github.io/niCHART/
Other
13 stars 8 forks source link

Refactor spares #222

Closed ashishsingh18 closed 2 years ago

ashishsingh18 commented 2 years ago

Fix #219 Fix #220 Fix #221

test_spares is commented out since we need synthetic spare data and model to run the test

to test the cmd line app( assuming data is already harmonized), run the cmd: NiBAx --data_file path\to\data.pkl.gz --SPARE_model_file path\to\sparemodel.pkl.gz --output_file_name out.pkl.gz --nogui 1

ashishsingh18 commented 2 years ago

@ashishsingh18 Thanks. It seems that when NiBAx is executed without the --data_file or --SPARE_model_file argument, that it tries to load '', which of course fails. Can you confirm this behaviour?

@AbdulkadirA thanks for testing this, I modified the code, can you check again please?

ashishsingh18 commented 2 years ago

@AbdulkadirA Thanks. With pandas==1.3.4 I had to make two changes to how the data frame was indexed to make it work (see inline code suggestions).

@AbdulkadirA It is working for me with pandas==1.3.4 even without those changes. And it is what we had in our previous file as well 'computespares.py'. Do you mean, it gives wrong results without this change?

AbdulkadirA commented 2 years ago

@AbdulkadirA Thanks. With pandas==1.3.4 I had to make two changes to how the data frame was indexed to make it work (see inline code suggestions).

@AbdulkadirA It is working for me with pandas==1.3.4 even without those changes. And it is what we had in our previous file as well 'computespares.py'. Do you mean, it gives wrong results without this change?

@ashishsingh18 It crashed for me. But this was because I had a fragmented data frame where the indices were not ordered from 0 to N. So, to be safe, we need to add the .values.

ashishsingh18 commented 2 years ago

@AbdulkadirA Thanks. With pandas==1.3.4 I had to make two changes to how the data frame was indexed to make it work (see inline code suggestions).

@AbdulkadirA It is working for me with pandas==1.3.4 even without those changes. And it is what we had in our previous file as well 'computespares.py'. Do you mean, it gives wrong results without this change?

@ashishsingh18 It crashed for me. But this was because I had a fragmented data frame where the indices were not ordered from 0 to N. So, to be safe, we need to add the .values.

@AbdulkadirA okay, done.