The mosdef
User’s Guide
mosdef 0.99.0
This vignette describes how to use the mosdef package for performing tasks commonly associated to your Differential Expression workflows.
This includes functionality for
plotting your expression values and differential expression results, both individually and as summary overviews (gene_plot
, de_volcano
, go_volcano
, plot_ma
, get_expr_values
)
running different methods for functional enrichment analysis, providing a unified API that simplifies the calls to the individual methods, ensuring the results are also provided in a standardized format (run_cluPro
, run_topGO
, run_goseq
)
decorating and improving your analysis reports (assuming these are generated as Rmarkdown documents).
This can enhance the experience of browsing the results by automatical linking to external databases (ENSEMBL, GTEX, HPA, NCBI, … via create_link_
functions, wrapped into a buttonifier
to seamlessly multiply the information in a simple tabular representation).
Additional info on frequently used features such as genes and Gene Ontology terms can also be embedded with geneinfo_2_html
and go_2_html
The mosdef package as a whole aims to collect the MOSt frequently used DE-related Functions, and is open to further contributions from the community.
All in all, the objective for mosdef is to streamline the generation of comprehensive, information-rich analysis reports.
Historically, many of these functions (at least conceptually) have been developed in some of our other Bioconductor packages, such as pcaExplorer, ideal and GeneTonic. mosdef is the attempt to achieve a better modularization for the most common tasks in the DE workflow.
In order to use mosdef in your workflow, two main inputs are required:
dds
, a DESeqDataSet
containing the expression matrixres_de
, a DESeqResults
, i.e. a DataFrame
storing the results of the differential expression analysisAdditionally, the mapping
parameters, shared by a number of functions, refers to the annotation of your species provided by AnnotationDbi-like packages, which are commonplace in the Bioconductor environment.
For human, this would be org.Hs.eg.db, and for mouse org.Mm.eg.db.
Currently, mosdef is able to feed on the classes used throughout the DESeq2 approach, but can easily be extended for the corresponding implementations in edgeR and limma.
mosdef
on the macrophage data
In the remainder of this vignette, we will illustrate the main features of mosdef on a publicly available dataset from Alasoo et al., “Shared genetic effects on chromatin and gene expression indicate a role for enhancer priming in immune response”, published in Nature Genetics, January 2018 (Alasoo et al. 2018) doi:10.1038/s41588-018-0046-7.
The data is made available via the macrophage Bioconductor package, which contains the files output from the Salmon quantification (version 0.12.0, with Gencode v29 reference), as well as the values summarized at the gene level, which we will use to exemplify the analysis steps.
In the macrophage
experimental setting, the samples are available from 6 different donors, in 4 different conditions (naive, treated with Interferon gamma, with SL1344, or with a combination of Interferon gamma and SL1344).
For simplicity, we will restrict our attention on the comparison between Interferon gamma treated samples vs naive samples.
To install mosdef, you can run the following commands:
if (!require("BiocManager")) {
install.packages("BiocManager")
}
BiocManager::install("mosdef")
Once installed, the package can be loaded and attached to your current workspace as follows:
library("mosdef")
#>
Load your dataset. We will use the well known macrophage
data as an example.
Notably, we correctly specify the experimental design as ~ line + condition
, to obtain the effect due to the condition
, while accounting for the cell line
.
library("macrophage")
library("DESeq2")
#> Loading required package: S4Vectors
#> Loading required package: stats4
#> Loading required package: BiocGenerics
#>
#> Attaching package: 'BiocGenerics'
#> The following objects are masked from 'package:stats':
#>
#> IQR, mad, sd, var, xtabs
#> The following objects are masked from 'package:base':
#>
#> Filter, Find, Map, Position, Reduce, anyDuplicated, aperm, append,
#> as.data.frame, basename, cbind, colnames, dirname, do.call,
#> duplicated, eval, evalq, get, grep, grepl, intersect, is.unsorted,
#> lapply, mapply, match, mget, order, paste, pmax, pmax.int, pmin,
#> pmin.int, rank, rbind, rownames, sapply, setdiff, table, tapply,
#> union, unique, unsplit, which.max, which.min
#>
#> Attaching package: 'S4Vectors'
#> The following object is masked from 'package:utils':
#>
#> findMatches
#> The following objects are masked from 'package:base':
#>
#> I, expand.grid, unname
#> Loading required package: IRanges
#> Loading required package: GenomicRanges
#> Loading required package: GenomeInfoDb
#> Loading required package: SummarizedExperiment
#> Loading required package: MatrixGenerics
#> Loading required package: matrixStats
#>
#> Attaching package: 'MatrixGenerics'
#> The following objects are masked from 'package:matrixStats':
#>
#> colAlls, colAnyNAs, colAnys, colAvgsPerRowSet, colCollapse,
#> colCounts, colCummaxs, colCummins, colCumprods, colCumsums,
#> colDiffs, colIQRDiffs, colIQRs, colLogSumExps, colMadDiffs,
#> colMads, colMaxs, colMeans2, colMedians, colMins, colOrderStats,
#> colProds, colQuantiles, colRanges, colRanks, colSdDiffs, colSds,
#> colSums2, colTabulates, colVarDiffs, colVars, colWeightedMads,
#> colWeightedMeans, colWeightedMedians, colWeightedSds,
#> colWeightedVars, rowAlls, rowAnyNAs, rowAnys, rowAvgsPerColSet,
#> rowCollapse, rowCounts, rowCummaxs, rowCummins, rowCumprods,
#> rowCumsums, rowDiffs, rowIQRDiffs, rowIQRs, rowLogSumExps,
#> rowMadDiffs, rowMads, rowMaxs, rowMeans2, rowMedians, rowMins,
#> rowOrderStats, rowProds, rowQuantiles, rowRanges, rowRanks,
#> rowSdDiffs, rowSds, rowSums2, rowTabulates, rowVarDiffs, rowVars,
#> rowWeightedMads, rowWeightedMeans, rowWeightedMedians,
#> rowWeightedSds, rowWeightedVars
#> Loading required package: Biobase
#> Welcome to Bioconductor
#>
#> Vignettes contain introductory material; view with
#> 'browseVignettes()'. To cite Bioconductor, see
#> 'citation("Biobase")', and for packages 'citation("pkgname")'.
#>
#> Attaching package: 'Biobase'
#> The following object is masked from 'package:MatrixGenerics':
#>
#> rowMedians
#> The following objects are masked from 'package:matrixStats':
#>
#> anyMissing, rowMedians
library("org.Hs.eg.db")
#> Loading required package: AnnotationDbi
#>
data(gse, package = "macrophage")
dds_macrophage <- DESeqDataSet(gse, design = ~ line + condition)
#> using counts and average transcript lengths from tximeta
rownames(dds_macrophage) <- substr(rownames(dds_macrophage), 1, 15)
We perform some filtering on the features to be kept, and define the set of differentially expressed genes contrasting the IFNg
and the naive
samples.
Notably, we correctly specify the lfcThreshold
parameter instead of a post-hoc approach to filter the DE table based on the log2 fold change values - see https://support.bioconductor.org/p/101504/ for an excellent explanation on why to prefer the more rigorous (yet, likely conservative) method defined in the chunk below.
keep <- rowSums(counts(dds_macrophage) >= 10) >= 6
dds_macrophage <- dds_macrophage[keep, ]
dds_macrophage <- DESeq(dds_macrophage)
#> estimating size factors
#> using 'avgTxLength' from assays(dds), correcting for library size
#> estimating dispersions
#> gene-wise dispersion estimates
#> mean-dispersion relationship
#> final dispersion estimates
#> fitting model and testing
res_macrophage_IFNg_vs_naive <- results(dds_macrophage,
contrast = c("condition", "IFNg", "naive"),
lfcThreshold = 1,
alpha = 0.05)
Please refer to the vignette of the DESeq2 or edgeR packages for more complex experimental designs and/or additional options in each workflow.
The aim for this section was simply to generate exemplary objects to work with and provide to the mosdef functions.
mosdef allows you to create your enrichment results right from your DESeqDataset
and DESeqResults
objects using 3 possible algorithms, widely used:
For more information on the differences between these algorithms we refer to their individual vignettes and publications.
All of these algorithms require an annotation to function properly, so make sure you have installed and use the correct one for your experimental data.
The default is org.Mm.eg.db
(Mus musculus). The macrophage
data however stems from human, so we need org.Hs.eg.db
, and we load this package in the following chunk:
library("AnnotationDbi")
library("org.Hs.eg.db")
We also want to add a symbol column for later use - and, in order to add a human readable name for our features of interest:
res_macrophage_IFNg_vs_naive$symbol <-
AnnotationDbi::mapIds(org.Hs.eg.db,
keys = row.names(res_macrophage_IFNg_vs_naive),
column = "SYMBOL",
keytype = "ENSEMBL",
multiVals = "first"
)
#> 'select()' returned 1:many mapping between keys and columns
We indeed recommend to use identifiers as row names that are machine-readable and stable over time, such as ENSEMBL or GENCODE.
To ensure that we are using objects that would work out-of-the-box into mosdef, we provide some utilities to check that in advance - this can relax the need of specifying a number of parameters in the other functions.
mosdef_dds_check(dds_macrophage)
mosdef_res_check(res_macrophage_IFNg_vs_naive)
mosdef
and topGO
topGO is a widely used option to obtain a set of spot-on Gene Ontology terms, removing some of the more generic ones and therefore also reducing the redundancy which is inherent in the GO database (Ashburner et al. 2000).
The run_topGO
function will return a table with the analysis for all possible GO terms (when using the BP ontology that is 6547 terms).
Not all of these results are significant, and this list can (should) be further subset/filtered. For example by using a p-value cutoff.
library("topGO")
#> Loading required package: graph
#> Loading required package: GO.db
#> Loading required package: SparseM
#>
#> Attaching package: 'SparseM'
#> The following object is masked from 'package:base':
#>
#> backsolve
#>
#> groupGOTerms: GOBPTerm, GOMFTerm, GOCCTerm environments built.
#>
#> Attaching package: 'topGO'
#> The following object is masked from 'package:IRanges':
#>
#> members
res_enrich_macrophage_topGO <- run_topGO(
res_de = res_macrophage_IFNg_vs_naive,
dds = dds_macrophage,
ontology = "BP",
mapping = "org.Hs.eg.db",
geneID = "symbol",
de_type = "up_and_down",
add_gene_to_terms = TRUE,
topGO_method2 = "elim",
min_counts = 20,
top_de = 700,
verbose = TRUE
)
#> 'select()' returned 1:many mapping between keys and columns
#> 'select()' returned 1:many mapping between keys and columns
#> Your dataset has 1024 DE genes. You selected 700 (68.36%) genes. You analysed all up_and_down-regulated genes
#> Warning in run_topGO(res_de = res_macrophage_IFNg_vs_naive, dds =
#> dds_macrophage, : NAs introduced by coercion
#> 6133 GO terms were analyzed. Not all of them are significantly enriched.
#> We suggest further subsetting the output list by for example:
#> using a pvalue cutoff in the column:
#> 'p.value_elim'.
The key parameters for run_topGO()
are defined as follows:
res_de
: Your DESeqResults
objectdds
: Your DESeqDataset
objectontology
: Which gene ontology to analyse, default is “BP”mapping
: The annotation/speciesgeneID
: Which format the genes are provided. If you provide a DESeqDataset
and DESeqResults
, then mosdef
does it for you and uses symbols. If you provide vectors please specify a value.de_type
: Which genes to analyse. The default is all (“up_and_down”)
Other possibilities are only up-/down-regulated (“up”/“down”) genes.add_gene_to_terms
: Logical, whether to add a column with all genes annotated to each GO term.topGO_method2
: Character, specifying which of the methods implemented by topGO
is to be used. The default is elim. For more info look at the documentation of topGO.min_counts
: Minimum number of counts a gene has to have to be considered for the background.
The default is 0 and we advise this parameter is only used by expert users that understand the impact of selecting “non-standard” backgrounds.top_de
: The number of genes to be considered in the enrich analysis.
The default is all genes, this can be reduced to reduce redundancy.
In this case, we take the top 700 highest DE genes based of padj score.
If this number is bigger than the total amount of de genes the parameter defaults back to all genes.verbose
: Whether or not to summarise the analysis in a message.head(res_enrich_macrophage_topGO)
#> GO.ID
#> 1 GO:0002250
#> 2 GO:0002503
#> 3 GO:0019886
#> 4 GO:0045087
#> 5 GO:0034341
#> 6 GO:0051607
#> Term
#> 1 adaptive immune response
#> 2 peptide antigen assembly with MHC class II protein complex
#> 3 antigen processing and presentation of exogenous peptide antigen via MHC class II
#> 4 innate immune response
#> 5 response to type II interferon
#> 6 defense response to virus
#> Annotated Significant Expected Rank in p.value_classic p.value_elim
#> 1 368 86 15.32 3 3.6e-23
#> 2 13 13 0.54 22 9.4e-19
#> 3 27 15 1.12 50 1.7e-14
#> 4 724 100 30.15 14 3.3e-11
#> 5 122 31 5.08 31 4.9e-11
#> 6 286 42 11.91 63 1.3e-09
#> p.value_classic
#> 1 NA
#> 2 9.9e-19
#> 3 1.8e-14
#> 4 1.7e-27
#> 5 1.8e-16
#> 6 7.9e-13
#> genes
#> 1 ASCL2,B2M,BTN3A1,BTN3A2,BTN3A3,C1QB,C1RL,C1S,C2,C3,C4A,C4B,CD1A,CD274,CD28,CD40,CD7,CD74,CD80,CEACAM1,CLEC10A,CLEC6A,CR1L,CSF2RB,CTLA4,CTSS,CX3CR1,ERAP2,EXO1,FGL1,GPR183,HLA-A,HLA-B,HLA-C,HLA-DMA,HLA-DMB,HLA-DOA,HLA-DOB,HLA-DPA1,HLA-DPB1,HLA-DQA1,HLA-DQB1,HLA-DQB2,HLA-DRA,HLA-DRB1,HLA-DRB5,HLA-E,HLA-F,ICAM1,IL12RB1,IL18BP,IL27,IL4I1,IRF1,IRF7,ITK,JAK2,JAK3,KLRK1,LAG3,LAMP3,LILRA1,LILRB3,MCOLN2,NOD2,P2RX7,PDCD1,PDCD1LG2,RIPK2,RNF19B,RSAD2,SERPING1,SIT1,SLAMF1,SLAMF6,SLAMF7,SLC11A1,TAP1,TAP2,TBX21,TLR8,TNFRSF11A,TNFRSF21,TNFSF13B,TNFSF18,ZC3H12A
#> 2 B2M,HLA-DMA,HLA-DMB,HLA-DOA,HLA-DOB,HLA-DPA1,HLA-DPB1,HLA-DQA1,HLA-DQB1,HLA-DQB2,HLA-DRA,HLA-DRB1,HLA-DRB5
#> 3 B2M,CD74,CTSS,HLA-DMA,HLA-DMB,HLA-DOA,HLA-DOB,HLA-DPA1,HLA-DPB1,HLA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1
mosdef
and goseq
The method implemented in the goseq package is able to handle the selection bias inherent in assays such as RNA-seq, whereas highly expressed genes have a higher probability of being detected as differentially expressed.
Parameters like top_de
, min_counts
, verbose
and de_type
can also be used here (for more detail on these parameters see above), as they are a part of the shared API with run_topGO
and run_cluPro
.
Importantly, the feature length retrieval is based on the goseq()
function, and this requires that the corresponding TxDb packages are installed and available. So make sure one is installed on your machine. For human samples, the recommended one is TxDb.Hsapiens.UCSC.hg38.knownGene.
goseq_macrophage <- run_goseq(
res_de = res_macrophage_IFNg_vs_naive,
dds = dds_macrophage,
mapping = "org.Hs.eg.db",
testCats = "GO:BP" # which categories to test of ("GO:BP, "GO:MF", "GO:CC")
)
head(goseq_macrophage)
To save time when rendering here we use the provided objects in mosdef to demonstrate the output.
data(res_enrich_macrophage_goseq, package = "mosdef")
head(res_enrich_macrophage_goseq)
#> category over_represented_pvalue under_represented_pvalue numDEInCat
#> 1796 GO:0006955 2.895316e-55 1 216
#> 618 GO:0002376 4.274725e-50 1 263
#> 8441 GO:0051707 9.229954e-40 1 175
#> 6455 GO:0043207 1.042219e-39 1 175
#> 2431 GO:0009607 3.248210e-39 1 177
#> 531 GO:0002250 1.035736e-38 1 94
#> numInCat term ontology p.adj
#> 1796 1314 immune response BP 4.330523e-51
#> 618 1974 immune system process BP 3.196853e-46
#> 8441 1138 response to other organism BP 3.897119e-36
#> 6455 1139 response to external biotic stimulus BP 3.897119e-36
#> 2431 1171 response to biotic stimulus BP 9.716694e-36
#> 531 369 adaptive immune response BP 2.581918e-35
#> genes
#> 1796 ENSG00000125347,ENSG00000162645,ENSG00000145365,ENSG00000137496,ENSG00000154451,ENSG00000231389,ENSG00000204257,ENSG00000100342,ENSG00000162654,ENSG00000164509,ENSG00000204267,ENSG00000131203,ENSG00000213886,ENSG00000168394,ENSG00000242574,ENSG00000163568,ENSG00000183734,ENSG00000101017,ENSG00000117228,ENSG00000244731,ENSG00000019582,ENSG00000204252,ENSG00000089041,ENSG00000179583,ENSG00000136436,ENSG00000120217,ENSG00000204287,ENSG00000131979,ENSG00000096996,ENSG00000113263,ENSG00000169248,ENSG00000117226,ENSG00000026751,ENSG00000224389,ENSG00000004468,ENSG00000197646,ENSG00000164136,ENSG00000149131,ENSG00000008517,ENSG00000089692,ENSG00000184588,ENSG00000078081,ENSG00000223865,ENSG00000073861,ENSG00000164308,ENSG00000173369,ENSG00000169245,ENSG00000196126,ENSG00000167207,ENSG00000204642,ENSG00000079385,ENSG00000123146,ENSG00000179344,ENSG00000181374,ENSG00000186470,ENSG00000198502,ENSG00000234745,ENSG00000000971,ENSG00000152207,ENSG00000213809,ENSG00000140853,ENSG00000121858,ENSG00000243649,ENSG00000026950,ENSG00000204592,ENSG00000102794,ENSG00000141574,ENSG00000153064,ENSG00000138755,ENSG00000172183,ENSG00000141655,ENSG00000206503,ENSG00000123609,ENSG00000123240,ENSG00000115415,ENSG00000213512,ENSG00000163599,ENSG00000204525,ENSG00000198736,ENSG00000096968,ENSG00000198829,ENSG00000168329,ENSG00000205220,ENSG00000127951,ENSG00000013374,ENSG00000151651,ENSG00000135148,ENSG00000232629,ENSG00000158270,ENSG00000197721,ENSG00000165949,ENSG00000173762,ENSG00000104312,ENSG00000101916,ENSG00000156587,ENSG00000111801,ENSG00000104951,ENSG00000166278,ENSG00000102524,ENSG00000018280,ENSG00000170581,ENSG00000108688,ENSG00000169508,ENSG00000197272,ENSG00000026103,ENSG00000068079,ENSG00000140749,ENSG00000178562,ENSG00000153898,ENSG00000241106,ENSG00000196735,ENSG00000185201,ENSG00000090339,ENSG00000205846,ENSG00000275718,ENSG00000243811,ENSG00000124256,ENSG00000204577,ENSG00000184678,ENSG00000185885,ENSG00000120337,ENSG00000121594,ENSG00000104518,ENSG00000188389,ENSG00000132274,ENSG00000140464,ENSG00000100368,ENSG00000146072,ENSG00000116514,ENSG00000166710,ENSG00000108700,ENSG00000128383,ENSG00000125730,ENSG00000162739,ENSG00000239713,ENSG00000132514,ENSG00000186074,ENSG00000103313,ENSG00000161929,ENSG00000189171,ENSG00000119917,ENSG00000174123,ENSG00000163874,ENSG00000121797,ENSG00000163131,ENSG00000105639,ENSG00000083799,ENSG00000104760,ENSG00000203805,ENSG00000119922,ENSG00000196954,ENSG00000035720,ENSG00000158477,ENSG00000124201,ENSG00000139832,ENSG00000174371,ENSG00000185507,ENSG00000134321,ENSG00000104974,ENSG00000120436,ENSG00000137959,ENSG00000136960,ENSG00000173198,ENSG00000124508,ENSG00000182326,ENSG00000078401,ENSG00000139178,ENSG00000115267,ENSG00000100226,ENSG00000137078,ENSG00000117090,ENSG00000158517,ENSG00000163840,ENSG00000183347,ENSG00000113749,ENSG00000239998,ENSG00000186810,ENSG00000136689,ENSG00000064932,ENSG00000054219,ENSG00000204616,ENSG00000137628,ENSG00000135636,ENSG00000159403,ENSG00000142089,ENSG00000065427,ENSG00000075240,ENSG00000204632,ENSG00000082074,ENSG00000158714,ENSG00000158481,ENSG00000158813,ENSG00000187554,ENSG00000171522,ENSG00000237541,ENSG00000099985,ENSG00000104856,ENSG00000113916,ENSG00000275385,ENSG00000189067,ENSG00000178999,ENSG00000271503,ENSG00000254087,ENSG00000106952,ENSG00000168811,ENSG00000111335,ENSG00000163735,ENSG00000163564,ENSG00000152778,ENSG00000164300,ENSG00000136044,ENSG00000173193,ENSG00000198719,ENSG00000196664,ENSG00000085265,ENSG00000243414
#> 618 ENSG00000125347,ENSG00000162645,ENSG00000145365,ENSG00000137496,ENSG00000154451,ENSG00000231389,ENSG00000204257,ENSG00000100342,ENSG00000162654,ENSG00000134470,ENSG00000164509,ENSG00000204267,ENSG00000131203,ENSG00000213886,ENSG00000168394,ENSG00000242574,ENSG00000163568,ENSG00000183734,ENSG00000101017,ENSG00000117228,ENSG00000244731,ENSG00000019582,ENSG00000204252,ENSG00000089041,ENSG00000179583,ENSG00000136436,ENSG00000170989,ENSG00000185338,ENSG00000120217,ENSG00000188906,ENSG00000204287,ENSG00000131979,ENSG00000096996,ENSG00000113263,ENSG00000169248,ENSG00000117226,ENSG00000026751,ENSG00000240065,ENSG00000224389,ENSG00000004468,ENSG00000197646,ENSG00000164136,ENSG00000149131,ENSG00000008517,ENSG00000089692,ENSG00000184588,ENSG00000078081,ENSG00000223865,ENSG00000073861,ENSG00000164308,ENSG00000173369,ENSG00000169245,ENSG00000196126,ENSG00000167207,ENSG00000204642,ENSG00000079385,ENSG00000123146,ENSG00000179344,ENSG00000181374,ENSG00000186470,ENSG00000198502,ENSG00000234745,ENSG00000000971,ENSG00000152207,ENSG00000188404,ENSG00000213809,ENSG00000140853,ENSG00000121858,ENSG00000092010,ENSG00000243649,ENSG00000026950,ENSG00000204592,ENSG00000102794,ENSG00000141574,ENSG00000168062,ENSG00000153064,ENSG00000138755,ENSG00000172183,ENSG00000141655,ENSG00000206503,ENSG00000123609,ENSG00000188676,ENSG00000117115,ENSG00000123240,ENSG00000115415,ENSG00000213512,ENSG00000163599,ENSG00000204525,ENSG00000182782,ENSG00000198736,ENSG00000096968,ENSG00000198829,ENSG00000168329,ENSG00000205220,ENSG00000127951,ENSG00000013374,ENSG00000002933,ENSG00000151651,ENSG00000135148,ENSG00000135424,ENSG00000232629,ENSG00000158270,ENSG00000197721,ENSG00000106565,ENSG00000165949,ENSG00000173762,ENSG00000088992,ENSG00000104312,ENSG00000101916,ENSG00000156587,ENSG00000111801,ENSG00000104951,ENSG00000123685,ENSG00000166278,ENSG00000102524,ENSG00000018280,ENSG00000170581,ENSG00000182580,ENSG00000108688,ENSG00000169508,ENSG00000231925,ENSG00000197272,ENSG00000026103,ENSG00000204264,ENSG00000068079,ENSG00000140749,ENSG00000178562,ENSG00000153898,ENSG00000241106,ENSG00000196735,ENSG00000162692,ENSG00000185201,ENSG00000090339,ENSG00000049130,ENSG00000099377,ENSG00000284690,ENSG00000153094,ENSG00000205846,ENSG00000275718,ENSG00000243811,ENSG00000124256,ENSG00000204577,ENSG00000184678,ENSG00000185885,ENSG00000120337,ENSG00000121594,ENSG00000104518,ENSG00000188389,ENSG00000162367,ENSG00000116016,ENSG00000064201,ENSG00000132274,ENSG00000140464,ENSG00000100368,ENSG00000146072,ENSG00000116514,ENSG00000173821,ENSG00000166710,ENSG00000108700,ENSG00000128383,ENSG00000125730,ENSG00000162739,ENSG00000239713,ENSG00000132514,ENSG00000186074,ENSG00000103313,ENSG00000161929,ENSG00000189171,ENSG00000119917,ENSG00000174123,ENSG00000163874,ENSG00000121797,ENSG00000163131,ENSG00000105639,ENSG00000083799,ENSG00000104760,ENSG00000135124,ENSG00000133800,ENSG00000203805,ENSG00000119922,ENSG00000196954,ENSG00000023330,ENSG00000035720,ENSG00000158477,ENSG00000124201,ENSG00000139832,ENSG00000174371,ENSG00000006747,ENSG00000185507,ENSG00000119969,ENSG00000134321,ENSG00000125810,ENSG00000162337,ENSG00000104974,ENSG00000120436,ENSG00000137959,ENSG00000136960,ENSG00000173198,ENSG00000170271,ENSG00000124508,ENSG00000182326,ENSG00000078401,ENSG00000139178,ENSG00000150630,ENSG00000115267,ENSG00000100226,ENSG00000137078,ENSG00000117090,ENSG00000158517,ENSG00000163840,ENSG00000183347,ENSG00000141682,ENSG00000113749,ENSG00000239998,ENSG00000186810,ENSG00000134256,ENSG00000136689,ENSG00000139192,ENSG00000064932,ENSG00000054219,ENSG00000204616,ENSG00000137628,ENSG00000135636,ENSG00000159403,ENSG00000154639,ENSG00000142089,ENSG00000065427,ENSG00000075240,ENSG00000204632,ENSG00000100628,ENSG00000082074,ENSG00000158714,ENSG00000070501,ENSG00000158481,ENSG00000158813,ENSG00000187554,ENSG00000146918,ENSG00000171522,ENSG00000237541,ENSG00000099985,ENSG00000104856,ENSG00000113916,ENSG00000275385,ENSG00000189067,ENSG00000178999,ENSG00000271503,ENSG00000254087,ENSG00000106952,ENSG00000168811,ENSG00000196684,ENSG00000111335,ENSG00000163735,ENSG00000163564,ENSG00000152778,ENSG00000164300,ENSG00000123610,ENSG00000136044,ENSG00000173193,ENSG00000198719,ENSG00000196664,ENSG00000085265,ENSG00000142405,ENSG00000243414
#> 8441 ENSG00000125347,ENSG00000162645,ENSG00000145365,ENSG00000137496,ENSG00000154451,ENSG00000231389,ENSG00000100342,ENSG00000162654,ENSG00000164509,ENSG00000204267,ENSG00000131203,ENSG00000213886,ENSG00000163568,ENSG00000101017,ENSG00000117228,ENSG00000244731,ENSG00000019582,ENSG00000089041,ENSG00000179583,ENSG00000136436,ENSG00000120217,ENSG00000131979,ENSG00000096996,ENSG00000169248,ENSG00000117226,ENSG00000026751,ENSG00000224389,ENSG00000197646,ENSG00000164136,ENSG00000149131,ENSG00000186439,ENSG00000089692,ENSG00000184588,ENSG00000073861,ENSG00000173369,ENSG00000169245,ENSG00000196126,ENSG00000167207,ENSG00000204642,ENSG00000079385,ENSG00000181374,ENSG00000234745,ENSG00000000971,ENSG00000213809,ENSG00000140853,ENSG00000243649,ENSG00000204592,ENSG00000102794,ENSG00000168062,ENSG00000153064,ENSG00000138755,ENSG00000172183,ENSG00000141655,ENSG00000206503,ENSG00000123609,ENSG00000123240,ENSG00000115415,ENSG00000213512,ENSG00000204525,ENSG00000198736,ENSG00000096968,ENSG00000168329,ENSG00000127951,ENSG00000013374,ENSG00000151651,ENSG00000135148,ENSG00000178726,ENSG00000158270,ENSG00000165949,ENSG00000104312,ENSG00000176485,ENSG00000101916,ENSG00000156587,ENSG00000123685,ENSG00000166278,ENSG00000018280,ENSG00000170581,ENSG00000108688,ENSG00000197272,ENSG00000068079,ENSG00000153898,ENSG00000162692,ENSG00000140465,ENSG00000185201,ENSG00000136514,ENSG00000205846,ENSG00000275718,ENSG00000243811,ENSG00000124256,ENSG00000184678,ENSG00000185885,ENSG00000121594,ENSG00000104518,ENSG00000064201,ENSG00000132274,ENSG00000140464,ENSG00000108950,ENSG00000100368,ENSG00000116514,ENSG00000173821,ENSG00000166710,ENSG00000108700,ENSG00000128383,ENSG00000125730,ENSG00000162739,ENSG00000239713,ENSG00000132514,ENSG00000186074,ENSG00000103313,ENSG00000161929,ENSG00000119917,ENSG00000174123,ENSG00000163874,ENSG00000163131,ENSG00000167914,ENSG00000105639,ENSG00000083799,ENSG00000119922,ENSG00000196954,ENSG00000035720,ENSG00000124201,ENSG00000139832,ENSG00000185507,ENSG00000204397,ENSG00000165806,ENSG00000081985,ENSG00000134321,ENSG00000120436,ENSG00000100985,ENSG00000137959,ENSG00000182326,ENSG00000078401,ENSG00000139178,ENSG00000115267,ENSG00000166920,ENSG00000117090,ENSG00000158517,ENSG00000163840,ENSG00000183347,ENSG00000141682,ENSG00000239998,ENSG00000064932,ENSG00000204616,ENSG00000137628,ENSG00000159403,ENSG00000142089,ENSG00000167992,ENSG00000075240,ENSG00000204632,ENSG00000158714,ENSG00000125355,ENSG00000187554,ENSG00000171522,ENSG00000104856,ENSG00000175175,ENSG00000275385,ENSG00000134326,ENSG00000189067,ENSG00000178999,ENSG00000271503,ENSG00000254087,ENSG00000106952,ENSG00000168811,ENSG00000111335,ENSG00000163735,ENSG00000255833,ENSG00000163564,ENSG00000152778,ENSG00000117632,ENSG00000164300,ENSG00000136044,ENSG00000173193,ENSG00000196664,ENSG00000085265,ENSG00000243414
#> 6455 ENSG00000125347,ENSG00000162645,ENSG00000145365,ENSG00000137496,ENSG00000154451,ENSG00000231389,ENSG00000100342,ENSG00000162654,ENSG00000164509,ENSG00000204267,ENSG00000131203,ENSG00000213886,ENSG00000163568,ENSG00000101017,ENSG00000117228,ENSG00000244731,ENSG00000019582,ENSG00000089041,ENSG00000179583,ENSG00000136436,ENSG00000120217,ENSG00000131979,ENSG00000096996,ENSG00000169248,ENSG00000117226,ENSG00000026751,ENSG00000224389,ENSG00000197646,ENSG00000164136,ENSG00000149131,ENSG00000186439,ENSG00000089692,ENSG00000184588,ENSG00000073861,ENSG00000173369,ENSG00000169245,ENSG00000196126,ENSG00000167207,ENSG00000204642,ENSG00000079385,ENSG00000181374,ENSG00000234745,ENSG00000000971,ENSG00000213809,ENSG00000140853,ENSG00000243649,ENSG00000204592,ENSG00000102794,ENSG00000168062,ENSG00000153064,ENSG00000138755,ENSG00000172183,ENSG00000141655,ENSG00000206503,ENSG00000123609,ENSG00000123240,ENSG00000115415,ENSG00000213512,ENSG00000204525,ENSG00000198736,ENSG00000096968,ENSG00000168329,ENSG00000127951,ENSG00000013374,ENSG00000151651,ENSG00000135148,ENSG00000178726,ENSG00000158270,ENSG00000165949,ENSG00000104312,ENSG00000176485,ENSG00000101916,ENSG00000156587,ENSG00000123685,ENSG00000166278,ENSG00000018280,ENSG00000170581,ENSG00000108688,ENSG00000197272,ENSG00000068079,ENSG00000153898,ENSG00000162692,ENSG00000140465,ENSG00000185201,ENSG00000136514,ENSG00000205846,ENSG00000275718,ENSG00000243811,ENSG00000124256,ENSG00000184678,ENSG00000185885,ENSG00000121594,ENSG00000104518,ENSG00000064201,ENSG00000132274,ENSG00000140464,ENSG00000108950,ENSG00000100368,ENSG00000116514,ENSG00000173821,ENSG00000166710,ENSG00000108700,ENSG00000128383,ENSG00000125730,ENSG00000162739,ENSG00000239713,ENSG00000132514,ENSG00000186074,ENSG00000103313,ENSG00000161929,ENSG00000119917,ENSG00000174123,ENSG00000163874,ENSG00000163131,ENSG00000167914,ENSG00000105639,ENSG00000083799,ENSG00000119922,ENSG00000196954,ENSG00000035720,ENSG00000124201,ENSG00000139832,ENSG00000185507,ENSG00000204397,ENSG00000165806,ENSG00000081985,ENSG00000134321,ENSG00000120436,ENSG00000100985,ENSG00000137959,ENSG00000182326,ENSG00000078401,ENSG00000139178,ENSG00000115267,ENSG00000166920,ENSG00000117090,ENSG00000158517,ENSG00000163840,ENSG00000183347,ENSG00000141682,ENSG00000239998,ENSG00000064932,ENSG00000204616,ENSG00000137628,ENSG00000159403,ENSG00000142089,ENSG00000167992,ENSG00000075240,ENSG00000204632,ENSG00000158714,ENSG00000125355,ENSG00000187554,ENSG00000171522,ENSG00000104856,ENSG00000175175,ENSG00000275385,ENSG00000134326,ENSG00000189067,ENSG00000178999,ENSG00000271503,ENSG00000254087,ENSG00000106952,ENSG00000168811,ENSG00000111335,ENSG00000163735,ENSG00000255833,ENSG00000163564,ENSG00000152778,ENSG00000117632,ENSG00000164300,ENSG00000136044,ENSG00000173193,ENSG00000196664,ENSG00000085265,ENSG00000243414
#> 2431 ENSG00000125347,ENSG00000162645,ENSG00000145365,ENSG00000137496,ENSG00000154451,ENSG00000231389,ENSG00000100342,ENSG00000162654,ENSG00000164509,ENSG00000204267,ENSG00000131203,ENSG00000213886,ENSG00000163568,ENSG00000101017,ENSG00000117228,ENSG00000244731,ENSG00000019582,ENSG00000089041,ENSG00000179583,ENSG00000136436,ENSG00000120217,ENSG00000131979,ENSG00000096996,ENSG00000169248,ENSG00000117226,ENSG00000026751,ENSG00000224389,ENSG00000197646,ENSG00000164136,ENSG00000149131,ENSG00000186439,ENSG00000089692,ENSG00000184588,ENSG00000073861,ENSG00000173369,ENSG00000169245,ENSG00000196126,ENSG00000167207,ENSG00000204642,ENSG00000079385,ENSG00000181374,ENSG00000234745,ENSG00000000971,ENSG00000213809,ENSG00000140853,ENSG00000243649,ENSG00000204592,ENSG00000102794,ENSG00000168062,ENSG00000153064,ENSG00000138755,ENSG00000172183,ENSG00000141655,ENSG00000206503,ENSG00000123609,ENSG00000123240,ENSG00000115415,ENSG00000213512,ENSG00000204525,ENSG00000198736,ENSG00000096968,ENSG00000168329,ENSG00000127951,ENSG00000013374,ENSG00000151651,ENSG00000135148,ENSG00000178726,ENSG00000158270,ENSG00000165949,ENSG00000104312,ENSG00000176485,ENSG00000101916,ENSG00000156587,ENSG00000104951,ENSG00000123685,ENSG00000166278,ENSG00000018280,ENSG00000170581,ENSG00000108688,ENSG00000197272,ENSG00000068079,ENSG00000153898,ENSG00000162692,ENSG00000140465,ENSG00000185201,ENSG00000136514,ENSG00000136826,ENSG00000205846,ENSG00000275718,ENSG00000243811,ENSG00000124256,ENSG00000184678,ENSG00000185885,ENSG00000121594,ENSG00000104518,ENSG00000064201,ENSG00000132274,ENSG00000140464,ENSG00000108950,ENSG00000100368,ENSG00000116514,ENSG00000173821,ENSG00000166710,ENSG00000108700,ENSG00000128383,ENSG00000125730,ENSG00000162739,ENSG00000239713,ENSG00000132514,ENSG00000186074,ENSG00000103313,ENSG00000161929,ENSG00000119917,ENSG00000174123,ENSG00000163874,ENSG00000163131,ENSG00000167914,ENSG00000105639,ENSG00000083799,ENSG00000119922,ENSG00000196954,ENSG00000035720,ENSG00000124201,ENSG00000139832,ENSG00000185507,ENSG00000204397,ENSG00000165806,ENSG00000081985,ENSG00000134321,ENSG00000120436,ENSG00000100985,ENSG00000137959,ENSG00000182326,ENSG00000078401,ENSG00000139178,ENSG00000115267,ENSG00000166920,ENSG00000117090,ENSG00000158517,ENSG00000163840,ENSG00000183347,ENSG00000141682,ENSG00000239998,ENSG00000064932,ENSG00000204616,ENSG00000137628,ENSG00000159403,ENSG00000142089,ENSG00000167992,ENSG00000075240,ENSG00000204632,ENSG00000158714,ENSG00000125355,ENSG00000187554,ENSG00000171522,ENSG00000104856,ENSG00000175175,ENSG00000275385,ENSG00000134326,ENSG00000189067,ENSG00000178999,ENSG00000271503,ENSG00000254087,ENSG00000106952,ENSG00000168811,ENSG00000111335,ENSG00000163735,ENSG00000255833,ENSG00000163564,ENSG00000152778,ENSG00000117632,ENSG00000164300,ENSG00000136044,ENSG00000173193,ENSG00000196664,ENSG00000085265,ENSG00000243414
#> 531 ENSG00000125347,ENSG00000137496,ENSG00000231389,ENSG00000204257,ENSG00000204267,ENSG00000168394,ENSG00000242574,ENSG00000183734,ENSG00000101017,ENSG00000244731,ENSG00000019582,ENSG00000204252,ENSG00000089041,ENSG00000120217,ENSG00000204287,ENSG00000096996,ENSG00000113263,ENSG00000026751,ENSG00000224389,ENSG00000197646,ENSG00000149131,ENSG00000089692,ENSG00000078081,ENSG00000223865,ENSG00000073861,ENSG00000164308,ENSG00000173369,ENSG00000196126,ENSG00000167207,ENSG00000204642,ENSG00000079385,ENSG00000179344,ENSG00000186470,ENSG00000198502,ENSG00000234745,ENSG00000213809,ENSG00000026950,ENSG00000204592,ENSG00000141655,ENSG00000206503,ENSG00000163599,ENSG00000204525,ENSG00000096968,ENSG00000168329,ENSG00000232629,ENSG00000197721,ENSG00000173762,ENSG00000104312,ENSG00000101916,ENSG00000111801,ENSG00000104951,ENSG00000166278,ENSG00000102524,ENSG00000018280,ENSG00000169508,ENSG00000197272,ENSG00000178562,ENSG00000153898,ENSG00000241106,ENSG00000196735,ENSG00000090339,ENSG00000205846,ENSG00000204577,ENSG00000120337,ENSG00000121594,ENSG00000188389,ENSG00000100368,ENSG00000146072,ENSG00000116514,ENSG00000166710,ENSG00000125730,ENSG00000162739,ENSG00000132514,ENSG00000163874,ENSG00000163131,ENSG00000105639,ENSG00000104760,ENSG00000158477,ENSG00000174371,ENSG00000185507,ENSG00000134321,ENSG00000104974,ENSG00000182326,ENSG00000139178,ENSG00000137078,ENSG00000117090,ENSG00000159403,ENSG00000204632,ENSG00000158481,ENSG00000237541,ENSG00000104856,ENSG00000113916,ENSG00000254087,ENSG00000168811
#> genesymbols
#> 1796 ACOD1,ADAM8,ADGRE5,AIM2,APOBEC3A,APOBEC3D,APOBEC3G,APOL1,APPL2,ASCL2,AURKB,B2M,BANK1,BCL6,BTN2A2,BTN3A1,BTN3A2,BTN3A3,C1QB,C1R,C1RL,C1S,C2,C3,C4A,C4B,CALCOCO2,CASP4,CCL13,CCL15,CCL18,CCL5,CCL7,CCL8,CCRL2,CD1A,CD1C,CD274,CD28,CD300LF,CD38,CD40,CD7,CD74,CD80,CEACAM1,CFB,CFH,CIITA,CLEC10A,CLEC6A,COLEC12,CR1L,CSF2RB,CTLA4,CTSS,CX3CR1,CXCL10,CXCL11,CXCL5,CXCL9,CXCR3,CYLD,CYSLTR1,CYSLTR2,DDX60,DLL1,DTX3L,DYSF,EDA,EDN1,ENPP2,ERAP2,EXO1,FAS,FCN1,FGL1,FGL2,FYB1,GBP1,GBP2,GBP3,GBP4,GBP5,GBP6,GBP7,GCH1,GPR183,GPR31,GRAMD4,GSDMD,GTPBP1,H2BC21,HLA-A,HLA-B,HLA-C,H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,TMEM255A,TNFRSF11A,TNFSF8,TRAFD1,TRDN,TRIM22,TRIM31,TSPAN32,UBD,UBE2L6,VCAM1,VWCE,ZBP1,ZC3H12A,ZNFX1
#> 531 ASCL2,B2M,BCL6,BTN3A1,BTN3A2,BTN3A3,C1QB,C1R,C1RL,C1S,C2,C3,C4A,C4B,CD1A,CD1C,CD274,CD28,CD40,CD7,CD74,CD80,CEACAM1,CLEC10A,CLEC6A,CR1L,CSF2RB,CTLA4,CTSS,CX3CR1,ERAP2,EXO1,FGL1,GPR183,HLA-A,HLA-B,HLA-C,HLA-DMA,HLA-DMB,HLA-DOA,HLA-DOB,HLA-DPA1,HLA-DPB1,HLA-DQA1,HLA-DQA1,HLA-DQB1,HLA-DQB2,HLA-DRA,HLA-DRB1,HLA-DRB5,HLA-E,HLA-F,HLA-G,ICAM1,IL12A,IL12RB1,IL18BP,IL27,IL4I1,IRF1,IRF7,ITK,JAK2,JAK3,KLRK1,LAG3,LAMP3,LILRA1,LILRB3,LYN,MCOLN2,NOD2,P2RX7,PDCD1,PDCD1LG2,RELB,RIPK2,RNF19B,RSAD2,SERPING1,SIT1,SLAMF1,SLAMF6,SLAMF7,SLC11A1,TAP1,TAP2,TBX21,TLR8,TNFRSF11A,TNFRSF21,TNFSF13B,TNFSF18,ZC3H12A
mosdef
and clusterProfiler
Parameters like top_de
, min_counts
, verbose
and de_type
can also be used here (For more detail on these parameters see above).
If you want to further customize the call of enrichGO()
inside the function, have a look at the documentation for enrichGO()
from clusterProfiler Those parameters can be added to the run_cluPro()
function call within the ellipsis (...
).
clupro_macrophage <- run_cluPro(
res_de = res_macrophage_IFNg_vs_naive,
dds = dds_macrophage,
mapping = "org.Hs.eg.db",
keyType = "SYMBOL"
)
head(clupro_macrophage)
Importantly, keyType
is relevant for the enrichGO()
function that is wrapped in this routine.
If using DESeqDataset
and DESeqResults
, this has to be “SYMBOL” which is also the default.
If you use vectors please specify here what type of IDs you provide.
Again, to save time when rendering the vignette, we load the objects provided alongside this package to demonstrate the output:
data(res_enrich_macrophage_cluPro, package = "mosdef")
head(res_enrich_macrophage_cluPro)
#> ID Description GeneRatio BgRatio
#> GO:0003823 GO:0003823 antigen binding 30/724 53/13421
#> GO:0042605 GO:0042605 peptide antigen binding 22/724 30/13421
#> GO:0023023 GO:0023023 MHC protein complex binding 16/724 30/13421
#> GO:0023026 GO:0023026 MHC class II protein complex binding 14/724 23/13421
#> GO:0140375 GO:0140375 immune receptor activity 23/724 105/13421
#> GO:0005126 GO:0005126 cytokine receptor binding 32/724 196/13421
#> pvalue p.adjust qvalue
#> GO:0003823 9.746377e-25 7.465725e-22 6.822464e-22
#> GO:0042605 3.624641e-22 1.388238e-19 1.268624e-19
#> GO:0023023 3.129706e-13 7.991183e-11 7.302648e-11
#> GO:0023026 8.122609e-13 1.555480e-10 1.421457e-10
#> GO:0140375 6.378203e-09 9.771407e-07 8.929484e-07
#> GO:0005126 1.734230e-08 2.214034e-06 2.023269e-06
#> geneID
#> GO:0003823 HLA-DPA1/HLA-DMA/TAP2/TAP1/HLA-DMB/CD40/HLA-DOA/HLA-DRA/LAG3/HLA-DPB1/HLA-DRB1/HLA-F/HLA-DQB1/HLA-DRB5/HLA-B/HLA-E/HLA-A/HLA-C/HLA-DQB2/TAPBP/HLA-DOB/HLA-DQA1/B2M/CD1A/LILRA1/SLAMF1/LILRA2/HLA-G/CD1C/FCN1
#> GO:0042605 HLA-DPA1/HLA-DMA/TAP2/TAP1/HLA-DMB/HLA-DOA/HLA-DRA/HLA-DPB1/HLA-DRB1/HLA-F/HLA-DQB1/HLA-DRB5/HLA-B/HLA-E/HLA-A/HLA-C/HLA-DQB2/TAPBP/HLA-DOB/HLA-DQA1/B2M/HLA-G
#> GO:0023023 HLA-DPA1/HLA-DMA/HLA-DMB/CD74/HLA-DOA/HLA-DRA/HLA-DPB1/HLA-DRB1/HLA-DQB1/HLA-DRB5/HLA-DQB2/TAPBP/HLA-DOB/HLA-DQA1/B2M/TAPBPL
#> GO:0023026 HLA-DPA1/HLA-DMA/HLA-DMB/CD74/HLA-DOA/HLA-DRA/HLA-DPB1/HLA-DRB1/HLA-DQB1/HLA-DRB5/HLA-DQB2/HLA-DOB/HLA-DQA1/B2M
#> GO:0140375 HLA-DPA1/IL15RA/IL31RA/CD74/HLA-DOA/HLA-DRA/IL12RB1/HLA-DRB1/HLA-DQB1/KLRK1/IL3RA/CX3CR1/HLA-DQB2/HLA-DOB/HLA-DQA1/CSF2RB/CCRL2/IL12RB2/LILRA1/LILRA2/CXCR3/IL22RA2/GFRA2
#> GO:0005126 IL12RB1/CXCL11/IL15/CXCL10/CCL13/TNFSF10/CXCL9/STAT1/JAK2/CX3CR1/TNFSF13B/CCL7/IL27/KITLG/CCL15/TNFSF18/CCL8/CD300LF/CCRL2/JAK3/STAP1/CDH5/VEGFC/IL1RN/EDA/TLR5/OSM/CCL18/CCL5/TNFSF8/IL12A/CXCL5
#> Count
#> GO:0003823 30
#> GO:0042605 22
#> GO:0023023 16
#> GO:0023026 14
#> GO:0140375 23
#> GO:0005126 32
mosdef
All of these functions tailored to run enrichment methods also work if you only have/provide a vector of differentially expressed genes and a vector of background genes.
Most of the above mentioned parameters work here as well (top_de
, verbose
), however parameters like min_counts
and de_type
will not affect the result, since they need further information which can only be found in the DESeqDataset
and DESeqResults
(in this case, access to the counts from the DESeqDataset
object dds
and the Log2FoldChange from the DESeqResults
object passed to res_de
).
res_subset <- deseqresult2df(res_macrophage_IFNg_vs_naive)[1:500, ] # reduce size to increase computational speed
myde <- res_subset$id
myassayed <- rownames(res_macrophage_IFNg_vs_naive)
## Here keys are Ensembl not symbols
res_enrich_macrophage_topGO_vec <- run_topGO(
de_genes = myde,
bg_genes = myassayed,
mapping = "org.Hs.eg.db",
geneID = "ensembl"
)
#> Your dataset has 500 DE genes.You selected 500 (100.00%) genes. You analysed all up_and_down-regulated genes
#> Warning in run_topGO(de_genes = myde, bg_genes = myassayed, mapping =
#> "org.Hs.eg.db", : NAs introduced by coercion
#> 6140 GO terms were analyzed. Not all of them are significantly enriched.
#> We suggest further subsetting the output list by for example:
#> using a pvalue cutoff in the column:
#> 'p.value_elim'.
head(res_enrich_macrophage_topGO_vec)
#> GO.ID
#> 1 GO:0002250
#> 2 GO:0002503
#> 3 GO:0019886
#> 4 GO:0034341
#> 5 GO:0050778
#> 6 GO:0001916
#> Term
#> 1 adaptive immune response
#> 2 peptide antigen assembly with MHC class II protein complex
#> 3 antigen processing and presentation of exogenous peptide antigen via MHC class II
#> 4 response to type II interferon
#> 5 positive regulation of immune response
#> 6 positive regulation of T cell mediated cytotoxicity
#> Annotated Significant Expected Rank in p.value_classic p.value_elim
#> 1 369 75 10.77 3 8.7e-25
#> 2 14 13 0.41 22 1.3e-19
#> 3 28 15 0.82 43 1.9e-16
#> 4 123 28 3.59 34 1.0e-12
#> 5 586 77 17.11 9 3.6e-10
#> 6 33 11 0.96 129 1.2e-09
#> p.value_classic
#> 1 NA
#> 2 1.3e-19
#> 3 1.9e-16
#> 4 1.2e-17
#> 5 6.1e-30
#> 6 1.2e-09
#> genes
#> 1 ENSG00000018280,ENSG00000019582,ENSG00000026751,ENSG00000026950,ENSG00000073861,ENSG00000078081,ENSG00000079385,ENSG00000089041,ENSG00000089692,ENSG00000090339,ENSG00000096968,ENSG00000096996,ENSG00000100368,ENSG00000101017,ENSG00000101916,ENSG00000102524,ENSG00000104312,ENSG00000104951,ENSG00000111801,ENSG00000113263,ENSG00000116514,ENSG00000120217,ENSG00000120337,ENSG00000121594,ENSG00000125347,ENSG00000125730,ENSG00000132514,ENSG00000137496,ENSG00000141655,ENSG00000146072,ENSG00000149131,ENSG00000153898,ENSG00000162739,ENSG00000163131,ENSG00000163599,ENSG00000163874,ENSG00000164308,ENSG00000166278,ENSG00000166710,ENSG00000167207,ENSG00000168329,ENSG00000168394,ENSG00000169508,ENSG00000173369,ENSG00000173762,ENSG00000178562,ENSG00000179344,ENSG00000183734,ENSG00000186470,ENSG00000188389,ENSG00000196126,ENSG00000196735,ENSG00000197272,ENSG00000197646,ENSG00000197721,ENSG00000198502,ENSG00000204252,ENSG00000204257,ENSG00000204267,ENSG00000204287,ENSG00000204525,ENSG00000204577,ENSG00000204592,ENSG00000204642,ENSG00000205846,ENSG00000206503,ENSG00000213809,ENSG00000223865,ENSG00000224389,ENSG00000231389,ENSG00000232629,ENSG00000234745,ENSG00000241106,ENSG00000242574,ENSG00000244731
#> 2 ENSG00000166710,ENSG00000179344,ENSG00000196126,ENSG00000196735,ENSG00000198502,ENSG00000204252,ENSG00000204257,ENSG00000204287,ENSG00000223865,ENSG00000231389,ENSG00000232629,ENSG00000241106,ENSG00000242574
#> 3 ENSG00000019582,ENSG00000163131,ENSG00000166710,ENSG00000179344,ENSG00000196126,ENSG00000196735,ENSG00000198502,ENSG00000204252,ENSG00000204257,ENSG00000204287,ENSG00000223865,ENSG00000231389,ENSG00000232629,ENSG00000241106,ENSG00000242574
#> 4 ENSG00000013374,ENSG00000018280,ENSG00000019582,ENSG00000096968,ENSG00000096996,ENSG00000101017,ENSG00000102794,ENSG00000103313,ENSG00000108688,ENSG00000108700,ENSG00000115415,ENSG00000117226,ENSG00000117228,ENSG00000125347,ENSG00000131979,ENSG00000136436,ENSG00000140853,ENSG00000154451,ENSG00000162645,ENSG00000162654,ENSG00000179583,ENSG00000181374,ENSG00000185201,ENSG00000185885,ENSG00000213512,ENSG00000213886,ENSG00000231389,ENSG00000275718
#> 5 ENSG00000000971,ENSG00000004468,ENSG00000018280,ENSG00000019582,ENSG00000026950,ENSG00000068079,ENSG00000073861,ENSG00000079385,ENSG00000089041,ENSG00000089692,ENSG00000096968,ENSG00000096996,ENSG00000101017,ENSG00000101916,ENSG00000102524,ENSG00000102794,ENSG00000103313,ENSG00000104312,ENSG00000111801,ENSG00000113263,ENSG00000117228,ENSG00000120217,ENSG00000121594,ENSG00000123609,ENSG00000124256,ENSG00000125347,ENSG00000125730,ENSG00000131203,ENSG00000140853,ENSG00000145365,ENSG00000146072,ENSG00000149131,ENSG00000151651,ENSG00000153064,ENSG00000154451,ENSG00000158270,ENSG00000161929,ENSG00000162645,ENSG00000162739,ENSG00000163131,ENSG00000163568,ENSG00000163599,ENSG00000163874,ENSG00000164136,ENSG00000166278,ENSG00000166710,ENSG00000167207,ENSG00000173369,ENSG00000174123,ENSG00000178562,ENSG00000179344,ENSG00000184588,ENSG00000186074,ENSG00000186470,ENSG00000196126,ENSG00000196735,ENSG00000197721,ENSG00000198502,ENSG00000204252,ENSG00000204257,ENSG00000204267,ENSG00000204287,ENSG00000204525,ENSG00000204592,ENSG00000204642,ENSG00000205846,ENSG00000206503,ENSG00000213809,ENSG00000223865,ENSG00000224389,ENSG00000231389,ENSG00000232629,ENSG00000234745,ENSG00000241106,ENSG00000242574,ENSG00000243649,ENSG00000244731
#> 6 ENSG00000089041,ENSG00000096996,ENSG00000166710,ENSG00000196126,ENSG00000204267,ENSG00000204287,ENSG00000204525,ENSG00000204592,ENSG00000204642,ENSG00000206503,ENSG00000234745
mosdef provides some wrappers to commonly used visualizations of individual genes, as well as summary visualizations for all features at once.
gene_plot()
An elegant way to plot the expression values (by default the normalized counts) of a certain gene of interest, split up by a covariate of interest - for example, the condition
, IFNg vs naive.
gene_plot(
dds = dds_macrophage,
gene = "ENSG00000125347",
intgroup = "condition"
)
Key parameters are in this case:
dds
: Your DESeqDataset
gene
: The gene of interestintgroup
: A character vector of names in colData(dds)
used for grouping the expression values.Notably, gene_plot()
also has some heuristics to suggest an appropriate layer of plotting the data points, depending on the number of samples included in each individual group - this include the simple jittered points, a boxplot, a violin plot, or a sina plot.
This automatic behavior can be suppressed by specifying a different value for the plot_type
parameter.
Volcano plots are one of the most well known and used plots to display differentially expressed genes.
These functions return a basic ggplot
object including the most important parts when creating a volcano plot.
This can be later expanded upon like any regular ggplot
object by the user.
volcPlot <- de_volcano(
res_de = res_macrophage_IFNg_vs_naive,
mapping = "org.Hs.eg.db",
labeled_genes = 25,
L2FC_cutoff = 1
)
#> 'select()' returned 1:many mapping between keys and columns
volcPlot
#> Warning: Removed 17782 rows containing missing values or values outside the scale range
#> (`geom_text_repel()`).
Again, an overview on the key parameters:
res_de
: Your DESeqResults
mapping
: The annotation/species: Important to generate symbols for labeling.
labeled_genes
: The number of the top DE genes to be labeled. Default is 30.
L2FC_cutoff
: Where to draw the lines in the plot and which genes to mark as significant. The default is one (meaning L2FC +/-1): So genes with a FoldChange higher than 1 or lower -1 and a padj value below 0.05.
As mentioned above the user can now expand upon this with all the tools in the ggplot2 toolbox. For example:
library("ggplot2")
volcPlot +
ggtitle("macrophage Volcano") +
ylab("-log10 PValue") +
xlab("Log 2 FoldChange (Cutoff 1/-1)")
#> Warning: Removed 17782 rows containing missing values or values outside the scale range
#> (`geom_text_repel()`).
For further possibilities please look at the ggplot2 documentation.
In addition to only focusing on differentially expressed genes, in the volcanoPlot you can also highlight genes associated with a certain GO term of interest.
This can be done with the go_volcano()
function:
Volc_GO <- go_volcano(
res_de = res_macrophage_IFNg_vs_naive,
res_enrich = res_enrich_macrophage_topGO,
term_index = 1,
L2FC_cutoff = 1,
mapping = "org.Hs.eg.db",
overlaps = 50,
col_to_use = "symbol",
enrich_col = "genes",
down_col = "black",
up_col = "black",
highlight_col = "tomato"
)
Volc_GO
#> Warning: Removed 17719 rows containing missing values or values outside the scale range
#> (`geom_label_repel()`).
#> Warning: ggrepel: 22 unlabeled data points (too many overlaps). Consider
#> increasing max.overlaps
The key parameters:
res_de
: Your DESeqResults
res_enrich
: Your enrichment resultsterm_index
: The index(row) where your term of interest is located in your enrichment result.L2FC_cutoff
: Where to draw the lines in the plot and which genes to mark as significant. The default is one (meaning L2FC +/-1): So genes with a FoldChange higher than 1 or lower -1 and a padj value below 0.05.mapping
: The annotation/species: Important to generate symbols for labeling.overlaps
: The number of overlaps ggrepell
is supposed to allow for labeling (increases number of labeled genes).col_to_use
: Name of the column in your res_de containing the gene symbols.enrich_col
: Name of the column in your res_enrich containing the gene symbols. For an example see run_topGO
data provided in mosdef: data(res_enrich_macrophage_topGO, package = "mosdef")
.down_col
: Colour for your downregulated genes (genes with a L2FC below your cutoff).up_col
: Colour for your upregulated genes (genes with a L2FC above your cutoff).highlight_col
: Colour for your genes associated with the given term of interest.An alternative to the volcano plot, less focused on the individual significance values and more focused on the combination of mean expression and changes in expression levels, is the MA plot. It can be considered an extension of the Bland-Altman plot for genomics data. This grants an overview of the differentially expressed genes across the different levels of expression.
plot_ma()
also allows you to set x and y labels right away, but we provide some default values.
However, similar to de_volcano()
, these can also be set later on by directly modifying the returned ggplot
object.
maplot <- plot_ma(
res_de = res_macrophage_IFNg_vs_naive,
FDR = 0.05,
hlines = 1
)
# For further parameters please check the function documentation
maplot
All key parameters at a glance:
res_de
: Your DESeqResults
objectFDR
: Which padj cutoff value to set for genes to be counted as DE (default < 0.05)hlines
: whether or not (and where) to draw the horizontal line (optional)Further control on the aspect of the output plot is enabled via the other possible parameters; please refer to the documentation of the plot_ma()
function itself.
If desired, plot_ma()
further allows you to highlight certain genes of interest to you, if providing them via the intgenes
parameter.
maplot_genes <- plot_ma(
res_de = res_macrophage_IFNg_vs_naive,
FDR = 0.1,
intgenes = c(
"SLC7A2",
"CFLAR",
"PDK4",
"IFNGR1"
), # suggested genes of interest
hlines = 1
)
maplot_genes
Analysis reports, often generated via Rmarkdown, are a great way of handing over data, results, and output to collaborators, colleagues, PIs, …
mosdef provides a set of functions aiming to enhance the report quality, e.g. by turning normal tables into interactive tables, linking to a number of additional external databases - thus simplifying the search & exploration steps which naturally follow the inspection of a DE table.
The life of a bioinformatician, but also the life of a biologist and a medical scientist, often contains a fair amount of searches into external databases, in order to obtain additional information on the shortlisted features.
Simplifying the time to reach these resources and embedding them into one info-rich analysis report is mosdef’s proposal to streamline this as a whole.
All of these (except ENSEMBL, using their internal identifier system) require gene symbols as the input. Currently, mosdef has functions to create automated links to:
You can access all of these easily by using one function that uses a data.frame
as input:
# creating a smaller subset for visualization purposes and to keep the main res_de
res_subset <- deseqresult2df(res_macrophage_IFNg_vs_naive, FDR = 0.05)[1:500, ]
buttonifier(
df = res_subset,
col_to_use = "symbol",
new_cols = c("GC", "NCBI", "GTEX", "UNIPROT", "dbPTM", "HPA", "PUBMED"),
ens_col = "id",
ens_species = "Homo_sapiens"
)
Again, an overview of the key parameters:
df
: A data.frame object containing your data. To get one from your DESeqResults
data use the function: deseqresult2df()
.
col_to_use
: Column where the gene names are stored, default is “SYMBOL”, in this example however the column is named “symbol”.
new_cols
: All of the supported websites. You can pick however many you want.
ens_col
: Where to find the Ensembl IDs in case you want to turn those into buttons too. If not this defaults to NULL and that part is skipped.
ens_species
: The species you are working on. Only needed if you want to turn the Ensembl IDs into buttons.
Importantly, the buttonifier()
function directly returns a DT::datatable
by default (not a data.frame
).
This is to ensure that the escape = FALSE
parameter of datatable
is set and not forgotten as the links/buttons will not work otherwise (or at least, will displayed very oddly as “simple text”, not interpreted as the code to generate buttons).
Advanced users that want further customization options to their datatable
can ensure a data.frame
is returned using the output_format
parameter (then the escape = FALSE
must be set by hand):
res_subset <- deseqresult2df(res_macrophage_IFNg_vs_naive, FDR = 0.05)[1:500, ]
res_subset <- buttonifier(res_subset,
col_to_use = "symbol",
new_cols = c("GC", "NCBI", "HPA"),
output_format = "DF"
)
DT::datatable(res_subset,
escape = FALSE,
rownames = FALSE
# other parameters...
)
As an additional prettifying element, the information on the log2 fold change can be also encoded with small transparent colored bars, representing the underlying effect sizes.
This can be done with the de_table_painter()
function, displayed in the following chunk:
de_table_painter(res_subset,
rounding_digits = 3,
signif_digits = 5)
## This also works directly on the DESeqResults objects:
de_table_painter(res_macrophage_IFNg_vs_naive[1:100, ],
rounding_digits = 3,
signif_digits = 5)
All of the functions included inside the buttonifier()
function are also available as singular functions in case you are only interested in a subset of them.
As a reminder: all functions, except the one related to the ENSEMBL database, can use/need gene symbols as input, so that the call to build up the table from its individual columns could be specified as in the following chunk:
res_subset <- deseqresult2df(res_macrophage_IFNg_vs_naive, FDR = 0.05)[1:500, ]
row.names(res_subset) <- create_link_ENS(row.names(res_subset), species = "Homo_sapiens")
res_subset$symbol_GC <- create_link_genecards(res_subset$symbol)
res_subset$symbol_Pub <- create_link_pubmed(res_subset$symbol)
res_subset$symbol_NCBI <- create_link_NCBI(res_subset$symbol)
res_subset$symbol_dbptm <- create_link_dbPTM(res_subset$symbol)
res_subset$symbol_GTEX <- create_link_GTEX(res_subset$symbol)
res_subset$symbol_UniP <- create_link_UniProt(res_subset$symbol)
res_subset$symbol_HPA <- create_link_HPA(res_subset$symbol)
DT::datatable(res_subset, escape = FALSE)
For information on singular genes you can use:
geneinfo_2_html("IRF1",
res_de = res_macrophage_IFNg_vs_naive,
col_to_use = "symbol"
)
IRF1It can however also be used without a res_de for a general overview.
geneinfo_2_html("ACTB")
ACTBThis can be a practical way to generate some HTML content to be embedded e.g. in other contexts such as dashboards, as it is currently implemented in pcaExplorer, ideal and GeneTonic.
res_enrich_macrophage_topGO$GO.ID <- create_link_GO(res_enrich_macrophage_topGO$GO.ID)
DT::datatable(res_enrich_macrophage_topGO, escape = FALSE)
#> Warning in instance$preRenderHook(instance): It seems your data is too big for
#> client-side DataTables. You may consider server-side processing:
#> https://rstudio.github.io/DT/server.html
Setting escape = FALSE
is important here to ensure the link is turned into a button - since we are dealing with a datatable
where we need to interpret some content directly as HTML code.
To get information on a singular GO term of interest you can use:
go_2_html("GO:0001525")
GO ID: GO:0001525@AMIGOThis not only creates a link to the AmiGO database, but also extracts some information about the term itself from the GO.db package.
This approach can be extended to link to additional external resources on genesets, such as MSigDB or Reactome.
sessionInfo()
#> R Under development (unstable) (2024-03-18 r86148)
#> Platform: x86_64-pc-linux-gnu
#> Running under: Ubuntu 22.04.4 LTS
#>
#> Matrix products: default
#> BLAS: /home/biocbuild/bbs-3.19-bioc/R/lib/libRblas.so
#> LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.10.0
#>
#> locale:
#> [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
#> [3] LC_TIME=en_GB LC_COLLATE=C
#> [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
#> [7] LC_PAPER=en_US.UTF-8 LC_NAME=C
#> [9] LC_ADDRESS=C LC_TELEPHONE=C
#> [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
#>
#> time zone: America/New_York
#> tzcode source: system (glibc)
#>
#> attached base packages:
#> [1] stats4 stats graphics grDevices utils datasets methods
#> [8] base
#>
#> other attached packages:
#> [1] ggplot2_3.5.0 topGO_2.55.0
#> [3] SparseM_1.81 GO.db_3.18.0
#> [5] graph_1.81.0 org.Hs.eg.db_3.18.0
#> [7] AnnotationDbi_1.65.2 DESeq2_1.43.4
#> [9] SummarizedExperiment_1.33.3 Biobase_2.63.0
#> [11] MatrixGenerics_1.15.0 matrixStats_1.2.0
#> [13] GenomicRanges_1.55.4 GenomeInfoDb_1.39.9
#> [15] IRanges_2.37.1 S4Vectors_0.41.5
#> [17] BiocGenerics_0.49.1 macrophage_1.19.0
#> [19] mosdef_0.99.0 BiocStyle_2.31.0
#>
#> loaded via a namespace (and not attached):
#> [1] RColorBrewer_1.1-3 jsonlite_1.8.8 magrittr_2.0.3
#> [4] magick_2.8.3 GenomicFeatures_1.55.4 farver_2.1.1
#> [7] rmarkdown_2.26 BiocIO_1.13.0 fs_1.6.3
#> [10] zlibbioc_1.49.3 vctrs_0.6.5 Rsamtools_2.19.4
#> [13] memoise_2.0.1 RCurl_1.98-1.14 ggtree_3.11.1
#> [16] htmltools_0.5.7 S4Arrays_1.3.6 SparseArray_1.3.4
#> [19] gridGraphics_0.5-1 sass_0.4.9 bslib_0.6.2
#> [22] htmlwidgets_1.6.4 plyr_1.8.9 cachem_1.0.8
#> [25] GenomicAlignments_1.39.4 igraph_2.0.3 lifecycle_1.0.4
#> [28] pkgconfig_2.0.3 Matrix_1.7-0 R6_2.5.1
#> [31] fastmap_1.1.1 gson_0.1.0 GenomeInfoDbData_1.2.11
#> [34] digest_0.6.35 aplot_0.2.2 enrichplot_1.23.1
#> [37] colorspace_2.1-0 patchwork_1.2.0 goseq_1.55.0
#> [40] crosstalk_1.2.1 RSQLite_2.3.5 labeling_0.4.3
#> [43] fansi_1.0.6 mgcv_1.9-1 httr_1.4.7
#> [46] polyclip_1.10-6 abind_1.4-5 compiler_4.4.0
#> [49] bit64_4.0.5 withr_3.0.0 BiocParallel_1.37.1
#> [52] viridis_0.6.5 DBI_1.2.2 highr_0.10
#> [55] BiasedUrn_2.0.11 ggforce_0.4.2 geneLenDataBase_1.39.0
#> [58] MASS_7.3-60.2 DelayedArray_0.29.9 rjson_0.2.21
#> [61] HDO.db_0.99.1 tools_4.4.0 ape_5.7-1
#> [64] scatterpie_0.2.1 glue_1.7.0 restfulr_0.0.15
#> [67] nlme_3.1-164 GOSemSim_2.29.1 grid_4.4.0
#> [70] shadowtext_0.1.3 reshape2_1.4.4 fgsea_1.29.0
#> [73] generics_0.1.3 gtable_0.3.4 tidyr_1.3.1
#> [76] data.table_1.15.2 tidygraph_1.3.1 utf8_1.2.4
#> [79] XVector_0.43.1 ggrepel_0.9.5 pillar_1.9.0
#> [82] stringr_1.5.1 yulab.utils_0.1.4 splines_4.4.0
#> [85] dplyr_1.1.4 tweenr_2.0.3 treeio_1.27.0
#> [88] lattice_0.22-6 rtracklayer_1.63.1 bit_4.0.5
#> [91] tidyselect_1.2.1 locfit_1.5-9.9 Biostrings_2.71.5
#> [94] knitr_1.45 gridExtra_2.3 bookdown_0.38
#> [97] xfun_0.42 graphlayouts_1.1.1 DT_0.32
#> [100] stringi_1.8.3 lazyeval_0.2.2 ggfun_0.1.4
#> [103] yaml_2.3.8 evaluate_0.23 codetools_0.2-19
#> [106] ggraph_2.2.1 tibble_3.2.1 qvalue_2.35.0
#> [109] BiocManager_1.30.22 ggplotify_0.1.2 cli_3.6.2
#> [112] munsell_0.5.0 jquerylib_0.1.4 Rcpp_1.0.12
#> [115] png_0.1-8 XML_3.99-0.16.1 parallel_4.4.0
#> [118] ellipsis_0.3.2 blob_1.2.4 clusterProfiler_4.11.0
#> [121] DOSE_3.29.2 bitops_1.0-7 viridisLite_0.4.2
#> [124] tidytree_0.4.6 scales_1.3.0 purrr_1.0.2
#> [127] crayon_1.5.2 rlang_1.1.3 cowplot_1.1.3
#> [130] fastmatch_1.1-4 KEGGREST_1.43.0
Alasoo, Kaur, Julia Rodrigues, Subhankar Mukhopadhyay, Andrew J Knights, Alice L Mann, Kousik Kundu, Christine Hale, Gordon Dougan, and Daniel J Gaffney. 2018. “Shared genetic effects on chromatin and gene expression indicate a role for enhancer priming in immune response.” Nature Genetics 50 (3): 424–31. https://doi.org/10.1038/s41588-018-0046-7.
Ashburner, Michael, Catherine A Ball, Judith A Blake, David Botstein, Heather Butler, J Michael Cherry, Allan P Davis, et al. 2000. “Gene Ontology: tool for the unification of biology.” Nature Genetics 25 (1): 25–29. https://doi.org/10.1038/75556.