R/PE.R

Defines functions PE.plant PE.ensemble

Documented in PE.ensemble PE.plant

#' PFAM Enrichment analysis function based on ensemble annotation data
#' @param df: DGE files (DESeq2 result files) or vector contains gene names
#' @param PO_FILE: PFAM annotation data, you can get the data by using makeesanno function
#' @param filename: output filename
#' @param gene.cutoff: DGE singificant cutoff value
#' @export
#' @author Kai Guo
PE.ensemble<-function(df,PO_FILE,gene.cutoff=0.01,padj.method="BH",minSize=2,maxSize=500,keepRich=TRUE,filename=NULL,cutoff=0.05){
  data(pfanno)
  annot.info=pfanno
  res=enrich(df,annot=PO_FILE,annot.info =pfanno,filename=filename,gene.cutoff = gene.cutoff,padj.method = padj.method)
  res<-res[res$Pvalue<cutoff,]
  return(res)
}
#' PFAM Enrichment analysis function based on ensemble plant annotation data
#' @param df: DGE files (DESeq2 result files) or vector contains gene names
#' @param PO_FILE: PFAM annotation data, you can get the data by using makeplantann function
#' @param filename: output filename
#' @param gene.cutoff: DGE singificant cutoff value
#' @export
#' @author Kai Guo
PE.plant<-function(df,PO_FILE,gene.cutoff=0.01,padj.method="BH",minSize=2,maxSize=500,keepRich=TRUE,filename=NULL,cutoff=0.05){
  data(pfanno)
  res=enrich(df,annot=PO_FILE,annot.info = pfanno,filename=filename,gene.cutoff = gene.cutoff,padj.method = padj.method,minSize=minSize,maxSize=maxSize,keepRich=keepRich)
  res<-res[res$Pvalue<cutoff,]
  return(res)
}
guokai8/EnrichR documentation built on May 18, 2020, 5:29 a.m.