-
Notifications
You must be signed in to change notification settings - Fork 16
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
Adapt Azimuth code for Wilms label transfer #843
Adapt Azimuth code for Wilms label transfer #843
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.
I reviewed the results, but I am most curious about what happens when we use the adaptation with all the other results (e.g., inferCNV) to generate labels! We may not know that until next week (at the earliest).
The only question I had was about whether or not we should be setting query.assay = NULL
.
k.filter = NA, | ||
reference.neighbors = "refdr.annoy.neighbors", | ||
reference.assay = "refAssay", | ||
query.assay = NULL, |
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.
Do we want to be doing this instead of accepting an argument to transfer_labels
?
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 NULL
here is based on the source code, and to be honest I was hesitant to rock the boat on it...
This is defined in Seurat with this assay
argument, and we previously didn't override the NULL
default.
I'm ~sure the assay should be RNA, but I'd want to run it through to see if specifying* "RNA" changes the results. Do you think I should do that?
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.
I'm ~sure the assay should be RNA, but I'd want to run it through to see if specifying* "RNA" changes the results. Do you think I should do that?
I too am ~sure, so I say go for it; it will bring us greater understanding at the very least!
I re-ran this with
Here's the updated supplemental notebook: Given this increased agreement with Azimuth inferences, I think specifying "RNA" is indeed the move. I updated the actual label transfer notebooks accordingly. |
…' into sjspielman/wilms-run-azimuth
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.
👍🏻
3e2f90c
into
AlexsLemonade:feature/wilms-tumor-06-azimuth
Towards #810
This PR does the crux of the work to swap over label transfer strategies. There are a lot of code changes, but I think they are all ok for 1 PR since they are all highly related (please let me know if you want me to cherry pick some things out!).
This PR implements the following changes:
notebook_template/utils/label-transfer-functions.R
. This script contains functions adapted from Azimuth (with source links) to prepare a query for label transfer and perform label transfer02a
and02b
) that perform label transfer to use these new functions rather than Azimuthk.weight
accordingly00_run_workflow.sh
(now a shell script; see Create shell script for wilms-06 workflow #817 & issue Use shell script for cell-type-wilms-tumor-06 workflow #816) so these steps are not run in CI, but use the CI paramThere are also some additional smol changes:
.gitleaks.toml
regex's for efficiencyscripts/prepare-fetal-references.R
, since this data is now tracked withrenv
(Add fetusref.SeuratData to renv #831)I also added a new directory
supplemental-notebooks
which contains a README and 1 notebook (here is the HTML for review though it's also committed: compare-label-transfer-approaches.nb.html.zip) to compare these results to Azimuth. Before running this notebook, I re-ran themain
branch workflow up through label transfer (including object Seurat preparation) to ensure results being compared use the current data release. Then, I ran this notebook to compare results between Azimuth and the code here which is adapted from Azimuth over 5 samples. Results are consistent enough that I feel comfortable with this code!Note that the pre-commit hook styled a lot of this code, so you may want to turn off whitespace when reviewing!
Opening this as a draft since we're running in CI for the first time!
EDIT: Several samples have now successfully undergone label transfer in CI; it's still running at the time of writing this, but seems enough to be be ready for review!