{"id":5652,"date":"2026-11-11T13:19:20","date_gmt":"2026-11-11T06:19:20","guid":{"rendered":"https:\/\/bioturing.com\/blog\/?p=5652"},"modified":"2026-11-11T14:07:00","modified_gmt":"2026-11-11T07:07:00","slug":"sesame-peanuts-a-transcript-to-cell-assignment-method-for-overlapping-cells","status":"publish","type":"post","link":"https:\/\/bioturing.com\/blog\/sesame-peanuts-a-transcript-to-cell-assignment-method-for-overlapping-cells\/","title":{"rendered":"Sesame-peanuts: A transcript-to-cell assignment method for overlapping cells"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\"><strong>1. Introduction<\/strong><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>1.1. Motivations<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">In single-cell spatial transcriptomics, most downstream analyses run on the CELL\u00d7GENE expression matrix. This matrix is built by a process called transcript-to-cell assignment, which is commonly done by giving each transcript to the cell whose polygon it falls in. But a tissue section is a 3D object imaged in 2D. Where cells overlap in depth, their transcripts also overlap, and no 2D polygon can separate them.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"533\" src=\"https:\/\/bioturing.com\/blog\/wp-content\/uploads\/2026\/11\/anh-1-1024x533.png\" alt=\"\" class=\"wp-image-5661\" style=\"aspect-ratio:1.9212350796940891;width:552px;height:auto\" srcset=\"https:\/\/bioturing.com\/blog\/wp-content\/uploads\/2026\/11\/anh-1-1024x533.png 1024w, https:\/\/bioturing.com\/blog\/wp-content\/uploads\/2026\/11\/anh-1-300x156.png 300w, https:\/\/bioturing.com\/blog\/wp-content\/uploads\/2026\/11\/anh-1-767x399.png 767w, https:\/\/bioturing.com\/blog\/wp-content\/uploads\/2026\/11\/anh-1.png 1226w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\"><strong>Figure 1.<\/strong> A crop showing macrophages sitting next to, or on top of, a sheet of tumour cells. The second image shows position of marker transcripts of the crop. Dataset: Xenium Human Lung Cancer [1]; marker genes from [2].<\/figcaption><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">Figure 1 shows the physical limit of cell segmentation. There is no cut that separates the macrophages\u2019 transcripts from the tumour\u2019s: whatever boundary we draw, it will include tumour transcripts. If we let them mix as-is, three kinds of damage follow, ordered from least to worst:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Wrong cell-type prediction.<\/strong> An immune cell that infiltrates a tumour or an inflamed tissue can have its transcripts outnumbered by those of the cells it overlaps. Its true identity is drowned, and it is mis-annotated.<\/li>\n\n\n\n<li><strong>Wrong gene expression.<\/strong> Even when the cell type comes out right, the cell\u2019s expression profile is influenced by who its neighbours are.<\/li>\n\n\n\n<li><strong>False discoveries.<\/strong> As a result of (2), a tumour gene such as CAPN8 can look up-regulated in macrophages simply because they sit next to a tumour that makes it. Differential expression tests handle dropout and over-dispersion, but they have no concept of this kind of noise, so it comes out as false positives.<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>1.2. Problem statement<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">To undo the mixing, we need to move the leaked transcripts in both directions: send the foreign transcripts inside a polygon back to the cell that made them, and give each cell back its own transcripts that landed outside its polygon. Some transcripts belong to no cell at all and should be left as background.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In other words, the goal is to link every transcript to the cell that made it (Figure 2), then produce the CELL\u00d7GENE matrix.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"420\" src=\"https:\/\/bioturing.com\/blog\/wp-content\/uploads\/2026\/11\/Untitled-design-1024x420.png\" alt=\"\" class=\"wp-image-5679\" style=\"width:673px;height:auto\" srcset=\"https:\/\/bioturing.com\/blog\/wp-content\/uploads\/2026\/11\/Untitled-design-1024x420.png 1024w, https:\/\/bioturing.com\/blog\/wp-content\/uploads\/2026\/11\/Untitled-design-300x123.png 300w, https:\/\/bioturing.com\/blog\/wp-content\/uploads\/2026\/11\/Untitled-design-766x314.png 766w, https:\/\/bioturing.com\/blog\/wp-content\/uploads\/2026\/11\/Untitled-design-1536x630.png 1536w, https:\/\/bioturing.com\/blog\/wp-content\/uploads\/2026\/11\/Untitled-design-2048x839.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\"><strong>Figure 2.<\/strong> The goal: each transcript linked to the cell that made it, or left as background (\u00d7).<\/figcaption><\/figure>\n<\/div>\n\n\n<h3 class=\"wp-block-heading\"><strong>1.3. Related works<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Two published methods also use expression to decide where transcripts belong. Neither removes the mixing.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Baysor<\/strong> [3] treats the slide as a mixture model of gene expression and transcript positions, and assigns transcripts to cells with expectation maximization. Each assignment is scored by the three factors of (1), where factor (b) is the problem: it rewards neighbouring transcripts for sharing a cell, so where two cells overlap and their transcripts are mixed, Baysor blends them into one region instead of sorting them apart.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"98\" src=\"https:\/\/bioturing.com\/blog\/wp-content\/uploads\/2026\/11\/anh-4-1024x98.png\" alt=\"\" class=\"wp-image-5664\" style=\"width:560px;height:auto\" srcset=\"https:\/\/bioturing.com\/blog\/wp-content\/uploads\/2026\/11\/anh-4-1024x98.png 1024w, https:\/\/bioturing.com\/blog\/wp-content\/uploads\/2026\/11\/anh-4-300x29.png 300w, https:\/\/bioturing.com\/blog\/wp-content\/uploads\/2026\/11\/anh-4-765x73.png 765w, https:\/\/bioturing.com\/blog\/wp-content\/uploads\/2026\/11\/anh-4.png 1216w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\"><strong>Proseg<\/strong> [2] comes closer. It also models each cell\u2019s expression, and lets cells reclaim transcripts from their neighbours by growing and shrinking their shapes one bin at a time. But its output is still a cell shape, and the matrix counts what falls inside it (Figure 3). Two cells cannot claim the same spot, so where cells overlap, the mixing remains<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"213\" src=\"https:\/\/bioturing.com\/blog\/wp-content\/uploads\/2026\/11\/anh-5-1024x213.png\" alt=\"\" class=\"wp-image-5665\" style=\"aspect-ratio:4.807726703630835;width:758px;height:auto\" srcset=\"https:\/\/bioturing.com\/blog\/wp-content\/uploads\/2026\/11\/anh-5-1024x213.png 1024w, https:\/\/bioturing.com\/blog\/wp-content\/uploads\/2026\/11\/anh-5-300x62.png 300w, https:\/\/bioturing.com\/blog\/wp-content\/uploads\/2026\/11\/anh-5-765x159.png 765w, https:\/\/bioturing.com\/blog\/wp-content\/uploads\/2026\/11\/anh-5-1536x319.png 1536w, https:\/\/bioturing.com\/blog\/wp-content\/uploads\/2026\/11\/anh-5.png 1540w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\"><strong>Figure 3.<\/strong> Proseg refines cell shapes, but still counts the transcripts inside each shape. Figures from [2].<\/figcaption><\/figure>\n<\/div>\n\n\n<h3 class=\"wp-block-heading\"><strong>1.4. Sesame-peanuts<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">We propose sesame-peanuts, a completely unsupervised transcript-to-cell assignment method that sorts mixed transcripts without drawing new boundaries. Its inputs are:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>the transcripts, as (<em>x<\/em>, <em>y<\/em>, <em>g<\/em>) where <em>g<\/em> is the gene;<\/li>\n\n\n\n<li>the nuclear segmentation;<\/li>\n\n\n\n<li>optionally, the membrane segmentation.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Its output is a denoised CELL\u00d7GENE matrix. We call it denoised because the mixed-in transcripts act as noise on each cell\u2019s expression, and sesame-peanuts removes them.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The core idea is to give each cell an arm for every gene. The arm stretches out from the cell boundary, and its pull weakens with distance; how far it reaches is learned from the data. How hard it pulls depends on how much the cell makes of that gene. A transcript of gene <em>g<\/em> at (<em>x<\/em>, <em>y<\/em>) goes to the cell whose arm for <em>g<\/em> pulls hardest there, like a tug of war between neighbouring cells.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Figure 4 shows the arms of the macrophage from Figure 1. Its AIF1 and FCGR3A arms are strong, and it wins those transcripts well beyond its outline. Its MALL and CAPN8 arms are faint, so the tumour cells around it win those transcripts, even inside the macrophage\u2019s own outline. This is how one mechanism moves transcripts in both directions: a cell reclaims its own transcripts from inside its neighbours\u2019 polygons, and gives up foreign ones inside its own.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"372\" src=\"https:\/\/bioturing.com\/blog\/wp-content\/uploads\/2026\/11\/anh-6-1024x372-1.png\" alt=\"\" class=\"wp-image-5666\" style=\"width:812px;height:auto\" srcset=\"https:\/\/bioturing.com\/blog\/wp-content\/uploads\/2026\/11\/anh-6-1024x372-1.png 1024w, https:\/\/bioturing.com\/blog\/wp-content\/uploads\/2026\/11\/anh-6-300x109-1.png 300w, https:\/\/bioturing.com\/blog\/wp-content\/uploads\/2026\/11\/anh-6-768x279-1.png 768w, https:\/\/bioturing.com\/blog\/wp-content\/uploads\/2026\/11\/anh-6-.png 1524w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\"><strong>Figure 4.<\/strong> The arms of one macrophage for two tumour genes, two macrophage genes and two shared genes. Top: how hard the macrophage pulls on each gene. Bottom: who wins the tug of war at each spot (pink means a macrophage wins, blue means a tumour wins). The dots at bottom row are the transcripts.<\/figcaption><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">Section 2 shows how this sorting fixes each of the three aforementioned kinds of damage, and what it may costs. Section 3 then gives an overview of how sesame-peanuts works.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>2. Results<\/strong><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>2.1. What we measure<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">All results in this chapter come from the whole slide of the Xenium Human Lung Cancer dataset [1]. We compare three CELL\u00d7GENE matrices built from the same transcripts:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Nuclear:<\/strong> count the transcripts that fall inside each nucleus polygon, produced by our SpatialX pipeline.<\/li>\n\n\n\n<li><strong>Xenium cell:<\/strong> count the transcripts that fall inside each cell polygon of the vendor\u2019s segmentation.<\/li>\n\n\n\n<li><strong>sesame-peanuts:<\/strong> the denoised matrix, given both segmentations. Each of its cells keeps the id of its nucleus, so its rows line up with the nuclear matrix. The exception is Section 2.2, which isolates the effect of denoising alone: it compares the Xenium cell matrix with the same matrix after denoising, and no nucleus segmentation is used there at all.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Each test targets one of the three kinds of damage from the introduction (Table 1). The fourth test checks for potential trade-offs of this method.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td class=\"has-text-align-center\" data-align=\"center\"><strong>Damage<\/strong><\/td><td class=\"has-text-align-center\" data-align=\"center\"><strong>Test<\/strong><\/td><td class=\"has-text-align-center\" data-align=\"center\"><strong>Section<\/strong><\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">Wrong cell-type prediction<\/td><td class=\"has-text-align-center\" data-align=\"center\">Do immune cells on a tumour sheet get the right label?<\/td><td class=\"has-text-align-center\" data-align=\"center\">Section 2.2<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">Wrong gene expression<\/td><td class=\"has-text-align-center\" data-align=\"center\">How many tumour transcripts end up inside macrophages?<\/td><td class=\"has-text-align-center\" data-align=\"center\">Section 2.3<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">False discoveries<\/td><td class=\"has-text-align-center\" data-align=\"center\">Which genes look up-regulated in macrophages next to tumour?<\/td><td class=\"has-text-align-center\" data-align=\"center\">Section 2.4<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">Trade-off<\/td><td class=\"has-text-align-center\" data-align=\"center\">Are real changes near tumour still detected after denoising?<\/td><td class=\"has-text-align-center\" data-align=\"center\">Section 2.5<\/td><\/tr><\/tbody><\/table><figcaption class=\"wp-element-caption\"><strong>Table 1.<\/strong> The four tests of this chapter. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/figcaption><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>2.2. Cell-type prediction<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">When a T cell is squeezed between tumour cells, its polygon also holds tumour transcripts, and the tumour cells around it pick up some of its CD3D. In the embedding, such cells sit between clusters, and a cell-type predictor has to guess.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To see what denoising alone does, we gave sesame-peanuts only the Xenium cell segmentation, with no nuclear, so both matrices start from the same cells. We ran BioTuring\u2019s MetaReference prediction on the Xenium cell matrix with and without denoising, and coloured the t-SNE by CD3D (Figure 5). Without denoising, CD3D is scattered across the whole embedding. After denoising, it is concentrated in the T-cell clusters, and fewer cells pass the same CD3D threshold (11,855 against 13,099).<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"612\" src=\"https:\/\/bioturing.com\/blog\/wp-content\/uploads\/2026\/11\/anh-7-1024x612.png\" alt=\"\" class=\"wp-image-5668\" style=\"width:595px;height:auto\" srcset=\"https:\/\/bioturing.com\/blog\/wp-content\/uploads\/2026\/11\/anh-7-1024x612.png 1024w, https:\/\/bioturing.com\/blog\/wp-content\/uploads\/2026\/11\/anh-7-300x179.png 300w, https:\/\/bioturing.com\/blog\/wp-content\/uploads\/2026\/11\/anh-7-768x459.png 768w, https:\/\/bioturing.com\/blog\/wp-content\/uploads\/2026\/11\/anh-7-1536x918.png 1536w, https:\/\/bioturing.com\/blog\/wp-content\/uploads\/2026\/11\/anh-7.png 1566w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\"><strong>Figure 5.<\/strong> t-SNE of the Xenium matrix, before and after denoising, coloured by MetaReference cell type (a\u2013c) and by CD3D (d\u2013e). After denoising, CD3D is more concentrated in the T-cell clusters.<\/figcaption><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">The effect matters most where cell overlap. Figure 6 returns to the close-up of Figure 1. The macrophage markers (MS4A4A, FCGR1A, AIF1, MRC1) mark where the macrophages are. The tumour markers (MALL, EPCAM, CAPN8) are everywhere, because the macrophages lie on top of a tumour sheet. On the Xenium matrix, the macrophages whose transcripts are outnumbered by the tumour\u2019s are predicted as tumour. After denoising, MetaReference calls them macrophages.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"793\" src=\"https:\/\/bioturing.com\/blog\/wp-content\/uploads\/2026\/11\/anh-8-1024x793.png\" alt=\"\" class=\"wp-image-5669\" style=\"aspect-ratio:1.2913143735588009;width:654px;height:auto\" srcset=\"https:\/\/bioturing.com\/blog\/wp-content\/uploads\/2026\/11\/anh-8-1024x793.png 1024w, https:\/\/bioturing.com\/blog\/wp-content\/uploads\/2026\/11\/anh-8-300x232.png 300w, https:\/\/bioturing.com\/blog\/wp-content\/uploads\/2026\/11\/anh-8-768x595.png 768w, https:\/\/bioturing.com\/blog\/wp-content\/uploads\/2026\/11\/anh-8.png 1226w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\"><strong>Figure 6.<\/strong> MetaReference prediction on the close-up of Figure 1. Large red dots are cells predicted as macrophages. Denoising recovers the macrophages that sit on the tumour sheet. Marker genes are from [2].<\/figcaption><\/figure>\n<\/div>\n\n\n<h3 class=\"wp-block-heading\"><strong>2.3. Gene expression<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Proseg\u2019s paper [2] gives a clean way to measure how much a cell\u2019s expression are leaked from its neighbours. Tumour markers (MALL, EPCAM, CAPN8, KRT7, TMC5) should be nearly absent from macrophages, so the share of a macrophage\u2019s counts that are tumour markers tells us how many tumour transcripts it has collected. We call this spurious share \u201ccontamination\u201d. Macrophages more than 30 \u03bcm from any tumour cell give the baseline, and macrophages touching a tumour cell (centroids within 15 \u03bcm) show the leakage on top of it.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Figure 7 shows contamination against the distance to the nearest tumour cell. Away from the tumour, all three methods are flat. As a macrophage approaches the tumour, the polygon methods climb steeply: touching macrophages reach about 4% contamination in the nuclear matrix and 5% in the Xenium cell matrix. With sesame-peanuts they reach under 2%.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"515\" src=\"https:\/\/bioturing.com\/blog\/wp-content\/uploads\/2026\/11\/anh-9-1024x515.png\" alt=\"\" class=\"wp-image-5670\" style=\"aspect-ratio:1.988386285460665;width:624px;height:auto\" srcset=\"https:\/\/bioturing.com\/blog\/wp-content\/uploads\/2026\/11\/anh-9-1024x515.png 1024w, https:\/\/bioturing.com\/blog\/wp-content\/uploads\/2026\/11\/anh-9-300x151.png 300w, https:\/\/bioturing.com\/blog\/wp-content\/uploads\/2026\/11\/anh-9-768x386.png 768w, https:\/\/bioturing.com\/blog\/wp-content\/uploads\/2026\/11\/anh-9.png 1034w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\"><strong>Figure 7.<\/strong> Contamination of macrophages by distance to the nearest tumour cell, mean \u00b1 standard error. The grey band marks macrophages touching a tumour cell.<\/figcaption><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">Contamination alone can be gamed: a method that keeps only the transcripts in the very centre of each nucleus would be clean but would throw most of the data away. That is the usual trade-off of polygon methods. sesame-peanuts breaks this trade-off (Figure 8): it assigns the most transcripts, with the lowest excess contamination.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"722\" height=\"502\" src=\"https:\/\/bioturing.com\/blog\/wp-content\/uploads\/2026\/11\/anh-10.png\" alt=\"\" class=\"wp-image-5671\" style=\"aspect-ratio:1.4382658703826587;width:478px;height:auto\" srcset=\"https:\/\/bioturing.com\/blog\/wp-content\/uploads\/2026\/11\/anh-10.png 722w, https:\/\/bioturing.com\/blog\/wp-content\/uploads\/2026\/11\/anh-10-300x209.png 300w\" sizes=\"auto, (max-width: 722px) 100vw, 722px\" \/><figcaption class=\"wp-element-caption\"><strong>Figure 8.<\/strong> Share of transcripts assigned to a cell against excess contamination (touching minus far macrophages). The ideal method sits in the bottom-right corner.<\/figcaption><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">Sesame-peanuts does not reach zero. Some tumour transcripts stay with the macrophages, because the method only moves a transcript when the evidence says so. This design is intentionally because being overzealous would have a cost, which will be measured by Section 2.5.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The cleaner expression also shows up in the embedding. Using Proseg\u2019s ten lung cell types and their marker lists, we cluster each matrix and draw its UMAP (Figure 9).<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"334\" src=\"https:\/\/bioturing.com\/blog\/wp-content\/uploads\/2026\/11\/anh-11-1024x334.png\" alt=\"\" class=\"wp-image-5672\" style=\"width:720px;height:auto\" srcset=\"https:\/\/bioturing.com\/blog\/wp-content\/uploads\/2026\/11\/anh-11-1024x334.png 1024w, https:\/\/bioturing.com\/blog\/wp-content\/uploads\/2026\/11\/anh-11-300x98.png 300w, https:\/\/bioturing.com\/blog\/wp-content\/uploads\/2026\/11\/anh-11-768x250.png 768w, https:\/\/bioturing.com\/blog\/wp-content\/uploads\/2026\/11\/anh-11.png 1222w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\"><strong>Figure 9.<\/strong> UMAP of each matrix, coloured by cell type from Proseg\u2019s marker lists.<\/figcaption><\/figure>\n<\/div>\n\n\n<h3 class=\"wp-block-heading\"><strong>2.4. False discoveries<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">A common question in tumour immunology is how macrophages change when they are next to a tumour. Proseg\u2019s paper turns this question into a test of the matrix. Split the macrophages into those adjacent to a tumour cell and the rest, and run a differential expression test (DESeq2) between them. A DE call is spurious if the gene is up in adjacent macrophages and is also more abundant in tumour cells than in macrophages: the \u201cup-regulation\u201d could be nothing more than tumour transcripts leaking in.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Figure 10 shows the result. The Xenium cell matrix makes the most calls (95), and a third of them are spurious. Its strongest hits are MALL, TCIM and EPCAM, which are all tumour genes, not macrophage biology. The nuclear matrix is cleaner but still has 22% spurious calls, with MALL among its top hits. sesame-peanuts makes as many calls as the nuclear matrix (62 against 60), and only two of them are spurious. Its strongest hits are the macrophage genes PPARG, MARCO, FCGR3A, MCEMP1, FCGR1A and VCAN.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"321\" src=\"https:\/\/bioturing.com\/blog\/wp-content\/uploads\/2026\/11\/anh-12-1024x321.png\" alt=\"\" class=\"wp-image-5673\" srcset=\"https:\/\/bioturing.com\/blog\/wp-content\/uploads\/2026\/11\/anh-12-1024x321.png 1024w, https:\/\/bioturing.com\/blog\/wp-content\/uploads\/2026\/11\/anh-12-300x94.png 300w, https:\/\/bioturing.com\/blog\/wp-content\/uploads\/2026\/11\/anh-12-766x240.png 766w, https:\/\/bioturing.com\/blog\/wp-content\/uploads\/2026\/11\/anh-12-1536x481.png 1536w, https:\/\/bioturing.com\/blog\/wp-content\/uploads\/2026\/11\/anh-12.png 1660w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\"><strong>Figure 10.<\/strong> Differential expression of macrophages adjacent to tumour against the other macrophages. Red: DE calls that may come from tumour transcripts leaking in.<\/figcaption><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">This test has a blind spot: it calls an up-regulation \u201cspurious\u201d whenever tumour cells make more of the gene, yet a macrophage near a tumour can genuinely up-regulate such a gene. The test cannot tell this biology from leakage, so it would even reward an overzealous method that hands every such transcript to the tumour. For sesame-peanuts this is a real risk: a tumour cell that makes far more of a gene pulls hard on it, and could take the macrophage\u2019s own transcripts along with the leaked ones, erasing a genuine up-regulation discovery. The next section measures whether it does.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>2.5. The cost of denoising<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Measuring this needs a ground truth of which cell made which transcript, which is not available in this Xenium Human Lung Cancer dataset, so we must curate it ourselves. Experiments on real biological groundtruth will follow in an extended blog.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">We pick eight real genes that tumour cells make in abundance but macrophages rarely do (observed from nuclear matrix): CYP2B6, TCIM, TFPI, STEAP4, MET, NTN4, EGFR and CFTR. For each gene, we add a synthetic copy to the panel. Every cell expresses the copy at its cell type\u2019s average expression for the original gene, and its transcripts are scattered around the cell that made them (Figure 11). The copies therefore behave like the real genes, the only difference is that we know which cell made each transcript. To ensure unbiased test results, we scattered them using 3 different methods.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"378\" src=\"https:\/\/bioturing.com\/blog\/wp-content\/uploads\/2026\/11\/anh-13-1024x378.png\" alt=\"\" class=\"wp-image-5674\" style=\"width:753px;height:auto\" srcset=\"https:\/\/bioturing.com\/blog\/wp-content\/uploads\/2026\/11\/anh-13-1024x378.png 1024w, https:\/\/bioturing.com\/blog\/wp-content\/uploads\/2026\/11\/anh-13-300x111.png 300w, https:\/\/bioturing.com\/blog\/wp-content\/uploads\/2026\/11\/anh-13-766x283.png 766w, https:\/\/bioturing.com\/blog\/wp-content\/uploads\/2026\/11\/anh-13-1536x567.png 1536w, https:\/\/bioturing.com\/blog\/wp-content\/uploads\/2026\/11\/anh-13.png 1652w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\"><strong>Figure 11.<\/strong> Planted synthetic transcripts around the macrophage of Figure 1, under the three ways of scattering.<\/figcaption><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">Then we up-regulate the copies in macrophages 5\u201310 \u03bcm from a tumour by a factor <em>k<\/em>, and leave the macrophages more than 30 \u03bcm away untouched. Each value of <em>k<\/em> is a separate test, with the slide denoised anew each time. Comparing near with far macrophages, a correct matrix should report:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><em>k<\/em> = 1 (no change): a log<sub>2<\/sub> fold change of 0;<\/li>\n\n\n\n<li><em>k<\/em> = 2: a log<sub>2<\/sub> fold change of 1;<\/li>\n\n\n\n<li><em>k<\/em> = 4: a log<sub>2<\/sub> fold change of 2.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Figure 12 gives the result. When nothing changed (<em>k<\/em> = 1), the polygon matrices report a log<sub>2<\/sub> fold change of 1.2 to 1.7: they claim that macrophages near tumour make these genes 2.3 to 3.2 times more, when they do not. sesame-peanuts reports near zero in all three cases. When the change is real, the polygon matrices overshoot it, while sesame-peanuts undershoots it.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"343\" src=\"https:\/\/bioturing.com\/blog\/wp-content\/uploads\/2026\/11\/save-2-1024x343.png\" alt=\"\" class=\"wp-image-5681\" style=\"aspect-ratio:2.98550563669684;width:768px;height:auto\" srcset=\"https:\/\/bioturing.com\/blog\/wp-content\/uploads\/2026\/11\/save-2-1024x343.png 1024w, https:\/\/bioturing.com\/blog\/wp-content\/uploads\/2026\/11\/save-2-300x101.png 300w, https:\/\/bioturing.com\/blog\/wp-content\/uploads\/2026\/11\/save-2-767x257.png 767w, https:\/\/bioturing.com\/blog\/wp-content\/uploads\/2026\/11\/save-2-1536x515.png 1536w, https:\/\/bioturing.com\/blog\/wp-content\/uploads\/2026\/11\/save-2.png 1802w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\"><strong>Figure 12.<\/strong> Reported against true log<sub>2<\/sub> fold change of the synthetic genes in macrophages near tumour, with 95% intervals, for the three ways of scattering of Figure 11.<\/figcaption><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">So denoising does have a small cost. Where a macrophage and a tumour cell overlap, sesame-peanuts gives some of the macrophage\u2019s own transcripts to the tumour, and the effect shrinks. But the direction of the change and the order of the effects stay right under every kind of scattering. The two kinds of error are not equally harmful: a polygon matrix reports a discovery that does not exist, while sesame-peanuts reports a real one as somewhat smaller than it is.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>3. Our approach<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Sesame-peanuts takes the transcripts, the nuclear segmentation and, if available, the membrane segmentation; then returns a CELL\u00d7GENE matrix. In between are five steps (Figure 13).<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"311\" src=\"https:\/\/bioturing.com\/blog\/wp-content\/uploads\/2026\/11\/save-1024x311.png\" alt=\"\" class=\"wp-image-5680\" srcset=\"https:\/\/bioturing.com\/blog\/wp-content\/uploads\/2026\/11\/save-1024x311.png 1024w, https:\/\/bioturing.com\/blog\/wp-content\/uploads\/2026\/11\/save-300x91.png 300w, https:\/\/bioturing.com\/blog\/wp-content\/uploads\/2026\/11\/save-767x233.png 767w, https:\/\/bioturing.com\/blog\/wp-content\/uploads\/2026\/11\/save-1536x467.png 1536w, https:\/\/bioturing.com\/blog\/wp-content\/uploads\/2026\/11\/save.png 1804w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\"><strong>Figure 13.<\/strong> Overview of sesame-peanuts, on the close-up of Figure 1. Step 4 alternates between reassigning transcripts and updating each cell\u2019s profile until the assignment settles.<\/figcaption><\/figure>\n<\/div>\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Build the cells.<\/strong> If both nuclear and membrane segmentations are given, they are merged into one list of cells.<\/li>\n\n\n\n<li><strong>Learn the arm.<\/strong> Decide where a cell may reclaim its transcripts.<\/li>\n\n\n\n<li><strong>Initialize cell profiles (or gene expression of each cell).<\/strong> To know how hard a cell pulls on each gene, we need a first guess of its profile. We get it without any reference or marker list: build an expression matrix from the nuclear counts, and cluster it with Leiden; merge clusters with similar average profiles, since Leiden tends to split one cell type into several sub-states; start each cell from the average profile of its cluster.<\/li>\n\n\n\n<li><strong>Tug of war.<\/strong> Each cell\u2019s pull on a transcript is its reach (step 2) times its size times its profile for that gene. The transcripts are shared out according to these pulls, then each cell updates its own profile from the transcripts it now holds. The cluster profile of step 3 is only a starting point: every cell ends up with a profile of its own.<\/li>\n\n\n\n<li><strong>Final call.<\/strong> Each transcript is given to one cell, or left as background. Counting the assigned transcripts gives the CELL\u00d7GENE matrix, with one row per cell, so it can be compared row by row with a segmentation-based matrix.<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\">3.1. Why each cell keeps its own profile<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Step 4 is what sets sesame-peanuts apart. The simpler alternative would be to fix each cell\u2019s profile to its cluster average, and reassign transcripts by distance and cluster membership only. That works for cell-type prediction, but it erases exactly what differential expression is looking for: cells that make a gene more or less than their cluster\u2019s average.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Take a macrophage that truly up-regulates a gene. If its pull on that gene is pinned to the macrophage average, it pulls too weakly, and the transcripts of that gene go to its neighbours, resulting in the up-regulation being shrunk back towards the average. If instead it truly down-regulates a gene, the pinned profile pulls too strongly, and it collects that gene\u2019s transcripts from its neighbours, resulting in the down-regulation being filled back in. Either way, pinning the profile makes every cell look more like its cluster than it is.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Because each cell\u2019s pull follows its own counts, a cell that makes more of a gene pulls harder for it, and a cell that makes less pulls less. Its deviations from the cluster are therefore kept. This is why, in Section 2.5, sesame-peanuts still detects a real change in macrophages near tumour, while reporting none where there is none.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">References<\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li>10x Genomics: Preview Data: FFPE Human Lung Cancer with Xenium Multimodal Cell Segmentation, <a href=\"https:\/\/www.10xgenomics.com\/datasets\/preview-data-ffpe-human-lung-cancer-with-xenium-multimodal-cell-segmentation-1-standard\">https:\/\/www.10xgenomics.com\/datasets\/preview-data-ffpe-human-lung-cancer-with-xenium-multimodal-cell-segmentation-1-standard<\/a><\/li>\n\n\n\n<li>Jones, D.C., Elz, A.E., Hadadianpour, A., Ryu, H., Glass, D.R., Newell, E.W.: Cell simulation as cell segmentation. Nature Methods. 22, 1331\u20131342 (2025). <a href=\"https:\/\/doi.org\/10.1038\/s41592-025-02697-0\">https:\/\/doi.org\/10.1038\/s41592-025-02697-0<\/a><\/li>\n\n\n\n<li>Petukhov, V., Xu, R.J., Soldatov, R.A., Cadinu, P., Khodosevich, K., Moffitt, J.R., Kharchenko, P.V.: Cell segmentation in imaging-based spatial transcriptomics. Nature Biotechnology. 40, 345\u2013354 (2022). <a href=\"https:\/\/doi.org\/10.1038\/s41587-021-01044-w\">https:\/\/doi.org\/10.1038\/s41587-021-01044-w<\/a><\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\"><br><\/p>\n","protected":false},"excerpt":{"rendered":"<p>1. Introduction 1.1. Motivations In single-cell spatial transcriptomics, most downstream analyses run on the CELL\u00d7GENE expression matrix. This matrix is built by a process called transcript-to-cell assignment, which is commonly done by giving each transcript to the cell whose polygon it falls in. But a tissue section is a 3D object imaged in 2D. Where [&hellip;]<\/p>\n","protected":false},"author":7,"featured_media":5683,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[25],"tags":[],"class_list":["post-5652","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-applications"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Sesame-peanuts: A transcript-to-cell assignment method for overlapping cells - BioTuring<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/bioturing.com\/blog\/sesame-peanuts-a-transcript-to-cell-assignment-method-for-overlapping-cells\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Sesame-peanuts: A transcript-to-cell assignment method for overlapping cells - BioTuring\" \/>\n<meta property=\"og:description\" content=\"1. Introduction 1.1. Motivations In single-cell spatial transcriptomics, most downstream analyses run on the CELL\u00d7GENE expression matrix. This matrix is built by a process called transcript-to-cell assignment, which is commonly done by giving each transcript to the cell whose polygon it falls in. But a tissue section is a 3D object imaged in 2D. Where [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/bioturing.com\/blog\/sesame-peanuts-a-transcript-to-cell-assignment-method-for-overlapping-cells\/\" \/>\n<meta property=\"og:site_name\" content=\"BioTuring\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/bioturing\" \/>\n<meta property=\"article:published_time\" content=\"2026-11-11T06:19:20+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-11-11T07:07:00+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/bioturing.com\/blog\/wp-content\/uploads\/2026\/11\/preview-sesame-peanuts-2.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"630\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"BioTuring Science Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@bioturing\" \/>\n<meta name=\"twitter:site\" content=\"@bioturing\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"BioTuring Science Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"16 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/bioturing.com\/blog\/sesame-peanuts-a-transcript-to-cell-assignment-method-for-overlapping-cells\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/bioturing.com\/blog\/sesame-peanuts-a-transcript-to-cell-assignment-method-for-overlapping-cells\/\"},\"author\":{\"name\":\"BioTuring Science Team\",\"@id\":\"https:\/\/bioturing.com\/blog\/#\/schema\/person\/13e44bdb917492207d780491bda2992b\"},\"headline\":\"Sesame-peanuts: A transcript-to-cell assignment method for overlapping cells\",\"datePublished\":\"2026-11-11T06:19:20+00:00\",\"dateModified\":\"2026-11-11T07:07:00+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/bioturing.com\/blog\/sesame-peanuts-a-transcript-to-cell-assignment-method-for-overlapping-cells\/\"},\"wordCount\":2863,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/bioturing.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/bioturing.com\/blog\/sesame-peanuts-a-transcript-to-cell-assignment-method-for-overlapping-cells\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/bioturing.com\/blog\/wp-content\/uploads\/2026\/11\/preview-sesame-peanuts-2.png\",\"articleSection\":[\"Applications\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/bioturing.com\/blog\/sesame-peanuts-a-transcript-to-cell-assignment-method-for-overlapping-cells\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/bioturing.com\/blog\/sesame-peanuts-a-transcript-to-cell-assignment-method-for-overlapping-cells\/\",\"url\":\"https:\/\/bioturing.com\/blog\/sesame-peanuts-a-transcript-to-cell-assignment-method-for-overlapping-cells\/\",\"name\":\"Sesame-peanuts: A transcript-to-cell assignment method for overlapping cells - BioTuring\",\"isPartOf\":{\"@id\":\"https:\/\/bioturing.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/bioturing.com\/blog\/sesame-peanuts-a-transcript-to-cell-assignment-method-for-overlapping-cells\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/bioturing.com\/blog\/sesame-peanuts-a-transcript-to-cell-assignment-method-for-overlapping-cells\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/bioturing.com\/blog\/wp-content\/uploads\/2026\/11\/preview-sesame-peanuts-2.png\",\"datePublished\":\"2026-11-11T06:19:20+00:00\",\"dateModified\":\"2026-11-11T07:07:00+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/bioturing.com\/blog\/sesame-peanuts-a-transcript-to-cell-assignment-method-for-overlapping-cells\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/bioturing.com\/blog\/sesame-peanuts-a-transcript-to-cell-assignment-method-for-overlapping-cells\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/bioturing.com\/blog\/sesame-peanuts-a-transcript-to-cell-assignment-method-for-overlapping-cells\/#primaryimage\",\"url\":\"https:\/\/bioturing.com\/blog\/wp-content\/uploads\/2026\/11\/preview-sesame-peanuts-2.png\",\"contentUrl\":\"https:\/\/bioturing.com\/blog\/wp-content\/uploads\/2026\/11\/preview-sesame-peanuts-2.png\",\"width\":1200,\"height\":630},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/bioturing.com\/blog\/sesame-peanuts-a-transcript-to-cell-assignment-method-for-overlapping-cells\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/bioturing.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Sesame-peanuts: A transcript-to-cell assignment method for overlapping cells\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/bioturing.com\/blog\/#website\",\"url\":\"https:\/\/bioturing.com\/blog\/\",\"name\":\"BioTuring Blog\",\"description\":\"Revolutionizing Multi-Omics and Spatial Biology\",\"publisher\":{\"@id\":\"https:\/\/bioturing.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/bioturing.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/bioturing.com\/blog\/#organization\",\"name\":\"BioTuring Blog\",\"url\":\"https:\/\/bioturing.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/bioturing.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/bioturing.com\/blog\/wp-content\/uploads\/2024\/12\/bioturing-favicon.png\",\"contentUrl\":\"https:\/\/bioturing.com\/blog\/wp-content\/uploads\/2024\/12\/bioturing-favicon.png\",\"width\":512,\"height\":512,\"caption\":\"BioTuring Blog\"},\"image\":{\"@id\":\"https:\/\/bioturing.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/bioturing\",\"https:\/\/x.com\/bioturing\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/bioturing.com\/blog\/#\/schema\/person\/13e44bdb917492207d780491bda2992b\",\"name\":\"BioTuring Science Team\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/bioturing.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/b2c407b3640d82ff0df9257dfbf304e30b9b4a365e18798a82b83a99767562b7?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/b2c407b3640d82ff0df9257dfbf304e30b9b4a365e18798a82b83a99767562b7?s=96&d=mm&r=g\",\"caption\":\"BioTuring Science Team\"},\"url\":\"https:\/\/bioturing.com\/blog\/author\/jen\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Sesame-peanuts: A transcript-to-cell assignment method for overlapping cells - BioTuring","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/bioturing.com\/blog\/sesame-peanuts-a-transcript-to-cell-assignment-method-for-overlapping-cells\/","og_locale":"en_US","og_type":"article","og_title":"Sesame-peanuts: A transcript-to-cell assignment method for overlapping cells - BioTuring","og_description":"1. Introduction 1.1. Motivations In single-cell spatial transcriptomics, most downstream analyses run on the CELL\u00d7GENE expression matrix. This matrix is built by a process called transcript-to-cell assignment, which is commonly done by giving each transcript to the cell whose polygon it falls in. But a tissue section is a 3D object imaged in 2D. Where [&hellip;]","og_url":"https:\/\/bioturing.com\/blog\/sesame-peanuts-a-transcript-to-cell-assignment-method-for-overlapping-cells\/","og_site_name":"BioTuring","article_publisher":"https:\/\/www.facebook.com\/bioturing","article_published_time":"2026-11-11T06:19:20+00:00","article_modified_time":"2026-11-11T07:07:00+00:00","og_image":[{"width":1200,"height":630,"url":"https:\/\/bioturing.com\/blog\/wp-content\/uploads\/2026\/11\/preview-sesame-peanuts-2.png","type":"image\/png"}],"author":"BioTuring Science Team","twitter_card":"summary_large_image","twitter_creator":"@bioturing","twitter_site":"@bioturing","twitter_misc":{"Written by":"BioTuring Science Team","Est. reading time":"16 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/bioturing.com\/blog\/sesame-peanuts-a-transcript-to-cell-assignment-method-for-overlapping-cells\/#article","isPartOf":{"@id":"https:\/\/bioturing.com\/blog\/sesame-peanuts-a-transcript-to-cell-assignment-method-for-overlapping-cells\/"},"author":{"name":"BioTuring Science Team","@id":"https:\/\/bioturing.com\/blog\/#\/schema\/person\/13e44bdb917492207d780491bda2992b"},"headline":"Sesame-peanuts: A transcript-to-cell assignment method for overlapping cells","datePublished":"2026-11-11T06:19:20+00:00","dateModified":"2026-11-11T07:07:00+00:00","mainEntityOfPage":{"@id":"https:\/\/bioturing.com\/blog\/sesame-peanuts-a-transcript-to-cell-assignment-method-for-overlapping-cells\/"},"wordCount":2863,"commentCount":0,"publisher":{"@id":"https:\/\/bioturing.com\/blog\/#organization"},"image":{"@id":"https:\/\/bioturing.com\/blog\/sesame-peanuts-a-transcript-to-cell-assignment-method-for-overlapping-cells\/#primaryimage"},"thumbnailUrl":"https:\/\/bioturing.com\/blog\/wp-content\/uploads\/2026\/11\/preview-sesame-peanuts-2.png","articleSection":["Applications"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/bioturing.com\/blog\/sesame-peanuts-a-transcript-to-cell-assignment-method-for-overlapping-cells\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/bioturing.com\/blog\/sesame-peanuts-a-transcript-to-cell-assignment-method-for-overlapping-cells\/","url":"https:\/\/bioturing.com\/blog\/sesame-peanuts-a-transcript-to-cell-assignment-method-for-overlapping-cells\/","name":"Sesame-peanuts: A transcript-to-cell assignment method for overlapping cells - BioTuring","isPartOf":{"@id":"https:\/\/bioturing.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/bioturing.com\/blog\/sesame-peanuts-a-transcript-to-cell-assignment-method-for-overlapping-cells\/#primaryimage"},"image":{"@id":"https:\/\/bioturing.com\/blog\/sesame-peanuts-a-transcript-to-cell-assignment-method-for-overlapping-cells\/#primaryimage"},"thumbnailUrl":"https:\/\/bioturing.com\/blog\/wp-content\/uploads\/2026\/11\/preview-sesame-peanuts-2.png","datePublished":"2026-11-11T06:19:20+00:00","dateModified":"2026-11-11T07:07:00+00:00","breadcrumb":{"@id":"https:\/\/bioturing.com\/blog\/sesame-peanuts-a-transcript-to-cell-assignment-method-for-overlapping-cells\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/bioturing.com\/blog\/sesame-peanuts-a-transcript-to-cell-assignment-method-for-overlapping-cells\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/bioturing.com\/blog\/sesame-peanuts-a-transcript-to-cell-assignment-method-for-overlapping-cells\/#primaryimage","url":"https:\/\/bioturing.com\/blog\/wp-content\/uploads\/2026\/11\/preview-sesame-peanuts-2.png","contentUrl":"https:\/\/bioturing.com\/blog\/wp-content\/uploads\/2026\/11\/preview-sesame-peanuts-2.png","width":1200,"height":630},{"@type":"BreadcrumbList","@id":"https:\/\/bioturing.com\/blog\/sesame-peanuts-a-transcript-to-cell-assignment-method-for-overlapping-cells\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/bioturing.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Sesame-peanuts: A transcript-to-cell assignment method for overlapping cells"}]},{"@type":"WebSite","@id":"https:\/\/bioturing.com\/blog\/#website","url":"https:\/\/bioturing.com\/blog\/","name":"BioTuring Blog","description":"Revolutionizing Multi-Omics and Spatial Biology","publisher":{"@id":"https:\/\/bioturing.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/bioturing.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/bioturing.com\/blog\/#organization","name":"BioTuring Blog","url":"https:\/\/bioturing.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/bioturing.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/bioturing.com\/blog\/wp-content\/uploads\/2024\/12\/bioturing-favicon.png","contentUrl":"https:\/\/bioturing.com\/blog\/wp-content\/uploads\/2024\/12\/bioturing-favicon.png","width":512,"height":512,"caption":"BioTuring Blog"},"image":{"@id":"https:\/\/bioturing.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/bioturing","https:\/\/x.com\/bioturing"]},{"@type":"Person","@id":"https:\/\/bioturing.com\/blog\/#\/schema\/person\/13e44bdb917492207d780491bda2992b","name":"BioTuring Science Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/bioturing.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/b2c407b3640d82ff0df9257dfbf304e30b9b4a365e18798a82b83a99767562b7?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/b2c407b3640d82ff0df9257dfbf304e30b9b4a365e18798a82b83a99767562b7?s=96&d=mm&r=g","caption":"BioTuring Science Team"},"url":"https:\/\/bioturing.com\/blog\/author\/jen\/"}]}},"_links":{"self":[{"href":"https:\/\/bioturing.com\/blog\/wp-json\/wp\/v2\/posts\/5652","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bioturing.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bioturing.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bioturing.com\/blog\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/bioturing.com\/blog\/wp-json\/wp\/v2\/comments?post=5652"}],"version-history":[{"count":3,"href":"https:\/\/bioturing.com\/blog\/wp-json\/wp\/v2\/posts\/5652\/revisions"}],"predecessor-version":[{"id":5687,"href":"https:\/\/bioturing.com\/blog\/wp-json\/wp\/v2\/posts\/5652\/revisions\/5687"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/bioturing.com\/blog\/wp-json\/wp\/v2\/media\/5683"}],"wp:attachment":[{"href":"https:\/\/bioturing.com\/blog\/wp-json\/wp\/v2\/media?parent=5652"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bioturing.com\/blog\/wp-json\/wp\/v2\/categories?post=5652"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bioturing.com\/blog\/wp-json\/wp\/v2\/tags?post=5652"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}