GeneOntology#

class openomics.database.ontology.GeneOntology(path='http://geneontology.org/gene-associations/', species='human', file_resources=None, index_col='DB_Object_Symbol', keys=None, col_rename={'DB_Object_ID': 'gene_id', 'DB_Object_Symbol': 'gene_name', 'GO_ID': 'go_id', 'Taxon_ID': 'species_id'}, blocksize=None, **kwargs)[source][source]#

Bases: openomics.database.ontology.Ontology

Loads the GeneOntology database from http://geneontology.org .

Default path: “http://geneontology.org/gene-associations/”.

Default file_resources: {

“go-basic.obo”: “http://purl.obolibrary.org/obo/go/go-basic.obo”, “goa_human.gaf”: “goa_human.gaf.gz”, “goa_human_rna.gaf”: “goa_human_rna.gaf.gz”, “goa_human_isoform.gaf”: “goa_human_isoform.gaf.gz”,

}

Attributes Summary

Methods Summary

add_predecessor_terms(anns[, edge_type, sep])

filter_network(namespace)

Filter the subgraph node_list to only namespace terms.

info()

load_dataframe(file_resources[, blocksize])

Handles data preprocessing given the file_resources input, and returns a DataFrame.

load_network(file_resources)

rtype

Tuple[Graph, ndarray]

Attributes Documentation

COLUMNS_RENAME_DICT = {'DB_Object_ID': 'gene_id', 'DB_Object_Symbol': 'gene_name', 'GO_ID': 'go_id', 'Taxon_ID': 'species_id'}[source]#

Methods Documentation

add_predecessor_terms(anns, edge_type='is_a', sep='\\\\||;')[source]#
filter_network(namespace)[source]#

Filter the subgraph node_list to only namespace terms. :param namespace: one of {“biological_process”, “cellular_component”, “molecular_function”}

Return type

None

info()[source][source]#
load_dataframe(file_resources, blocksize=None)[source][source]#

Handles data preprocessing given the file_resources input, and returns a DataFrame.

Parameters
  • file_resources (dict) – A dict with keys as filenames and values as full file path.

  • blocksize (int) –

Return type

DataFrame

load_network(file_resources)[source][source]#
Return type

Tuple[Graph, ndarray]