Richard Barnes

Richard Barnes

Scientist. Developer. Tinkerer.

GitHub LinkedIn Stack Overflow Google Scholar ResearchGate Blog

I develop high-performance algorithms for investigating big data problems in society and the environment.

Skip to content
Tyramine content of foods

Caveat to this post. Only a few groups of people really need to think about tyramine: those on MAOI antidepressants and those on certain antibiotics including linezolid and furazolidone.

Background

Tyramine results from bacteria eating protein. Specifically, tyrosine, an amino acid common to protein-rich foods, gets its carboxyl group snipped off by microbes, and the leftover is tyramine. Thus, the more bacterial protein breakdown a food has gone through, the higher its tyramine content will be. Fresh foods are safe while aged, fermented, cured, and spoiled foods all have higher levels.

When you ingest tyramine an enzyme called monoamine oxidase (MAO) destroys it in your gut before it reaches your blood stream. When MAOI antidepressants and antibiotics block that enzyme, tyramine gets into the blood stream inducing norepinephrine release. This causes blood pressure to spike high enough that it can cause a "hypertensive crisis".1

Antibiotics that can cause tyramine issues:

  • linezolid (Zyvox)2 — yes. A reversible, non-selective MAO inhibitor; a significant blood-pressure response appears at tyramine doses over 100 mg, so the label warns against tyramine-rich foods.
  • furazolidone (Furoxone)3 — yes, but cumulative. The MAO-inhibiting effect builds over days: roughly 5 days of dosing raises tyramine sensitivity about 2–3 fold.
  • tedizolid (Sivextro)4 — unlikely. A reversible MAO inhibitor in vitro but weak in practice: the tyramine dose needed to push systolic blood pressure up 30 mmHg fell only from 425 mg (placebo) to 325 mg, so it generally needs no dietary caution.

Danger zones:

  • 600 mg for a healthy person not on any MAOI5
  • ~325 mg the median tyramine dose that provokes a pressor response on tedizolid (Sivextro) — several times more than any normal meal delivers, which is why it needs no dietary caution4
  • ~100 mg Linezolid's FDA labelling 2
  • 50 mg for someone on a newer (third-generation) MAOI5
  • 6 mg for someone on a classic irreversible MAOI like phenelzine or tranylcypromine5

For the classic MAOIs a dose–response framing is similar6: ~6 mg starts mild symptoms, 10–25 mg risks a severe reaction, and the average un-medicated person tolerates 200–800 mg before their blood pressure changes.

Also note: tyramine levels in food have decreased over time. Non-decarboxylating starter cultures and refrigeration mean today's supermarket cheddar, salami, and soy sauce carry a fraction of the tyramine of the mid-century samples that produced terrifying guidance in the past7.

The tables

Each table lists tyramine in milligrams per kilogram (mg/kg), which is the same as µg/g, and is how the food-chemistry literature reports it. For a sense of scale, 1 oz ≈ 28 g, so a 1 oz slice of cheese at 250 mg/kg delivers about 7 mg of tyramine — already over the MAOI ceiling.

The three Safe columns estimate whether a typical serving (1 oz cheese, 1 oz cured meat, 1 tbsp sauce or paste, 12 oz beer, 5 oz wine, 4 oz sauerkraut) is okay for three different situations, each with its own per-meal tyramine ceiling:

  • Safe old MAOI. 6 mg/meal limit. — classic irreversible MAOIs (phenelzine, tranylcypromine, isocarboxazid). Ceiling ~6 mg/meal.
  • Safe new MAOI. 50 mg/meal limit. — third-generation / reversible MAOIs and higher-dose transdermal selegiline.
  • Safe on AB. 100 mg/meal limit. — the antibiotic linezolid (and furazolidone).

Because almost nobody eats exactly one bite, I've kept a ~3× margin of safety in each column:

  • Yes — three servings still fit under that column's ceiling (roughly < 2 / < 17 / < 33 mg per serving).
  • Maybe — one serving is usually fine, but more than one approaches the ceiling, or the food is variable enough that a bad batch could exceed it (roughly 2–6 / 17–50 / 33–100 mg per serving).
  • No — one serving alone can blow past the ceiling (roughly > 6 / > 50 / > 100 mg per serving).

Remember, a high mg/kg number is harmless if you eat very little (soy sauce, yeast extract by the teaspoon), while a moderate number eaten in quantity (cheese, sauerkraut) can still get you. The Safe columns account for serving size; the mg/kg column does not.

