-
Notifications
You must be signed in to change notification settings - Fork 3
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
QC for TMAs and Control Samples #358
Conversation
This looks great. Can you open a new issue and self-assign for adding a ranks for the TMA-wide QC tissue ranks? Right now, the only way to see if a specific TMA has a control sample that is higher (or lower) than all the others is to look by eye at the color of each dot and see if a specific colored dot is most often at the top or bottom of the violin. Having a way to automatically check this would be helpful. I think you can copy what you did in the first part, averaging the rank across different markers. It would be useful to compute that same ranking for the control tissues. So instead of creating a rank across the 50 FOVs in an TMA, it would be across the 3 or 4 different LN_Top samples. |
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.
The visualization looks good, let me know once you've generated the plots for each TMA so we can confirm there are no spatial effects.
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 good! Are we adding in a notebook for this as well?
@camisowers Yeah the notebook will be the final PR for these extra QCs. |
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 good, one comment regarding condensing a deeply nested loop.
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
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.
Functionality looks great, added a bunch of comments about simplifying the notebook.
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.
Code looks good to me!
@ngreenwald How does the notebook look after these updates? |
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 good, some more notebook simplifications
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.
A couple issues from first round that didn't get completely addressed. Make sure to glance over the full notebook before re-requesting review. Almost there!
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 good
If you haven't already, please read through our contributing guidelines before opening your PR
What is the purpose of this PR?
Closes #277.
Closes #362.
Adds QC metric for TMAs, and for tissue wide-batch effects.
How did you implement your changes
Added helper functions for ranking TMAs and computing tissue QC metrics.
Added plotting functions for QC TMA metrics, and updated the batch effect plot functions.
Sample Figures from the TONIC Cohort
TMA QC Plot
Violin Plot, for CD*
In addition, other notable changes include adding a Random number generator Fixture in
conftest.py
, so for any test, we can just add that fixture as a function argument like below:Adjusted some
Pandas
function calls to be Pandas 2.0 compatible (Notably you cannotpd.append
DataFrames, you mustpd.concat
them). In the future we can take advantage of 2.0 features.Dependency Modifications:
scipy
to>=1.10.1
loguru
as a dev dependency.Remaining issues
image_stitching.get_tiled_names
where some FOVs would returnNext Steps