MAP Inference

bvas.map.map_inference(Y, Gamma, mutations, tau_reg)[source]

Use Maximum A Posteriori (MAP) inference and a diffusion-based likelihood to infer selection effects from genomic surveillance data. See reference [1] for details.

References:

[1] “Inferring effects of mutations on SARS-CoV-2 transmission from genomic surveillance data,” Brian Lee, Muhammad Saqib Sohail, Elizabeth Finney, Syed Faraz Ahmed, Ahmed Abdul Quadeer, Matthew R. McKay, John P. Barton.

Parameters:
  • Y (torch.Tensor) – A vector of shape (A,) that encodes integrated alelle frequency increments for each allele and where A is the number of alleles.

  • Gamma (torch.Tensor) – A matrix of shape (A, A) that encodes information about second moments of allele frequencies.

  • mutations (list) – A list of strings of length A that encodes the names of the A alleles in Y.

  • tau_reg (float) – A positive float tau_reg that serves as the regularizer in MAP inference along the lines of ridge regression. Note that this quantity is called gamma in reference [1].

Returns pandas.DataFrame:

Returns a pandas.DataFrame containing results of inference.