Cheese

Aged cheese is the single most important high-tyramine food, and tyramine can't be guessed from taste, smell, or variety — it tracks aging and protein breakdown. The same cheese name spans orders of magnitude depending on how it was made and how long it sat; a 2024 systematic review found cheese tyramine ranging from 3.2 to 1,398 mg/kg8.

Cheese Tyramine (mg/kg) Safe old MAOI Safe new MAOI Safe on AB Notes
Fresh / unripened (cottage, cream, ricotta, fresh mozzarella, mascarpone) ~0 (not detected)9 Yes Yes Yes No aging, no protein breakdown, no tyramine
Gorgonzola 810
~0.2 mg/oz
Yes Yes Yes Low in the sampled batch — but blue cheeses vary widely (see below)
Tilsit 3211
~0.9 mg/oz
Yes Yes Yes
Appenzeller 5511
~1.6 mg/oz
Yes Yes Yes
Brie ND–26011
~0–7.4 mg/oz
No Yes Yes Surface mould ferments most residual lactose and protein
Camembert 3711
~1 mg/oz
Yes Yes Yes
Limburger (soft-ripened) 1209
~3.4 mg/oz
Maybe Yes Yes Short ripening and rising pH hold these down despite the pungent smell
Muenster (soft-ripened) 1409
~4 mg/oz
Maybe Yes Yes
Parmigiano-Reggiano up to ~147 (<150)12
~4.2 mg/oz
Maybe Yes Yes
Grana Padano up to ~12912
~3.7 mg/oz
Maybe Yes Yes
Asiago 29–3412
~0.8–1 mg/oz
Yes Yes Yes
Caciocavallo 29–3412
~0.8–1 mg/oz
Yes Yes Yes
Fontina 71–8012
~2.3 mg/oz
Maybe Yes Yes
Taleggio 71–8012
~2.3 mg/oz
Maybe Yes Yes
Provolone 8712
~2.5 mg/oz
Maybe Yes Yes
Pecorino Romano 11712
~3.3 mg/oz
Maybe Yes Yes
Mish (aged Egyptian) up to 19013
up to ~5.4 mg/oz
Maybe Yes Yes
Cheddar (commercial / young) 210–2709
~6–7.7 mg/oz
No Yes Yes Right at the line
Colby up to 5609
up to ~16 mg/oz
No Yes Yes
Gouda (young / commercial) 20–67011
~0.6–19 mg/oz
No Maybe Yes Young examples are far lower, but aged Gouda runs high
Gruyère 3711
~1 mg/oz
Yes Yes Yes
Leerdammer ND11 Yes Yes Yes
Edam 13.5–31010 11
~0.4–8.8 mg/oz
No Yes Yes
Cheddar (extra-sharp / aged) up to 7009
up to ~20 mg/oz
No Maybe Yes Aging drives tyramine up
Emmental ~17–13012 11
~0.5–3.7 mg/oz
Maybe Yes Yes Genuine Emmental is modest
Swiss cheese (US domestic) avg ~410, up to ~1,8009
~12–51 mg/oz
No No Maybe 1974 US survey; one sample reached 1,800 — modern Emmental is far lower
Feta (aged, brined) 152–24611
~4.3–7 mg/oz
No Yes Yes
Blue cheese (domestic) ~360, up to ~1,4009 8
~10–40 mg/oz
No Maybe Maybe The highest common category
Roquefort 27–1,10011 10 9
~0.8–31 mg/oz
No Maybe Yes Very batch-dependent
Stilton 4609
~13 mg/oz
No Yes Yes Single 1974 sample
Highly aged artisanal up to ~1,4008 14
up to ~40 mg/oz
No Maybe Maybe Avoid entirely on a classic MAOI; cave-ripened "fossa" styles can run even higher
Goat cheese 0–70 (one aged Italian 2,000)7
~0–2 mg/oz
Yes Yes Yes Fresh ~0–12, rising to ~55–70 by 90 days7; a single aged sample reached 2,000
Pecorino (artisan, various regions) 45–475 (one ~1,300)7
~1.3–13 mg/oz
No Yes Yes Wider than the Pecorino Romano above; artisan styles vary a lot
Hard-ripened cheese (raw vs pasteurised milk) raw 0–302; pasteurised 0–1647
raw ~0–8.6; pasteurised ~0–4.6 mg/oz
No Yes Yes Raw-milk versions run roughly double their pasteurised equivalents
Acid-curd / sour-milk cheese (Harzer, Steirerkäse) median ~30, up to ~2,0007
median ~0.8 mg/oz, up to ~57
No No Maybe A crumble-textured Steirerkäse sample reached 2,000
Processed cheese (slices, blocks) ~100–200 (some retail up to 800)7
~2.8–5.7 mg/oz (retail up to ~23)
No Maybe Yes Mean ~200 for cheddar styles, ~100 for Gouda styles
Cheese spread little–407
up to ~1.1 mg/oz
Yes Yes Yes Vintage-cheese spreads sit at the top of the range
read more →
Kayaking Tomales Bay in search of bioluminescence

