Enums

Classification

Metric

class onecodex.lib.enums.Metric(*values)

Metrics for taxonomic abundance data.

Taxonomic descendants refer to all taxa below a given taxon in the taxonomic hierarchy (superkingdom > phylum > class > order > family > genus > species > strain). For example, if a read maps to the species Escherichia coli, that read contributes to the readcount for E. coli as well as the ReadcountWChildren for its genus (Escherichia), family (Enterobacteriaceae), and all ancestor taxa up the hierarchy.

Auto

Determine appropriate metric automatically (see to_classification_df()).

Readcount

Number of reads assigned to a given taxon.

ReadcountWChildren

Read count for a taxon and all its taxonomic descendants.

PropReadcount

Readcount as a proportion of total reads in the sample.

\[\frac{\text{readcount}}{\text{n\_reads\_total}}\]
PropReadcountWChildren

ReadcountWChildren as a proportion of total reads in the sample.

PropClassified

Readcount as a proportion of classified microbial reads.

\[\frac{\text{readcount}}{\text{n\_mapped\_microbial\_reads}}\]

Where n_mapped_microbial_reads = n_mapped_reads - n_host_reads - n_nonspecific_reads. Host reads are those mapping to detected host organisms (typically tax IDs 9606 for human and 10090 for mouse). Nonspecific reads are those mapping to tax IDs 1 (root) and 131567 (cellular organisms).

PropClassifiedWChildren

ReadcountWChildren as a proportion of classified microbial reads.

Abundance

Relative abundance estimate for a given taxon, computed by the classifier.

AbundanceWChildren

Abundance for a taxon and all its descendants.

NormalizedReadcount

Readcount normalized by the sum of readcounts for taxa at the specified rank. Values sum to 1.0 across taxa at that rank.

\[\frac{\text{readcount}}{\sum_{\text{taxa at rank}} \text{readcount}}\]
NormalizedReadcountWChildren

ReadcountWChildren normalized by the sum of ReadcountWChildren for taxa at the specified rank. Represents the proportion of reads that classified to the specified rank or below. Values sum to 1.0 across taxa at that rank.

\[\frac{\text{readcount\_w\_children}}{\sum_{\text{taxa at rank}} \text{readcount\_w\_children}}\]
Abundance = 'abundance'
AbundanceWChildren = 'abundance_w_children'
Auto = 'auto'
NormalizedReadcount = 'normalized_readcount'
NormalizedReadcountWChildren = 'normalized_readcount_w_children'
PropClassified = 'prop_classified'
PropClassifiedWChildren = 'prop_classified_w_children'
PropReadcount = 'prop_readcount'
PropReadcountWChildren = 'prop_readcount_w_children'
Readcount = 'readcount'
ReadcountWChildren = 'readcount_w_children'
property display_name: str

Returns the human-readable name used for this metric. Useful for plotting and exports.

property dtype

Returns the Python data type used to store this metric in a Numpy array or Pandas DataFrame.

property includes_children: bool

Returns True if this metric aggregates over its own taxonomic descendants (children).

property is_abundance_metric: bool

Returns True if this metric is an abundance metric (Abundance or AbundanceWChildren).

property is_normalized: bool

Return true if the metric has been normalized (ie proportionalized) in some way.

property results_key

Return the key used to fetch the raw value for this metric in Classifications.results.

Rank

class onecodex.lib.enums.Rank(*values)

A taxonomic rank.

Auto = 'auto'
Class = 'class'
Family = 'family'
Genus = 'genus'
Kingdom = 'kingdom'
Order = 'order'
Phylum = 'phylum'
Species = 'species'
Superkingdom = 'superkingdom'

Alpha & Beta Diversity

AlphaDiversityMetric

class onecodex.lib.enums.AlphaDiversityMetric(*values)

Supported alpha-diversity metrics.

Chao1 = 'chao1'
ObservedTaxa = 'observed_taxa'
Shannon = 'shannon'
Simpson = 'simpson'

BetaDiversityMetric

class onecodex.lib.enums.BetaDiversityMetric(*values)

Supported beta-diversity metrics.

Aitchison = 'aitchison'
BrayCurtis = 'braycurtis'
CityBlock = 'cityblock'
Euclidean = 'euclidean'
Jaccard = 'jaccard'
Manhattan = 'manhattan'
UnweightedUnifrac = 'unweighted_unifrac'
WeightedUnifrac = 'weighted_unifrac'

Linkage

class onecodex.lib.enums.Linkage(*values)

Clustering linkages used for distance plots.

Average = 'average'
Centroid = 'centroid'
Complete = 'complete'
Median = 'median'
Single = 'single'
Weighted = 'weighted'

OrdinationMethod

class onecodex.lib.enums.OrdinationMethod(*values)

Ordination methods supported by distance plotting methods.

Pcoa = 'pcoa'
Smacof = 'smacof'

Functional Profiles

FunctionalAnnotations

class onecodex.lib.enums.FunctionalAnnotations(*values)

Types of functional annotations.

Ec = 'ec'
EggNog = 'eggnog'
Go = 'go'
Ko = 'ko'
MetaCyc = 'metacyc'
Pathways = 'pathways'
Pfam = 'pfam'
Reaction = 'reaction'

FunctionalAnnotationsMetric

class onecodex.lib.enums.FunctionalAnnotationsMetric(*values)

Metrics used to quantify functional annotations.

Abundance = 'abundance'
CompleteAbundance = 'complete_abundance'
Coverage = 'coverage'
Cpm = 'cpm'
Rpk = 'rpk'