association
index
c:\my projects\python\bioinformatics\association.py

Gene Association data parser
Zafer Barutcuoglu 2003/11/25
 
This module parses the bioinformatical Gene Association data, which is the mapping of genes to Gene Ontology nodes.
 
The term "GOID" used throughout is short for Gene Ontology ID, of the format "GO:1234567".

 
Classes
       
Association

 
class Association
    Gene Association data class.
 
self.genesToNodes is dict of gene_name -> list of GOID
self.nodesToGenes is dict of GOID -> list of gene_name
 
  Methods defined here:
__init__(self, infile=None)
Constructor.
<infile> may be either a file name, open file object, or None.
loadFile(self, infile)
Loads data from file.
<infile> may be a file name or open file object. If latter, it is not closed on exit.
loadLines(self, lines)
Loads data from a list of data lines.
saveIndices(self, outfile, geneList=None, GOIDList=None)
Saves data as sparse matrix text file.
M(gene_index, GOID_index) = 1 if gene is associated to GOID.
The indices are 1+(order in list parameter).
If lists are not specified, order of appearance is used.