tl;dr There are a bunch of planning tools near the bottom of the post.

Tomales Bay is one of the best places in California to kayak through bioluminescent plankton, but you can only see it if three things align: it has to be dark enough (moon below the horizon), late enough (after full darkness), and the right season (late spring through fall when dinoflagellate populations peak). What follows is a trip report followed by some planning tools for your own trip.

Sunset over Tomales Bay from the east shore

The First Trip — September 23–24, 2022

We reserved Boat Site B at Point Reyes National Seashore Campground, a group site on the west shore of Tomales Bay at Marshall Beach, accessible only by water.

Map showing Marshall Beach campsite location on the west shore of Tomales Bay

The original plan was to park overnight at, and launch from, Miller Boat Launch on the east shore and paddle across to camp.

Miller Boat Launch on the east shore of Tomales Bay

Straight-line, the route is about 1.78 miles.

Kayak route of 1.78 miles along the east shore to the campsite

By timing the crossing for slack tide, though, we could have cut straight across the Bay — only about 4,500 feet — and then head southeast along the shore to the camp site. This would have minimized exposure to open water risks.

Direct crossing of Tomales Bay: 4,493 feet

But, in planning this, I chickened out a bit. The group included people with variable kayaking experience and high afternoon winds can lead to large waves on the Bay, so we instead launched from Chicken Ranch Beach to the south, and paddled 5.29 miles along the shore so that there'd be an easy way to bail if things went wrong. This choice brought us into Type II Fun territory.

Route from Inverness launch to campsite: 5.29 miles

Kayaks loaded and ready at the launch point

Launching from Miller Boat Launch in the late afternoon

Group paddling across Tomales Bay toward the campsite

I chose the date to maximize darkness. Moonset on September 23 was at 6:19 PM — well before sunset — leaving the whole evening dark. (The planner below includes all this information in an easy-to-use form.)

Moon position chart for September 23, 2022: moonset at 6:19 PM, 5.5% illumination

In addition, civil twilight ended at 7:39 PM, nautical twilight at 8:06 PM, and astronomical twilight at 8:33 PM.

Sun and twilight times for September 23–24, 2022

Winds pick up in the afternoons so launching before noon is recommended and, in fact, local outfitters won't rent kayaks after noon even though winds tend to drop off again later in the day. Given the tide and light, starting around 4:00 PM during slack tide should have given enough time to paddle and set up camp before dark.

However, due to folks' work schedules, we weren't able to get onto the water until 5:12 PM (a vanguard from our group acquired the kayaks). This meant meant fighting the incoming tide that started at 5:53 PM on the 23rd. But not just the tide! Also that wind. The result was a brutal, soaking paddle. We got to camp at 7:17 PM, so the trip took about two hours.

On the way out we didn't time it much better and got on the water at 11:25 AM to fight the outgoing tide on our way back. The winds were calm and the paddling was much easier than the day before. We took it slow and arrived at 1:18 PM, so the trip took about two hours.

NOAA tide chart for Tomales Bay, September 23–24, 2022

Most beaches on the west shore are tidally dependent and will disappear at tides above 5 ft. Since September 23 had a high tide of 5.28 ft at 11:11 PM, we needed to set up camp well above the waterline.

Campsite at Marshall Beach as dusk falls

Cold and wet, some members of the trip retreated to tents immediately to get warm and no one was up for venturing back out again into the dark. The fabled bioluminescence didn't show itself in the bay near our tents.

But the weekend wasn't a wash. Our visit corresponded with the annual campout of the Traditional Small Craft Association. They played folk music by their fire well into the night.

Sunrise over Tomales Bay from the beach

Morning view from inside the tent looking out at the bay

Campsite in the morning light with TSCA boats on the water

The next morning we went hiking up and around our mini-bay.

Morning hike along the trail above Marshall Beach

Wooded trail through the trees on the morning hike

