Package ete2 :: Package coretype :: Module arraytable :: Class ArrayTable
[hide private]
[frames] | no frames]

Class ArrayTable

source code

object --+
         |
        ArrayTable

This object is thought to work with matrix datasets (like microarrays). It allows to load the matrix an access easily to row and column vectors.

Instance Methods [hide private]
 
__str__(self)
str(x)
source code
 
__init__(self, matrix_file=None, mtype='float')
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
get_row_vector(self, rowname)
Returns the vector associated to the given row name
source code
 
get_column_vector(self, colname)
Returns the vector associated to the given column name
source code
 
get_several_column_vectors(self, colnames)
Returns a list of vectors associated to several column names
source code
 
get_several_row_vectors(self, rownames)
Returns a list vectors associated to several row names
source code
 
remove_column(self, colname)
Removes the given column form the current dataset
source code
 
merge_columns(self, groups, grouping_criterion)
Returns a new ArrayTable object in which columns are merged according to a given criterion.
source code
 
transpose(self)
Returns a new ArrayTable in which current matrix is transposed.
source code
 
_link_names2matrix(self, m)
Synchronize curent column and row names to the given matrix
source code
 
write(self, fname, colnames=[]) source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__str__(self)
(Informal representation operator)

source code 

str(x)

Overrides: object.__str__
(inherited documentation)

__init__(self, matrix_file=None, mtype='float')
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

merge_columns(self, groups, grouping_criterion)

source code 
Returns a new ArrayTable object in which columns are
merged according to a given criterion.

'groups' argument must be a dictionary in which keys are the
new column names, and each value is the list of current
column names to be merged.

'grouping_criterion' must be 'min', 'max' or 'mean', and
defines how numeric values will be merged.

Example:
   my_groups = {'NewColumn':['column5', 'column6']}
   new_Array = Array.merge_columns(my_groups, 'max')