Learn R Programming

LncMod (version 1.1)

tri.enrich: Modulator Functional Enrichment

Description

Targets of a modulator in the triplets is enriched to GOterms based on the hypergeometric distribution. It can also owe GOterms to disease hallmarks at the same time.

Usage

tri.enrich(tri, GOterms, background, inter.thr = 2, GOterms.mark = NULL,correction="BH")

Arguments

tri
a dataframe (or matrix) representing the triplets used to enrich.The first column is modulator;the second column is effetor;the third column is target.
GOterms
a list whose variable is a GOterm name and the content is genes annotated on the GOterm.
background
a vector containing a gene set in which GOterm annotated genes must be.Its id style must be consistent with the id format in GOterms.
inter.thr
a numeric (default 2) representing min number of intersection between a modulator's targets and a GOterms genes.
GOterms.mark
a dataframe (or matrix;default NULL) with 2 columns in which the first represent GOterm sets to be enriched while the second represent hallmark to which the GOterm belongs;
correction
correction method (default "BH") in one of p.adjust.methods.

Value

If GOterms.mark is NULL,it is a 6 column dataframe as following:
  • modulator the modulator name;
  • GOterm the GOterm name;
  • mtarnum the target number of a modulator;
  • GOtarnum the gene number of a GOterm;
  • internum the number of intersected factor between a GOterm genes and a modulator targets;
  • P_value the significance of enrichment;
  • fdr corrected P_value by the assigned method;
If GOterms.mark is not NULL,it added a seventh column(named "mark" representing the disease mark) besides six columns above.

Details

Note:All the arguments without default value must be assigned.

If background is NULL,then targets of a modulator is enriched to the GOterms genes passed in; If background is not NULL,then targets of a modulator is enriched to the GOterms genes filterd by the background.

If GOterms.mark is NULL,it only do GOterms enrichment; If GOterms.mark is not NULL,it also owe GOterms to disease marks.

See Also

phyper

Examples

Run this code
#Functional enrichment without disease hallmarks
tri.enrich(tri=datatests[["tri_enrich"]],GOterms=datatests[["GOterms"]],
           background=datatests[["background"]])
#Funtional enrichment with disease hallmarks
tri.enrich(tri=datatests[["tri_enrich"]],GOterms=datatests[["GOterms"]],
           background=datatests[["background"]],
		   GOterms.mark=datatests[["GOterms_mark"]])

Run the code above in your browser using DataLab