It took a while, so we investigated climbing across the cliffs to get back to camp.

Rocky shoreline at low tide below the cliffs

But were spared that adventure by the TCSA coming over in one of their boats!

A TSCA sailboat launching from the cove

Crew aboard a TSCA sailboat

View from a TSCA sailboat looking back at the campsite

Heading out from camp for the return crossing

The Second Trip — October 6–7, 2023

I returned a year later with a friend to try again. Blue Waters normally rents sit-on-top kayaks, but as a former kayak guide I was able to get a lighter enclosed double. This time we used the Miller Boat Launch. The winds were, by luck, exceptionally calm when we got on the water at 3:30 PM. By 4:39 PM we'd successfully crossed to the opposite shore and were making our way along it and by 5:47 PM we had our tent set up at Tomales Beach (which is closer to Miller than Marshall Beach).

Red kayaks and gear at the launch point

Paddling across the open bay

Paddling past a rocky headland on the west shore

Dinner cooking on camp stove at the beach as the sun sets over the bay

After dark, we got back on the water and kayaked from Tomales Beach up to White Gulch Beach - which is in a deep bay directly west of Hog Island. We found bioluminescence the whole way, and it was incredible. Every paddle stroke lit up the waters and disturbed kelp shot lightning bolts away from us.

Night paddle through bioluminescent water

read more →
Lactose content of dairy products

Caveat to this post. There are several different ways to be dairy sensitive and lactose intolerance is only one of them. If you're eating dairy products that are supposed to be lactose-free and still having reactions a parsimonious explanation is that the lactose is not actually the problem. I'll discuss this in a future post.

Background

Lactose tolerance is common globally. Roughly two-thirds of the world's adults stop producing lactase past childhood, and what counts as a tolerable dose varies between people. The NIH puts the typical daily threshold at about 12 g of lactose — roughly one cup of milk — without symptoms or with only mild ones1. Below that, most people are fine; above it, dose and individual sensitivity start to matter.

The lactose content of dairy products spans nearly five orders of magnitude. A wedge of aged Cheddar has almost no lactose while a spoonful of Brunost (Norwegian whey cheese) has more than half its mass in lactose. The reason: lactose is water-soluble and lives in the whey, not the curd. Anything that drains whey (cheesemaking, Greek-style yogurt straining) removes lactose and anything that ferments whey (aging, live yogurt cultures) converts it to lactic acid. Anything that concentrates whey (Brunost, ricotta, dry milk solids) also concentrates lactose.

The tables

The table below is my personal reference. I've normalized all values to grams of lactose per 100 g of product, so they're directly comparable. Each value is footnoted. Where US and non-US values differ I've tried to go with the US value since I spend most of my time in the US.

For mental conversion: 100 g is about 1 cup of milk, about 3.5 oz of cheese, or roughly 7 tablespoons of butter.

The Safe? column estimates whether a lactose-intolerant adult can comfortably consume a typical US serving (1 cup milk/yogurt, 1 oz cheese, 1 tbsp butter, 2 tbsp cream, ½ cup ice cream, ½ cup cottage cheese / ricotta) with a 3× margin of safety. Since most people, myself included, eat more than one serving at a meal, a food is really only safe if ~3 servings still fit under the ~12 g/day NIDDK threshold1:

  • Yes — < 1 g per typical serving. Three servings are still well under the 12g threshold. This is safe for nearly all lactose-intolerant adults.
  • Maybe — 1–4 g per typical serving. One serving is fine for most people; 3 servings approach or hit the threshold.
  • No — > 4 g per typical serving. Three servings clearly exceed the threshold; even one serving may cause symptoms in sensitive individuals.

Milks

Product Lactose (g/100g) Safe? Notes
Whole cow milk (3.25% fat) 4.812 No ≈ 12 g per 244 g cup1 — one cup alone hits threshold
Reduced-fat (2%) cow milk 4.692 No
Lowfat (1%) cow milk 4.862 No
Skim cow milk 5.052 No Removing fat slightly raises lactose-by-mass
Buttermilk, lowfat (cultured) 4.03 No Despite the name, US buttermilk is fermented lowfat milk
Goat milk 4.272 No
Sheep milk 4.44 No
Lactose-free milk (Lactaid-style) <0.14 Yes Lactase enzyme has hydrolyzed the lactose into glucose + galactose
Evaporated whole milk ~105 Maybe Used in small amounts (2 tbsp ≈ 3 g); a ½ cup recipe portion is "No"
Sweetened condensed milk ~125 Maybe A 2 tbsp drizzle is fine; ¼ cup in a recipe is not

