APFilters#
- class astropathdb.db_io.sql.APFilters#
The custom sqlalchemy filters we apply.
We apply
_create_dynamic_filter()over the list of filters defined in the__slots__of this class. This way columns that we typically subset on can be called as “<filter name>_filter()” vs having to write extended explicit clauses every time. This is really done to simplify the code base rather than designed for external use.They are added to a class so that we can better document them vs using a constant
list.- Allowed filters:
sampleid: Filter on the sampleid column.
ptype: Filter on the ptype column.
exprphenotype: Filter on exprphenotype column.
px: Filter on px column.
py: Filter on py column.
btype: Filter on btype column (0: Nuclei and 1:EntireCell).
lname: Filter on the annotation layer names.
tdist: Filter on tumor distance.
See also
_create_dynamic_filter()for details on the filter arguments.