Posts

Motifs and ILP

Image
Image generated by Gemini AI . This post is about two subjects that I worked on extensively but separately in the past: motif finding and integer linear programming (ILP). Motif finding is the problem of finding approximately repeated patterns in unaligned data. In this particular case, the patterns of interest is in nucleotide data such as DNA or RNA sequences. The repeated patterns may correspond to locations where proteins bind to regulate genes, i.e. transcription factor binding sites or other cis-regulatory sites. Today, in practice, motif finding has is usually performed by position weight matrix (PWM) tools like STREME  or Gibbs sampling , biophysical likelihood models fit to high-throughput binding data, and deep learning models . These approaches can find patters in thousands to hundreds of thousands of sequences. I won't attempt anything quite so ambitious here. Linear programming (LP) is an optimization method that maximizes or minimizes a linear objective function su...

Measles Revisited

Image
Generated by Gemini Medicine is a social science, and politics is nothing but medicine at a large scale.  ~ Rudolf Virchow, 1848 I downloaded the latest data on measles cases in the US from the CDC Measles Cases and Outbreaks site on 2026-10-16. What follows is an attempt to recreate the plots on that site using R.  I retrieved the following files:   MeaslesCasesHistory.csv - cases by year from 1962 to 2026 MeaslesCasesWeekly.csv - cases for each week from 2022 to 2026  MeaslesKindergartenVaxcovExemptions.csv. - vaccinations by state for school years 2029-10 2025-26 MeaslesCasesMap.csv - cases by state and years 2024-2026. We can use MeaslesCasesWeekly to plot the cases by week. > library (tidyverse) > df_2026_10_26 <- read_csv ( "/mnt/g/measles/data/MeaslesCasesWeekly.csv" ) > head (df_2026_10_26) # A tibble: 6 × 2 week_start cases < date > < dbl > 1 2026-10-18 28 2 2026-10-11 116 3 2026-10-04 179 4 ...