Experiment.subsample_count(total, replace=False, inplace=False, random_seed=None)[source]¶Randomly subsample each sample to the same number of counts.
Warning
This function will change the Experiment.data
object from sparse to dense. The input Experiment object
should not have been normalized by total sum and its data
should be discrete count. The samples that have few total count
than total will be dropped.
Note
This function may not work on Windows OS. It relies on
the skbio.stats.subsample_counts() which have
ValueError: Buffer dtype mismatch, expected ‘int64_t’ but got
‘long’ in _subsample_counts_without_replacement function of
skbio/stats/__subsample.pyx
| Parameters: |
|
|---|---|
| Returns: | The subsampled experiment. |
| Return type: |
See also
skbio.stats.subsample_counts()