Function to build an object of the S4 class Onto from input files

Description

dcBuildOnto is supposed to build an object of of the S4 class Onto, given input files. These input files include 1) a file containing term relations, and 2) a file containing term/node information.

Usage

dcBuildOnto(relations.file, nodes.file, output.file = "Onto.RData")

Arguments

relations.file
an input file containing term relations (i.e. edges from parent terms to child terms). For example, a file containing relations between GO Molecular Function (GOMF) terms can be found in http://dcgor.r-forge.r-project.org/data/onto/igraph_GOMF_edges.txt. As seen in this example, the input file must contain the header (in the first row) and two columns: 1st column for parent term ID, and 2nd column for child term ID. Note: the file should use the tab delimiter as the field separator between columns
nodes.file
an input file containing term/node information. For example, a file containing GO Molecular Function (GOMF) terms can be found in http://dcgor.r-forge.r-project.org/data/onto/igraph_GOMF_nodes.txt. As seen in this example, the input file must contain the header (in the first row) and five columns: 1st column 'name' for node names (actually term ID; must be unique), 2nd column 'term_id' for term ID, 3rd 'term_name' for term name, 4th column 'term_namespace' for term namespace, and 5th column 'term_distance' for term distance. These five columns must be provided, the content in the first two columns are identical, and the content for the last column can be arbitrary (if it is hard to prepare). Note: the file should use the tab delimiter as the field separator between columns
output.file
an output file used to save the built object as an RData-formatted file. If NULL, this file will be saved into "Onto.RData" in the current working local directory

Value

Any use-specified variable that is given on the right side of the assigement sign '<-', which contains the built Onto object. Also, an RData file specified in "output.file" is saved in the local directory.

Note

If there are no use-specified variable that is given on the right side of the assigement sign '<-', then no object will be loaded onto the working environment.

Examples

# build an "Onto" object for GO Molecular Function onto.GOMF <- dcBuildOnto(relations.file="http://dcgor.r-forge.r-project.org/data/onto/igraph_GOMF_edges.txt", nodes.file="http://dcgor.r-forge.r-project.org/data/onto/igraph_GOMF_nodes.txt", output.file="onto.GOMF.RData")
An object of S4 class 'Onto' has been built and saved into '/Users/hfang/Sites/SUPERFAMILY/dcGO/dcGOR/onto.GOMF.RData'.
onto.GOMF
An object of S4 class 'Onto' @adjMatrix: a direct matrix of 9595 terms (parents/from) X 9595 terms (children/to) @nodeInfo (InfoDataFrame) nodeNames: GO:0003674 GO:0000988 GO:0001071 ... GO:0004008 GO:0086037 (9595 total) nodeAttr: term_id term_name term_namespace term_distance

Source code

dcBuildOnto.r

Source man

dcBuildOnto.Rd dcBuildOnto.pdf

See also

Onto