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

Add longitudinal trends for subset of subjects #64

Merged
merged 1 commit into from
Oct 21, 2021

Conversation

melhemr
Copy link
Contributor

@melhemr melhemr commented Oct 19, 2021

No description provided.

Copy link
Contributor

@AbdulkadirA AbdulkadirA left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs some fixes to work. Also the plt.plot() function that is supposed to draw the lines between the observed values of the same subject does not produce anything.

BrainChart/datamodel.py Outdated Show resolved Hide resolved
BrainChart/plotcanvas.py Outdated Show resolved Hide resolved
BrainChart/plotcanvas.py Outdated Show resolved Hide resolved
@melhemr melhemr force-pushed the variable_age_trends branch 2 times, most recently from ef8ed24 to f16e905 Compare October 20, 2021 13:08
@melhemr melhemr changed the title Draft: Add longitudinal trends for subset of subjects Add longitudinal trends for subset of subjects Oct 20, 2021
Copy link
Contributor

@AbdulkadirA AbdulkadirA left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@melhemr Thanks for the updates. I recommend not to compute DXsimple in the toolbox as this is too specific. Instead, pick a column and plot that one. Could also simply be Diagnosis_nearest_2.0 for now. Make sure to remove unused categories.

BrainChart/datamodel.py Outdated Show resolved Hide resolved
BrainChart/plotcanvas.py Outdated Show resolved Hide resolved
Copy link
Contributor

@AbdulkadirA AbdulkadirA left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. There should be no conversion of diagnoses in the toolbox plot function.

BrainChart/plotcanvas.py Outdated Show resolved Hide resolved
Comment on lines 158 to 159
palette = dict(MCI="orangered", AD="crimson",CN="indigo",none="slategrey",other="gold")
ax = sns.scatterplot(x='Age',y=currentROI,hue=currentHue,ax=self.axes,edgecolor=data_sample["DX_simple"].map(palette),linewidth=1.5,s=50,data=data_sample)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
palette = dict(MCI="orangered", AD="crimson",CN="indigo",none="slategrey",other="gold")
ax = sns.scatterplot(x='Age',y=currentROI,hue=currentHue,ax=self.axes,edgecolor=data_sample["DX_simple"].map(palette),linewidth=1.5,s=50,data=data_sample)
ax = sns.scatterplot(x='Age',y=currentROI,hue=currentHue,ax=self.axes, linewidth=1.5,s=50,data=data_sample)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How would I show diagnosis on the plot if these are not included?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The line with the scatterplot will still be included, but the edge color is not fixed.

BrainChart/plotcanvas.py Show resolved Hide resolved
README.md Outdated
@@ -3,7 +3,7 @@
After proper installation, the tools can be used as follows

```shell
python -m BrainChart.main --data_file istaging.pkl.gz --harmonization_model_file MUSE_harmonization_model.pkl
python -m BrainChart.main --data_file reduced_istaging.pkl.gz --harmonization_model_file MUSE_harmonization_model_sprint_in.pkl
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please undo this change to keep the default at the full data set and the default harmonization model.

Comment on lines 164 to 166
markers = [plt.Line2D([0,0],[0,0],color=color, marker='o', linestyle='') for color in palette.values()]
dx_legend = ax.legend(markers, palette.keys(), numpoints=1,loc='lower right')
ax.add_artist(dx_legend)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These lines can be removed.

@AbdulkadirA AbdulkadirA merged commit 7314f93 into CBICA:main Oct 21, 2021
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

Successfully merging this pull request may close these issues.

2 participants