getKOAnn {SubpathwayMiner} | R Documentation |
Annotate a set of genes to sub-pathways by using KEGG Orthology (KO).
getKOAnn(geneList,background=getDefaultBackground(), order="pvalue",decreasing=FALSE,graphList)
geneList |
A character vector of genes. |
background |
A character vector of genes used to identify the statistically significantly enriched pathways. |
order |
A character string. Should be one of "pvalue", "qvalue". |
decreasing |
A logical. Should the sort order be increasing or decreasing? |
graphList |
A list. its elements may be a graph-class or a vector of charactor. |
The function can annotate a set of genes to sub-pathways and identify the statistically significantly enriched pathways.
The value of graphList
should be changed with the function getKcSubGraph
by setting arguments graphList=
getDefaultKOUndirectedGraph
.
Before you use the function, had better use the function getOrgAndIdType
to get the type of current organism and gene identifiers from the environment variable. If the value is different from the type of organism and gene identifier in your current study, you must change them by using the function updateOrgAndIdType
, data
or loadKe2g
.
If users don't set the argument background
, the background distribution will be obtained from the whole-genome genes. Detailed information is provided in the function getDefaultBackground
.
A list. Each element of the list is another list. It includes eight elements: 'pathwayName', 'annGeneList', 'annGeneNumber', 'annBgNumber', 'geneNumber', 'bgNumber', 'pvalue', 'qvalue'. They correspond to pathway name, the submitted genes annotated to the pathway, numbers of submitted genes annotated to the pathway, numbers of background genes annotated to the pathway, numbers of submitted genes, numbers of background genes, p-value, and FDR-corrected q-value.
To visualize and save the results, the list
can be converted to the data.frame
by the function printAnn
. But, note that, compared with data.frame
, the list
provides more information, e.g., the annotated genes are saved in the list
,yet not in the data.frame
.
Chunquan Li <lcqbio@yahoo.com.cn>
getKcSubGraph
,getDefaultKOUndirectedGraph
, getAnn
, cutoffAnn
, printAnn
,plotKOAnn
##annotate the genes to sub-pathway by using KEGG Orthology (KO). ##get a set of genes geneList<-getAexample(k=100) # subGraphList<-getKcSubGraph(k=4,graphList=getDefaultKOUndirectedGraph()) #get the annotated results ann<-getKOAnn(geneList,graphList=subGraphList) #print the annotation results to screen result<-printAnn(ann) result[2:5] ##write the annotation results to tab delimited file. #note that the argument col.names=NA is essential. write.table(result,file="result",col.names=NA,sep="\t")