Yogurts and fermented milks

Product Lactose (g/100g) Safe? Notes
Plain whole-milk yogurt 4.73 No A 6 oz container has ~8 g; live cultures pre-digest some lactose but most remains
Plain low-fat yogurt 4.03 No ~6.8 g per 6 oz container
Greek yogurt (strained, plain) ~3.06 Maybe Straining removes ~70% of the lactose into the acid whey6
Greek yogurt (nonfat, strained) ≤0.76 Yes
Kefir, plain 4.03 Maybe High raw lactose, but live yeast/bacteria reduce symptoms in lactose-intolerant people by 54–71%7 — effective dose is much lower than the raw number suggests
Skyr 2.53 Maybe Strained, like Greek yogurt
Sour cream 2.03 Yes A 2 tbsp dollop has ~0.6 g
Crème fraîche ~2.44 Yes A 2 tbsp serving has ~0.7 g

Cream and butter

Product Lactose (g/100g) Safe? Notes
Butter, salted 0.68 Yes An entire stick (113 g) has ~0.1 g9; almost all the whey has been churned out
Butter oil 0.0038 Yes
Ghee 0.00298 Yes
Heavy / whipping cream 2.53 Yes A 2 tbsp serving has ~0.75 g; more fat, less aqueous phase, less lactose
Half-and-half ~4.05 Maybe A 2 tbsp coffee splash is fine (~1.2 g); 3 splashes approach the threshold

Fresh and unripened cheeses

Product Lactose (g/100g) Safe? Notes
Cottage cheese, low-fat 1.83 Maybe A ½ cup serving has ~2 g; 3 servings = 6 g
Cream cheese 3.63 Maybe Highest of any common cheese; a 1 oz schmear has ~1 g
Ricotta (whey-based) 2.753 Maybe Made from the whey drained off other cheeses; ½ cup has ~3.4 g
Mascarpone 3.03 Yes A 1 oz serving has ~0.84 g
Chèvre, fresh (goat) 0.93 Yes A 1 oz serving has ~0.25 g
Paneer 0.0023 Yes Acid-set; the whey carries off nearly all of it
Burrata ~1.53 Maybe A mozzarella shell wrapped around a stracciatella cream filling; lactose is dominated by the filling. ~1 g per typical 1 oz serving
Stracciatella (burrata cream filling) 1.83 Maybe Sold as a stand-alone topping; eaten by the spoonful
Cheese curds, fresh 3.03 Maybe Wisconsin specialty. Unaged and unpressed, so much of the lactose remains; a small handful (~30 g) has ~1 g
Queso fresco 2.310 Maybe Fresh, unaged Mexican cheese. Crumbled on tacos at typical portions (~30 g) gives <1 g

Soft-ripened and washed-rind cheeses

Product Lactose (g/100g) Safe? Notes
Brie <0.00243 Yes Mould ripening fully ferments residual lactose
Camembert <0.00243 Yes
Limburger <0.00243 Yes
Taleggio <0.0013 Yes

Pasta filata (stretched-curd) cheeses

Product Lactose (g/100g) Safe? Notes
Mozzarella, commercial low-moisture 0.743 Yes The kind on US pizza
Mozzarella di bufala 0.353 Yes
Bocconcini (mini fresh mozzarella) <0.0013 Yes Fresh; lower lactose than commercial mozzarella because there's less moisture to retain whey
String cheese 0.743 Yes Mechanically the same product as low-moisture mozzarella; one stick (~28 g) has ~0.2 g
Oaxaca (queso Oaxaca) <0.53 Yes Mexican pasta filata cheese; USDA reports ~0 carbohydrates per serving
Provolone, dolce or piccante <0.0013 Yes
read more →
Richard's Picks

My current and previous choices for the tools I use.

read more →
How to estimate a QR code redunduncy level?

An answer to this question on Stack Overflow.

Question

I'm not a specialist, but as far as I know, a bit of information in a QR-code is coded more than once, and it is defined as the redundancy level

How can I estimate a QR-code redundancy level ? Is where an mobile app or a website where I can test my QR-code redundancy level easily ? If not, is it an easy algorithm that I can implement ?

Redundancy is sorted in different categories according to this website, but I'd like to have the direct percentage value if possible

Answer

QR codes contain a couple of bits which indicate the error correction level, as depicted below (source):

QR code redundancy level bits

read more →

See all posts →