-
Notifications
You must be signed in to change notification settings - Fork 83
scripts for immune deconvolution #292
scripts for immune deconvolution #292
Conversation
Hi @komalsrathi, thank you for filing this! We are probably unlikely to provide a full review prior to the holiday this week, thanks for your patience. I noticed that you are adding the CIBERSORT R script here ( If this is in fact the case, I'd recommend the following:
Looking forward to your thoughts on implementation if we need to work around CIBERSORT. Thank you again for the contribution and have a happy holiday break! |
@jaclyn-taroni Thank you for your feedback. I agree, we shouldn't have the CIBERSORT.R and LM22.txt available (my bad for overlooking that). I am going to think about this a little more and get back with my thoughts after the break. Have a Happy Thanksgiving! |
CIBERSORT's license used to be... extensive. @dhimmel made a copy of it here: Is the license the same or have they modified it? It seems plausible that they could have updated it so that you could add a command to download it to the CI system with wget if there's a URL where it's available. |
Ah, okay it does look like it's been updated @cgreene, I am copying the text from the modal that comes up when you click
|
Hi @komalsrathi, I hope you had a great break! I wanted to check in. I have not requested or provided a review of this yet because of the expected CIBERSORT changes. Do you have an idea of when you will have the opportunity to revisit this pull request? Thank you! |
@jaclyn-taroni I should have the necessary changes by end of next week. |
Sounds good, thanks! |
@jaclyn-taroni I am working on this today, will let you know when this is ready for review. |
@jaclyn-taroni I have made the changes that you suggested:
Please review when you can and let me know any changes/suggestions. Thank you!! |
The |
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 @komalsrathi,
Thanks for adding this analysis! I've added specific comments aimed at bringing the folder organization more in line with the rest of the repository and using rprojroot
to head off any potential issues with sourcing your plot theme file. In addition to the line comments I've added, I have some more general comments and questions about this analysis:
-
Can you add this module to the "modules at a glance" table in
analyses/README.md
please? That was added as a requirement since this pull request was initiall filed (ref). -
Similarly, can you add a README to
immune-deconv
here? I think this addition will help with some of the outstanding questions I have (see below). -
How do you intend for this module to be used? Specifically, do you expect that folks will run only two methods (e.g.,
xCell
andcibersort_abs
) or is your intention to make this flexible enough that people can run multiple methods that they can compare downstream? I'm asking in part because you made reference to creating correlation plots for all methods in the past Planned Analysis: Immune/Stroma characterization across PBTA #15 (comment). -
How do you intend for folks to use the results of this analysis, e.g.,
results/deconv-output.RData
, downstream? It looks like there is a section of theimmunedeconv
documentation about the interpretation of scores that should probably be mentioned in the README. It looks like you have some information around this in your methods pull request add methods for collapse rnaseq and immunedeconv OpenPBTA-manuscript#64 -
You're combining the two RNA-seq matrices that have been split up because we observed technical effects. How does combining the matrices (or not) affect your results?
Thanks again!
c79de3a
to
401b9ad
Compare
@komalsrathi : can you help us understand why you needed to force push here:
Do you know what changes were wiped out by this? I'm guessing they were edits that were made by others or on GitHub. |
I was trying to pull the changes that I thought had been made to this
branch - can this be fixed?
On Fri, Jan 3, 2020 at 4:59 PM Casey Greene ***@***.***> wrote:
@komalsrathi <https://github.com/komalsrathi> : can you help us
understand why you needed to force push here:
komalsrathi force-pushed the komalsrathi:immune-deconv branch from c79de3a
<c79de3a>
to 401b9ad
<401b9ad>
37 minutes ago
Do you know what changes were wiped out by this? I'm guessing they were
edits that were made by others or on GitHub.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#292?email_source=notifications&email_token=ABVNEJ7A7SUWXKWEGKLPOWLQ36YNPA5CNFSM4JR4IALKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEICFVXA#issuecomment-570710748>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABVNEJ3K4XBXS3ADNTEPPTDQ36YNPANCNFSM4JR4IALA>
.
--
*Komal S Rathi* | Bioinformatics Scientist II, DBHi, The Children's
Hospital of Philadelphia | rathik@email.chop.edu
|
@komalsrathi Just corresponded a bit with @jaclyn-taroni. Fortunately she checked it out locally so she could force push back to the state things were at when she was last making changes. How many changes were you intending to make (vs. how many of the changes from the commits came in from the merge). |
@cgreene I guess I was just trying to pull changes that Jaclyn had made here to my local branch: in order to get all changes on my local system and then work on her other suggestions. Because there were some changes that I had accepted for e.g. where she had asked to create a plots directory. |
Ok! I see merge markers so it sounds like you pulled, there were merge conflicts, and then when you tried to push it didn't work b/c it wasn't yet merged. I will let @jaclyn-taroni propose next steps on this, but I think her force pushing and you re-integrating those changes will be easier than any other alternative. Thanks for your help understanding what the goal was here! It'll help us get the best path to a successful merge. 😁 |
The suggestions that were applied earlier are marked as resolved so they can no longer be applied. I will mark them as unresolved so we're able to apply the changes via the GitHub interface. That will get us back to the point where I submitted my review. |
Alright! You are all set to apply my suggestions via the GitHub interface. Once you've applied the suggestions, you essentially want to get the same state of the branch on your local machine as what's here remotely. You could do what is called a This StackOverflow post has a lot of good information in it and is what I referenced while writing this up. The command for that is (warning this will get rid of any local changes!):
I am happy to walk you through all of that when we meet in person, but I wanted to document this while it was fresh in my mind. |
Co-Authored-By: Jaclyn Taroni <jaclyn.n.taroni@gmail.com>
Co-Authored-By: Jaclyn Taroni <jaclyn.n.taroni@gmail.com>
Co-Authored-By: Jaclyn Taroni <jaclyn.n.taroni@gmail.com>
Co-Authored-By: Jaclyn Taroni <jaclyn.n.taroni@gmail.com>
Co-Authored-By: Jaclyn Taroni <jaclyn.n.taroni@gmail.com>
@jaclyn-taroni Hi Jaclyn, I think this should be ok now. This is what I did:
Then, I applied the changes via Github interface and again:
This is the log on my local system:
Now, I just need to make and commit other changes that you have suggested in the review. Can you comment, if this sounds right? |
Yep, this looks correct 👍 thanks! |
HI @jaclyn-taroni, here are my responses:
Done
Please see the output section of: https://github.com/komalsrathi/OpenPBTA-analysis/blob/immune-deconv/analyses/immune-deconv/README.md#choice-of-method
MCP_Counter gives exactly the same result for polyA and stranded, if the matrix is combined or not. CIBERSORT (abs.) also gives the same result for polyA - whether combined or not. But for stranded data, there is some loss of information when using the combined matrix because polyA has lesser genes compared to stranded. In this case, if the stranded data is run independently, a few more cell types pop up. Similarly, for xCell not much changes when using the combined matrix vs the independent matrices (pearson correlation 0.99). So, to address the issue with CIBERSORT (abs.), I have changed
|
Modules at a glance added with 9fc1439 |
@jaclyn-taroni, I have made the discussed changes. Let me know whenever you get a chance to review this. And thanks for helping out! |
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! Thanks for the updates! I'm going to update this branch to be in sync with the master branch (the CI failure is not related to your changes, but has been fixed elsewhere) and if this passes, I will merge.
Purpose/implementation Section
What scientific question is your analysis addressing?
Immune profiling of PBTA histologies.
What was your approach?
To deconvolute the immune cell types across 20 histologies from the PBTA cohort, we use the R package immunedeconv, which is a unified interface that allows cell type quantification from RNA-seq gene expression data using multiple methods i.e. EPIC (n = 6), TIMER (n = 6), MCP-counter (n = 8), quanTIseq (n = 10), CIBERSORT (n = 22) and xCell (n = 64). Out of the six methods, we chose the top two most comprehensive methods i.e. CIBERSORT and xCell that are able to deconvolute 22 and 64 cell types, respectively. In a benchmarking study, xCell was also shown to robustly outperform all other methods, including CIBERSORT.
In general, immune deconvolution is a hard problem in that most immune deconvolution methods do not always agree because of the type of underlying algorithm and ability to deconvolute certain cell types better than others. To compare the outcome scores across these two prominent profiling methods, we took 13 cell types common between both methods and created a correlation plot per cell type per histology.
In order to see histology specific enrichment of certain cell types, we created heatmaps for xCell and CIBERSORT representing average immune cell scores normalized across histologies.
What GitHub issue does your pull request address?
#15
Directions for reviewers. Tell potential reviewers what kind of feedback you are soliciting.
Which areas should receive a particularly close look?
Is there anything that you want to discuss further?
Any suggestions are most welcomed.
Is the analysis in a mature enough form that the resulting figure(s) and/or table(s) are ready for review?
Yes
Results
What types of results are included (e.g., table, figure)?
01-immune-deconv.R creates an RData containing immune scores corresponding to xCell and CIBERSORT.
02-summary-plots.R creates a correlation plot between cell types common between xCell and CIBERSORT as well as heatmaps containing average immune scores per cell type per histology for each method.
What is your summary of the results?
Correlation plot:
Overall, across all histologies and cell types, the predictions did not correlate well (pearson correlation 0.12) but we did observe a high correlation (> 0.5) between certain cell type predictions i.e. Macrophages M2, Monocytes, Neutrophils and T cell CD8+ markers across specific histologies.
Heatmaps:
We observed a very similar and interesting pattern in the heatmaps as well i.e. cell types that were highly correlated between xCell and CIBERSORT are also the ones that found in high proportions compared to other cell types. Using the profiling method, we could distinctively identify three histologies enriched in specific cell types. Histiocytic tumors (n = 5) which are known to be characterized by an increase in Monocytes, Macrophages and Dendritic cells[3] were observed to be enriched in Myeloid dendritic cell activated, Monocytes, Neutrophils and Macrophage M1/M2; Lymphomas (n = 1) were seen to be enriched in B cell plasma, Class-switched memory B cell, B cell naive, B cell, B cell memory, T cell regulatory (Tregs), Common Lymphoid progenitor[4]; and Germ cell tumors (n = 13) as expected[5] were seen to be enriched in T cell CD8+ and T cell CD4+ naive cells.
Because we only have a sample size of 1 for Lymphomas, we couldn't get any correlation between immune scores of xCell and CIBERSORT across various B cell types but looking at the heatmap of average scores per cell type per histology, it is highly likely that those two would correlate.
Reproducibility Checklist