# 1) load SCOP.sf (as 'InfoDataFrame' object)
SCOP.sf <- dcRDataLoader('SCOP.sf')
# randomly select 20 domains
data <- sample(rowNames(SCOP.sf), 20)
# 2) perform enrichment analysis, producing an object of S4 class 'Eoutput'
eoutput <- dcEnrichment(data, domain="SCOP.sf", ontology="GOMF")
eoutput
# 3) write into the file 'Eoutput.txt' in your local directory
write(eoutput, file='Eoutput.txt')
# 4) view the top 5 significant terms
view(eoutput, top_num=5, sortBy="pvalue", details=TRUE)
# 4) retrieve several slots directly
zscore(eoutput)[1:5]
pvalue(eoutput)[1:5]
adjp(eoutput)[1:5]
Run the code above in your browser using DataLab