Welcome to MATCHER’s documentation!¶
Installation
MATCHER is on the Python package index (PyPI). To install it using pip, simply type:
pip install pymatcher
MATCHER Input
MATCHER takes in single cell datasets as Numpy ndarrays (produced by the genfromtxt function in the Numpy package, for example). Each row should contain the measured values for a single cell, and each column should contain the values of a feature across cells. See the sample data files and the Jupyter notebook included with the package for more details.
-
class
matcher.
MATCHER
(X, num_inducing=10)[source]¶ Manifold Alignment to Characterize Experimental Relationships (MATCHER)
Parameters: - X (list, possibly nested) – One or more single cell datasets. To learn a joint trajectory from two datasets with known correspondences, add a second level list.
- num_inducing – Number of “inducing inputs” to use in variational approximation
-
correlation
(model1, model2, inds1, inds2, method=’Spearman’)[source]¶ Approximate correlation between the specified features of two different data types.
Parameters: - model1 (int) – Index of first data type
- model2 (int) – Index of second data type
- inds1 (list) – Indices of features
- inds2 (list) – Indices of features
- method (string) – Type of correlation coefficient to compute (“Spearman” or “Pearson”)
Returns: Correlation matrix
Rytpe: 2D array
-
find_markers
(inds, fdr_correction=True)[source]¶ Find features that are significantly related to pseudotime from each specified data type.
Parameters: - inds (list) – Indices of data types to use
- fdr_correction (bool) – Perform multiple hypothesis test correction to control FDR?
Returns: list of indices for each data type
Return type: list of lists
-
infer
(quantiles=50, method=None, reverse=None)[source]¶ Infer pseudotime and master time values.
Parameters: - quantiles (list of booleans) – How many quantiles to use when computing warp functions
- method (list of strings) – Gaussian process regression or linear interpolation?
- reverse – Reverse pseudotime?
-
plot_feature
(model_ind, feature_ind)[source]¶ Plot the specified feature and its model fit
Parameters: - model_ind (int) – Index for data type
- feature_ind (int) – Index of feature
-
plot_master_time
(inds)[source]¶ Plot inferred master time values and uncertainty for models specified by inds.
Parameters: inds (list) – Indices of data types
-
plot_warp_functions
(inds)[source]¶ Plot the functions for each data type that map from domain-specific pseudotime to master time.
Parameters: inds (list) – Indices of data types
-
sample_master_time
(ind, samples=10)[source]¶ Sample from the posterior for the inferred master time values for the specified model.
Parameters: - ind (int) – Index of model to sample
- samples (int) – Number of samples
Returns: Posterior samples from inferred master_time values for each cell
Return type: SxN array, where S is the number of samples and N is the number of cells
-
class
matcher.
WarpFunction
(t, quantiles=50, method=’gp’, reverse=False)[source]¶ Class to learn a (possibly nonlinear) function warping from observed distribution to uniform (0,1) distribution and back.
Parameters: - t (Nx1 array of float) – pseudotime values
- quantiles (integer) – Number of quantiles to use in learning warp
- method (string) – Gaussian process regression or linear interpolation?
- reverse (boolean) – Reverse uniform quantiles before warping?