rnalysis.filtering.CountFilter.biotypes_from_ref_table

CountFilter.biotypes_from_ref_table(long_format: bool = False, ref: Union[str, Path, Literal['predefined']] = 'predefined') DataFrame

Returns a DataFrame describing the biotypes in the table and their count. The data about feature biotypes is drawn from a Biotype Reference Table supplied by the user.

:param long_format:if True, returns a short-form DataFrame, which states the biotypes in the Filter object and their count. Otherwise, returns a long-form DataFrame, which also provides descriptive statistics of each column per biotype. :param ref: Name of the biotype reference table used to determine biotype. Default is ce11 (included in the package). :rtype: pandas.DataFrame :returns: a pandas DataFrame showing the number of values belonging to each biotype, as well as additional descriptive statistics of format==’long’.

Examples
>>> from rnalysis import filtering
>>> d = filtering.Filter("tests/test_files/test_deseq.csv")
>>> # short-form view
>>> d.biotypes_from_ref_table(ref='tests/biotype_ref_table_for_tests.csv')
                gene
biotype
protein_coding    26
pseudogene         1
unknown            1
>>> # long-form view
>>> d.biotypes_from_ref_table(long_format=True,ref='tests/biotype_ref_table_for_tests.csv')
               baseMean               ...           padj
                  count         mean  ...            75%            max
biotype                               ...
protein_coding     26.0  1823.089609  ...   1.005060e-90   9.290000e-68
pseudogene          1.0  2688.043701  ...   1.800000e-94   1.800000e-94
unknown             1.0  2085.995094  ...  3.070000e-152  3.070000e-152

[3 rows x 48 columns]