Modules¶
model
¶
Classes¶
Modules¶
standard_profile
¶
Provide a description of the standard profile format.
Classes¶
StandardProfile
¶
Bases: pa.SchemaModel
Define the standard profile format.
Source code in taxpasta/domain/model/standard_profile.py
taxonomy
¶
tidy_observation_table
¶
Provide a description of a tidy observation table.
Classes¶
TidyObservationTable
¶
Bases: pa.SchemaModel
Define the tidy observation table.
Source code in taxpasta/domain/model/tidy_observation_table.py
count: Series[int] = pa.Field(ge=0)
class-attribute
¶sample: Series[pd.CategoricalDtype] = pa.Field()
class-attribute
¶taxonomy_id: Series[pd.CategoricalDtype] = pa.Field()
class-attribute
¶Config
¶Configure the schema model.
Source code in taxpasta/domain/model/tidy_observation_table.py
wide_observation_table
¶
Provide a description of an observation matrix.
Classes¶
WideObservationTable
¶
Bases: pa.SchemaModel
Define the observation matrix.
Source code in taxpasta/domain/model/wide_observation_table.py
service
¶
Classes¶
Modules¶
consensus_builder
¶
Provide a builder service for creating a consensus between many profiles.
Classes¶
ConsensusBuilder
¶
Bases: ABC
Define a builder service for creating a consensus between many profiles.
Source code in taxpasta/domain/service/consensus_builder.py
sample_merging_service
¶
Provide a sample merging service that summarizes two or more samples.
Classes¶
SampleMergingService
¶Define a sample merging service that summarizes one or more samples.
Source code in taxpasta/domain/service/sample_merging_service.py
merge_long(samples: Iterable[Sample]) -> DataFrame[TidyObservationTable]
classmethod
¶Merge two or more sample profiles into a tidy observation table.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
samples |
Iterable[Sample]
|
Two or more samples. |
required |
Returns:
Type | Description |
---|---|
DataFrame[TidyObservationTable]
|
A single table containing three columns: taxonomy identifier, abundance |
DataFrame[TidyObservationTable]
|
count, and sample identifier. |
Source code in taxpasta/domain/service/sample_merging_service.py
merge_wide(samples: Iterable[Sample]) -> DataFrame[WideObservationTable]
classmethod
¶Merge two or more sample profiles into a wide-format observation matrix.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
samples |
Iterable[Sample]
|
Two or more samples. |
required |
Returns:
Type | Description |
---|---|
DataFrame[WideObservationTable]
|
A single table containing one row per taxon, one column for the taxonomy |
DataFrame[WideObservationTable]
|
identifier, and one column per sample with abundance counts. |