FrequencyTable¶
- class FrequencyTable(frequency, skipcols=None, allow_nan=False, **kwargs)[source]¶
An essential class for handling frequency data.
Constructor for
FrequencyTable- Parameters
frequency (Union[pandas.core.frame.DataFrame, str]) – Data containing frequency data.
skipcols (Union[Sequence[Union[int, str]], str, int]) – Columns to skip when processing data.
allow_nan (bool) – Allow NA/NaN values or raise an error.
kwargs – Remaining parameters passed to
read_csv()orbiomloader
Attributes
any_nanIs there nan values present?
controllerActive essentials controller instance.
dataPandas dataframe of FrequencyTable
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 axis.
xsidSample axis.
Methods
copy()Copy of the instance.
drop_features_by_id(ids)Drop features by ids
Drop features that has no counts.
drop_samples_by_id(ids)Drop samples by ids
export(output_fp, *args[, _add_ext, sep])Exports the sample metadata content into the specified file.
from_biom(filepath, **kwargs)Factory method to construct a
FrequencyTablefrombiomfile.from_csv(filepath, **kwargs)Factory method to construct a
FrequencyTablefrom CSV file.get_feature_ids([dtype])This function and its sample twin is a rescue method to fix RepPhylogeny index problem.
get_sample_ids([dtype])This function and its sample twin is a rescue method to fix RepPhylogeny index problem.
get_subset([rids, sids])Get subset of the
FrequencyTable.merge_features_by_map(mapping[, aggfunc])Merge features by mapping
merge_samples_by_map(mapping[, aggfunc])Merge samples by mapping
rename_samples(mapper)Rename sample names.
replace_nan_with(value)Replace NaN values with value.
Transform absolute counts to relative.