Thank you for your lesson. Honestly, I spent 3 days to get the result from gene list as a beginner. I did not know that the gene list (value) from my data frame should be converted into a vector form. Then the enrichGO recognized my gene list.
Great video! this is helpful. in the comment at 3:45 you meant 366 of 402 ? (instead of 403) because when you printed the to be tested genes there were 402 out of the initial 1192 that crossed the significance threshold
Hi thank you for your video. But I have a question about the genes for test, normally the FC cutoff is 2, which means |log2FC | >= 1, right? Besides, not only |log2FC | >= 1 but also the padj should less than 0.05, right?
The cutoffs you chose are always arbitrary. But, abs(lfc2) >= 1 AND padj < 0.05 is pretty typical. Without looking at what I did again, I most likely filtered based on both lfc and padj. Maybe at different lines of code if you didn't see both.
Thanks a lot for the inspiring video! What about the GO annotation of a plant genome's gene list (i.e. Triticum turgidum spp. durum) as for the "org" database? Is there a way to select a species-specific resource?
I've never worked with plants before. This method might not work. You can try checking out something like DAVID to see if they have resources for you species.
Very easy to follow, thank you! I was previously using ShinyGO and there was an option to supply a background list, is it possible to do it with enrichGO?
Hi, is there a location of the database/file in which you are using for this script? I'm trying to follow along but as a beginner is it difficult if I cannot view the file
If you want to start from the beginning I have a complete walkthrough through the process of RNAseq leading up to this point. Check out my RNAseq section
Thank you very much for this! I am just wondering how did you determine the cutoff for baseMean? In this case it's 50, is this a commonly used threshold value?
Good question. There isn't a definitive answer. A lot of people use arbitrary thresholds, but you can also base it on the variability of your dataset at lower values or use a filter based on the distribution of gene abundances.
Hi Sanbomics, I did two GO plots and my PI wants the two p adj keys to be the same scale/range. I have been searching how to achieve this, but no beans. Do you have any suggestions? Thank you for the informative video!
You could convert them to -log10 values which may make it easier to put on the same scale if they are far apart. Alternatively (harder) you can make your own color mapper that spans the whole range of values and color the bars based on that and make a legend bar. There might be an easier way I don't know. (I am much better at plotting in python than R).
That is a great question. Basically all you need is a background list of genes, target lists of genes, (e.g., genes that belong to a GO term) and your enriched set of genes. You can do a hypergeometric enrichment analysis. I have a video that goes over this. But, you still need a list of target genes, and if it is not a well-characterized organism you may have to be creative in coming up with these lists.
Hi, cheers for the super informative video to save a bunch of grad students like me. Anyways, I have one question. It seems like that enrichGO doesn't work but in CC mode, which is not so useful like you mentioned in the video. It doesn't matter if I change the keyType or any options. Can you recommend the alternative function? Apparently gseGO and groupGO don't work in the same way.
Hi, I am using Jaculus jaculus and I cannot find the "org" database for them , but I can retrieve the GOs info from biomart in R, How can I adapt that data in order to make this graph that you so nicely explain here, or is there a jaculus jaculus org database that you know ? thank you so much
Aww I had to look up jaculus jaculus. Cute little ones. You may have to use a different tool for encirhment maybe like an EnrichR wrapper. Or you can use the DAVID web tool and save the output table and make a graph from it.
@@sanbomics thank you so much for your answer and for your awesome videos, they really make science come to life 🥰. And yeah jaculus are the cutest 😁 do you happen to have any tutorial on some of these steps ? Thank you so much, very grateful!
Thanks for the informative video. My Deseq output excel file (from a bacterium) has Locus tags instead of geneIDs. How can I convert locus tags into Ensemble IDs?
Thanks lot for this amazing video. I am trying to do the same analysis but with Genbank Accession numbers instead of Ensembl ID as keyType. Eventhough after applying Log2FC and p-adj filters, I only get 271 genes for enrichGO, when I use "ACCNUM" as keyType, R took over 30 minutes and threw an exception error and crashed. I use Mus musculus (Mm) database.
Thanks for the helpful video! I'm super confused about the data base though since I'm working with the coccolithophore Coccolithus braarudii, for which we don't even have a genome. What should I do?
I don't have much experience working with human or non-model organisms. To do enrichment analysis you need annotated gene sets. I'm not sure if they exist for your organism or not. You could check if DAVID has anything : david.ncifcrf.gov/
Thank you so much for this informative video. I am doing exactly the same thing as you did in this video. But I am unable to plot the barplot and dotplot. I have also tried with the enrichplot package but still it is not showing the plots. It shows the command as "Error in barplot.default(go_analysis) : 'height' must be a vector or a matrix" Can you please advice me on this issue?
Huge thanks for informative tutorial, and I have a question, I got DEGs from snRNA seq data with seurat, in my marker.csv doesn't has STAT column like your dataset. So what is stat column meaning and how can I calculate it?
Are you trying to do GSEA? For simple GO enrichment you don't need it. For GSEA you don't need that STAT column if you can use something else. Does the DE test you use provide any statistic? If not you can use the log fold change to rank them.
Exactly, I wanted to run GSEA and my DEG.csv has colums of gene symbol, log2FC, p-value, adj-pval, pct.1 and pct.2. It just cluster marker extracted from seurat. So I can run GSEA with my DEG.csv if I arrange the data with p-val or log2FC in descending manner?
On my R version on MAC when i type the rownames it prints the row number that that sample corresponds, how can I choose the column that I want it to express???
Hi, thanks for these amazing videos. I am unable to create the plot of this go_result. Is there any specific package which needs to be installed or something else?
Hey, I am also facing the same problem as u did earlier, i.e. I am unable to plot the go_result. I have also tried the package enrichplot, but it is showing some commands. Can you please help me on this?
Hello, I am trying to use enrichGO but I am running into an error, Expected input gene ID: ENSMUSG00000020191,ENSMUSG00000063281,ENSMUSG00000030898,ENSMUSG00000028294,ENSMUSG00000038651,ENSMUSG00000021822. My genes have the ensembl id so I do not know why it is giving me this error.
Hi. In your command {[sigs$log2FoldChange>0.5,]}, you just find genes that have higher expression in A vs B. How is the command for both downregulated and upregulated in A?
Very informative and helpful. Please suggest me how to prepare the database for nonmodel organizations. Can I use all the gene ID and corresponding GO number for this purpose. Thanks
Thats a good question. Typically, you pick up OR down. But depending on your question there might be some instances you want to include both. Unless you know for sure I would pick the former.
Hie, you used human database here which is available in bioconductor, but what if I have, for example, goldfish, which database is not in bioconductor, how will I proceed then? Pls let me know.thank you
Goldfish! That is awesome. I've never heard of someone do goldfish. Yeah, unfortunately you will need to build your own reference database. This is a common question and I go into it a little more depth in other responses if you want to look through. I may make a video doing this in the future
Thanks for this nice video. Please inform the following: 1. What if database of a bacteria at .org....eg.db is removed by bioconductor. 2. How to input data if I have 8 treatment with 3 replicates, can I put all treatment simultaneously or in group of 2/3? 3. After deseq2 is GO/GSEA or what should be the step to complete the analysis? Please inform Thanks in advance
1) You can make a custom database although it will be a bit more involved. I am not familiar with bacterial work so I cant assist much more than that. 2) Do you mean for DE analysis? It depends on the questions you are trying to answer. You can only do pairwise comparisons, but if one group is one treatment and the other group is a combination of the other 7 treatments, is up to you. Usually people would do a pairwise comparison of all treatments, but 8 groups is a lot of comparisons. I would pick the comparisons that make biological sense. For example, you might want to just compare the treatments individually to the control for 8 total DE analysis. Its a hard question to answer without knowing more though. 3) Again, this is highly dependent on what you are trying to answer. But, GO/GSEA are almost always done after DE analysis and I would highly recommend doing that at the minimum. People usually like to see the top DE genes in something like a volcano plot or heatmap, even though IMO those don't add that much to the analysis that a csv of the output doesn't already tell you. If you are interested in how similar the treatments are you can do some sort of clustering (PCA/hierarchical/etc). if you have 24 samples you can theoretically do a co expression analysis. good luck!
@@sanbomics Thank you for a detailed description 1. I understand but in almost every information source people taking the example of humans, ratus, and Arabidopsis, I am unable to follow their instructions. Could you please elaborate on the custom database if possible? 2. Yes I have one control with 3 treatments in one condition and another control and 3 treatment in the second condition. (1+3 = condition 1) (1+3 = condition 2) 3. I am looking for how such treatments change the morphology of organisms and which genes are important for it. Thus was looking for advice on GSEA or pathway analysis?
Hi! Sorry for the delay, I don't get notified when people respond after I respond. 1) Several of the R GO packages allow you to input custom gene lists for for enrichment. Its gonna take a little trial and error on your part likely. 2) Im sorry, I am still a little confused about the layout 3) I think both are important. You should try both. GSEA is just a method to test gene set enrichment. Pathway analysis usually means the gene sets are specific to pathways, as opposed to gene ontology where the gene sets are more broad. You can use GSEA on both pathways or GO
You mean the background gene list? This is a good question. It should be all the genes you detected in your analysis - not all the genes in the genome. I wish I had specified that clearly in the video.
Hello, first of all thank you for the video and the effort. However I try to implicate it R gives object ('sigs' not found) error. I don't know how to resolve the issue and I am fairly new to the R.
Hi, I am sorry but I am not sure I understood the question. But, GO enrichment requires a gene list. Theoretically, whatever gives you a list of genes can also be used for GO analysis.
Hi ! Thanks for this very clear video. I am working with a non model organisms that do not have the annotation file prepared as for human or mouth. Is there a package to do this ? Thanks in advance
I've never had to do it, but I think you can with topGO: bioconductor.org/packages/release/bioc/html/topGO.html I've had this question multiple times, so I might figure it out and make a video down the line.
@@sanbomics GO id for individual genes.. since my data is non-model species, I could not use org.hs database. So, I extracted the go id of each gene_id against interproscan. So, Now, I have deseq data and GO id corresponding to each gene. With only this information, Can I perform GO analysis as you do in video?
Nobody cares about plants... JK. Not really familiar working with them.. but at the end of the dat the algorithm is the same you just have to find and use the right database
You need to find a database that has functional terms associated to miRNA. I am not sure which ones exist because I have not done much with miRNA. You can change the database that you use in the function from the default one
Hi. You co-expression analysis is different than just DE/GO. You need a large sample size for that in order to find correlations between gene expression. Usually the minimum is around ~20 samples. But that varies based on which model you are using. If you are using humans you need a lot more than if you are using cell culture from one cell line or if you are using genetically identical mice.
Oh, thank you. But what I really want to know is that do i have to use Differentially Expressed genes for co-expression analysis? Or i can just use whatever dataset and use it for the analysis without finding DEGs
You don't necessarily need to do DE analysis to do co-expression. Co-expression finds correlations between genes, irrespective of DE testing. However, DE analysis can help you focus in on specific co-expression pathways or genes that are different between conditions.
Hi, thanks a lot for this video, it is very well explain and looks sooooo simple! However it is not working for me. First, to visualise the data frame, I cannot do just: as.data.frame(GO_results), but this: as.data.frame(GO_results@result) otherwise it gives me an empty df. Second, I cannot do the plot since I obtain this error message: > fit
Regarding the second problem that you have, I generated the plots without creating a dataframe of the enrichGO output, before that I kept getting the same "height" error.