rnalysis.filtering.CountFilter.normalize_to_rpm

CountFilter.normalize_to_rpm(inplace: bool = True, return_scaling_factors: bool = False)

Normalizes the count matrix to Reads Per Million (RPM). Divides each column in the count matrix by (total reads)*10^-6 .

Parameters
  • inplace (bool (default=True)) – If True (default), filtering will be applied to the current CountFilter object. If False, the function will return a new CountFilter instance and the current instance will not be affected.

  • return_scaling_factors (bool (default=False)) – if True, return a DataFrame containing the calculated scaling factors.

Returns

If inplace is False, returns a new instance of the Filter object.

Examples
>>> from rnalysis import filtering
>>> c = filtering.CountFilter("tests/test_files/counted.csv")
>>> c.normalize_to_rpm()

Normalized 22 features. Normalized inplace.