-
Notifications
You must be signed in to change notification settings - Fork 17
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
Start wilms analysis #681
Start wilms analysis #681
Conversation
This looks great! I'm going to close #672 and start my review here. |
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.
Hi @maud-p - I have to head to some meetings, so I will return the feedback I have so far here. 😄
Some high-level thoughts:
- I would move to use the data download script as part of your development process because I think it will make it easier for other people (e.g., reviewers) to run your code over the project's lifecycle.
- Were you able to build this Docker image successfully locally? If so, what kind of machine are you on? I ran into a problem locally, and I think your answers might help us narrow down what's going on here.
Please let us know if you have any questions. Thank you!
|
||
• Provide annotations of normal cells composing the kidney, including normal kidney epithelium, endothelium, stroma and immune cells | ||
• Provide annotations of tumor cell populations that may be present in the WT samples, including blastemal, epithelial, and stromal populations of cancer cells | ||
Based on the provided annotation, we would like to additionally provide a reference of marker genes for the three cancer cell populations, which is so far lacking for the WT community. |
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.
🎉
Data have been downloaded locally and are found in mnt_data. the mnt_data folder has to be define in the config.yaml file or changed in the notebook accordingly. | ||
|
||
```{r paths} | ||
path_to_data <- "~/mnt_data/Wilms ALSF/SCPCP000006_2024-06-25" | ||
``` |
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 using the download-data.py
method here would require fewer manual steps for folks who want to run this module.
From this directory, one could run:
../../download-data.py --projects SCPCP000006
(This would use the defaults = download the _processed.rds
SingleCellExperiment
objects, which I believe are all you need but please do let me know if I'm wrong!)
And then your future notebooks could develop against the path (relative to the root of the repository) data/current/SCPCP000006
. That way, even as new releases get cut, your code would continue to run without modification.
This requires AWS CLI setup to run as intended, so let us know if you have any questions!
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.
AWS CLI setup and download into data worked well 👍
../../download-data.py --projects SCPCP000006
I'll change the READ.ME file, config.yaml and (future) scripts!
# parse config parameters: | ||
source bash/parse_yaml.sh | ||
eval $(parse_yaml config.yaml CONF_) |
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 not sure if we expect everyone who might want to run this module to have access to bash/parse_yaml.sh
?
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.
... Start being a bit too high-level for me to be honnest...
All our template have been done by our expert Christoph Hafemeister, and here, I have to admit, I run it without understanding every line...
I'll ask him once he is back from vacation!
Would this replace the run.sh and config.yaml files in the end?
https://openscpca.readthedocs.io/en/latest/ensuring-repro/docker/docker-images/#r-based-images
# pull base image | ||
FROM bioconductor/tidyverse:3.19 |
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 problem building this locally, but it seems that the base image might be the issue. I will need to investigate a little more.
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 changed for this:
# Base image on the Bioconductor 3.19 image
FROM bioconductor/r-ver:3.19
and build locally like this
podman buildx build . -t openscpca/cell-type-wilms-tumor-06:latest --platform linux/amd64
and it works :)
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 am building locally to make some tested recommendations regarding what to do with run.sh
, but it is taking a while, so I'll post an update as soon as possible!
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.
Thank you that would be great!
I am initiating a renv environment from the current R Session to then simplify the Dockerfile using the renv.lock (https://openscpca.readthedocs.io/en/latest/ensuring-repro/docker/docker-images/)
renv_init() is taking a while... I'll continue tomorrow :)
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 trouble accessing RStudio on the image I built locally. I'm attempting to isolate the problem... but that unfortunately requires rebuilding things 😅 ⏳
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.
Thank you for being on it :) I have troubles trying to implement the renv() environment and to change for the bioconductor/r-ver:3.19 based image... So far I can only open RStudio using the following Dockerfile (just a bit "cleaned" compared to the PR).
# Base image on the Bioconductor 3.19 image
FROM bioconductor/tidyverse:3.19
# Set global R options
RUN echo "options(repos = 'https://cloud.r-project.org')" > $(R --no-echo --no-save -e "cat(Sys.getenv('R_HOME'))")/etc/Rprofile.site
ENV RETICULATE_MINICONDA_ENABLED=FALSE
RUN R --no-echo --no-restore --no-save -e "install.packages('remotes')"
RUN R -e "devtools::install_github('enblacar/SCpubr')"
RUN R -e "remotes::install_github('satijalab/seurat', 'seurat5', quiet = TRUE)" # this also install patchwork (and others)
RUN R -e "remotes::install_github('satijalab/azimuth', quiet = TRUE)" # this also install SingleCellExperiment, DT (and others)
RUN R -e "remotes::install_github('cancerbits/DElegate')"
RUN R -e "install.packages('viridis')"
RUN R -e "install.packages('ggplotify')"
RUN R -e "BiocManager::install('edgeR')"
# make sure all R related binaries are in PATH in case we want to call them directly
ENV PATH ${R_HOME}/bin:$PATH
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.
@jaclyn-taroni FYI, I removed from the run.sh et config file unnecessary volume and path to data that are specific to our group. I realized it prevent the execution of the docker image if not defined!
Just in case it can help.
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.
Last comment of the week ;)
I added the renv.lock file from the RStudio session of docker image I am running on my machine.
I am now trying to use it to build the image as described here: (https://openscpca.readthedocs.io/en/latest/ensuring-repro/docker/docker-images/), but building of the image is full of ERROR because of BiocManager version not matching the bioconductor version.. (as described here rstudio/renv#517) Will take some time of fine tunning ⏳
But I think it's worth trying to have the Docker image in this format, then it might be easier to share/reproduce? What do you think @jaclyn-taroni ?
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 agree that our end goal should be to use renv
as part of the Docker build process, but I don't know if that's necessarily where we need to start. I think it's fine to start installing packages one-by-one in the Dockerfile, and then view renv
as a feature enhancement!
I am specifically struggling with what base image should be used right now.
I expect folks working on this project (including all of our staff at the Data Lab) to be on Macs with Apple Silicon.
My understanding is that you want to be able to develop using the RStudio Server IDE from within the running container. This is often part of my workflow, and I expect many other project participants might have this use case! (That is to say, I think we are bumping into a problem that will come up again and again in the project...)
However, I'm not sure we can use bioconductor/tidyverse:3.19
as the base image and have it play nicely with multiple architectures (e.g., if someone using an ARM machine wants to build and use it locally). That's because I don't think rocker/tidyverse
, which I understand to be the base of bioconductor/tidyverse
, supports ARM: rocker-org/rocker-versioned2#830
So, we might instead want to use the bioconductor_docker
as the base:
# pull base image
FROM bioconductor/bioconductor_docker:3.19
And until we implement renv
, I expect we can install the Tidyverse packages the same way suggested in that issue ☝🏻
# pull base image
FROM bioconductor/bioconductor_docker:3.19
# Adds tidyverse packages & devtools
RUN /rocker_scripts/install_tidyverse.sh
Then I believe we'd have an image we can build and push to Elastic Container Registry using GitHub Actions that can also be built and used locally on ARM machines. This compatibility seems like a good goal to me.
I would have liked to test this all conclusively, but installing Azimuth is taking a very long time for me 😅 Appreciate your patience, @maud-p!
Thank you for your feedback @jaclyn-taroni ! I will try to answer.
"Welcome to Ubuntu 22.04.2 LTS (GNU/Linux 5.15.0-101-generic x86_64)" System load: 0.79736328125 Processes: 1245 I used podman to build the image I will try to work on the improvment you suggested below for the Dockerfile, it might also solve the issue. |
Co-authored-by: Jaclyn Taroni <[email protected]>
Co-authored-by: Jaclyn Taroni <[email protected]>
Co-authored-by: Jaclyn Taroni <[email protected]>
Co-authored-by: Jaclyn Taroni <[email protected]>
Co-authored-by: Jaclyn Taroni <[email protected]>
Co-authored-by: Jaclyn Taroni <[email protected]>
…-test Build and test Docker image using `bioconductor/bioconductor_docker:3.19` and `renv`
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.
@maud-p, this is very close! 🎉
I left a few comments on the README about the marker sets:
- For some of the genes included, I might expect it to be helpful to examine altered expression patterns/programs rather than individual gene expression. You do not need to take any action besides replying with what you think about those ideas—these are just items for scientific discussion and for us to consider moving forward!
- I had a question about why THY1 was included vs. other markers based on one publication.
- I had a problem with one of the DOIs that’d be good to check out before merging.
Regarding how you need to run the Docker image:
- I’d rename the
run.sh
to be more general and to accept the password as an argument. - I’d write a section in the README that explains how you use the script to run the container on your own system.
We now know that the Docker image can be built because of the workflow we added! ✅ I link to the successful run in one of my comments so you can check it out.
I also wanted to mention that your decision to close #680, as mentioned in maud-p#3 (comment), and re-open a new pull request makes sense to me!
|
||
|gene_symbol|ENSEMBL_ID|cell_class|cell_type|DOI|comment| | ||
|---|---|---|---|---|---| | ||
|WT1|ENSG00000184937|malignant|cancer_cell|10.1242/dev.153163|Tumor_suppressor_WT1_is_lost_in_some_WT_cells| |
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 of sc/snRNA-seq as better suited to picking up overexpression than loss. I know you've worked on these data before, so I'm just curious if you expect or have observed differences in WT1 expression in the cancer cells. Although, I see that you put:
WT1 (?)
in #635, so maybe we don't know yet!
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 added the (?) for the reason you mentionned, as we are looking for loss of function, I am not sure that we can really use it for annotation.
However, about 20% of Wilms tumor would have imperment of WT1, and I would expect the WT1 mutated Wilms tumor to have a specific transcriptional program. At the final step of integration of the 40 samples together, I would expect a cluster negative for WT1. Also, the normal kidney should be WT1 positive. So in this last step I think looking at WT1 would make sense.
|---|---|---|---|---|---| | ||
|WT1|ENSG00000184937|malignant|cancer_cell|10.1242/dev.153163|Tumor_suppressor_WT1_is_lost_in_some_WT_cells| | ||
|IGF2|ENSG00000167244|malignant|cancer_cell|10.1038/ng1293-408|NA| | ||
|TP53|ENSG00000141510|malignant|anaplastic|10.1158/1078-0432.CCR-16-0985|Might_also_be_in_small_non_anaplastic_subset| |
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.
From the abstract of this publication, I wonder if looking at TP53 loss/activation at a pathway level would be interesting 🤔
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 a great idea, I will implement this in the next PR:
- Differential expression analysis using DElegate (pseudobulk based) FindAllMarkers2 to find markers for each clusters
- Enrichment analysis of the markers genes, I was thinking using the gene sets hallmarks and MSigdB C8, I found them the most informative. The Hallmarks of Cancer might help us defining specific cancer clusters (proliferation +++, DNA damage/repair +++, hallmark TP53 in anaplastic Wilms tumor). And the MSigdB C8 can be an additionnal level of information regarding cell types. Do you think to some other gene sets?
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.
|SIX1|ENSG00000126778|malignant|blastema|10.1016/j.ccell.2015.01.002|NA| | ||
|SIX2|ENSG00000170577|malignant|blastema|10.1016/j.ccell.2015.01.002|NA| |
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.
Similar to my TP53 comment – from a quick look at this publication, I wonder if looking at the altered expression patterns rather than the individual genes could be helpful.
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.
In the MSigdB C3/MIR gene sets, we have gene sets for DICER and DROSHA, I could also give a try to run enrichment for this dataset.
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.
|NCAM1|ENSG00000149294|malignant|blastema|10.1016/j.stemcr.2014.05.013|might_also_be_expressed_in_non_malignant| | ||
|PODXL|ENSG00000128567|non-malignant|podocyte|10.1016/j.stem.2019.06.009|NA| | ||
|COL6A3|ENSG00000163359|malignant|mesenchymal|10.2147/OTT.S256654|might_also_be_expressed_in_non_malignant_stroma| | ||
|THY1|ENSG00000154096|malignant|mesenchymal|10.1093/hmg/ddq042|might_also_be_expressed_in_non_malignant_stroma| |
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 curious why this gene differs from some of the ones outlined in the abstract and is included. I suppose I would not expect the ones outlined in the abstract to be specific to malignant cells necessarily.
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.
unfortunately I don't know about one mesenchymal gene specific for mesenchymal Wilms tumor cells... For some colleagues who wanted to characterize CAF, the best approach I found was:
- identify stromal cells and
- based on the inferedCNV, distinguish normal from cancer stromal cells at the cluster level.
This is not perfect I think, but at least we should have clusters enriched in the target population.
Stromal cells are really easily identified based on either few markers, or label transfer from the fetal kidney reference. They often form one single cluster. This is the reason why I didn't spend too much time adding marker genes for them, but I can add few more mesenchymal markers and references for correctness :)
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 THY1 is generally nicely expressed is I remember well!
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'd defer to you since you've spent more time thinking about this problem 😄
You don't need to add them – we'll have a record of this conversation!
|alteration|gain_loss|cell_class|cell_type|DOI|PMID|comment | ||
|---|---|---|---|---|---|---| | ||
|11p13|loss|malignant|NA|10.1242/dev.153163|NA|NA| | ||
|11p15|loss|malignant|NA|10.1128/mcb.9.4.1799|NA|NA| |
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 get a 404 at: https://doi.org/10.1128/mcb.9.4.1799 – perhaps a typo in the DOI?
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.
oh sorry, complete doi is https://doi.org/10.1128/mcb.9.4.1799-1803.1989
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.
should be corrected in the READ.ME and csv file :)
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.
Can we rename this to run-podman-internal.sh
, please? run.sh
might imply that this is how you run all steps in the module, so I think this name is more descriptive.
Did you need to add this file with force, i.e., git add --force analyses/cell-type-wilms-tumor-06/run.sh
? I would expect this file to be ignored, which is why I ask.
Generally, you want to avoid using --force
. There are many things in the .gitignore
in the root of the repository to prevent us from committing things we want to put in S3 instead, for example, and --force
allows you to avoid the guardrails.
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.
File renamed :)
Actually I think it do not need to be in this github folder. I might have been a bit too enthousiastic to have it run and quickly saved the few lines of codes in a run.sh file. But I could save it somewhere else for myself only.
Tbh I added quickly this file on the bowser interface, using "Add file". I didn't know about the shell --force
, it might be default via the interface. I'll be more carefull now!
@@ -0,0 +1,21 @@ | |||
# ids defined in image for the rstudio user, if not define as such, it is not possible to login to RStudio |
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 have not tested this (and probably could not satisfactorily without access to your system), so please test it on your end. I think it would be better to pass the password as an argument:
# ids defined in image for the rstudio user, if not define as such, it is not possible to login to RStudio | |
PASSWORD="$1" | |
# ids defined in image for the rstudio user, if not define as such, it is not possible to login to RStudio |
I will add what I think needs to happen in line 18 for this to work.
--gidmap $gid:0:1 --gidmap 0:1:$gid --gidmap $(($gid+1)):$(($gid+1)):$(($subgidSize-$gid)) \ | ||
--group-add=keep-groups \ | ||
--volume=$PWD/:/home/rstudio \ | ||
-e PASSWORD=wordpass \ |
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.
-e PASSWORD=wordpass \ | |
-e PASSWORD=$PASSWORD \ |
|
||
If you are on a Mac with an M series chip, you will not be able to use RStudio Server if you are using a `linux/amd64` or `linux/x86_84` (like the ones available from ECR). | ||
You must build an ARM image locally to be able to use RStudio Server within the container. | ||
|
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.
Can you add an H4 section here on Halbritter lab internal development please?
I'd expect that would include how to run the script (this is taking into account some review feedback):
./run-podman-internal.py {PASSWORD}
This hopefully helps you with your own development if, for example, you go on vacation for two weeks and come back to this! 😄 But it also helps others understand that this bash script isn't for their use.
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'll have to ask for some help in the Halbritter lab, add it on my to do list ;)
Co-authored-by: Jaclyn Taroni <[email protected]>
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.
@maud-p - I think this is good to go in as is 👍🏻
Congratulations on your first contribution 🥳
If you get more information about running this internally or need to make refinements, it's fine to add that in a later pull request!
I'm going to merge the AlexsLemonade:main
branch into this one to make sure it is up-to-date, which is a prerequisite for merging this into AlexsLemonade:main
.
Once this goes in, I recommend creating a new branch to add your clustering analyses from AlexsLemonade:main
.
Here are some instructions using GitKraken: https://openscpca.readthedocs.io/en/latest/contributing-to-analyses/working-with-git/working-with-branches/#creating-a-feature-branch-in-gitkraken
Side note: If you haven't checked out GitKraken yet, you can use the free version with this project: https://www.gitkraken.com/
I'm not 100% sure how feasible it is to use GitKraken with your lab's setup, but I figured I'd let you know about it.
If you can't use GitKraken, those instructions are less helpful 😅 so if you have any questions, ping me and/or @jashapiro + @sjspielman (Data Lab scientists) in a comment on #679
Thank you, and congratulations again!
Thank you very much!!! I am really happy about it and looking forward the next step of the analysis :) Thank you for your help setting up all of this! |
Purpose/implementation Section
In this module 1, I create 2 metadata tables to compile from the literature information on marker genes and known genetic alterations, that will be used later to validate annotations of the Wilms tumor dataset.
Please link to the GitHub issue that this pull request addresses.
#671
#635 (reply in thread)
What is the goal of this pull request?
Wilms tumor (WT) is the most common pediatric kidney cancer characterized by an exacerbated intra- and inter- tumor heterogeneity. The genetic landscape of WT is very diverse in each of the histological contingents. The COG classifies WT patients into two groups: the favorable histology and diffuse anaplasia. Each of these groups is composed of the blastemal, epithelial, and stromal populations of cancer cells in different proportions, as well as cells from the normal kidney, mostly kidney epithelial cells, endothelial cells, immune cells and normal stromal cells (fibroblast).
In this module, we reviewed the literature to compile a table of marker genes for each of the expected cell types in the dataset. Additionally, we provide a table of know genetic alterations in Wilms tumor that can be useful to validate CNV profiles obtained after running inferCNV function.
Briefly describe the general approach you took to achieve this goal.
The table CellType_metadata.csv contains the following column and information:
The table GeneticAlterations_metadata.csv contains the following column and information:
If known, do you anticipate filing additional pull requests to complete this analysis module?
This module will be used for later validation of the annotations and results from inferCNV.
What is the name of your results bucket on S3?
Results should be uploaded to your bucket so they are available during review.
See here for instructions on how to upload to your bucket:
https://openscpca.readthedocs.io/en/latest/software-platforms/aws/working-with-s3-buckets/
What types of results does your code produce (e.g., table, figure)?
2 tables
Provide directions for reviewers
This section had 2 aims:
What are the software and computational requirements needed to be able to run the code in this PR?
Are there particularly areas you'd like reviewers to have a close look at?
Is there anything that you want to discuss further?
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.