Cell Class Description
- class aisynphys.cell_class.CellClass(*exprs, name=None, **criteria)
Represents a class of cells as a list of selection criteria.
Construct with an arbitrary set of keyword arguments, where each argument specifies a criteria for matching cells. Keyword argument names must be a column from the
Morphology, Intrinsic, or CorticalCellLocation database tables. Can also be filtered with an arbitrary list of expressions (unnamed arguments), each of which must be an sqlalchemy BinaryExpression, as used in query.filter(), referring to one of the available tables.
pv_class = CellClass(cre_type='pvalb') inhibitory_class = CellClass(cre_type=('pvalb', 'sst', 'vip')) l23_pyr_class = CellClass(cortical_layer='2/3') l5_spiny_class = CellClass(dendrite_type='spiny', cortical_layer='5') deep_l3_class = CellClass( db.CorticalCellLocation.fractional_layer_depth < 0.5, cortical_layer='3')
- property as_tuple
A tuple representation of this cell class used for display purposes.
Order of elements in the tuple is (target_layer, pyramidal, cre_type), but elements are only present if they were specified as criteria for the cell class.
- dataframe_mask(df, prefix='')
Given a dataframe containing columns describing cell properties, return a boolean Series that indicates whether the cell in each row is a member of the class.
Dataframe columns must be named like “cell.cre_type” or “morphology.dendrite_type”, as defined in the database. Optionally, these names may begin with prefix.
- filter_query(query, cell_table, db=None)
Return a modified query (sqlalchemy) that filters results to include only those in this cell class.
- property is_excitatory
True if this class includes only excitatory cells; False if this class includes only inhibitory cells; None if the class may include a mixture of excitatory and inhibitory cells.
Relevant criteria used here are: * cell.cre_type * morphology.dendrite_type * cell.cell_class * cell.cell_class_nonsynaptic
- property name
A short string representation of this cell class.
If no name was supplied, then this value is as_tuple concatenated with spaces.
- property output_synapse_type
Expected type of synapses “ex”, “in”, or None to be output from this cell type.