Skip to content

Repository files navigation

mudRapp-seq

This repository contains the code that accompanies the paper introducing "Multiple direct RNApadlock probing in combination with in-situ sequencing (mudRapp-seq)":

Shazeb Ahmad, Jianhui Li, Joél Schaust, Anne-Sophie Gribling-Burrer, Nina Geiger, Sabine C Fischer, Uddhav B Ambi, Simone Backes, Markus J Ankenbrand, Redmond P Smyth, Visualizing the transcription and replication of influenza A viral RNAs in cells by multiple direct RNA padlock probing and in situ sequencing (mudRapp-seq), Nucleic Acids Research, Volume 53, Issue 11, 24 June 2025, gkaf461, https://doi.org/10.1093/nar/gkaf461

This repository is archived at Zenodo DOI

Data

Raw data is archived independently in the BioImage Archive (BIA) with accession number S-BIAD1376. In order to reproduce our analyses, download the raw data from BIA and put them into the data/raw folder.

Image data, acquired on the Leica DMI8 were maximum intensity projected along the z-axis and instant computational clearing (ICC) was applied using Leica software. These images, with associated metadata consist the raw data of our analysis. Only for one dataset (2nt), the images without ICC were used for cell segmentation. Except for these non-ICC images, all datasets were convertet to spacetx format for further analysis.

All final and some intermediate results are included in the repository to facilitate additional analyses without having to re-process all files from scratch.

Data sets

Computational environments

Python environments

To re-create the python environments with mamba run:

mamba env create -f envs/starfish.yml # mudRapp-seq-starfish
mamba env create -f envs/cellpose.yml # mudRapp-seq-cellpose

R environment

The R environment for this project is managed via renv. A local environment is automatically created for you, when you run R or Rscript for the first time in the main project directory. This happens because of the .Rprofile file.

jupyter setting (vscode)

