-
Notifications
You must be signed in to change notification settings - Fork 8
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
Add scatter plot of SPARE-AD and SPARE-BA #31
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It crashes for me when I change view to SPARE. The error it gives is as follows:
`
(D:\ashish\Installs\Python\iStagingENV) D:\ashish\work\projects\iSTAGING-Tools>python -m iSTAGING.main --data_file D:\ashish\Data\iSTAGINGData\short.pkl.gz --harmonization_model_file D:\ashish\Data\iSTAGINGData\MUSE_harmonization_model.pkl
Traceback (most recent call last):
File "D:\ashish\work\projects\iSTAGING-Tools\iSTAGING\plotcanvas.py", line 82, in PlotSPARE
s=5, data=datamodel.GetData(['SPARE_BA','SPARE_AD'],
File "D:\ashish\work\projects\iSTAGING-Tools\iSTAGING\datamodel.py", line 76, in GetData
d = self.data[roi + ["Age",hue]]
File "D:\ashish\Installs\Python\iStagingENV\lib\site-packages\pandas\core\frame.py", line 3030, in getitem
indexer = self.loc._get_listlike_indexer(key, axis=1, raise_missing=True)[1]
File "D:\ashish\Installs\Python\iStagingENV\lib\site-packages\pandas\core\indexing.py", line 1266, in _get_listlike_indexer
self._validate_read_indexer(keyarr, indexer, axis, raise_missing=raise_missing)
File "D:\ashish\Installs\Python\iStagingENV\lib\site-packages\pandas\core\indexing.py", line 1316, in _validate_read_indexer
raise KeyError(f"{not_found} not in index")
KeyError: "['SPARE_BA', 'SPARE_AD'] not in index"
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:\ashish\work\projects\iSTAGING-Tools\iSTAGING\mainwindow.py", line 400, in OnViewChanged
self.UpdatePlot()
File "D:\ashish\work\projects\iSTAGING-Tools\iSTAGING\mainwindow.py", line 296, in UpdatePlot
self.plotCanvas.Plot(self.model,plotOptions)
File "D:\ashish\work\projects\iSTAGING-Tools\iSTAGING\plotcanvas.py", line 38, in Plot
self.PlotSPARE(datamodel,plotOptions)
File "D:\ashish\work\projects\iSTAGING-Tools\iSTAGING\plotcanvas.py", line 84, in PlotSPARE
except e:
NameError: name 'e' is not defined
`
Crash should be addressed. Happened when no SPARE-* scores were available in data set. |
@AbdulkadirA Can you share the SPARE data that will produce the SPARE plot? Also, can you please propagate the error message to mainwindow so we can show an error message as a pop up? We just need to return the error message you are currently displaying on plotcanvas from the function. |
@ashishsingh18 Thanks. I sent you the path via Teams. How do I return the value. Do you mean adding |
So we will need to return a bool as well - for plot successful or failed.
Will it always fail due to lack of SPARE scores? If yes, we don't need to send message, just a bool will be sufficient and we can handle this in mainwindow. Plot() function which is called by mainwindow, will also need to return it. |
If this is confusing, let's discuss this first and we can always add this later. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine. We can add pop up message later.
@ashishsingh18 Thanks. Let's merge for now and I'll open an issue to handle missing SPARE-*. |
Replace dummy plot with actual plot of SPARE scores.