API reference

Every public name exported from pylimma has an entry below; every entry below resolves to a public attribute on the top-level pylimma module. If the two lists ever disagree that is a bug - file an issue.

Linear modelling

pylimma.lm_fit(data[, design, ndups, ...])

Fit linear models to expression data.

pylimma.gls_series(M[, design, ndups, ...])

Fit linear model for each gene using generalized least squares.

pylimma.mrlm(M[, design, ndups, spacing, ...])

Robustly fit linear model for each gene using M-estimation.

pylimma.contrasts_fit(data[, contrasts, ...])

Apply contrast matrix to a fitted model.

pylimma.make_contrasts(*contrasts_args[, ...])

Construct a contrast matrix from contrast expressions.

pylimma.model_matrix(formula, data)

Create a design matrix from a formula and data.

pylimma.e_bayes(data[, proportion, ...])

Empirical Bayes moderation of t-statistics.

pylimma.treat(data[, fc, lfc, trend, ...])

Moderated t-statistics relative to a log fold-change threshold.

pylimma.top_table(data[, coef, number, ...])

Extract a table of top-ranked genes from a linear model fit.

pylimma.top_table_f(fit[, number, genelist, ...])

Top table for multiple coefficients ranked by F-statistic.

pylimma.top_treat(fit[, coef, sort_by, ...])

Top-ranked genes after a treat() fit.

pylimma.decide_tests(data[, method, ...])

Classify genes as differentially expressed.

pylimma.classify_tests_f(fit[, cor_matrix, ...])

Use F-tests to classify vectors of t-statistics into outcomes.

pylimma.squeeze_var(var, df[, covariate, ...])

Empirical Bayes posterior variances.

pylimma.fit_f_dist(x, df1[, covariate])

Fit a scaled F-distribution to sample variances.

pylimma.fit_f_dist_robustly(x, df1[, ...])

Robust estimation of scaled F-distribution parameters.

pylimma.fit_f_dist_unequal_df1(x, df1[, ...])

Fit scaled F-distribution with unequal df1 values.

pylimma.is_fullrank(x)

Check whether a matrix has full column rank.

pylimma.non_estimable(x[, coef_names])

Check for non-estimable coefficients in a design matrix.

Voom and RNA-seq

pylimma.voom(counts[, design, lib_size, ...])

Transform RNA-seq counts for linear modelling with mean-variance weighting.

pylimma.voom_with_quality_weights(counts[, ...])

voom transformation with sample-specific quality weights.

pylimma.vooma(y[, design, block, ...])

voom-like weights for non-count expression data.

pylimma.vooma_lm_fit(y[, design, ...])

Combined vooma + lmFit with iterative refinement.

Normalisation and batch

pylimma.normalize_between_arrays(object[, ...])

Normalize columns of an expression matrix between arrays.

pylimma.normalize_quantiles(A[, ties])

Quantile-normalize columns of a matrix.

pylimma.normalize_median_values(x)

Scale columns so they have the same median.

pylimma.normalize_cyclic_loess(x[, weights, ...])

Cyclic LOESS normalisation of columns of a matrix.

pylimma.background_correct(object[, ...])

Background-correct a single-channel intensity matrix or EList.

pylimma.normexp_fit(x[, method, n_pts, trace])

Estimate parameters of the normal + exponential convolution model.

pylimma.normexp_signal(par, x)

Expected value of signal given foreground under the normal + exponential convolution model.

pylimma.aver_arrays(x[, id, weights])

Average over technical-replicate columns.

pylimma.remove_batch_effect(x[, batch, ...])

Remove batch effects from a matrix of expression values.

pylimma.wsva(y, design[, n_sv, ...])

Weighted surrogate variable analysis.

Duplicates, weights, correlation

pylimma.duplicate_correlation(M[, design, ...])

Estimate correlation between duplicate spots or blocked samples.

pylimma.ave_dups(x[, ndups, spacing, weights])

Average over duplicate spots.

pylimma.avereps(x[, ID])

Average over irregular replicate probes.

pylimma.array_weights(object[, design, ...])

Estimate relative quality weights for each array/sample.

pylimma.array_weights_quick(y, fit, *[, layer])

Compute approximate array quality weights from a linear model fit.

Gene set testing

pylimma.ids2indices(gene_sets, identifiers)

Map named gene sets of identifier strings to zero-based integer indices.

pylimma.roast(y[, index, design, contrast, ...])

Rotation gene-set test (single set).

pylimma.mroast(y, index[, design, contrast, ...])

Rotation gene-set test over many sets.

pylimma.fry(y[, index, design, contrast, ...])

