stemangiola / tidybulk

Brings bulk and pseudobulk transcriptomics to the tidyverse
https://stemangiola.github.io/tidybulk/
164 stars 25 forks source link

pathway analysis using tidybulk #263

Open adityamahadevaniyer opened 1 year ago

adityamahadevaniyer commented 1 year ago

Could you please point me to github repos or links where you have successfully tested pathway analysis (GSEA and Overrepresenation analysis) tidybulk functions for pathway analysis? Some of the workshop materials where pathway analysis was done were outdated. A future workshop towards this would be really great. Thank you for this wonderful package!

stemangiola commented 1 year ago

Hello,

a tutorial was meant to go to our blog very long time ago. But we don't have enough forces to keep up.

https://github.com/stemangiola/tidytranscriptomics/commit/0d498f058894e54c2fd0dcce11448f7fdd0dc756

Have a look, and if you want to improve and be the one publishing it to the repo, with that you will become a contributor to tidytranscriptomics! In that case, feel free to change the author's name to yours.

adityamahadevaniyer commented 1 year ago

Thank you. I will try that from my end.

Another question:

I have a treatment column that’s made of Control, T1 , T2 and T3 samples. I am interested in looking at genes that are different between Control and (T1,T2,T3)

For now , I was setting Control as the reference using relevel function and then used test_differential_abundance(~treatment) for DE analysis/ DE methods comparison. I dont need a superset of genes that’s composed of C vs T1 , C vs T2 and C vs T3. I need DE genes that are different between control and treatments (combined). Is this method correct?

One more question, how does one incorporate complicated design matrix in the model? for example, I would like to compare Control Average versus Treatment average in the test_differential_abundance function? They have given the comparison in the publication here : https://f1000research.com/articles/9-1444 makeContrasts((T1+T2+T3)/3-Control, levels=colnames(design)) How do I incorporate such complicated contrasts/design into the test_differential_abundance function and contrasts argument?

Is there an easy way to extract contrasts comparison made for DESeq2, limma and edgeR easily? For DESeq2, I was able to figure this out using the code resultNames(attr(counts_de, “internals”)$DESeq2 Unable to extract such comparisons from edgeR and limma.

Thank you so much for all of your help. I have recently used tidybulk extensively and am looking to incorporate tidyseurat in the future. Keep up the good work! Thanks again, Aditya

stemangiola commented 1 year ago

s there an easy way to extract contrasts comparison made for DESeq2, limma and edgeR easily?

I don't understand what you mean by "extract contrasts". Can you please reformulate?

adityamahadevaniyer commented 1 year ago

Thank you. Good suggestion. Are you suggesting combining treatments into 1 group? Will it not result in issues for DE tools to model dispersion within those treatment groups?

How can I input such complicated contrast in the function?makeContrasts((T1+T2+T3)/3-Control, levels=colnames(design))

stemangiola commented 1 year ago

It is not clear how many samples for how many conditions you have. It is hard for me to suggest an analysis design with so little information, and besides, I don't really know what is the biological question, which should dictate the design matrix and contrasts.

adityamahadevaniyer commented 1 year ago

Sure. I will try to make it clear in this comment. I have 12 samples - 3 Controls, 3 T1 , 3 T2 and 3 T3. I am interested in looking at genes that are different between controls and treatment. Also I would like to obtain DE genes that are different between control average and treatment average for which I had provided the contrast above that I want from the analysis (T1 + T2 + T3)/3 - Controls. I am unable to input such contrasts in the test_differential_abundance function under the contrasts argument. Can you suggest the design and contrasts arguement for looking at

  1. control vs treatments and
  2. controls average versus treatment average.
stemangiola commented 1 year ago

I see, can you show me your code, and the error. For this can you please open a new issue, because this diverged from the original, and often people look for issue title to solve theirs.

adityamahadevaniyer commented 1 year ago

okay opening a new issue