rnalysis.filtering.CountFilter.split_by_principal_components
- CountFilter.split_by_principal_components(components: PositiveInt | List[PositiveInt], gene_fraction: Fraction = 0.1, power_transform: Literal['box-cox', 'log', 'none'] = 'box-cox') Tuple[CountFilter, CountFilter] | Tuple[Tuple[CountFilter, CountFilter], ...]
Performs Principal Component Analysis (PCA), and split the table based on the contribution (loadings) of genes to specific Principal Components. For each Principal Component specified, RNAlysis will find the X% most influential genes on the Principal Component based on their loadings (where X is gene_fraction), (X/2)% from the top and (X/2)% from the bottom. This type of analysis can help you understand which genes contribute the most to each principal component.
- Parameters:
components (int or list of integers) – the Principal Components the table should be filtered by. Each Principal Component will be analyzed separately.
gene_fraction (float between 0 and 1 (default=0.1)) – the total fraction of top influential genes that will be returned. For example, if gene_fraction=0.1, RNAlysis will return the top and bottom 5% of genes based on their loadings for any principal component.
power_transform ('box-cox', 'log', or 'none' (default='box-cox')) – the transformation applied to the data before it is standardized and analyzed. ‘box-cox’ (the default) fits a separate power transform to every gene, which usually makes the data more normally distributed; it can be numerically unstable for a gene whose values are near-constant at a high magnitude (a reporter transgene, for example), in which case RNAlysis will tell you which genes to filter out. ‘log’ applies log2(x+1) to every value - simpler, and never unstable. ‘none’ standardizes the data without transforming it first. The legacy values True (‘box-cox’) and False (‘none’) are still accepted.