## Not run:
# # 1) load onto.GOMF (as 'Onto' object)
# g <- dcRDataLoader('onto.GOMF')
#
# # 2) load SCOP superfamilies annotated by GOMF (as 'Anno' object)
# Anno <- dcRDataLoader('SCOP.sf2GOMF')
#
# # 3) prepare for annotation data
# # randomly select 5 terms vertices (and their annotation data)
# annotations <- Anno[,sample(1:dim(Anno)[2], 5)]
#
# # 4) obtain the induced subgraph according to the input annotation data
# # 4a) based on all possible paths (i.e. the complete subgraph induced)
# dcDAGannotate(g, annotations, path.mode="all_paths", verbose=TRUE)
# # 4b) based on shortest paths (i.e. the most concise subgraph induced)
# dag <- dcDAGannotate(g, annotations, path.mode="shortest_paths",
# verbose=TRUE)
#
# # 5) color-code nodes/terms according to the number of annotations
# if(class(dag)=='Onto') dag <- dcConverter(dag, from='Onto',
# to='igraph')
# data <- sapply(V(dag)$annotations, length)
# names(data) <- V(dag)$name
# dnet::visDAG(g=dag, data=data, node.info="both")
# ## End(Not run)
Run the code above in your browser using DataLab