API#
Preprocessing#
|
Add metadata to an AnnData object while checking for matching indices or shape |
|
Filter based on metadata |
|
Filter features based on missing values. |
|
Scale and center data. |
|
Logarithmize a data matrix. |
|
Detect special values such as NaN, zero, negative, and infinite values in the data. |
|
Normalize measured counts per sample |
|
Impute missing values in each column by random sampling from a gaussian distribution. |
|
Impute missing values using median imputation |
|
Impute missing values using median imputation |
|
Impute missing values using Bayesian Principal Component Analysis (BPCA) |
|
Correct batch effects using the ComBat method []. |
Tools#
|
Reannotate protein groups with gene names from a FASTA input. |
|
Map gene names to protein groups using the provided id2gene_map mapping |
|
Apply Benjamini-Hochberg correction with NaN-safe handling. |
|
NaN-safe wrapper around scipy.stats.ttest_ind. |
|
Calculate ratios of features between two specific groups using t-test. |
|
Calculate differential expression using AlphaQuant. |
|
Principal component analysis []. |
|
Bayesian Principal Component Analysis |
|
Run Limma eBayes moderated ttest for differential expression. |
|
Extract PCA data required for PCA plotting from an AnnData object. |
Prepare the gene loadings (1d) of a PC for plotting. |
|
Prepare a DataFrame with PCA feature loadings for the 2D plotting. |
|
|
Prepare scree plot data from AnnData object. |
Prepare the gene loadings (1d) of a PC for plotting. |
Metrics#
|
Coefficient of variation |
Compute principal component regression (PCR) score. |
|
Compute pooled coefficient of variation within sample groups. |
|
Compute pooled median absolute deviation (PMAD) within sample groups. |
|
|
Calculate all QC metrics and add them to adata.obs. |
|
Calculate the fraction of detected values per observation or per feature. |
|
Count the number of detected features per observation or detected observations per feature. |
|
Calculate sum of intensity per observation or per feature. |
Plotting#
|
Class for creating figures with matplotlib |
|
Add vertical or horizontal reference lines to a plot |
|
Add labels to a 2D axes object |
Continuous colormaps for alphapepttools plots |
|
Default color palette for alphapepttools plots |
|
Discrete color palettes for alphapepttools plots |
|
|
Flexibly add a legend to axes with automatic color assignment |
|
Add a legend with patches to an axes, using config defaults for font sizes |
|
Create a figure with a specified number of rows and columns |
|
Apply formatted labels and optional enumeration to a matplotlib axes object |
|
Save a figure in a publication-friendly format |
|
Map categorical values to colors |
IO#
Reader functions#
|
Read peptide spectrum match tables to the |
|
Read protein group table to the |
|
Factory class to convert AlphaBase PSM DataFrames to AnnData format. |
|
Get a list of all available readers, as provided by alphabase |
Data#
Example data that can be accessed with the package.
List all available proteomics studies |
|
|
Download data from a specific study |