Module transdisrupt :: Class ExpressionSimilarityMatrix
[hide private]
[frames] | no frames]

Class ExpressionSimilarityMatrix

source code

The ExpressionSimilarityMatrix is basically an implementation of a matrix, that is suited for our purposes. This means that entries can easily be extracted by factornames instead of indices.

Instance Methods [hide private]
 
__init__(self, name, gf_dict, default_element=0.0)
Constructor.
source code
 
__str__(self, factor_fmt='%10s', element_fmt=' %7.3f', none_symbol=' None ')
Prints the matrix.
source code
 
gnu_comparison(self, other, cmp_function)
this function seems to be half-implemented -- it does not do anything reasonable or useful
source code
 
gene_factor_dictionary(self)
Returns the gene-factor dictionary.
source code
 
factor_gene_dictionary(self) source code
 
return_as_list(self)
Returns the matrix as a list where rows follow each other.
source code
 
fill_all(self, v)
Writes v in each entry of the matrix.
source code
 
get_index(self, fname)
Returns the index of the factor fname in the membervariable factor_list owned by the matrix.
source code
 
get_fname(self, gname)
Returns the product of the gene gname.
source code
 
get_element(self, f1, f2)
Returns the entry of the matrix associated with the factors f1 and f2.
source code
 
set_element(self, f1, f2, element)
Fill entry of the matrix associated with the factors f1, f2 with element.
source code
 
get_gnamelist(self)
Returns the gene names in a list.
source code
 
get_fnamelist(self)
Returns the factor names in a list.
source code
 
replace_none(self, element) source code
Method Details [hide private]

__init__(self, name, gf_dict, default_element=0.0)
(Constructor)

source code 

Constructor. Initialize ExpressionSimilarityMatrix with all factors given as values in the dictionary gf_dict. When an error is raised the network has factors that are encoded by multiple genes. this functionality is not (yet) implemented.