Fast closed-form limit of roast (nrot -> Inf with df.prior=Inf).

pylimma.camera(y, index[, design, contrast, ...])

Competitive gene-set test with inter-gene correlation.

pylimma.camera_pr(statistic, index[, ...])

Pre-ranked competitive gene-set test.

pylimma.inter_gene_correlation(y, design)

Variance-inflation factor and inter-gene correlation.

pylimma.romer(y, index[, design, contrast, ...])

Rotation mean-rank gene-set enrichment analysis.

pylimma.gene_set_test(index, statistics[, ...])

Competitive gene-set test.

pylimma.rank_sum_test_with_correlation(...)

Wilcoxon rank-sum test with an inter-gene correlation adjustment.

GO / KEGG enrichment

pylimma.goana(de, gene_pathway[, universe, ...])

Gene-ontology over-representation analysis.

pylimma.top_go(results[, ontology, sort, ...])

Extract the top GO terms from a goana() result.

pylimma.kegga(de, gene_pathway[, ...])

KEGG pathway over-representation analysis.

pylimma.top_kegg(results[, sort, number, ...])

Extract the top KEGG pathways from a kegga() result.

pylimma.goana_trend(index_de, covariate[, ...])

Estimate per-gene DE probability from a covariate.

Statistical utilities

pylimma.qqt(y[, df, plot_it])

Student's t probability plot (Q-Q plot).

pylimma.zscore_t(x, df[, approx, method])

Z-score equivalents of t-statistics.

pylimma.tricube_moving_average(x[, span, power])

Moving average filter with tricube weights for a time series.

pylimma.convest(p[, niter, plot, report, ...])

Estimate pi0 using a convex decreasing density estimate.

pylimma.prop_true_null(p[, method, nbins])

Estimate the proportion of null p-values.

pylimma.detection_p_values(x, status[, negctrl])

Detection p-values from negative controls.

pylimma.weighted_lowess(x, y[, weights, ...])

Weighted LOWESS smoother - R-compatible entry point.

pylimma.au_roc(truth[, stat])

Area under the empirical ROC curve.

Model selection and mixture models

pylimma.select_model(y, design_list[, ...])

Gene-wise model comparison via AIC, BIC, or Mallows' Cp.

pylimma.fitmixture(log2e, mixprop[, niter, ...])

Fit a mixture model by non-linear least squares.

pylimma.genas(fit[, coef, subset, plot, ...])

Estimate the biological correlation between two contrasts.

pylimma.pred_fcm(fit[, coef, ...])

Predictive (empirical-Bayes shrunken) fold changes.

Splicing

pylimma.diff_splice(fit, geneid[, exonid, ...])

Test for differential exon usage from an exon-level fit.

pylimma.top_splice(fit[, coef, test, ...])

Top-ranked splicing results from a diff_splice fit.

pylimma.plot_splice(fit[, coef, geneid, ...])

Plot exons or isoforms of a chosen gene.

Plotting

pylimma.plot_with_highlights(x, y[, status, ...])

Scatterplot with colour/size highlighting for special groups of points.

pylimma.plot_ma(object[, array, coef, xlab, ...])

MA plot for a matrix, EList, or MArrayLM.

pylimma.plot_md(object[, column, coef, ...])

Mean-difference plot.

pylimma.volcano_plot(fit[, coef, style, ...])

Volcano plot of log-fold-change vs significance.

pylimma.plot_sa(fit[, xlab, ylab, ...])

Sigma vs Amean plot.

pylimma.plot_densities(object[, log, group, ...])

Kernel-density plots of sample intensities.

pylimma.plot_mds(x[, top, labels, pch, cex, ...])

Multidimensional-scaling plot.

pylimma.venn_counts(x[, include])

Cross-tabulate significance indicators.

pylimma.venn_diagram(object[, include, ...])

2- or 3-circle Venn diagram.

pylimma.coolmap(x[, cluster_by, col, ...])

Clustered heatmap with log2-expression colour scheme.

pylimma.barcode_plot(statistics[, index, ...])

Barcode plot of one or two gene sets.

Data classes and dispatchers

pylimma.EList([data])

Expression-list container (Python equivalent of R limma's EList).

pylimma.MArrayLM([data])

Linear-model-fit container (Python equivalent of R limma's MArrayLM).

pylimma.get_eawp(obj, *[, layer, weights_layer])

Polymorphic input dispatcher - port of R limma's getEAWP().

pylimma.put_eawp(slots, original, *[, ...])

Polymorphic output dispatcher - package a result in a form matching the original input's class.