Transcription Factors Analysis - GianlucaMattei/methyl.O GitHub Wiki

TFs Analysis:

While alteration of methylation on genes alone can lead to little changes, a DMR occuring on TF can cause a major perturbation in overall gene expression profile. For this reason methyl.O offers the possibility to perform specific analyses on TFs. First, the annotated DMRs are used to query the ENCODE database in order to select all TFs overlapped by DMRs, then the same database is used to associate target genes to each TFs. The tool offers also the possibility to compare methylation levels of TFs and expression of target genes to better evaluate their impact (Figure 4). Finally the differentially expressed targets can be used to perform enrichment analysis by enrichR.

Figure 4: The plot shows on the left the beta Difference of Methylation between two compared conditions of specific TFs, STAT1 in this case, and the expression of target genes.

R:

First it is necessary to annotate the TFs to the target genes. This can be done by the function associateTFs2Exprs which accepts as input the annotated DMRs and the expression profile. The specific parameters for input methylation and for expression profiles are the same as used in other functions which integrate expression and methylation data.

TFs2Targets <- associateTFs2Exprs(annotatedDMRs, expressionSubset, active.features = c("promoters", "heads") col.genes = 1,  
col.stat = 6, stat.thr = 0.05, col.logFC = 2, logfc.thr = 0, beta.thr = .3, 
overlap.param.thr = 30, param.type = 'overlap.percentage')

Once the association between TFs and targets is retrieved, it is possible to plot the beta difference of a methylation occurring on a specific TF and the expression levels of target genes, as shown in figure 7, using the function plotTFs2Exprs. It needs as input the output of the function associateTFs2Exprs and the TF symbol to plot. The graphical parameters allow to choose the color of the methylation bar and the color palette of the expression values.

plotTFs2Exprs(TFs2Targets, symbol, col.meth = '##8e0000', pals.bars = 'Cold')

The results from the function associateTFs2Exprs can also be used to assess if the methylation of few TFs can affect any pathway by querying enrichR with the target genes. This can be easily done using the function tfs2Enrichr

tfs2Enrichr(TFs2Targets, logfc.thr = 1, stat.filter = 'P.value', stat.thr = 0.01)

GUI:

The TFs Analysis tab permits to study TFs. In the main part of the page it is shown the table of association between TFs and correspective target genes with relative beta differences and expression levels, the overlapped features and the characteristics of the overlap. This table can be customized by the parameters on the upper side of the page which permit to filter TFs according to the overlapped region by the DMRs. Other parameters will be discussed below. In the main page it is possible to plot the methylation of the desidered TFs and the expression of target genes. This plot can be customized by clicking the red gear button on its top left side. The enrichment analysis results are shown in the second part of the main page by a table and a plot that reflect the table results. As previously described, the enrichment plots show on the x-axis the -log10 of p. value, therefore, the smaller the p. value the greater the number shown on the x-axis. Also in this case the plot can be customized by clicking on the red gear button on its top left side. The left side panel is divided in three parts: the first part, named Expression File Parameters, is related to the parameters for using the expression data:

Command Description
Column Position of Gene ID Set the column position in the expression file where to find gene IDs
Column Position of Used Statistics Set the column position in the expression file where to find the statistics (p.value or adj p.value)
Column position of logFC Set the column position in the expression file where to get the log. fold changes values.
Select TRUE if Gene IDs are not Symbols If selected, gene IDs are not official symbols
Select Gene IDs Annotation Type to Translate If the above option is TRUE, then select the type of IDs provided.

the second part, named TFs Targets/Expression Correlation Parameters, permits to set parameters for filtering DMRs and expressed genes during the association process:

Command Description
LogFC Threshold Threshold value for expression log. fold change.
Beta Diff Threshold The beta threshold for each DMRs to be considered in the annotation
Statistic Threshold Threshold value for the selected statistics
Type of Parameter to filter Overlapping Methylation The metrics to filter the DMRs can be 1) the percentage of the enhancer overlapped with the DMR, 2) the length, in bp, of the overlap between the enhancer and 3) the DMR and the length, in bp of the DMR.
Overlapping Methylation Value Threshold for Filtering Threshold value for the selected parameter.

The third part of the left panel, named TFs Targets Enrichment Parameters, is related to the enrichment analysis:

Command Description
DBs to Query Select the database to query among the 12 available. If left blank, all 12 databases will be used.
LogFC Threshold The log. fold change threshold for target genes to be considered for the association.
Statistics Type for Results Filtering For each enriched pathway is computed a p. value and an adj. p.value, this parameter permits to set which statistic to use.
Statistics Threshold for Results Filtering Select the statistical threshold for the selected statistics.