-
Notifications
You must be signed in to change notification settings - Fork 18
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
Initiate "guide" notebook for validating cell type assignments #1001
Initiate "guide" notebook for validating cell type assignments #1001
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.
Looks good to me, left a couple comments but nothing too big!
The function probably isn't totally necessary since it's only used here, but I think it will help the notebook be less crowded in the long run.
💯
Yes, next up will be filling out the next section with summary plots.
To clarify, is this the spots marked TODO
?
|
||
1. Ensure that you have a local copy of the results from `aucell-singler-annotation.sh`, `evaluate-clusters.sh` and `run-aucell-ews-signatures.sh` saved to `results`. | ||
2. Copy the contents of this notebook to a new notebook titled `<library_id>_celltype-exploration.Rmd` and save in `exploratory_analysis/final_annotation_notebooks`. | ||
3. Replace the `sample_id` and `library_id` with the correct IDs in the `params` list. |
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.
and update the notebook title too in the yaml
The `celltype-exploration.Rmd` notebook is meant to be used as a guide for assigning and evaluating the final cell type annotations for each library in `SCPCP000015`. | ||
Instructions for using this guide: |
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 think it would also be fine to say here "instructions are in the template notebook" instead of duplicating instructions, but that's up to you!
analyses/cell-type-ewings/template_notebooks/celltype-exploration.Rmd
Outdated
Show resolved
Hide resolved
- Density plots by cluster of AUC values and custom gene set means | ||
- Maybe heatmaps with cluster annotation of AUC scores and custom gene set means | ||
|
||
## Re-cluster tumor cells **Manual exploration** |
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 had a thought that you might use section tags for these indicators instead of real text, like:
## Re-cluster tumor cells **Manual exploration** | |
## Re-cluster tumor cells {.manual-exploration} |
Those tags don't appear in the output (which may or may not be what you want?)
analyses/cell-type-ewings/template_notebooks/utils/setup-functions.R
Outdated
Show resolved
Hide resolved
cluster_df <- cluster_df |> | ||
# filter to the clustering results we want to use | ||
dplyr::filter( | ||
cluster_method == "leiden_mod", |
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.
This is documented for the notebook, but not specifically for the function that it's only going to consider Leiden with modularity. I'd add into the function docs somewhere.
dplyr::left_join(singler_df, by = c("barcodes")) |> | ||
dplyr::left_join(cluster_df, by = c("barcodes")) |> | ||
dplyr::left_join(aucell_wide_df, by = c("barcodes")) | ||
|
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 think a check would be worthwhile here before returning.. maybe check the column names are as expected?
Co-authored-by: Stephanie Spielman <[email protected]>
…itiate-final-annotation-template
@sjspielman I incorporated most of your reviews including removing the instructions in the README and just made a note to check the template for full instructions. The one thing I did not do is add the check for the columns. There are quite a lot of columns (multiple annotation and a lot of AUCell results) so I didn't think it was entirely necessary at this point.
Yes that's correct! Planning on filling out the TODOs before proceeding with making the notebooks fore each sample. |
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.
lgtm!
analyses/cell-type-ewings/template_notebooks/celltype-exploration.Rmd
Outdated
Show resolved
Hide resolved
Co-authored-by: Stephanie Spielman <[email protected]>
Purpose/implementation Section
Please link to the GitHub issue that this pull request addresses.
Starts on the journey of #993
What is the goal of this pull request?
Here I'm initiating a template or guide notebook of sorts that we plan to use to evaluate the results from 3 workflows and "finalize" cell type annotations for each library. We want to be able to produce a notebook for each library that compiles the results from
SingleR
, clustering, andAUCell
and uses those results to get cell type annotations. Since there is going to be some manual work when going through each of these libraries, we don't want to just render the same notebook for all libraries. But we will use a lot of the same plots and generally the same flow, so my thought is that we can use this guide to do most of the leg work code-wise and then fill in with biology that's specific to each library.This involves first creating the "guide" notebook and any associated functions and then use that notebook to create the actual notebook for each library.
If you need any clarification on the plan proposed here please let me know!
Briefly describe the general approach you took to achieve this goal.
This PR includes the initiation of the notebook and all the code needed for setting up the data.
template_notebooks
folder, but most of this is copied from the intro in the notebook. I figured as we finish the notebook and actually start using it the instructions might get expanded here.If known, do you anticipate filing additional pull requests to complete this analysis module?
Yes, next up will be filling out the next section with summary plots.
Author checklists
Check all those that apply.
Note that you may find it easier to check off these items after the pull request is actually filed.
Analysis module and review
README.md
has been updated to reflect code changes in this pull request.Reproducibility checklist
Dockerfile
.environment.yml
file.renv.lock
file.