phenotrex.structure package

Submodules

phenotrex.structure.records module

class phenotrex.structure.records.GenotypeRecord(identifier: str, features: List[str])[source]

Bases: object

Genomic features of a sample referenced by identifier.

features: List[str] = None
identifier: str = None
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] = None
group_name: Optional[str] = None
identifier: str = None
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 = None
trait_name: str = None
trait_sign: int = None
class phenotrex.structure.records.TrainingRecord(identifier: str, group_name: Optional[str], group_id: Optional[int], trait_name: str, trait_sign: int, 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.

features = None
identifier = None

Module contents