The jupyter files are in sub-folders of code/ but assume the kernel to run in the project root. This is necessary to make the R kernel use the local renv, and allows to consistently use paths relative to the project root rather than the specific notebook location. In VS Code this can be achieved by changing the setting jupyter.notebookFileRoot to ${workspaceFolder}. For jupyter lab there seems to be no simple solution at this moment (see jupyterlab#11619).

Analyses

Data formatting

As starfish is used, the raw data needs to be restructured in SpaceTx format.

In order to create the formatted data in data/spacetx run these steps in the root of the mudRapp-seq repo and in the mudRapp-seq environment:

mamba run -n mudRapp-seq-starfish python code/data_formatting/cDNA_vRNA.py
mamba run -n mudRapp-seq-starfish python code/data_formatting/specificity.py
mamba run -n mudRapp-seq-starfish python code/data_formatting/plp_individual.py
mamba run -n mudRapp-seq-starfish python code/data_formatting/plp_cumulative.py
mamba run -n mudRapp-seq-starfish python code/data_formatting/seq_qc.py
mamba run -n mudRapp-seq-starfish python code/data_formatting/seq_2nt.py

For cell segmentation in the seq_2nt dataset, the intensity of raw images without ICC need to be re-scaled, such that the autofluorescence within the cell is amplified:

mamba run -n mudRapp-seq-starfish python code/data_formatting/seq_2nt_scale_intensity.py

Segmentation

Images were separately segmented for nuclei and cell instances. Nuclei segmentation is used to separate spots based on their location into nucleus and cytoplasm. Cell segmentation is used to count spots per cell, filter infected cells and perform single cell analyses.

All segmentation masks (along with training data and models) are depositet at Zenodo: DOI

You can either download from there and unpack them into analysis/segmentation or follow the instructions below to create masks yourself.

For nucleus segmentation, a cellpose model (models/cellpose/nuclei) was trained and applied to the raw dapi images (in spaceTx format). The model was trained on a total of 5 dapi images with human provided sparse labels (seq_2nt, rep3, hpi5, fov1-5).

For cell instance segmentation, two different approaches were used:

  1. Watershed of the dapi image with nuclei as seeds
  2. A separate cellpose model with manual correction (details below)

Strategy 1 (nuclei via cellpose, cells via watershed)

The first strategy was used for most data, as it was deemed sufficient for filtering of infected cells and to calculate summary statistics like spots per cell. However, for single cell analyses the cell borders were not reliable enough.

This code performs nuclei segmentation with the cellpose model and watershed for cell segmentation (strategy 1).

mamba run -n mudRapp-seq-cellpose python code/segmentation/cellpose_nuclei_watershed_cells.py

Strategy 2 (nuclei and cells via cellpose, cells manually corrected)

The separate cellpose model was trained on raw images without ICC (computational clearing by the microscope vendor). Further, data was preprocessed with intensity scaling (see code). The model was trained on a total of 7 images with human provided sparse labels (2nt_rep1_0.3MOI_5hpi_fov4, 2nt_rep1_0.3MOI_7hpi_fov1, 2nt_rep1_0.3MOI_8hpi_fov1, 2nt_rep1_0.3MOI_8hpi_fov4, 2nt_rep1_1.0MOI_7hpi_fov1, 2nt_rep1_1.0MOI_8hpi_fov1, 2nt_rep2_0.3MOI_8hpi_fov2). In order to maximize the number of correctly detected cells, the following parameters were used: cellprob_threshold=-4.0, flow_threshold=0.7 based on preliminary experiments. Resulting masks were post-processed, removing small objects and closing small holes and gaps (see code).

mamba run -n mudRapp-seq-cellpose python code/segmentation/cellpose_nuclei.py
mamba run -n mudRapp-seq-cellpose python code/segmentation/cellpose_cells.py

Masks produced this way were manually corrected using label editing tools in napari. Manual correction involved extending cells, shrinking cells, moving cell borders and adding new cells (new cells were assigned IDs of 2000 and higher). The focus of the manual correction was mainly on infected cells, if no visibly infected cells were made out during inspection the FOV was saved unchanged.

The script used for manual correction can be started for a specific replication, MOI, hpi, and fov like this:

mamba run -n mudRapp-seq-starfish python code/segmentation/manual_correction_via_napari.py --rep 1 --moi 0.3MOI --hpi 7 --fov_index 1

The "cells (manually corrected)" layer, can be modified using napari tools. When finished, the layer can be saved in the corresponding folder (e.g. analysis/segmentation/seq_2nt/rep1/0.3MOI/7hpi/fov_1_cpmc_cells.png), the infix _cpmc_ stands for cellpose with manual correction.

Spot detection

Spot detection is performed using starfish methods. The following command creates csv and netCDF files in analysis/spot_detection

mamba run -n mudRapp-seq-starfish python code/spot_detection/cDNA_vRNA.py
mamba run -n mudRapp-seq-starfish python code/spot_detection/specificity.py
mamba run -n mudRapp-seq-starfish python code/spot_detection/plp_individual.py
mamba run -n mudRapp-seq-starfish python code/spot_detection/plp_cumulative.py
mamba run -n mudRapp-seq-starfish python code/spot_detection/seq_qc.py
mamba run -n mudRapp-seq-starfish python code/spot_detection/seq_2nt.py

This creates separate spots files for each fov, they can be combined to a single tsv.xz file for each experiment using

Rscript code/spot_detection/combine_csvs.R

The result of this step is included in the repository:

  • analysis/spot_detection/cDNA_vRNA/all_spots.tsv.xz
  • analysis/spot_detection/plp_cumulative/all_spots.tsv.xz
  • analysis/spot_detection/plp_individual/all_spots.tsv.xz
  • analysis/spot_detection/seq_2nt/all_spots.tsv.xz
  • analysis/spot_detection/specificity/all_spots.tsv.xz

Summary results of the QC experiment are in:

  • analysis/spot_detection/seq_qc/rep0/A_PB2/results.csv

Spot analysis

Sensitivity of cDNA vs direct vRNA probing

The main result is the much higher sensitivity for direct vRNA probing compared to cDNA probing. For details, see the analysis notebook. These figures are included in the manuscript as Supp. Fig. 1b and Fig. 1c, respectively.

Supplementary Figure 1bFigure 1c

Specificity of padlock probing on closely related strains

The main result is that padlock probing has very high specificity. There are almost no false positive results of probes designed for another strain. For details, see the analysis notebook. These figures are included in the manuscript as Supp. Fig. 1b and Fig. 1c, respectively.

Supplementary Figure 1bFigure 1c

Sensitivity of individual padlock probes

To test the sensitivity of individual padlock probes (PLPs), PLPs for ten distinct locations on NA and HA each, have been designed. The main result is that individual PLPs have different levels of sensitivity. While most PLPs produce a good number of spots, some PLPs produce almost none. For details, see the analysis notebook. These figures are included in the manuscript as Fig. 2c,d and Supp. Fig. 2c,d, respectively.

Figure 2c,dSupplementary Figure 2c,d

Binding site reactivity with Nano-DMS-MaP

To explain the different efficiencies of the individual PLPs, the reactivity of the binding sites was analyzed with Nano-DMS-MaP, both with and without PLPs bound. PLP binding reduces the reactivity of the binding sites (as expected). Further, the binding reactivity (without PLPs) positively correlates with PLP efficiency (both looking at the whole binding site, and only looking at a small window around the junctions). For details, see the analysis notebook. An overview of the reactivities along the NA segment, and the correlations with efficiencies are shown in the manuscript in Fig. 3b,c and Supp. Fig. 3a. The same plots were generated for the HA segment in the same notebook and shown in Supp. Fig. 4a,4b,4c.

Figure 3bFigure 3cSupplementary Figure 3a

Sensitivity with increasing number of padlock probes

To test the sensitivity with increasing number of padlock probes per segment, an increasing number of the ten distinct locations on NA and HA, have been used. The main result is that sensitivity increases with number of PLPs used, but saturates around 6PLPs. For details, see the analysis notebook. These figures are included in the manuscript as Fig. 2f,g and Supp. Fig. 2f,g, respectively.

Figure 2f,gSupplementary Figure 2f,g

Sequencing quality control

Dedicated experiments have been performed, to check the quality of the sequencing procedure.

Channel bleed-through estimation

Based on four experiments, in which only one of the channels (A,G,T, and C) is active in the first round, the bleed-through of signal from each channel to each other channel was estimated.

Only a moderate bleed-through (factor 0.656) was detected from channel A to channel T.

For details, see the notebooks (analysis, plot). This figure is included in the manuscript as Supp. Fig. 5b.

Supplementary Figure 5b

Decoding quality

Detailed analysis of the decoding correctness showed, that in an experiment with only a single valid 6nt barcode present, more than 92% of all detected spots were correct after 2 rounds of sequencing and 84% spots after 6 rounds of sequencing.

For details, see the analysis notebook. These figures are included in the manuscript as Supp. Fig. 6b,c.

Supplementary Figure 6bSupplementary Figure 6c

Segment analysis (seq_2nt)

  • channel order: "AGTC"
  • magnification: images were taken at 63x oil objective and pixel size is 0.103 µm

2nt barcode

SegmentvRNA/mRNACode
PB2vRNATT
PB1vRNATG
PAvRNATC
HAvRNATA
NPvRNAGT
NAvRNAGG
MvRNAGC
NSvRNAGA
PB2mRNACT
PB1mRNACG
PAmRNACC
HAmRNACA
NPmRNAAT
NAmRNAAG
MmRNAAC
NSmRNAAA

Bulk analysis

The molecule and segment counts, relative abundances and ambiguous spots were analysed by MOI and hpi, separately for nucleus and cytoplasm.

For details, see the analysis notebook. These figures are included in the manuscript as Fig. 5c,d and Supp. Fig. 7a,b, and 9a,b respectively.

Figure 5cFigure 5dSupplementary Figure 7aSupplementary Figure 7bSupplementary Figure 9aSupplementary Figure 9b

Temporal correlation

The temporal correlation analysis of single segment mRNA expression with total vRNA abundance revealed a high correlation of the M segment.

For details, see the analysis notebook. This figure is included in the manuscript as Supp. Fig. 8.

Supplementary Figure 8

Single-cell analysis

The single-cell analysis reveals extensive cell-to-cell heterogeneity. A substantial proportion of cells fails to replicate all vRNA segments. Cells missing either component of the polymerase complex vRNA segments or NP are associated with very low replication of the vRNA.

For details, see the analysis notebook. The results of the linear modelling are included in Table 2 in the manuscript. These figures are included in the manuscript as Fig. 6b,c,d,e and Supp. Fig. 10a,b, and 12a,b respectively.

Figure 6bFigure 6cFigure 6dFigure 6eSupplementary Figure 10aSupplementary Figure 10bSupplementary Figure 12aSupplementary Figure 12b

About

In-situ sequencing with multiple direct RNA-assisted padlock probing (mudRapp-seq)

Resources

Stars

2 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { // Add copy buttons to all
 blocks
(function() {
function addCopyButtons() {
document.querySelectorAll('pre code').forEach(function(codeBlock) {
if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;
codeBlock.parentElement.setAttribute('data-copy-added', 'true');
var btn = document.createElement('button');
btn.textContent = 'Copy';
btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';
btn.onmouseover = function() { this.style.opacity = '1'; };
btn.onmouseout = function() { this.style.opacity = '0.7'; };
btn.onclick = function() {
navigator.clipboard.writeText(codeBlock.textContent).then(function() {
btn.textContent = 'Copied!';
setTimeout(function() { btn.textContent = 'Copy'; }, 1500);
});
};
codeBlock.parentElement.style.position = 'relative';
codeBlock.parentElement.appendChild(btn);
});
}
addCopyButtons();
// Re-run on dynamic content
var observer = new MutationObserver(addCopyButtons);
observer.observe(document.body, { childList: true, subtree: true });
})();
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
GitHub - BioMeDS/mudRapp-seq: In-situ sequencing with multiple direct RNA-assisted padlock probing (mudRapp-seq) · GitHub
Skip to content

Repository files navigation

mudRapp-seq

This repository contains the code that accompanies the paper introducing "Multiple direct RNApadlock probing in combination with in-situ sequencing (mudRapp-seq)":

Shazeb Ahmad, Jianhui Li, Joél Schaust, Anne-Sophie Gribling-Burrer, Nina Geiger, Sabine C Fischer, Uddhav B Ambi, Simone Backes, Markus J Ankenbrand, Redmond P Smyth, Visualizing the transcription and replication of influenza A viral RNAs in cells by multiple direct RNA padlock probing and in situ sequencing (mudRapp-seq), Nucleic Acids Research, Volume 53, Issue 11, 24 June 2025, gkaf461, https://doi.org/10.1093/nar/gkaf461

This repository is archived at Zenodo DOI

Data

Raw data is archived independently in the BioImage Archive (BIA) with accession number S-BIAD1376. In order to reproduce our analyses, download the raw data from BIA and put them into the data/raw folder.

Image data, acquired on the Leica DMI8 were maximum intensity projected along the z-axis and instant computational clearing (ICC) was applied using Leica software. These images, with associated metadata consist the raw data of our analysis. Only for one dataset (2nt), the images without ICC were used for cell segmentation. Except for these non-ICC images, all datasets were convertet to spacetx format for further analysis.

All final and some intermediate results are included in the repository to facilitate additional analyses without having to re-process all files from scratch.

Data sets

Computational environments

Python environments

To re-create the python environments with mamba run:

mamba env create -f envs/starfish.yml # mudRapp-seq-starfish
mamba env create -f envs/cellpose.yml # mudRapp-seq-cellpose

R environment

The R environment for this project is managed via renv. A local environment is automatically created for you, when you run R or Rscript for the first time in the main project directory. This happens because of the .Rprofile file.

jupyter setting (vscode)

The jupyter files are in sub-folders of code/ but assume the kernel to run in the project root. This is necessary to make the R kernel use the local renv, and allows to consistently use paths relative to the project root rather than the specific notebook location. In VS Code this can be achieved by changing the setting jupyter.notebookFileRoot to ${workspaceFolder}. For jupyter lab there seems to be no simple solution at this moment (see jupyterlab#11619).

Analyses

Data formatting

As starfish is used, the raw data needs to be restructured in SpaceTx format.

In order to create the formatted data in data/spacetx run these steps in the root of the mudRapp-seq repo and in the mudRapp-seq environment:

mamba run -n mudRapp-seq-starfish python code/data_formatting/cDNA_vRNA.py
mamba run -n mudRapp-seq-starfish python code/data_formatting/specificity.py
mamba run -n mudRapp-seq-starfish python code/data_formatting/plp_individual.py
mamba run -n mudRapp-seq-starfish python code/data_formatting/plp_cumulative.py
mamba run -n mudRapp-seq-starfish python code/data_formatting/seq_qc.py
mamba run -n mudRapp-seq-starfish python code/data_formatting/seq_2nt.py

For cell segmentation in the seq_2nt dataset, the intensity of raw images without ICC need to be re-scaled, such that the autofluorescence within the cell is amplified:

mamba run -n mudRapp-seq-starfish python code/data_formatting/seq_2nt_scale_intensity.py

Segmentation

Images were separately segmented for nuclei and cell instances. Nuclei segmentation is used to separate spots based on their location into nucleus and cytoplasm. Cell segmentation is used to count spots per cell, filter infected cells and perform single cell analyses.

All segmentation masks (along with training data and models) are depositet at Zenodo: DOI

You can either download from there and unpack them into analysis/segmentation or follow the instructions below to create masks yourself.

For nucleus segmentation, a cellpose model (models/cellpose/nuclei) was trained and applied to the raw dapi images (in spaceTx format). The model was trained on a total of 5 dapi images with human provided sparse labels (seq_2nt, rep3, hpi5, fov1-5).

For cell instance segmentation, two different approaches were used:

  1. Watershed of the dapi image with nuclei as seeds
  2. A separate cellpose model with manual correction (details below)

Strategy 1 (nuclei via cellpose, cells via watershed)

The first strategy was used for most data, as it was deemed sufficient for filtering of infected cells and to calculate summary statistics like spots per cell. However, for single cell analyses the cell borders were not reliable enough.

This code performs nuclei segmentation with the cellpose model and watershed for cell segmentation (strategy 1).

mamba run -n mudRapp-seq-cellpose python code/segmentation/cellpose_nuclei_watershed_cells.py

Strategy 2 (nuclei and cells via cellpose, cells manually corrected)

The separate cellpose model was trained on raw images without ICC (computational clearing by the microscope vendor). Further, data was preprocessed with intensity scaling (see code). The model was trained on a total of 7 images with human provided sparse labels (2nt_rep1_0.3MOI_5hpi_fov4, 2nt_rep1_0.3MOI_7hpi_fov1, 2nt_rep1_0.3MOI_8hpi_fov1, 2nt_rep1_0.3MOI_8hpi_fov4, 2nt_rep1_1.0MOI_7hpi_fov1, 2nt_rep1_1.0MOI_8hpi_fov1, 2nt_rep2_0.3MOI_8hpi_fov2). In order to maximize the number of correctly detected cells, the following parameters were used: cellprob_threshold=-4.0, flow_threshold=0.7 based on preliminary experiments. Resulting masks were post-processed, removing small objects and closing small holes and gaps (see code).

mamba run -n mudRapp-seq-cellpose python code/segmentation/cellpose_nuclei.py
mamba run -n mudRapp-seq-cellpose python code/segmentation/cellpose_cells.py

Masks produced this way were manually corrected using label editing tools in napari. Manual correction involved extending cells, shrinking cells, moving cell borders and adding new cells (new cells were assigned IDs of 2000 and higher). The focus of the manual correction was mainly on infected cells, if no visibly infected cells were made out during inspection the FOV was saved unchanged.

The script used for manual correction can be started for a specific replication, MOI, hpi, and fov like this:

mamba run -n mudRapp-seq-starfish python code/segmentation/manual_correction_via_napari.py --rep 1 --moi 0.3MOI --hpi 7 --fov_index 1

The "cells (manually corrected)" layer, can be modified using napari tools. When finished, the layer can be saved in the corresponding folder (e.g. analysis/segmentation/seq_2nt/rep1/0.3MOI/7hpi/fov_1_cpmc_cells.png), the infix _cpmc_ stands for cellpose with manual correction.

Spot detection

Spot detection is performed using starfish methods. The following command creates csv and netCDF files in analysis/spot_detection

mamba run -n mudRapp-seq-starfish python code/spot_detection/cDNA_vRNA.py
mamba run -n mudRapp-seq-starfish python code/spot_detection/specificity.py
mamba run -n mudRapp-seq-starfish python code/spot_detection/plp_individual.py
mamba run -n mudRapp-seq-starfish python code/spot_detection/plp_cumulative.py
mamba run -n mudRapp-seq-starfish python code/spot_detection/seq_qc.py
mamba run -n mudRapp-seq-starfish python code/spot_detection/seq_2nt.py

This creates separate spots files for each fov, they can be combined to a single tsv.xz file for each experiment using

Rscript code/spot_detection/combine_csvs.R

The result of this step is included in the repository:

  • analysis/spot_detection/cDNA_vRNA/all_spots.tsv.xz
  • analysis/spot_detection/plp_cumulative/all_spots.tsv.xz
  • analysis/spot_detection/plp_individual/all_spots.tsv.xz
  • analysis/spot_detection/seq_2nt/all_spots.tsv.xz
  • analysis/spot_detection/specificity/all_spots.tsv.xz

Summary results of the QC experiment are in:

  • analysis/spot_detection/seq_qc/rep0/A_PB2/results.csv

Spot analysis

Sensitivity of cDNA vs direct vRNA probing

The main result is the much higher sensitivity for direct vRNA probing compared to cDNA probing. For details, see the analysis notebook. These figures are included in the manuscript as Supp. Fig. 1b and Fig. 1c, respectively.

Supplementary Figure 1bFigure 1c

Specificity of padlock probing on closely related strains

The main result is that padlock probing has very high specificity. There are almost no false positive results of probes designed for another strain. For details, see the analysis notebook. These figures are included in the manuscript as Supp. Fig. 1b and Fig. 1c, respectively.

Supplementary Figure 1bFigure 1c

Sensitivity of individual padlock probes

To test the sensitivity of individual padlock probes (PLPs), PLPs for ten distinct locations on NA and HA each, have been designed. The main result is that individual PLPs have different levels of sensitivity. While most PLPs produce a good number of spots, some PLPs produce almost none. For details, see the analysis notebook. These figures are included in the manuscript as Fig. 2c,d and Supp. Fig. 2c,d, respectively.

Figure 2c,dSupplementary Figure 2c,d

Binding site reactivity with Nano-DMS-MaP

To explain the different efficiencies of the individual PLPs, the reactivity of the binding sites was analyzed with Nano-DMS-MaP, both with and without PLPs bound. PLP binding reduces the reactivity of the binding sites (as expected). Further, the binding reactivity (without PLPs) positively correlates with PLP efficiency (both looking at the whole binding site, and only looking at a small window around the junctions). For details, see the analysis notebook. An overview of the reactivities along the NA segment, and the correlations with efficiencies are shown in the manuscript in Fig. 3b,c and Supp. Fig. 3a. The same plots were generated for the HA segment in the same notebook and shown in Supp. Fig. 4a,4b,4c.

Figure 3bFigure 3cSupplementary Figure 3a

Sensitivity with increasing number of padlock probes

To test the sensitivity with increasing number of padlock probes per segment, an increasing number of the ten distinct locations on NA and HA, have been used. The main result is that sensitivity increases with number of PLPs used, but saturates around 6PLPs. For details, see the analysis notebook. These figures are included in the manuscript as Fig. 2f,g and Supp. Fig. 2f,g, respectively.

Figure 2f,gSupplementary Figure 2f,g

Sequencing quality control

Dedicated experiments have been performed, to check the quality of the sequencing procedure.

Channel bleed-through estimation

Based on four experiments, in which only one of the channels (A,G,T, and C) is active in the first round, the bleed-through of signal from each channel to each other channel was estimated.

Only a moderate bleed-through (factor 0.656) was detected from channel A to channel T.

For details, see the notebooks (analysis, plot). This figure is included in the manuscript as Supp. Fig. 5b.

Supplementary Figure 5b

Decoding quality

Detailed analysis of the decoding correctness showed, that in an experiment with only a single valid 6nt barcode present, more than 92% of all detected spots were correct after 2 rounds of sequencing and 84% spots after 6 rounds of sequencing.

For details, see the analysis notebook. These figures are included in the manuscript as Supp. Fig. 6b,c.

Supplementary Figure 6bSupplementary Figure 6c

Segment analysis (seq_2nt)

  • channel order: "AGTC"
  • magnification: images were taken at 63x oil objective and pixel size is 0.103 µm

2nt barcode

SegmentvRNA/mRNACode
PB2vRNATT
PB1vRNATG
PAvRNATC
HAvRNATA
NPvRNAGT
NAvRNAGG
MvRNAGC
NSvRNAGA
PB2mRNACT
PB1mRNACG
PAmRNACC
HAmRNACA
NPmRNAAT
NAmRNAAG
MmRNAAC
NSmRNAAA

Bulk analysis

The molecule and segment counts, relative abundances and ambiguous spots were analysed by MOI and hpi, separately for nucleus and cytoplasm.

For details, see the analysis notebook. These figures are included in the manuscript as Fig. 5c,d and Supp. Fig. 7a,b, and 9a,b respectively.

Figure 5cFigure 5dSupplementary Figure 7aSupplementary Figure 7bSupplementary Figure 9aSupplementary Figure 9b

Temporal correlation

The temporal correlation analysis of single segment mRNA expression with total vRNA abundance revealed a high correlation of the M segment.

For details, see the analysis notebook. This figure is included in the manuscript as Supp. Fig. 8.

Supplementary Figure 8

Single-cell analysis

The single-cell analysis reveals extensive cell-to-cell heterogeneity. A substantial proportion of cells fails to replicate all vRNA segments. Cells missing either component of the polymerase complex vRNA segments or NP are associated with very low replication of the vRNA.

For details, see the analysis notebook. The results of the linear modelling are included in Table 2 in the manuscript. These figures are included in the manuscript as Fig. 6b,c,d,e and Supp. Fig. 10a,b, and 12a,b respectively.

Figure 6bFigure 6cFigure 6dFigure 6eSupplementary Figure 10aSupplementary Figure 10bSupplementary Figure 12aSupplementary Figure 12b

About

In-situ sequencing with multiple direct RNA-assisted padlock probing (mudRapp-seq)

Resources

Stars

2 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { // Force GitHub README to respect dark mode (function() { var style = document.createElement('style'); style.textContent = ' .markdown-body { color-scheme: dark light; } .markdown-body pre { background: #161b22 !important; } .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; } .markdown-body table th, .markdown-body table td { border-color: #30363d !important; } .markdown-body img { background: #0d1117; } .markdown-body blockquote { border-left-color: #8b949e; } .markdown-body hr { border-color: #30363d; } '; document.head.appendChild(style); })(); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' GitHub - BioMeDS/mudRapp-seq: In-situ sequencing with multiple direct RNA-assisted padlock probing (mudRapp-seq) · GitHub
Skip to content

Repository files navigation

mudRapp-seq

This repository contains the code that accompanies the paper introducing "Multiple direct RNApadlock probing in combination with in-situ sequencing (mudRapp-seq)":

Shazeb Ahmad, Jianhui Li, Joél Schaust, Anne-Sophie Gribling-Burrer, Nina Geiger, Sabine C Fischer, Uddhav B Ambi, Simone Backes, Markus J Ankenbrand, Redmond P Smyth, Visualizing the transcription and replication of influenza A viral RNAs in cells by multiple direct RNA padlock probing and in situ sequencing (mudRapp-seq), Nucleic Acids Research, Volume 53, Issue 11, 24 June 2025, gkaf461, https://doi.org/10.1093/nar/gkaf461

This repository is archived at Zenodo DOI

Data

Raw data is archived independently in the BioImage Archive (BIA) with accession number S-BIAD1376. In order to reproduce our analyses, download the raw data from BIA and put them into the data/raw folder.

Image data, acquired on the Leica DMI8 were maximum intensity projected along the z-axis and instant computational clearing (ICC) was applied using Leica software. These images, with associated metadata consist the raw data of our analysis. Only for one dataset (2nt), the images without ICC were used for cell segmentation. Except for these non-ICC images, all datasets were convertet to spacetx format for further analysis.

All final and some intermediate results are included in the repository to facilitate additional analyses without having to re-process all files from scratch.

Data sets

Computational environments

Python environments

To re-create the python environments with mamba run:

mamba env create -f envs/starfish.yml # mudRapp-seq-starfish
mamba env create -f envs/cellpose.yml # mudRapp-seq-cellpose

R environment

The R environment for this project is managed via renv. A local environment is automatically created for you, when you run R or Rscript for the first time in the main project directory. This happens because of the .Rprofile file.

jupyter setting (vscode)

The jupyter files are in sub-folders of code/ but assume the kernel to run in the project root. This is necessary to make the R kernel use the local renv, and allows to consistently use paths relative to the project root rather than the specific notebook location. In VS Code this can be achieved by changing the setting jupyter.notebookFileRoot to ${workspaceFolder}. For jupyter lab there seems to be no simple solution at this moment (see jupyterlab#11619).

Analyses

Data formatting

As starfish is used, the raw data needs to be restructured in SpaceTx format.

In order to create the formatted data in data/spacetx run these steps in the root of the mudRapp-seq repo and in the mudRapp-seq environment:

mamba run -n mudRapp-seq-starfish python code/data_formatting/cDNA_vRNA.py
mamba run -n mudRapp-seq-starfish python code/data_formatting/specificity.py
mamba run -n mudRapp-seq-starfish python code/data_formatting/plp_individual.py
mamba run -n mudRapp-seq-starfish python code/data_formatting/plp_cumulative.py
mamba run -n mudRapp-seq-starfish python code/data_formatting/seq_qc.py
mamba run -n mudRapp-seq-starfish python code/data_formatting/seq_2nt.py

For cell segmentation in the seq_2nt dataset, the intensity of raw images without ICC need to be re-scaled, such that the autofluorescence within the cell is amplified:

mamba run -n mudRapp-seq-starfish python code/data_formatting/seq_2nt_scale_intensity.py

Segmentation

Images were separately segmented for nuclei and cell instances. Nuclei segmentation is used to separate spots based on their location into nucleus and cytoplasm. Cell segmentation is used to count spots per cell, filter infected cells and perform single cell analyses.

All segmentation masks (along with training data and models) are depositet at Zenodo: DOI

You can either download from there and unpack them into analysis/segmentation or follow the instructions below to create masks yourself.

For nucleus segmentation, a cellpose model (models/cellpose/nuclei) was trained and applied to the raw dapi images (in spaceTx format). The model was trained on a total of 5 dapi images with human provided sparse labels (seq_2nt, rep3, hpi5, fov1-5).

For cell instance segmentation, two different approaches were used:

  1. Watershed of the dapi image with nuclei as seeds
  2. A separate cellpose model with manual correction (details below)

Strategy 1 (nuclei via cellpose, cells via watershed)

The first strategy was used for most data, as it was deemed sufficient for filtering of infected cells and to calculate summary statistics like spots per cell. However, for single cell analyses the cell borders were not reliable enough.

This code performs nuclei segmentation with the cellpose model and watershed for cell segmentation (strategy 1).

mamba run -n mudRapp-seq-cellpose python code/segmentation/cellpose_nuclei_watershed_cells.py

Strategy 2 (nuclei and cells via cellpose, cells manually corrected)

The separate cellpose model was trained on raw images without ICC (computational clearing by the microscope vendor). Further, data was preprocessed with intensity scaling (see code). The model was trained on a total of 7 images with human provided sparse labels (2nt_rep1_0.3MOI_5hpi_fov4, 2nt_rep1_0.3MOI_7hpi_fov1, 2nt_rep1_0.3MOI_8hpi_fov1, 2nt_rep1_0.3MOI_8hpi_fov4, 2nt_rep1_1.0MOI_7hpi_fov1, 2nt_rep1_1.0MOI_8hpi_fov1, 2nt_rep2_0.3MOI_8hpi_fov2). In order to maximize the number of correctly detected cells, the following parameters were used: cellprob_threshold=-4.0, flow_threshold=0.7 based on preliminary experiments. Resulting masks were post-processed, removing small objects and closing small holes and gaps (see code).

mamba run -n mudRapp-seq-cellpose python code/segmentation/cellpose_nuclei.py
mamba run -n mudRapp-seq-cellpose python code/segmentation/cellpose_cells.py

Masks produced this way were manually corrected using label editing tools in napari. Manual correction involved extending cells, shrinking cells, moving cell borders and adding new cells (new cells were assigned IDs of 2000 and higher). The focus of the manual correction was mainly on infected cells, if no visibly infected cells were made out during inspection the FOV was saved unchanged.

The script used for manual correction can be started for a specific replication, MOI, hpi, and fov like this:

mamba run -n mudRapp-seq-starfish python code/segmentation/manual_correction_via_napari.py --rep 1 --moi 0.3MOI --hpi 7 --fov_index 1

The "cells (manually corrected)" layer, can be modified using napari tools. When finished, the layer can be saved in the corresponding folder (e.g. analysis/segmentation/seq_2nt/rep1/0.3MOI/7hpi/fov_1_cpmc_cells.png), the infix _cpmc_ stands for cellpose with manual correction.

Spot detection

Spot detection is performed using starfish methods. The following command creates csv and netCDF files in analysis/spot_detection

mamba run -n mudRapp-seq-starfish python code/spot_detection/cDNA_vRNA.py
mamba run -n mudRapp-seq-starfish python code/spot_detection/specificity.py
mamba run -n mudRapp-seq-starfish python code/spot_detection/plp_individual.py
mamba run -n mudRapp-seq-starfish python code/spot_detection/plp_cumulative.py
mamba run -n mudRapp-seq-starfish python code/spot_detection/seq_qc.py
mamba run -n mudRapp-seq-starfish python code/spot_detection/seq_2nt.py

This creates separate spots files for each fov, they can be combined to a single tsv.xz file for each experiment using

Rscript code/spot_detection/combine_csvs.R

The result of this step is included in the repository:

  • analysis/spot_detection/cDNA_vRNA/all_spots.tsv.xz
  • analysis/spot_detection/plp_cumulative/all_spots.tsv.xz
  • analysis/spot_detection/plp_individual/all_spots.tsv.xz
  • analysis/spot_detection/seq_2nt/all_spots.tsv.xz
  • analysis/spot_detection/specificity/all_spots.tsv.xz

Summary results of the QC experiment are in:

  • analysis/spot_detection/seq_qc/rep0/A_PB2/results.csv

Spot analysis

Sensitivity of cDNA vs direct vRNA probing

The main result is the much higher sensitivity for direct vRNA probing compared to cDNA probing. For details, see the analysis notebook. These figures are included in the manuscript as Supp. Fig. 1b and Fig. 1c, respectively.

Supplementary Figure 1bFigure 1c

Specificity of padlock probing on closely related strains

The main result is that padlock probing has very high specificity. There are almost no false positive results of probes designed for another strain. For details, see the analysis notebook. These figures are included in the manuscript as Supp. Fig. 1b and Fig. 1c, respectively.

Supplementary Figure 1bFigure 1c

Sensitivity of individual padlock probes

To test the sensitivity of individual padlock probes (PLPs), PLPs for ten distinct locations on NA and HA each, have been designed. The main result is that individual PLPs have different levels of sensitivity. While most PLPs produce a good number of spots, some PLPs produce almost none. For details, see the analysis notebook. These figures are included in the manuscript as Fig. 2c,d and Supp. Fig. 2c,d, respectively.

Figure 2c,dSupplementary Figure 2c,d

Binding site reactivity with Nano-DMS-MaP

To explain the different efficiencies of the individual PLPs, the reactivity of the binding sites was analyzed with Nano-DMS-MaP, both with and without PLPs bound. PLP binding reduces the reactivity of the binding sites (as expected). Further, the binding reactivity (without PLPs) positively correlates with PLP efficiency (both looking at the whole binding site, and only looking at a small window around the junctions). For details, see the analysis notebook. An overview of the reactivities along the NA segment, and the correlations with efficiencies are shown in the manuscript in Fig. 3b,c and Supp. Fig. 3a. The same plots were generated for the HA segment in the same notebook and shown in Supp. Fig. 4a,4b,4c.

Figure 3bFigure 3cSupplementary Figure 3a

Sensitivity with increasing number of padlock probes

To test the sensitivity with increasing number of padlock probes per segment, an increasing number of the ten distinct locations on NA and HA, have been used. The main result is that sensitivity increases with number of PLPs used, but saturates around 6PLPs. For details, see the analysis notebook. These figures are included in the manuscript as Fig. 2f,g and Supp. Fig. 2f,g, respectively.

Figure 2f,gSupplementary Figure 2f,g

Sequencing quality control

Dedicated experiments have been performed, to check the quality of the sequencing procedure.

Channel bleed-through estimation

Based on four experiments, in which only one of the channels (A,G,T, and C) is active in the first round, the bleed-through of signal from each channel to each other channel was estimated.

Only a moderate bleed-through (factor 0.656) was detected from channel A to channel T.

For details, see the notebooks (analysis, plot). This figure is included in the manuscript as Supp. Fig. 5b.

Supplementary Figure 5b

Decoding quality

Detailed analysis of the decoding correctness showed, that in an experiment with only a single valid 6nt barcode present, more than 92% of all detected spots were correct after 2 rounds of sequencing and 84% spots after 6 rounds of sequencing.

For details, see the analysis notebook. These figures are included in the manuscript as Supp. Fig. 6b,c.

Supplementary Figure 6bSupplementary Figure 6c

Segment analysis (seq_2nt)

  • channel order: "AGTC"
  • magnification: images were taken at 63x oil objective and pixel size is 0.103 µm

2nt barcode

SegmentvRNA/mRNACode
PB2vRNATT
PB1vRNATG
PAvRNATC
HAvRNATA
NPvRNAGT
NAvRNAGG
MvRNAGC
NSvRNAGA
PB2mRNACT
PB1mRNACG
PAmRNACC
HAmRNACA
NPmRNAAT
NAmRNAAG
MmRNAAC
NSmRNAAA

Bulk analysis

The molecule and segment counts, relative abundances and ambiguous spots were analysed by MOI and hpi, separately for nucleus and cytoplasm.

For details, see the analysis notebook. These figures are included in the manuscript as Fig. 5c,d and Supp. Fig. 7a,b, and 9a,b respectively.

Figure 5cFigure 5dSupplementary Figure 7aSupplementary Figure 7bSupplementary Figure 9aSupplementary Figure 9b

Temporal correlation

The temporal correlation analysis of single segment mRNA expression with total vRNA abundance revealed a high correlation of the M segment.

For details, see the analysis notebook. This figure is included in the manuscript as Supp. Fig. 8.

Supplementary Figure 8

Single-cell analysis

The single-cell analysis reveals extensive cell-to-cell heterogeneity. A substantial proportion of cells fails to replicate all vRNA segments. Cells missing either component of the polymerase complex vRNA segments or NP are associated with very low replication of the vRNA.

For details, see the analysis notebook. The results of the linear modelling are included in Table 2 in the manuscript. These figures are included in the manuscript as Fig. 6b,c,d,e and Supp. Fig. 10a,b, and 12a,b respectively.

Figure 6bFigure 6cFigure 6dFigure 6eSupplementary Figure 10aSupplementary Figure 10bSupplementary Figure 12aSupplementary Figure 12b

About

In-situ sequencing with multiple direct RNA-assisted padlock probing (mudRapp-seq)

Resources

Stars

2 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { // Highlight search terms from Google/DuckDuckGo/Bing referrer (function() { var ref = document.referrer; var terms = []; if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) { var url = new URL(ref); var q = url.searchParams.get('q') || url.searchParams.get('p'); if (q) { terms = q.split(/\s+/).filter(function(t) { return t.length > 2; }); } } if (terms.length === 0) return; var style = document.createElement('style'); style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }'; document.head.appendChild(style); function highlight(node) { if (node.nodeType === 3) { // text node var text = node.textContent; var found = false; terms.forEach(function(term) { var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\]\\]/g, '\\') + ')', 'gi'); if (regex.test(text)) { found = true; var frag = document.createDocumentFragment(); var parts = text.split(regex); parts.forEach(function(part, i) { if (i % 2 === 0) { frag.appendChild(document.createTextNode(part)); } else { var span = document.createElement('span'); span.className = 'userscript-highlight'; span.textContent = part; frag.appendChild(span); } }); node.parentNode.replaceChild(frag, node); } }); } else if (node.nodeType === 1 && node.childNodes) { // element var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT']; if (!skipTags.includes(node.tagName)) { Array.from(node.childNodes).forEach(highlight); } } } highlight(document.body); // Re-highlight on dynamic content var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1 || node.nodeType === 3) highlight(node); }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' GitHub - BioMeDS/mudRapp-seq: In-situ sequencing with multiple direct RNA-assisted padlock probing (mudRapp-seq) · GitHub
Skip to content

Repository files navigation

mudRapp-seq

This repository contains the code that accompanies the paper introducing "Multiple direct RNApadlock probing in combination with in-situ sequencing (mudRapp-seq)":

Shazeb Ahmad, Jianhui Li, Joél Schaust, Anne-Sophie Gribling-Burrer, Nina Geiger, Sabine C Fischer, Uddhav B Ambi, Simone Backes, Markus J Ankenbrand, Redmond P Smyth, Visualizing the transcription and replication of influenza A viral RNAs in cells by multiple direct RNA padlock probing and in situ sequencing (mudRapp-seq), Nucleic Acids Research, Volume 53, Issue 11, 24 June 2025, gkaf461, https://doi.org/10.1093/nar/gkaf461

This repository is archived at Zenodo DOI

Data

Raw data is archived independently in the BioImage Archive (BIA) with accession number S-BIAD1376. In order to reproduce our analyses, download the raw data from BIA and put them into the data/raw folder.

Image data, acquired on the Leica DMI8 were maximum intensity projected along the z-axis and instant computational clearing (ICC) was applied using Leica software. These images, with associated metadata consist the raw data of our analysis. Only for one dataset (2nt), the images without ICC were used for cell segmentation. Except for these non-ICC images, all datasets were convertet to spacetx format for further analysis.

All final and some intermediate results are included in the repository to facilitate additional analyses without having to re-process all files from scratch.

Data sets

Computational environments

Python environments

To re-create the python environments with mamba run:

mamba env create -f envs/starfish.yml # mudRapp-seq-starfish
mamba env create -f envs/cellpose.yml # mudRapp-seq-cellpose

R environment

The R environment for this project is managed via renv. A local environment is automatically created for you, when you run R or Rscript for the first time in the main project directory. This happens because of the .Rprofile file.

jupyter setting (vscode)

The jupyter files are in sub-folders of code/ but assume the kernel to run in the project root. This is necessary to make the R kernel use the local renv, and allows to consistently use paths relative to the project root rather than the specific notebook location. In VS Code this can be achieved by changing the setting jupyter.notebookFileRoot to ${workspaceFolder}. For jupyter lab there seems to be no simple solution at this moment (see jupyterlab#11619).

Analyses

Data formatting

As starfish is used, the raw data needs to be restructured in SpaceTx format.

In order to create the formatted data in data/spacetx run these steps in the root of the mudRapp-seq repo and in the mudRapp-seq environment:

mamba run -n mudRapp-seq-starfish python code/data_formatting/cDNA_vRNA.py
mamba run -n mudRapp-seq-starfish python code/data_formatting/specificity.py
mamba run -n mudRapp-seq-starfish python code/data_formatting/plp_individual.py
mamba run -n mudRapp-seq-starfish python code/data_formatting/plp_cumulative.py
mamba run -n mudRapp-seq-starfish python code/data_formatting/seq_qc.py
mamba run -n mudRapp-seq-starfish python code/data_formatting/seq_2nt.py

For cell segmentation in the seq_2nt dataset, the intensity of raw images without ICC need to be re-scaled, such that the autofluorescence within the cell is amplified:

mamba run -n mudRapp-seq-starfish python code/data_formatting/seq_2nt_scale_intensity.py

Segmentation

Images were separately segmented for nuclei and cell instances. Nuclei segmentation is used to separate spots based on their location into nucleus and cytoplasm. Cell segmentation is used to count spots per cell, filter infected cells and perform single cell analyses.

All segmentation masks (along with training data and models) are depositet at Zenodo: DOI

You can either download from there and unpack them into analysis/segmentation or follow the instructions below to create masks yourself.

For nucleus segmentation, a cellpose model (models/cellpose/nuclei) was trained and applied to the raw dapi images (in spaceTx format). The model was trained on a total of 5 dapi images with human provided sparse labels (seq_2nt, rep3, hpi5, fov1-5).

For cell instance segmentation, two different approaches were used:

  1. Watershed of the dapi image with nuclei as seeds
  2. A separate cellpose model with manual correction (details below)

Strategy 1 (nuclei via cellpose, cells via watershed)

The first strategy was used for most data, as it was deemed sufficient for filtering of infected cells and to calculate summary statistics like spots per cell. However, for single cell analyses the cell borders were not reliable enough.

This code performs nuclei segmentation with the cellpose model and watershed for cell segmentation (strategy 1).

mamba run -n mudRapp-seq-cellpose python code/segmentation/cellpose_nuclei_watershed_cells.py

Strategy 2 (nuclei and cells via cellpose, cells manually corrected)

The separate cellpose model was trained on raw images without ICC (computational clearing by the microscope vendor). Further, data was preprocessed with intensity scaling (see code). The model was trained on a total of 7 images with human provided sparse labels (2nt_rep1_0.3MOI_5hpi_fov4, 2nt_rep1_0.3MOI_7hpi_fov1, 2nt_rep1_0.3MOI_8hpi_fov1, 2nt_rep1_0.3MOI_8hpi_fov4, 2nt_rep1_1.0MOI_7hpi_fov1, 2nt_rep1_1.0MOI_8hpi_fov1, 2nt_rep2_0.3MOI_8hpi_fov2). In order to maximize the number of correctly detected cells, the following parameters were used: cellprob_threshold=-4.0, flow_threshold=0.7 based on preliminary experiments. Resulting masks were post-processed, removing small objects and closing small holes and gaps (see code).

mamba run -n mudRapp-seq-cellpose python code/segmentation/cellpose_nuclei.py
mamba run -n mudRapp-seq-cellpose python code/segmentation/cellpose_cells.py

Masks produced this way were manually corrected using label editing tools in napari. Manual correction involved extending cells, shrinking cells, moving cell borders and adding new cells (new cells were assigned IDs of 2000 and higher). The focus of the manual correction was mainly on infected cells, if no visibly infected cells were made out during inspection the FOV was saved unchanged.

The script used for manual correction can be started for a specific replication, MOI, hpi, and fov like this:

mamba run -n mudRapp-seq-starfish python code/segmentation/manual_correction_via_napari.py --rep 1 --moi 0.3MOI --hpi 7 --fov_index 1

The "cells (manually corrected)" layer, can be modified using napari tools. When finished, the layer can be saved in the corresponding folder (e.g. analysis/segmentation/seq_2nt/rep1/0.3MOI/7hpi/fov_1_cpmc_cells.png), the infix _cpmc_ stands for cellpose with manual correction.

Spot detection

Spot detection is performed using starfish methods. The following command creates csv and netCDF files in analysis/spot_detection

mamba run -n mudRapp-seq-starfish python code/spot_detection/cDNA_vRNA.py
mamba run -n mudRapp-seq-starfish python code/spot_detection/specificity.py
mamba run -n mudRapp-seq-starfish python code/spot_detection/plp_individual.py
mamba run -n mudRapp-seq-starfish python code/spot_detection/plp_cumulative.py
mamba run -n mudRapp-seq-starfish python code/spot_detection/seq_qc.py
mamba run -n mudRapp-seq-starfish python code/spot_detection/seq_2nt.py

This creates separate spots files for each fov, they can be combined to a single tsv.xz file for each experiment using

Rscript code/spot_detection/combine_csvs.R

The result of this step is included in the repository:

  • analysis/spot_detection/cDNA_vRNA/all_spots.tsv.xz
  • analysis/spot_detection/plp_cumulative/all_spots.tsv.xz
  • analysis/spot_detection/plp_individual/all_spots.tsv.xz
  • analysis/spot_detection/seq_2nt/all_spots.tsv.xz
  • analysis/spot_detection/specificity/all_spots.tsv.xz

Summary results of the QC experiment are in:

  • analysis/spot_detection/seq_qc/rep0/A_PB2/results.csv

Spot analysis

Sensitivity of cDNA vs direct vRNA probing

The main result is the much higher sensitivity for direct vRNA probing compared to cDNA probing. For details, see the analysis notebook. These figures are included in the manuscript as Supp. Fig. 1b and Fig. 1c, respectively.

Supplementary Figure 1bFigure 1c

Specificity of padlock probing on closely related strains

The main result is that padlock probing has very high specificity. There are almost no false positive results of probes designed for another strain. For details, see the analysis notebook. These figures are included in the manuscript as Supp. Fig. 1b and Fig. 1c, respectively.

Supplementary Figure 1bFigure 1c

Sensitivity of individual padlock probes

To test the sensitivity of individual padlock probes (PLPs), PLPs for ten distinct locations on NA and HA each, have been designed. The main result is that individual PLPs have different levels of sensitivity. While most PLPs produce a good number of spots, some PLPs produce almost none. For details, see the analysis notebook. These figures are included in the manuscript as Fig. 2c,d and Supp. Fig. 2c,d, respectively.

Figure 2c,dSupplementary Figure 2c,d

Binding site reactivity with Nano-DMS-MaP

To explain the different efficiencies of the individual PLPs, the reactivity of the binding sites was analyzed with Nano-DMS-MaP, both with and without PLPs bound. PLP binding reduces the reactivity of the binding sites (as expected). Further, the binding reactivity (without PLPs) positively correlates with PLP efficiency (both looking at the whole binding site, and only looking at a small window around the junctions). For details, see the analysis notebook. An overview of the reactivities along the NA segment, and the correlations with efficiencies are shown in the manuscript in Fig. 3b,c and Supp. Fig. 3a. The same plots were generated for the HA segment in the same notebook and shown in Supp. Fig. 4a,4b,4c.

Figure 3bFigure 3cSupplementary Figure 3a

Sensitivity with increasing number of padlock probes

To test the sensitivity with increasing number of padlock probes per segment, an increasing number of the ten distinct locations on NA and HA, have been used. The main result is that sensitivity increases with number of PLPs used, but saturates around 6PLPs. For details, see the analysis notebook. These figures are included in the manuscript as Fig. 2f,g and Supp. Fig. 2f,g, respectively.

Figure 2f,gSupplementary Figure 2f,g

Sequencing quality control

Dedicated experiments have been performed, to check the quality of the sequencing procedure.

Channel bleed-through estimation

Based on four experiments, in which only one of the channels (A,G,T, and C) is active in the first round, the bleed-through of signal from each channel to each other channel was estimated.

Only a moderate bleed-through (factor 0.656) was detected from channel A to channel T.

For details, see the notebooks (analysis, plot). This figure is included in the manuscript as Supp. Fig. 5b.

Supplementary Figure 5b

Decoding quality

Detailed analysis of the decoding correctness showed, that in an experiment with only a single valid 6nt barcode present, more than 92% of all detected spots were correct after 2 rounds of sequencing and 84% spots after 6 rounds of sequencing.

For details, see the analysis notebook. These figures are included in the manuscript as Supp. Fig. 6b,c.

Supplementary Figure 6bSupplementary Figure 6c

Segment analysis (seq_2nt)

  • channel order: "AGTC"
  • magnification: images were taken at 63x oil objective and pixel size is 0.103 µm

2nt barcode

SegmentvRNA/mRNACode
PB2vRNATT
PB1vRNATG
PAvRNATC
HAvRNATA
NPvRNAGT
NAvRNAGG
MvRNAGC
NSvRNAGA
PB2mRNACT
PB1mRNACG
PAmRNACC
HAmRNACA
NPmRNAAT
NAmRNAAG
MmRNAAC
NSmRNAAA

Bulk analysis

The molecule and segment counts, relative abundances and ambiguous spots were analysed by MOI and hpi, separately for nucleus and cytoplasm.

For details, see the analysis notebook. These figures are included in the manuscript as Fig. 5c,d and Supp. Fig. 7a,b, and 9a,b respectively.

Figure 5cFigure 5dSupplementary Figure 7aSupplementary Figure 7bSupplementary Figure 9aSupplementary Figure 9b

Temporal correlation

The temporal correlation analysis of single segment mRNA expression with total vRNA abundance revealed a high correlation of the M segment.

For details, see the analysis notebook. This figure is included in the manuscript as Supp. Fig. 8.

Supplementary Figure 8

Single-cell analysis

The single-cell analysis reveals extensive cell-to-cell heterogeneity. A substantial proportion of cells fails to replicate all vRNA segments. Cells missing either component of the polymerase complex vRNA segments or NP are associated with very low replication of the vRNA.

For details, see the analysis notebook. The results of the linear modelling are included in Table 2 in the manuscript. These figures are included in the manuscript as Fig. 6b,c,d,e and Supp. Fig. 10a,b, and 12a,b respectively.

Figure 6bFigure 6cFigure 6dFigure 6eSupplementary Figure 10aSupplementary Figure 10bSupplementary Figure 12aSupplementary Figure 12b

About

In-situ sequencing with multiple direct RNA-assisted padlock probing (mudRapp-seq)

Resources

Stars

2 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { // Strip utm_, fbclid, gclid, etc. from all links on page (function() { var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content', 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid', 'ref', 'ref_src', 'source', 'medium', 'campaign']; function cleanUrl(url) { try { var u = new URL(url, window.location.origin); var changed = false; trackingParams.forEach(function(p) { if (u.searchParams.has(p)) { u.searchParams.delete(p); changed = true; } }); return changed ? u.toString() : url; } catch (e) { return url; } } function cleanLinks() { document.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } cleanLinks(); var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1) { if (node.tagName === 'A') cleanLinks(); node.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + ' GitHub - BioMeDS/mudRapp-seq: In-situ sequencing with multiple direct RNA-assisted padlock probing (mudRapp-seq) · GitHub
Skip to content

Repository files navigation

mudRapp-seq

This repository contains the code that accompanies the paper introducing "Multiple direct RNApadlock probing in combination with in-situ sequencing (mudRapp-seq)":

Shazeb Ahmad, Jianhui Li, Joél Schaust, Anne-Sophie Gribling-Burrer, Nina Geiger, Sabine C Fischer, Uddhav B Ambi, Simone Backes, Markus J Ankenbrand, Redmond P Smyth, Visualizing the transcription and replication of influenza A viral RNAs in cells by multiple direct RNA padlock probing and in situ sequencing (mudRapp-seq), Nucleic Acids Research, Volume 53, Issue 11, 24 June 2025, gkaf461, https://doi.org/10.1093/nar/gkaf461

This repository is archived at Zenodo DOI

Data

Raw data is archived independently in the BioImage Archive (BIA) with accession number S-BIAD1376. In order to reproduce our analyses, download the raw data from BIA and put them into the data/raw folder.

Image data, acquired on the Leica DMI8 were maximum intensity projected along the z-axis and instant computational clearing (ICC) was applied using Leica software. These images, with associated metadata consist the raw data of our analysis. Only for one dataset (2nt), the images without ICC were used for cell segmentation. Except for these non-ICC images, all datasets were convertet to spacetx format for further analysis.

All final and some intermediate results are included in the repository to facilitate additional analyses without having to re-process all files from scratch.

Data sets

Computational environments

Python environments

To re-create the python environments with mamba run:

mamba env create -f envs/starfish.yml # mudRapp-seq-starfish
mamba env create -f envs/cellpose.yml # mudRapp-seq-cellpose

R environment

The R environment for this project is managed via renv. A local environment is automatically created for you, when you run R or Rscript for the first time in the main project directory. This happens because of the .Rprofile file.

jupyter setting (vscode)

The jupyter files are in sub-folders of code/ but assume the kernel to run in the project root. This is necessary to make the R kernel use the local renv, and allows to consistently use paths relative to the project root rather than the specific notebook location. In VS Code this can be achieved by changing the setting jupyter.notebookFileRoot to ${workspaceFolder}. For jupyter lab there seems to be no simple solution at this moment (see jupyterlab#11619).

Analyses

Data formatting

As starfish is used, the raw data needs to be restructured in SpaceTx format.

In order to create the formatted data in data/spacetx run these steps in the root of the mudRapp-seq repo and in the mudRapp-seq environment:

mamba run -n mudRapp-seq-starfish python code/data_formatting/cDNA_vRNA.py
mamba run -n mudRapp-seq-starfish python code/data_formatting/specificity.py
mamba run -n mudRapp-seq-starfish python code/data_formatting/plp_individual.py
mamba run -n mudRapp-seq-starfish python code/data_formatting/plp_cumulative.py
mamba run -n mudRapp-seq-starfish python code/data_formatting/seq_qc.py
mamba run -n mudRapp-seq-starfish python code/data_formatting/seq_2nt.py

For cell segmentation in the seq_2nt dataset, the intensity of raw images without ICC need to be re-scaled, such that the autofluorescence within the cell is amplified:

mamba run -n mudRapp-seq-starfish python code/data_formatting/seq_2nt_scale_intensity.py

Segmentation

Images were separately segmented for nuclei and cell instances. Nuclei segmentation is used to separate spots based on their location into nucleus and cytoplasm. Cell segmentation is used to count spots per cell, filter infected cells and perform single cell analyses.

All segmentation masks (along with training data and models) are depositet at Zenodo: DOI

You can either download from there and unpack them into analysis/segmentation or follow the instructions below to create masks yourself.

For nucleus segmentation, a cellpose model (models/cellpose/nuclei) was trained and applied to the raw dapi images (in spaceTx format). The model was trained on a total of 5 dapi images with human provided sparse labels (seq_2nt, rep3, hpi5, fov1-5).

For cell instance segmentation, two different approaches were used:

  1. Watershed of the dapi image with nuclei as seeds
  2. A separate cellpose model with manual correction (details below)

Strategy 1 (nuclei via cellpose, cells via watershed)

The first strategy was used for most data, as it was deemed sufficient for filtering of infected cells and to calculate summary statistics like spots per cell. However, for single cell analyses the cell borders were not reliable enough.

This code performs nuclei segmentation with the cellpose model and watershed for cell segmentation (strategy 1).

mamba run -n mudRapp-seq-cellpose python code/segmentation/cellpose_nuclei_watershed_cells.py

Strategy 2 (nuclei and cells via cellpose, cells manually corrected)

The separate cellpose model was trained on raw images without ICC (computational clearing by the microscope vendor). Further, data was preprocessed with intensity scaling (see code). The model was trained on a total of 7 images with human provided sparse labels (2nt_rep1_0.3MOI_5hpi_fov4, 2nt_rep1_0.3MOI_7hpi_fov1, 2nt_rep1_0.3MOI_8hpi_fov1, 2nt_rep1_0.3MOI_8hpi_fov4, 2nt_rep1_1.0MOI_7hpi_fov1, 2nt_rep1_1.0MOI_8hpi_fov1, 2nt_rep2_0.3MOI_8hpi_fov2). In order to maximize the number of correctly detected cells, the following parameters were used: cellprob_threshold=-4.0, flow_threshold=0.7 based on preliminary experiments. Resulting masks were post-processed, removing small objects and closing small holes and gaps (see code).

mamba run -n mudRapp-seq-cellpose python code/segmentation/cellpose_nuclei.py
mamba run -n mudRapp-seq-cellpose python code/segmentation/cellpose_cells.py

Masks produced this way were manually corrected using label editing tools in napari. Manual correction involved extending cells, shrinking cells, moving cell borders and adding new cells (new cells were assigned IDs of 2000 and higher). The focus of the manual correction was mainly on infected cells, if no visibly infected cells were made out during inspection the FOV was saved unchanged.

The script used for manual correction can be started for a specific replication, MOI, hpi, and fov like this:

mamba run -n mudRapp-seq-starfish python code/segmentation/manual_correction_via_napari.py --rep 1 --moi 0.3MOI --hpi 7 --fov_index 1

The "cells (manually corrected)" layer, can be modified using napari tools. When finished, the layer can be saved in the corresponding folder (e.g. analysis/segmentation/seq_2nt/rep1/0.3MOI/7hpi/fov_1_cpmc_cells.png), the infix _cpmc_ stands for cellpose with manual correction.

Spot detection

Spot detection is performed using starfish methods. The following command creates csv and netCDF files in analysis/spot_detection

mamba run -n mudRapp-seq-starfish python code/spot_detection/cDNA_vRNA.py
mamba run -n mudRapp-seq-starfish python code/spot_detection/specificity.py
mamba run -n mudRapp-seq-starfish python code/spot_detection/plp_individual.py
mamba run -n mudRapp-seq-starfish python code/spot_detection/plp_cumulative.py
mamba run -n mudRapp-seq-starfish python code/spot_detection/seq_qc.py
mamba run -n mudRapp-seq-starfish python code/spot_detection/seq_2nt.py

This creates separate spots files for each fov, they can be combined to a single tsv.xz file for each experiment using

Rscript code/spot_detection/combine_csvs.R

The result of this step is included in the repository:

  • analysis/spot_detection/cDNA_vRNA/all_spots.tsv.xz
  • analysis/spot_detection/plp_cumulative/all_spots.tsv.xz
  • analysis/spot_detection/plp_individual/all_spots.tsv.xz
  • analysis/spot_detection/seq_2nt/all_spots.tsv.xz
  • analysis/spot_detection/specificity/all_spots.tsv.xz

Summary results of the QC experiment are in:

  • analysis/spot_detection/seq_qc/rep0/A_PB2/results.csv

Spot analysis

Sensitivity of cDNA vs direct vRNA probing

The main result is the much higher sensitivity for direct vRNA probing compared to cDNA probing. For details, see the analysis notebook. These figures are included in the manuscript as Supp. Fig. 1b and Fig. 1c, respectively.

Supplementary Figure 1bFigure 1c

Specificity of padlock probing on closely related strains

The main result is that padlock probing has very high specificity. There are almost no false positive results of probes designed for another strain. For details, see the analysis notebook. These figures are included in the manuscript as Supp. Fig. 1b and Fig. 1c, respectively.

Supplementary Figure 1bFigure 1c

Sensitivity of individual padlock probes

To test the sensitivity of individual padlock probes (PLPs), PLPs for ten distinct locations on NA and HA each, have been designed. The main result is that individual PLPs have different levels of sensitivity. While most PLPs produce a good number of spots, some PLPs produce almost none. For details, see the analysis notebook. These figures are included in the manuscript as Fig. 2c,d and Supp. Fig. 2c,d, respectively.

Figure 2c,dSupplementary Figure 2c,d

Binding site reactivity with Nano-DMS-MaP

To explain the different efficiencies of the individual PLPs, the reactivity of the binding sites was analyzed with Nano-DMS-MaP, both with and without PLPs bound. PLP binding reduces the reactivity of the binding sites (as expected). Further, the binding reactivity (without PLPs) positively correlates with PLP efficiency (both looking at the whole binding site, and only looking at a small window around the junctions). For details, see the analysis notebook. An overview of the reactivities along the NA segment, and the correlations with efficiencies are shown in the manuscript in Fig. 3b,c and Supp. Fig. 3a. The same plots were generated for the HA segment in the same notebook and shown in Supp. Fig. 4a,4b,4c.

Figure 3bFigure 3cSupplementary Figure 3a

Sensitivity with increasing number of padlock probes

To test the sensitivity with increasing number of padlock probes per segment, an increasing number of the ten distinct locations on NA and HA, have been used. The main result is that sensitivity increases with number of PLPs used, but saturates around 6PLPs. For details, see the analysis notebook. These figures are included in the manuscript as Fig. 2f,g and Supp. Fig. 2f,g, respectively.

Figure 2f,gSupplementary Figure 2f,g

Sequencing quality control

Dedicated experiments have been performed, to check the quality of the sequencing procedure.

Channel bleed-through estimation

Based on four experiments, in which only one of the channels (A,G,T, and C) is active in the first round, the bleed-through of signal from each channel to each other channel was estimated.

Only a moderate bleed-through (factor 0.656) was detected from channel A to channel T.

For details, see the notebooks (analysis, plot). This figure is included in the manuscript as Supp. Fig. 5b.

Supplementary Figure 5b

Decoding quality

Detailed analysis of the decoding correctness showed, that in an experiment with only a single valid 6nt barcode present, more than 92% of all detected spots were correct after 2 rounds of sequencing and 84% spots after 6 rounds of sequencing.

For details, see the analysis notebook. These figures are included in the manuscript as Supp. Fig. 6b,c.

Supplementary Figure 6bSupplementary Figure 6c

Segment analysis (seq_2nt)

  • channel order: "AGTC"
  • magnification: images were taken at 63x oil objective and pixel size is 0.103 µm

2nt barcode

SegmentvRNA/mRNACode
PB2vRNATT
PB1vRNATG
PAvRNATC
HAvRNATA
NPvRNAGT
NAvRNAGG
MvRNAGC
NSvRNAGA
PB2mRNACT
PB1mRNACG
PAmRNACC
HAmRNACA
NPmRNAAT
NAmRNAAG
MmRNAAC
NSmRNAAA

Bulk analysis

The molecule and segment counts, relative abundances and ambiguous spots were analysed by MOI and hpi, separately for nucleus and cytoplasm.

For details, see the analysis notebook. These figures are included in the manuscript as Fig. 5c,d and Supp. Fig. 7a,b, and 9a,b respectively.

Figure 5cFigure 5dSupplementary Figure 7aSupplementary Figure 7bSupplementary Figure 9aSupplementary Figure 9b

Temporal correlation

The temporal correlation analysis of single segment mRNA expression with total vRNA abundance revealed a high correlation of the M segment.

For details, see the analysis notebook. This figure is included in the manuscript as Supp. Fig. 8.

Supplementary Figure 8

Single-cell analysis

The single-cell analysis reveals extensive cell-to-cell heterogeneity. A substantial proportion of cells fails to replicate all vRNA segments. Cells missing either component of the polymerase complex vRNA segments or NP are associated with very low replication of the vRNA.

For details, see the analysis notebook. The results of the linear modelling are included in Table 2 in the manuscript. These figures are included in the manuscript as Fig. 6b,c,d,e and Supp. Fig. 10a,b, and 12a,b respectively.

Figure 6bFigure 6cFigure 6dFigure 6eSupplementary Figure 10aSupplementary Figure 10bSupplementary Figure 12aSupplementary Figure 12b

About

In-situ sequencing with multiple direct RNA-assisted padlock probing (mudRapp-seq)

Resources

Stars

2 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { // Auto-enable theater mode on YouTube (function() { function tryTheater() { var btn = document.querySelector('button[aria-label="Theater mode"], ytd-player #player button[title="Theater mode"]'); if (btn && !btn.classList.contains('activated')) { btn.click(); } } // Try immediately tryTheater(); // Try after navigation (SPA) var lastUrl = location.href; setInterval(function() { if (location.href !== lastUrl) { lastUrl = location.href; setTimeout(tryTheater, 500); } }, 1000); // Also try on player load var observer = new MutationObserver(tryTheater); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' GitHub - BioMeDS/mudRapp-seq: In-situ sequencing with multiple direct RNA-assisted padlock probing (mudRapp-seq) · GitHub
Skip to content

Repository files navigation

mudRapp-seq

This repository contains the code that accompanies the paper introducing "Multiple direct RNApadlock probing in combination with in-situ sequencing (mudRapp-seq)":

Shazeb Ahmad, Jianhui Li, Joél Schaust, Anne-Sophie Gribling-Burrer, Nina Geiger, Sabine C Fischer, Uddhav B Ambi, Simone Backes, Markus J Ankenbrand, Redmond P Smyth, Visualizing the transcription and replication of influenza A viral RNAs in cells by multiple direct RNA padlock probing and in situ sequencing (mudRapp-seq), Nucleic Acids Research, Volume 53, Issue 11, 24 June 2025, gkaf461, https://doi.org/10.1093/nar/gkaf461

This repository is archived at Zenodo DOI

Data

Raw data is archived independently in the BioImage Archive (BIA) with accession number S-BIAD1376. In order to reproduce our analyses, download the raw data from BIA and put them into the data/raw folder.

Image data, acquired on the Leica DMI8 were maximum intensity projected along the z-axis and instant computational clearing (ICC) was applied using Leica software. These images, with associated metadata consist the raw data of our analysis. Only for one dataset (2nt), the images without ICC were used for cell segmentation. Except for these non-ICC images, all datasets were convertet to spacetx format for further analysis.

All final and some intermediate results are included in the repository to facilitate additional analyses without having to re-process all files from scratch.

Data sets

Computational environments

Python environments

To re-create the python environments with mamba run:

mamba env create -f envs/starfish.yml # mudRapp-seq-starfish
mamba env create -f envs/cellpose.yml # mudRapp-seq-cellpose

R environment

The R environment for this project is managed via renv. A local environment is automatically created for you, when you run R or Rscript for the first time in the main project directory. This happens because of the .Rprofile file.

jupyter setting (vscode)

The jupyter files are in sub-folders of code/ but assume the kernel to run in the project root. This is necessary to make the R kernel use the local renv, and allows to consistently use paths relative to the project root rather than the specific notebook location. In VS Code this can be achieved by changing the setting jupyter.notebookFileRoot to ${workspaceFolder}. For jupyter lab there seems to be no simple solution at this moment (see jupyterlab#11619).

Analyses

Data formatting

As starfish is used, the raw data needs to be restructured in SpaceTx format.

In order to create the formatted data in data/spacetx run these steps in the root of the mudRapp-seq repo and in the mudRapp-seq environment:

mamba run -n mudRapp-seq-starfish python code/data_formatting/cDNA_vRNA.py
mamba run -n mudRapp-seq-starfish python code/data_formatting/specificity.py
mamba run -n mudRapp-seq-starfish python code/data_formatting/plp_individual.py
mamba run -n mudRapp-seq-starfish python code/data_formatting/plp_cumulative.py
mamba run -n mudRapp-seq-starfish python code/data_formatting/seq_qc.py
mamba run -n mudRapp-seq-starfish python code/data_formatting/seq_2nt.py

For cell segmentation in the seq_2nt dataset, the intensity of raw images without ICC need to be re-scaled, such that the autofluorescence within the cell is amplified:

mamba run -n mudRapp-seq-starfish python code/data_formatting/seq_2nt_scale_intensity.py

Segmentation

Images were separately segmented for nuclei and cell instances. Nuclei segmentation is used to separate spots based on their location into nucleus and cytoplasm. Cell segmentation is used to count spots per cell, filter infected cells and perform single cell analyses.

All segmentation masks (along with training data and models) are depositet at Zenodo: DOI

You can either download from there and unpack them into analysis/segmentation or follow the instructions below to create masks yourself.

For nucleus segmentation, a cellpose model (models/cellpose/nuclei) was trained and applied to the raw dapi images (in spaceTx format). The model was trained on a total of 5 dapi images with human provided sparse labels (seq_2nt, rep3, hpi5, fov1-5).

For cell instance segmentation, two different approaches were used:

  1. Watershed of the dapi image with nuclei as seeds
  2. A separate cellpose model with manual correction (details below)

Strategy 1 (nuclei via cellpose, cells via watershed)

The first strategy was used for most data, as it was deemed sufficient for filtering of infected cells and to calculate summary statistics like spots per cell. However, for single cell analyses the cell borders were not reliable enough.

This code performs nuclei segmentation with the cellpose model and watershed for cell segmentation (strategy 1).

mamba run -n mudRapp-seq-cellpose python code/segmentation/cellpose_nuclei_watershed_cells.py

Strategy 2 (nuclei and cells via cellpose, cells manually corrected)

The separate cellpose model was trained on raw images without ICC (computational clearing by the microscope vendor). Further, data was preprocessed with intensity scaling (see code). The model was trained on a total of 7 images with human provided sparse labels (2nt_rep1_0.3MOI_5hpi_fov4, 2nt_rep1_0.3MOI_7hpi_fov1, 2nt_rep1_0.3MOI_8hpi_fov1, 2nt_rep1_0.3MOI_8hpi_fov4, 2nt_rep1_1.0MOI_7hpi_fov1, 2nt_rep1_1.0MOI_8hpi_fov1, 2nt_rep2_0.3MOI_8hpi_fov2). In order to maximize the number of correctly detected cells, the following parameters were used: cellprob_threshold=-4.0, flow_threshold=0.7 based on preliminary experiments. Resulting masks were post-processed, removing small objects and closing small holes and gaps (see code).

mamba run -n mudRapp-seq-cellpose python code/segmentation/cellpose_nuclei.py
mamba run -n mudRapp-seq-cellpose python code/segmentation/cellpose_cells.py

Masks produced this way were manually corrected using label editing tools in napari. Manual correction involved extending cells, shrinking cells, moving cell borders and adding new cells (new cells were assigned IDs of 2000 and higher). The focus of the manual correction was mainly on infected cells, if no visibly infected cells were made out during inspection the FOV was saved unchanged.

The script used for manual correction can be started for a specific replication, MOI, hpi, and fov like this:

mamba run -n mudRapp-seq-starfish python code/segmentation/manual_correction_via_napari.py --rep 1 --moi 0.3MOI --hpi 7 --fov_index 1

The "cells (manually corrected)" layer, can be modified using napari tools. When finished, the layer can be saved in the corresponding folder (e.g. analysis/segmentation/seq_2nt/rep1/0.3MOI/7hpi/fov_1_cpmc_cells.png), the infix _cpmc_ stands for cellpose with manual correction.

Spot detection

Spot detection is performed using starfish methods. The following command creates csv and netCDF files in analysis/spot_detection

mamba run -n mudRapp-seq-starfish python code/spot_detection/cDNA_vRNA.py
mamba run -n mudRapp-seq-starfish python code/spot_detection/specificity.py
mamba run -n mudRapp-seq-starfish python code/spot_detection/plp_individual.py
mamba run -n mudRapp-seq-starfish python code/spot_detection/plp_cumulative.py
mamba run -n mudRapp-seq-starfish python code/spot_detection/seq_qc.py
mamba run -n mudRapp-seq-starfish python code/spot_detection/seq_2nt.py

This creates separate spots files for each fov, they can be combined to a single tsv.xz file for each experiment using

Rscript code/spot_detection/combine_csvs.R

The result of this step is included in the repository:

  • analysis/spot_detection/cDNA_vRNA/all_spots.tsv.xz
  • analysis/spot_detection/plp_cumulative/all_spots.tsv.xz
  • analysis/spot_detection/plp_individual/all_spots.tsv.xz
  • analysis/spot_detection/seq_2nt/all_spots.tsv.xz
  • analysis/spot_detection/specificity/all_spots.tsv.xz

Summary results of the QC experiment are in:

  • analysis/spot_detection/seq_qc/rep0/A_PB2/results.csv

Spot analysis

Sensitivity of cDNA vs direct vRNA probing

The main result is the much higher sensitivity for direct vRNA probing compared to cDNA probing. For details, see the analysis notebook. These figures are included in the manuscript as Supp. Fig. 1b and Fig. 1c, respectively.

Supplementary Figure 1bFigure 1c

Specificity of padlock probing on closely related strains

The main result is that padlock probing has very high specificity. There are almost no false positive results of probes designed for another strain. For details, see the analysis notebook. These figures are included in the manuscript as Supp. Fig. 1b and Fig. 1c, respectively.

Supplementary Figure 1bFigure 1c

Sensitivity of individual padlock probes

To test the sensitivity of individual padlock probes (PLPs), PLPs for ten distinct locations on NA and HA each, have been designed. The main result is that individual PLPs have different levels of sensitivity. While most PLPs produce a good number of spots, some PLPs produce almost none. For details, see the analysis notebook. These figures are included in the manuscript as Fig. 2c,d and Supp. Fig. 2c,d, respectively.

Figure 2c,dSupplementary Figure 2c,d

Binding site reactivity with Nano-DMS-MaP

To explain the different efficiencies of the individual PLPs, the reactivity of the binding sites was analyzed with Nano-DMS-MaP, both with and without PLPs bound. PLP binding reduces the reactivity of the binding sites (as expected). Further, the binding reactivity (without PLPs) positively correlates with PLP efficiency (both looking at the whole binding site, and only looking at a small window around the junctions). For details, see the analysis notebook. An overview of the reactivities along the NA segment, and the correlations with efficiencies are shown in the manuscript in Fig. 3b,c and Supp. Fig. 3a. The same plots were generated for the HA segment in the same notebook and shown in Supp. Fig. 4a,4b,4c.

Figure 3bFigure 3cSupplementary Figure 3a

Sensitivity with increasing number of padlock probes

To test the sensitivity with increasing number of padlock probes per segment, an increasing number of the ten distinct locations on NA and HA, have been used. The main result is that sensitivity increases with number of PLPs used, but saturates around 6PLPs. For details, see the analysis notebook. These figures are included in the manuscript as Fig. 2f,g and Supp. Fig. 2f,g, respectively.

Figure 2f,gSupplementary Figure 2f,g

Sequencing quality control

Dedicated experiments have been performed, to check the quality of the sequencing procedure.

Channel bleed-through estimation

Based on four experiments, in which only one of the channels (A,G,T, and C) is active in the first round, the bleed-through of signal from each channel to each other channel was estimated.

Only a moderate bleed-through (factor 0.656) was detected from channel A to channel T.

For details, see the notebooks (analysis, plot). This figure is included in the manuscript as Supp. Fig. 5b.

Supplementary Figure 5b

Decoding quality

Detailed analysis of the decoding correctness showed, that in an experiment with only a single valid 6nt barcode present, more than 92% of all detected spots were correct after 2 rounds of sequencing and 84% spots after 6 rounds of sequencing.

For details, see the analysis notebook. These figures are included in the manuscript as Supp. Fig. 6b,c.

Supplementary Figure 6bSupplementary Figure 6c

Segment analysis (seq_2nt)

  • channel order: "AGTC"
  • magnification: images were taken at 63x oil objective and pixel size is 0.103 µm

2nt barcode

SegmentvRNA/mRNACode
PB2vRNATT
PB1vRNATG
PAvRNATC
HAvRNATA
NPvRNAGT
NAvRNAGG
MvRNAGC
NSvRNAGA
PB2mRNACT
PB1mRNACG
PAmRNACC
HAmRNACA
NPmRNAAT
NAmRNAAG
MmRNAAC
NSmRNAAA

Bulk analysis

The molecule and segment counts, relative abundances and ambiguous spots were analysed by MOI and hpi, separately for nucleus and cytoplasm.

For details, see the analysis notebook. These figures are included in the manuscript as Fig. 5c,d and Supp. Fig. 7a,b, and 9a,b respectively.

Figure 5cFigure 5dSupplementary Figure 7aSupplementary Figure 7bSupplementary Figure 9aSupplementary Figure 9b

Temporal correlation

The temporal correlation analysis of single segment mRNA expression with total vRNA abundance revealed a high correlation of the M segment.

For details, see the analysis notebook. This figure is included in the manuscript as Supp. Fig. 8.

Supplementary Figure 8

Single-cell analysis

The single-cell analysis reveals extensive cell-to-cell heterogeneity. A substantial proportion of cells fails to replicate all vRNA segments. Cells missing either component of the polymerase complex vRNA segments or NP are associated with very low replication of the vRNA.

For details, see the analysis notebook. The results of the linear modelling are included in Table 2 in the manuscript. These figures are included in the manuscript as Fig. 6b,c,d,e and Supp. Fig. 10a,b, and 12a,b respectively.

Figure 6bFigure 6cFigure 6dFigure 6eSupplementary Figure 10aSupplementary Figure 10bSupplementary Figure 12aSupplementary Figure 12b

About

In-situ sequencing with multiple direct RNA-assisted padlock probing (mudRapp-seq)

Resources

Stars

2 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { // Remove or un-stick sticky/fixed headers that block content (function() { function unstick() { document.querySelectorAll('header, nav, [role="banner"], .header, .navbar, .sticky, .fixed-top, [style*="position: fixed"], [style*="position:sticky"]').forEach(function(el) { if (el.style.position === 'fixed' || el.style.position === 'sticky' || getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') { el.style.position = 'static'; el.style.top = 'auto'; el.style.zIndex = 'auto'; } }); } unstick(); var observer = new MutationObserver(unstick); observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] }); })(); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' GitHub - BioMeDS/mudRapp-seq: In-situ sequencing with multiple direct RNA-assisted padlock probing (mudRapp-seq) · GitHub
Skip to content

Repository files navigation

mudRapp-seq

This repository contains the code that accompanies the paper introducing "Multiple direct RNApadlock probing in combination with in-situ sequencing (mudRapp-seq)":

Shazeb Ahmad, Jianhui Li, Joél Schaust, Anne-Sophie Gribling-Burrer, Nina Geiger, Sabine C Fischer, Uddhav B Ambi, Simone Backes, Markus J Ankenbrand, Redmond P Smyth, Visualizing the transcription and replication of influenza A viral RNAs in cells by multiple direct RNA padlock probing and in situ sequencing (mudRapp-seq), Nucleic Acids Research, Volume 53, Issue 11, 24 June 2025, gkaf461, https://doi.org/10.1093/nar/gkaf461

This repository is archived at Zenodo DOI

Data

Raw data is archived independently in the BioImage Archive (BIA) with accession number S-BIAD1376. In order to reproduce our analyses, download the raw data from BIA and put them into the data/raw folder.

Image data, acquired on the Leica DMI8 were maximum intensity projected along the z-axis and instant computational clearing (ICC) was applied using Leica software. These images, with associated metadata consist the raw data of our analysis. Only for one dataset (2nt), the images without ICC were used for cell segmentation. Except for these non-ICC images, all datasets were convertet to spacetx format for further analysis.

All final and some intermediate results are included in the repository to facilitate additional analyses without having to re-process all files from scratch.

Data sets

Computational environments

Python environments

To re-create the python environments with mamba run:

mamba env create -f envs/starfish.yml # mudRapp-seq-starfish
mamba env create -f envs/cellpose.yml # mudRapp-seq-cellpose

R environment

The R environment for this project is managed via renv. A local environment is automatically created for you, when you run R or Rscript for the first time in the main project directory. This happens because of the .Rprofile file.

jupyter setting (vscode)

The jupyter files are in sub-folders of code/ but assume the kernel to run in the project root. This is necessary to make the R kernel use the local renv, and allows to consistently use paths relative to the project root rather than the specific notebook location. In VS Code this can be achieved by changing the setting jupyter.notebookFileRoot to ${workspaceFolder}. For jupyter lab there seems to be no simple solution at this moment (see jupyterlab#11619).

Analyses

Data formatting

As starfish is used, the raw data needs to be restructured in SpaceTx format.

In order to create the formatted data in data/spacetx run these steps in the root of the mudRapp-seq repo and in the mudRapp-seq environment:

mamba run -n mudRapp-seq-starfish python code/data_formatting/cDNA_vRNA.py
mamba run -n mudRapp-seq-starfish python code/data_formatting/specificity.py
mamba run -n mudRapp-seq-starfish python code/data_formatting/plp_individual.py
mamba run -n mudRapp-seq-starfish python code/data_formatting/plp_cumulative.py
mamba run -n mudRapp-seq-starfish python code/data_formatting/seq_qc.py
mamba run -n mudRapp-seq-starfish python code/data_formatting/seq_2nt.py

For cell segmentation in the seq_2nt dataset, the intensity of raw images without ICC need to be re-scaled, such that the autofluorescence within the cell is amplified:

mamba run -n mudRapp-seq-starfish python code/data_formatting/seq_2nt_scale_intensity.py

Segmentation

Images were separately segmented for nuclei and cell instances. Nuclei segmentation is used to separate spots based on their location into nucleus and cytoplasm. Cell segmentation is used to count spots per cell, filter infected cells and perform single cell analyses.

All segmentation masks (along with training data and models) are depositet at Zenodo: DOI

You can either download from there and unpack them into analysis/segmentation or follow the instructions below to create masks yourself.

For nucleus segmentation, a cellpose model (models/cellpose/nuclei) was trained and applied to the raw dapi images (in spaceTx format). The model was trained on a total of 5 dapi images with human provided sparse labels (seq_2nt, rep3, hpi5, fov1-5).

For cell instance segmentation, two different approaches were used:

  1. Watershed of the dapi image with nuclei as seeds
  2. A separate cellpose model with manual correction (details below)

Strategy 1 (nuclei via cellpose, cells via watershed)

The first strategy was used for most data, as it was deemed sufficient for filtering of infected cells and to calculate summary statistics like spots per cell. However, for single cell analyses the cell borders were not reliable enough.

This code performs nuclei segmentation with the cellpose model and watershed for cell segmentation (strategy 1).

mamba run -n mudRapp-seq-cellpose python code/segmentation/cellpose_nuclei_watershed_cells.py

Strategy 2 (nuclei and cells via cellpose, cells manually corrected)

The separate cellpose model was trained on raw images without ICC (computational clearing by the microscope vendor). Further, data was preprocessed with intensity scaling (see code). The model was trained on a total of 7 images with human provided sparse labels (2nt_rep1_0.3MOI_5hpi_fov4, 2nt_rep1_0.3MOI_7hpi_fov1, 2nt_rep1_0.3MOI_8hpi_fov1, 2nt_rep1_0.3MOI_8hpi_fov4, 2nt_rep1_1.0MOI_7hpi_fov1, 2nt_rep1_1.0MOI_8hpi_fov1, 2nt_rep2_0.3MOI_8hpi_fov2). In order to maximize the number of correctly detected cells, the following parameters were used: cellprob_threshold=-4.0, flow_threshold=0.7 based on preliminary experiments. Resulting masks were post-processed, removing small objects and closing small holes and gaps (see code).

mamba run -n mudRapp-seq-cellpose python code/segmentation/cellpose_nuclei.py
mamba run -n mudRapp-seq-cellpose python code/segmentation/cellpose_cells.py

Masks produced this way were manually corrected using label editing tools in napari. Manual correction involved extending cells, shrinking cells, moving cell borders and adding new cells (new cells were assigned IDs of 2000 and higher). The focus of the manual correction was mainly on infected cells, if no visibly infected cells were made out during inspection the FOV was saved unchanged.

The script used for manual correction can be started for a specific replication, MOI, hpi, and fov like this:

mamba run -n mudRapp-seq-starfish python code/segmentation/manual_correction_via_napari.py --rep 1 --moi 0.3MOI --hpi 7 --fov_index 1

The "cells (manually corrected)" layer, can be modified using napari tools. When finished, the layer can be saved in the corresponding folder (e.g. analysis/segmentation/seq_2nt/rep1/0.3MOI/7hpi/fov_1_cpmc_cells.png), the infix _cpmc_ stands for cellpose with manual correction.

Spot detection

Spot detection is performed using starfish methods. The following command creates csv and netCDF files in analysis/spot_detection

mamba run -n mudRapp-seq-starfish python code/spot_detection/cDNA_vRNA.py
mamba run -n mudRapp-seq-starfish python code/spot_detection/specificity.py
mamba run -n mudRapp-seq-starfish python code/spot_detection/plp_individual.py
mamba run -n mudRapp-seq-starfish python code/spot_detection/plp_cumulative.py
mamba run -n mudRapp-seq-starfish python code/spot_detection/seq_qc.py
mamba run -n mudRapp-seq-starfish python code/spot_detection/seq_2nt.py

This creates separate spots files for each fov, they can be combined to a single tsv.xz file for each experiment using

Rscript code/spot_detection/combine_csvs.R

The result of this step is included in the repository:

  • analysis/spot_detection/cDNA_vRNA/all_spots.tsv.xz
  • analysis/spot_detection/plp_cumulative/all_spots.tsv.xz
  • analysis/spot_detection/plp_individual/all_spots.tsv.xz
  • analysis/spot_detection/seq_2nt/all_spots.tsv.xz
  • analysis/spot_detection/specificity/all_spots.tsv.xz

Summary results of the QC experiment are in:

  • analysis/spot_detection/seq_qc/rep0/A_PB2/results.csv

Spot analysis

Sensitivity of cDNA vs direct vRNA probing

The main result is the much higher sensitivity for direct vRNA probing compared to cDNA probing. For details, see the analysis notebook. These figures are included in the manuscript as Supp. Fig. 1b and Fig. 1c, respectively.

Supplementary Figure 1bFigure 1c

Specificity of padlock probing on closely related strains

The main result is that padlock probing has very high specificity. There are almost no false positive results of probes designed for another strain. For details, see the analysis notebook. These figures are included in the manuscript as Supp. Fig. 1b and Fig. 1c, respectively.

Supplementary Figure 1bFigure 1c

Sensitivity of individual padlock probes

To test the sensitivity of individual padlock probes (PLPs), PLPs for ten distinct locations on NA and HA each, have been designed. The main result is that individual PLPs have different levels of sensitivity. While most PLPs produce a good number of spots, some PLPs produce almost none. For details, see the analysis notebook. These figures are included in the manuscript as Fig. 2c,d and Supp. Fig. 2c,d, respectively.

Figure 2c,dSupplementary Figure 2c,d

Binding site reactivity with Nano-DMS-MaP

To explain the different efficiencies of the individual PLPs, the reactivity of the binding sites was analyzed with Nano-DMS-MaP, both with and without PLPs bound. PLP binding reduces the reactivity of the binding sites (as expected). Further, the binding reactivity (without PLPs) positively correlates with PLP efficiency (both looking at the whole binding site, and only looking at a small window around the junctions). For details, see the analysis notebook. An overview of the reactivities along the NA segment, and the correlations with efficiencies are shown in the manuscript in Fig. 3b,c and Supp. Fig. 3a. The same plots were generated for the HA segment in the same notebook and shown in Supp. Fig. 4a,4b,4c.

Figure 3bFigure 3cSupplementary Figure 3a

Sensitivity with increasing number of padlock probes

To test the sensitivity with increasing number of padlock probes per segment, an increasing number of the ten distinct locations on NA and HA, have been used. The main result is that sensitivity increases with number of PLPs used, but saturates around 6PLPs. For details, see the analysis notebook. These figures are included in the manuscript as Fig. 2f,g and Supp. Fig. 2f,g, respectively.

Figure 2f,gSupplementary Figure 2f,g

Sequencing quality control

Dedicated experiments have been performed, to check the quality of the sequencing procedure.

Channel bleed-through estimation

Based on four experiments, in which only one of the channels (A,G,T, and C) is active in the first round, the bleed-through of signal from each channel to each other channel was estimated.

Only a moderate bleed-through (factor 0.656) was detected from channel A to channel T.

For details, see the notebooks (analysis, plot). This figure is included in the manuscript as Supp. Fig. 5b.

Supplementary Figure 5b

Decoding quality

Detailed analysis of the decoding correctness showed, that in an experiment with only a single valid 6nt barcode present, more than 92% of all detected spots were correct after 2 rounds of sequencing and 84% spots after 6 rounds of sequencing.

For details, see the analysis notebook. These figures are included in the manuscript as Supp. Fig. 6b,c.

Supplementary Figure 6bSupplementary Figure 6c

Segment analysis (seq_2nt)

  • channel order: "AGTC"
  • magnification: images were taken at 63x oil objective and pixel size is 0.103 µm

2nt barcode

SegmentvRNA/mRNACode
PB2vRNATT
PB1vRNATG
PAvRNATC
HAvRNATA
NPvRNAGT
NAvRNAGG
MvRNAGC
NSvRNAGA
PB2mRNACT
PB1mRNACG
PAmRNACC
HAmRNACA
NPmRNAAT
NAmRNAAG
MmRNAAC
NSmRNAAA

Bulk analysis

The molecule and segment counts, relative abundances and ambiguous spots were analysed by MOI and hpi, separately for nucleus and cytoplasm.

For details, see the analysis notebook. These figures are included in the manuscript as Fig. 5c,d and Supp. Fig. 7a,b, and 9a,b respectively.

Figure 5cFigure 5dSupplementary Figure 7aSupplementary Figure 7bSupplementary Figure 9aSupplementary Figure 9b

Temporal correlation

The temporal correlation analysis of single segment mRNA expression with total vRNA abundance revealed a high correlation of the M segment.

For details, see the analysis notebook. This figure is included in the manuscript as Supp. Fig. 8.

Supplementary Figure 8

Single-cell analysis

The single-cell analysis reveals extensive cell-to-cell heterogeneity. A substantial proportion of cells fails to replicate all vRNA segments. Cells missing either component of the polymerase complex vRNA segments or NP are associated with very low replication of the vRNA.

For details, see the analysis notebook. The results of the linear modelling are included in Table 2 in the manuscript. These figures are included in the manuscript as Fig. 6b,c,d,e and Supp. Fig. 10a,b, and 12a,b respectively.

Figure 6bFigure 6cFigure 6dFigure 6eSupplementary Figure 10aSupplementary Figure 10bSupplementary Figure 12aSupplementary Figure 12b

About

In-situ sequencing with multiple direct RNA-assisted padlock probing (mudRapp-seq)

Resources

Stars

2 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { // Universal Dark Mode - works on any site (function() { var enabled = true; function applyDarkMode() { if (!enabled) return; // Create style element if it doesn't exist var style = document.getElementById('universal-dark-mode-style'); if (!style) { style = document.createElement('style'); style.id = 'universal-dark-mode-style'; document.head.appendChild(style); } // Dark mode CSS - inverts colors but preserves images/video style.textContent = ' /* Invert everything except media */ html { filter: invert(1) hue-rotate(180deg) !important; background: #1a1a2e !important; } /* Restore images, videos, iframes, canvas */ img, video, iframe, canvas, svg, picture, [style*="background-image"] { filter: invert(1) hue-rotate(180deg) !important; } /* Preserve specific elements that should not be inverted */ .no-dark-mode, .no-dark-mode *, [data-theme="light"], [data-theme="light"], .ace_editor, .ace_editor *, .CodeMirror, .CodeMirror *, .monaco-editor, .monaco-editor *, .markdown-body pre, .markdown-body pre *, .highlight, .highlight *, pre code, pre code * { filter: none !important; } /* Fix common UI elements */ .modal, .popup, .dropdown-menu, .tooltip, .popover { filter: invert(1) hue-rotate(180deg) !important; background: #2d2d44 !important; border-color: #444 !important; } /* Scrollbars */ ::-webkit-scrollbar { background: #1a1a2e !important; } ::-webkit-scrollbar-thumb { background: #444 !important; } ::-webkit-scrollbar-thumb:hover { background: #555 !important; } /* Selection */ ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; } ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; } '; } function removeDarkMode() { var style = document.getElementById('universal-dark-mode-style'); if (style) style.remove(); } // Toggle with Alt+Shift+D document.addEventListener('keydown', function(e) { if (e.altKey && e.shiftKey && e.key === 'D') { e.preventDefault(); enabled = !enabled; if (enabled) { applyDarkMode(); console.log('[Universal Dark Mode] Enabled'); } else { removeDarkMode(); console.log('[Universal Dark Mode] Disabled'); } } }); // Apply on load applyDarkMode(); // Re-apply on dynamic content var observer = new MutationObserver(function(mutations) { if (enabled && !document.getElementById('universal-dark-mode-style')) { applyDarkMode(); } }); observer.observe(document.head, { childList: true }); console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle'); })(); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })(); GitHub - BioMeDS/mudRapp-seq: In-situ sequencing with multiple direct RNA-assisted padlock probing (mudRapp-seq) · GitHub
Skip to content

Repository files navigation

mudRapp-seq

This repository contains the code that accompanies the paper introducing "Multiple direct RNApadlock probing in combination with in-situ sequencing (mudRapp-seq)":

Shazeb Ahmad, Jianhui Li, Joél Schaust, Anne-Sophie Gribling-Burrer, Nina Geiger, Sabine C Fischer, Uddhav B Ambi, Simone Backes, Markus J Ankenbrand, Redmond P Smyth, Visualizing the transcription and replication of influenza A viral RNAs in cells by multiple direct RNA padlock probing and in situ sequencing (mudRapp-seq), Nucleic Acids Research, Volume 53, Issue 11, 24 June 2025, gkaf461, https://doi.org/10.1093/nar/gkaf461

This repository is archived at Zenodo DOI

Data

Raw data is archived independently in the BioImage Archive (BIA) with accession number S-BIAD1376. In order to reproduce our analyses, download the raw data from BIA and put them into the data/raw folder.

Image data, acquired on the Leica DMI8 were maximum intensity projected along the z-axis and instant computational clearing (ICC) was applied using Leica software. These images, with associated metadata consist the raw data of our analysis. Only for one dataset (2nt), the images without ICC were used for cell segmentation. Except for these non-ICC images, all datasets were convertet to spacetx format for further analysis.

All final and some intermediate results are included in the repository to facilitate additional analyses without having to re-process all files from scratch.

Data sets

Computational environments

Python environments

To re-create the python environments with mamba run:

mamba env create -f envs/starfish.yml # mudRapp-seq-starfish
mamba env create -f envs/cellpose.yml # mudRapp-seq-cellpose

R environment

The R environment for this project is managed via renv. A local environment is automatically created for you, when you run R or Rscript for the first time in the main project directory. This happens because of the .Rprofile file.

jupyter setting (vscode)

The jupyter files are in sub-folders of code/ but assume the kernel to run in the project root. This is necessary to make the R kernel use the local renv, and allows to consistently use paths relative to the project root rather than the specific notebook location. In VS Code this can be achieved by changing the setting jupyter.notebookFileRoot to ${workspaceFolder}. For jupyter lab there seems to be no simple solution at this moment (see jupyterlab#11619).

Analyses

Data formatting

As starfish is used, the raw data needs to be restructured in SpaceTx format.

In order to create the formatted data in data/spacetx run these steps in the root of the mudRapp-seq repo and in the mudRapp-seq environment:

mamba run -n mudRapp-seq-starfish python code/data_formatting/cDNA_vRNA.py
mamba run -n mudRapp-seq-starfish python code/data_formatting/specificity.py
mamba run -n mudRapp-seq-starfish python code/data_formatting/plp_individual.py
mamba run -n mudRapp-seq-starfish python code/data_formatting/plp_cumulative.py
mamba run -n mudRapp-seq-starfish python code/data_formatting/seq_qc.py
mamba run -n mudRapp-seq-starfish python code/data_formatting/seq_2nt.py

For cell segmentation in the seq_2nt dataset, the intensity of raw images without ICC need to be re-scaled, such that the autofluorescence within the cell is amplified:

mamba run -n mudRapp-seq-starfish python code/data_formatting/seq_2nt_scale_intensity.py

Segmentation

Images were separately segmented for nuclei and cell instances. Nuclei segmentation is used to separate spots based on their location into nucleus and cytoplasm. Cell segmentation is used to count spots per cell, filter infected cells and perform single cell analyses.

All segmentation masks (along with training data and models) are depositet at Zenodo: DOI

You can either download from there and unpack them into analysis/segmentation or follow the instructions below to create masks yourself.

For nucleus segmentation, a cellpose model (models/cellpose/nuclei) was trained and applied to the raw dapi images (in spaceTx format). The model was trained on a total of 5 dapi images with human provided sparse labels (seq_2nt, rep3, hpi5, fov1-5).

For cell instance segmentation, two different approaches were used:

  1. Watershed of the dapi image with nuclei as seeds
  2. A separate cellpose model with manual correction (details below)

Strategy 1 (nuclei via cellpose, cells via watershed)

The first strategy was used for most data, as it was deemed sufficient for filtering of infected cells and to calculate summary statistics like spots per cell. However, for single cell analyses the cell borders were not reliable enough.

This code performs nuclei segmentation with the cellpose model and watershed for cell segmentation (strategy 1).

mamba run -n mudRapp-seq-cellpose python code/segmentation/cellpose_nuclei_watershed_cells.py

Strategy 2 (nuclei and cells via cellpose, cells manually corrected)

The separate cellpose model was trained on raw images without ICC (computational clearing by the microscope vendor). Further, data was preprocessed with intensity scaling (see code). The model was trained on a total of 7 images with human provided sparse labels (2nt_rep1_0.3MOI_5hpi_fov4, 2nt_rep1_0.3MOI_7hpi_fov1, 2nt_rep1_0.3MOI_8hpi_fov1, 2nt_rep1_0.3MOI_8hpi_fov4, 2nt_rep1_1.0MOI_7hpi_fov1, 2nt_rep1_1.0MOI_8hpi_fov1, 2nt_rep2_0.3MOI_8hpi_fov2). In order to maximize the number of correctly detected cells, the following parameters were used: cellprob_threshold=-4.0, flow_threshold=0.7 based on preliminary experiments. Resulting masks were post-processed, removing small objects and closing small holes and gaps (see code).

mamba run -n mudRapp-seq-cellpose python code/segmentation/cellpose_nuclei.py
mamba run -n mudRapp-seq-cellpose python code/segmentation/cellpose_cells.py

Masks produced this way were manually corrected using label editing tools in napari. Manual correction involved extending cells, shrinking cells, moving cell borders and adding new cells (new cells were assigned IDs of 2000 and higher). The focus of the manual correction was mainly on infected cells, if no visibly infected cells were made out during inspection the FOV was saved unchanged.

The script used for manual correction can be started for a specific replication, MOI, hpi, and fov like this:

mamba run -n mudRapp-seq-starfish python code/segmentation/manual_correction_via_napari.py --rep 1 --moi 0.3MOI --hpi 7 --fov_index 1

The "cells (manually corrected)" layer, can be modified using napari tools. When finished, the layer can be saved in the corresponding folder (e.g. analysis/segmentation/seq_2nt/rep1/0.3MOI/7hpi/fov_1_cpmc_cells.png), the infix _cpmc_ stands for cellpose with manual correction.

Spot detection

Spot detection is performed using starfish methods. The following command creates csv and netCDF files in analysis/spot_detection

mamba run -n mudRapp-seq-starfish python code/spot_detection/cDNA_vRNA.py
mamba run -n mudRapp-seq-starfish python code/spot_detection/specificity.py
mamba run -n mudRapp-seq-starfish python code/spot_detection/plp_individual.py
mamba run -n mudRapp-seq-starfish python code/spot_detection/plp_cumulative.py
mamba run -n mudRapp-seq-starfish python code/spot_detection/seq_qc.py
mamba run -n mudRapp-seq-starfish python code/spot_detection/seq_2nt.py

This creates separate spots files for each fov, they can be combined to a single tsv.xz file for each experiment using

Rscript code/spot_detection/combine_csvs.R

The result of this step is included in the repository:

  • analysis/spot_detection/cDNA_vRNA/all_spots.tsv.xz
  • analysis/spot_detection/plp_cumulative/all_spots.tsv.xz
  • analysis/spot_detection/plp_individual/all_spots.tsv.xz
  • analysis/spot_detection/seq_2nt/all_spots.tsv.xz
  • analysis/spot_detection/specificity/all_spots.tsv.xz

Summary results of the QC experiment are in:

  • analysis/spot_detection/seq_qc/rep0/A_PB2/results.csv

Spot analysis

Sensitivity of cDNA vs direct vRNA probing

The main result is the much higher sensitivity for direct vRNA probing compared to cDNA probing. For details, see the analysis notebook. These figures are included in the manuscript as Supp. Fig. 1b and Fig. 1c, respectively.

Supplementary Figure 1bFigure 1c

Specificity of padlock probing on closely related strains

The main result is that padlock probing has very high specificity. There are almost no false positive results of probes designed for another strain. For details, see the analysis notebook. These figures are included in the manuscript as Supp. Fig. 1b and Fig. 1c, respectively.

Supplementary Figure 1bFigure 1c

Sensitivity of individual padlock probes

To test the sensitivity of individual padlock probes (PLPs), PLPs for ten distinct locations on NA and HA each, have been designed. The main result is that individual PLPs have different levels of sensitivity. While most PLPs produce a good number of spots, some PLPs produce almost none. For details, see the analysis notebook. These figures are included in the manuscript as Fig. 2c,d and Supp. Fig. 2c,d, respectively.

Figure 2c,dSupplementary Figure 2c,d

Binding site reactivity with Nano-DMS-MaP

To explain the different efficiencies of the individual PLPs, the reactivity of the binding sites was analyzed with Nano-DMS-MaP, both with and without PLPs bound. PLP binding reduces the reactivity of the binding sites (as expected). Further, the binding reactivity (without PLPs) positively correlates with PLP efficiency (both looking at the whole binding site, and only looking at a small window around the junctions). For details, see the analysis notebook. An overview of the reactivities along the NA segment, and the correlations with efficiencies are shown in the manuscript in Fig. 3b,c and Supp. Fig. 3a. The same plots were generated for the HA segment in the same notebook and shown in Supp. Fig. 4a,4b,4c.

Figure 3bFigure 3cSupplementary Figure 3a

Sensitivity with increasing number of padlock probes

To test the sensitivity with increasing number of padlock probes per segment, an increasing number of the ten distinct locations on NA and HA, have been used. The main result is that sensitivity increases with number of PLPs used, but saturates around 6PLPs. For details, see the analysis notebook. These figures are included in the manuscript as Fig. 2f,g and Supp. Fig. 2f,g, respectively.

Figure 2f,gSupplementary Figure 2f,g

Sequencing quality control

Dedicated experiments have been performed, to check the quality of the sequencing procedure.

Channel bleed-through estimation

Based on four experiments, in which only one of the channels (A,G,T, and C) is active in the first round, the bleed-through of signal from each channel to each other channel was estimated.

Only a moderate bleed-through (factor 0.656) was detected from channel A to channel T.

For details, see the notebooks (analysis, plot). This figure is included in the manuscript as Supp. Fig. 5b.

Supplementary Figure 5b

Decoding quality

Detailed analysis of the decoding correctness showed, that in an experiment with only a single valid 6nt barcode present, more than 92% of all detected spots were correct after 2 rounds of sequencing and 84% spots after 6 rounds of sequencing.

For details, see the analysis notebook. These figures are included in the manuscript as Supp. Fig. 6b,c.

Supplementary Figure 6bSupplementary Figure 6c

Segment analysis (seq_2nt)

  • channel order: "AGTC"
  • magnification: images were taken at 63x oil objective and pixel size is 0.103 µm

2nt barcode

SegmentvRNA/mRNACode
PB2vRNATT
PB1vRNATG
PAvRNATC
HAvRNATA
NPvRNAGT
NAvRNAGG
MvRNAGC
NSvRNAGA
PB2mRNACT
PB1mRNACG
PAmRNACC
HAmRNACA
NPmRNAAT
NAmRNAAG
MmRNAAC
NSmRNAAA

Bulk analysis

The molecule and segment counts, relative abundances and ambiguous spots were analysed by MOI and hpi, separately for nucleus and cytoplasm.

For details, see the analysis notebook. These figures are included in the manuscript as Fig. 5c,d and Supp. Fig. 7a,b, and 9a,b respectively.

Figure 5cFigure 5dSupplementary Figure 7aSupplementary Figure 7bSupplementary Figure 9aSupplementary Figure 9b

Temporal correlation

The temporal correlation analysis of single segment mRNA expression with total vRNA abundance revealed a high correlation of the M segment.

For details, see the analysis notebook. This figure is included in the manuscript as Supp. Fig. 8.

Supplementary Figure 8

Single-cell analysis

The single-cell analysis reveals extensive cell-to-cell heterogeneity. A substantial proportion of cells fails to replicate all vRNA segments. Cells missing either component of the polymerase complex vRNA segments or NP are associated with very low replication of the vRNA.

For details, see the analysis notebook. The results of the linear modelling are included in Table 2 in the manuscript. These figures are included in the manuscript as Fig. 6b,c,d,e and Supp. Fig. 10a,b, and 12a,b respectively.

Figure 6bFigure 6cFigure 6dFigure 6eSupplementary Figure 10aSupplementary Figure 10bSupplementary Figure 12aSupplementary Figure 12b

About

In-situ sequencing with multiple direct RNA-assisted padlock probing (mudRapp-seq)

Resources

Stars

2 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages