lamindb.Features#
- class lamindb.Features(iterable: ListLike = None, field: SQLModelField = None, *, id: str = None, type: Any = None, files: List[File] = [], data: Union[Path, str, DataFrame, AnnData] = None, created_by_id: str = None, created_at: datetime)#
Bases:
BaseORM
Feature sets.
A feature set is represented by the hash of the set of primary keys and the feature type.
The current supported feature types are lnschema_bionty.Gene, lnschema_bionty.Protein & lnschema_bionty.CellMarker.
Guides:
/guide/scrna
guide/flow
Examples:
>>> import lnschema_bionty as bt >>> reference = bt.Gene(species="mouse") >>> features = ln.Features(adata, reference=reference) >>> file = ln.File(adata, name="Mouse Lymph Node scRNA-seq", features=features)
- Parameters:
data – [Path, str, pd.DataFrame, ad.AnnData] - DataFrame or AnnData to parse.
reference – Any = None - Reference for mapping features.
id – str = None - Primary key.
type – Any = None - Type of reference.
files – List[File] - Files to link against.
Attributes
-
id:
str
#
-
type:
str
#
-
created_by_id:
str
#
-
created_at:
datetime
#
-
files:
List
[File]#