RepTaxonomy¶
- class RepTaxonomy(taxonomy, taxonomy_columns=None, **kwargs)[source]¶
An essential class for handling taxonomy data.
Constructor for
RepTaxonomy- Parameters
- Return type
Attributes
avail_ranksList of available taxonomic ranks.
controllerActive essentials controller instance.
dataActual data representation as pd.DataFrame.
duplicatedList of duplicated feature indices.
is_buckledIs current essentials instance is mounted or not.
is_mountedTrue if current essentials instance is mounted or not.
metadataThe essential instance metadata.
nameThe essential instance name.
shapeReturn the shape/size of the essential instance.
xridFeature indices as pd.Index.
Methods
copy()Copy of the instance.
drop_feature_by_id(ids, **kwargs)Remove features by feature ids.
drop_features_without_ranks(ranks[, any])Remove features that do not contain ranks
drop_features_without_taxa(**kwargs)Remove features that do not contain taxonomy.
export(output_fp, *args[, _add_ext, sep])Exports the taxonomy into the specified file.
find_features_by_pattern(pattern_str[, …])Searches for features with taxa that matches pattern_str
Find features without taxa.
from_biom(filepath, **kwargs)Factory method to construct a
RepTaxonomyfrombiomfile.from_csv(filepath[, taxonomy_columns])Factory method to construct a
RepTaxonomyfrom CSV file.get_feature_ids([dtype])This function and its sample twin is a rescue method to fix RepPhylogeny index problem.
get_lineage_by_id([ids, missing_rank, …])Get taxonomy lineages by feature ids.
get_subset([rids])Get subset of the
RepTaxonomy.get_taxonomy_by_id([ids])Get taxonomy
DataFrameby feature ids.merge_duplicated_features(**kwargs)Merge features with duplicated taxonomy.
merge_features_by_rank(level, **kwargs)Merge features by taxonomic rank/level.