phenotrex.structure package¶
Submodules¶
phenotrex.structure.records module¶
- class phenotrex.structure.records.GenotypeRecord(identifier: str, feature_type: str, features: List[str])[source]¶
Bases:
object
Genomic features of a sample referenced by identifier.
- feature_type: str¶
- features: List[str]¶
- identifier: str¶
- class phenotrex.structure.records.GroupRecord(identifier: str, group_name: Optional[str], group_id: Optional[int])[source]¶
Bases:
object
Group label of sample identifier. Notes —– Useful for leave-one-group-out cross-validation (LOGO-CV), for example, to take taxonomy into account.
- group_id: Optional[int]¶
- group_name: Optional[str]¶
- identifier: str¶
- class phenotrex.structure.records.PhenotypeRecord(identifier: str, trait_name: str, trait_sign: int)[source]¶
Bases:
object
Ground truth labels of sample identifier, indicating presence/absence of trait trait_name:
0 if trait is absent
1 if trait is present
- identifier: str¶
- trait_name: str¶
- trait_sign: int¶
- class phenotrex.structure.records.TrainingRecord(identifier: str, group_name: Optional[str], group_id: Optional[int], trait_name: str, trait_sign: int, feature_type: str, features: List[str])[source]¶
Bases:
phenotrex.structure.records.GenotypeRecord
,phenotrex.structure.records.PhenotypeRecord
,phenotrex.structure.records.GroupRecord
Sample containing Genotype-, Phenotype- and GroupRecords, suitable as machine learning input for a single observation.
- feature_type: str¶
- features: List[str]¶
- identifier: str¶