Hi all, I'm also interested to this topic: what is the best way to subset and reclustering data starting from an integrating dataset? Yang, R. et al. So I have a couple of questions regarding my workflow: For downstream DE analysis, the scale.data slot in the SCT assay has disappeared after integration. This issue may help you address your question. From my understanding, including all genes into the "Feature.to.integrate" functions will give you a gene matrix of all genes altered based on the integration, but the PCA analysis and subsequent non-linear dimensionality reduction and clustering will still be calculated based on the 2000 features found in the "Find.Integration.anchors" functions (unless otherwise stated), which change depending on the original data used, ie subsetted or whole. ## [34] jsonlite_1.8.4 progressr_0.13.0 spatstat.data_3.0-0 Replies here and in some other GitHub issues have slightly different approaches but they all make general sense. I did see batch effects here (cells from different batches did not share clusters). Following subtraction of raw counts of baiting-negative control from those of all other antigen-baiting constructs in every cell, cutoffs for background binding levels were manually determined for every construct by inspection of bimodal distributions of count frequencies across all cells, and all binding counts below thresholds were set to zero and classified as nonbinding. Creates a Seurat object containing only a subset of the cells in the Patients with COVID-19 and healthy individuals were recruited at one of four hospitals in the Canton of Zurich, Switzerland. Hi Team Seurat, B cell populations were identified using a WNN clustering and subsequent manual assignment. Low CD21 expression defines a population of recent germinal center graduates primed for plasma cell differentiation. In tonsils, the S+ Bm cells were less IgG+ (77.4% versus 82.1%) and IgM+ (2.4% versus 5.5%), but more IgA+ (9.1% versus 6%) compared with the circulation (Fig. Several of these differences, such as T-bet, and CD11c, were confirmed at the protein level (Fig. The expansion of human T-bet high CD21 low B cells is T cell dependent. With Seurat, you can easily switch between different assays at the single cell level (such as ADT counts from CITE-seq, or integrated/batch-corrected data). 6, eabk0894 (2021). :) Thank you. r rna-seq single-cell seurat Share Then find the DEGs between 2 clusters with FindMarkers(ident.1=, ident.2=). Blood 99, 15441551 (2002). Elsner, R. A. select from data frame rows with a condition in r, Split data in R with two specific values of column, Subset a dataframe based on numerical values of a string inside a variable, How to filter based on a specific criteria in R. How to subset data in R: participant only needs to meet one of five criteria? A longitudinal cohort (Extended Data Fig. I integrated samples across multiple batch conditions and diets after performing SCTransform (according to your most recent vignette for integration with SCTransform - Compiled: 2019-07-16). 6, 748 (2019). Genewise statistics were conducted using empirical Bayes quasi-likelihood F-tests. However, when I try to do any of the following: I am at loss for how to perform conditional matching with the meta_data variable. 4e). Gowans, J. L. & Uhr, J. W. The carriage of immunological memory by small lymphocytes in the rat. I have a conceptual question about the batch-correction (integration) model developed by Seurat (the one from the most recent vignette for integration with SCTransform - Compiled: 2019-07-16). Multifactorial seroprofiling dissects the contribution of pre-existing human coronaviruses responses to SARS-CoV-2 immunity. The SWT+ Bm cells in the IgG+CD27hiCD45RBhi cluster (cluster 5) were mainly from blood, in the IgG+CD21hi cluster (cluster 2) predominantly tonsillar, while the IgG+CD27lo cluster (cluster 4) contained SWT+ Bm cells from both compartments. Antibody affinity shapes the choice between memory and germinal center B cell fates. We observed a strong increase in the frequency of S+ and RBD+ Bm cells in SARS-CoV-2-infected individuals at months 6 (median 0.14% and 0.033%, respectively) and 12 post-infection (median 0.068% and 0.02%) compared with acute infection (median 0.016% and 0.0023%) (Fig. All plotting functions will return a ggplot2 plot by default, allowing easy customization with ggplot2. 9eg) and visualization of Bm cells on the Monocle UMAP space identified two branches, which strongly separated CD21CD27+CD71+ activated and CD21CD27FcRL5+ Bm cells, both branching out from CD21+ resting Bm cells (Fig. Unexpected uint64 behaviour 0xFFFF'FFFF'FFFF'FFFF - 1 = 0? Article I have a Seurat object that I have run through doubletFinder. Extended Data Fig. Samples were stained as described for spectral flow cytometry using biotinylated SWT, RBD, Sbeta and Sdelta (MiltenyiBiotec) and hemagglutinin (SinoBiological) that were multimerized at 4:1 molar ratios with fluorescently labeled and/or barcoded SAV (TotalSeqC, BioLegend). The images or other third party material in this article are included in the articles Creative Commons license, unless indicated otherwise in a credit line to the material. In d, frequencies were compared using a two-tailed, two-proportions z-test with a Bonferroni-based multiple testing correction. The num_dim parameter of Monocles preprocess_cds() function was set to 20. Weighted-nearest neighbor (WNN) clustering identified nave B cells (IgMhiIgDhiFCER2hi), nave/activated B cells (IgMhiIgDhiFCER2hiFCRL5hi), GC B cells (CD27hiCD38hiAICDAhi) and Bm cells (IgMloIgDloCD27int) (Extended Data Fig. Cell 177, 524540 (2019). Barnett, B. E. et al. 25,26,27,28,29). *P<0.05, **P<0.01, ***P<0.001, ****P<0.0001. eLife 8, e41641 (2019). First, we create a column in the meta.data slot to hold both the cell type and stimulation information and switch the current ident to that column. Choose a subset of cells, and then split by samples and then re-run the integration steps (select integration features, find anchors and integrate data). c, Average expression of indicated genes was derived at preVac and postVac in persistent S+ Bm cell clones that contained at least one CD21CD27FcRL5+ S+ Bm cell (n=14 clones). On the basis of our data, we suggest a linearplastic model where the antigen stimulation and GC maturation of SARS-CoV-2-specific B cells resulted in the gradual adoption of a CD21+Ki-67lo resting Bm cell state at months 612 post-infection. A. et al. Find corresponding symbol for gene used in Seurat, Subsetting a Seurat object based on colnames. So, that means I run NormalizeData(), FindVariableFeatures() and ScaleData() on my RNA assay again after subsetting a cluster. During acute infection S+ Bm cells were mainly immunoglobulin (Ig)M+ and IgG+, whereas IgG+ Bm cells predominated (8590%) at months 6 and 12 post-infection (Fig. Bhattacharya, D. Instructing durable humoral immunity for COVID-19 and other vaccinable diseases. But how do I subset a data before clustering? J. Immunol. ## [85] ragg_1.2.5 goftest_1.2-3 knitr_1.42 Looking for job perks? Percentages indicate frequencies of clonally expanded cells. Pape, K. A. et al. (palm-face-impact)@MariaKwhere were you 3 months ago?! Next, we performed droplet-based scRNA-seq combined with feature barcoding and BCR sequencing (BCR-seq) on sorted S+ and S Bm cells isolated from the blood of nine patients with COVID-19 at months 6 and 12 post-infection; three patients were nonvaccinated, and six received SARS-CoV-2 mRNA vaccination between month 6 and month 12 (Extended Data Fig. I know that we shouldn't rescale subsetted data from an integrated object but is it possible to RunUMAP on the subsetted data so I can at least get a plot? After determining the cell type identities of the scRNA-seq clusters, we often would like to perform a differential expression (DE) analysis between conditions within particular cell types. Bioinformatics 32, 28472849 (2016). Raw counts obtained from the cellranger gene expression matrix were used to create cell datasets, which were preprocessed using the Monocle 3 pipeline. However, this brings the cost of flexibility. c, Stacked bar plots (mean + SD) show isotypes of S+ Bm cells at week 2 (n=10) and month 6 (n=11) post-second dose and at week 2 post-third dose (n=10). By clicking Post Your Answer, you agree to our terms of service, privacy policy and cookie policy. Keller, B. et al. Weisel, F. & Shlomchik, M. Memory B cells of mice and humans. DefaultAssay(control_subset) <- "RNA" Tracking of individual B cell clones by B cell receptor sequencing revealed that previously fated Bm cell clones could redifferentiate upon antigen rechallenge into other Bm cell subsets, including CD21CD27 Bm cells, demonstrating that single Bm cell clones can adopt functionally different trajectories. Sutton, H. J. et al. Compare: For your example, I believe the following should work: See the examples in ?subset for more. Google Scholar. Eight patients were vaccinated against SARS-CoV-2 (analyzed on average at day 144 after last vaccination), whereas the other eight patients were considered SARS-CoV-2-recovered based on a history of SARS-CoV-2 infection or positive anti-nucleocapsid (N) serum antibody measurement, with six of them additionally vaccinated against SARS-CoV-2 (assessed on average at day 118 post-last vaccination) (Extended Data Fig. | NoAxes | Remove axes and axis text | ## [112] lifecycle_1.0.3 Rdpack_2.4 spatstat.geom_3.0-6 ## [133] parallel_4.2.0 grid_4.2.0 tidyr_1.3.0 Another useful way to visualize these changes in gene expression is with the split.by option to the FeaturePlot() or VlnPlot() function. I'm also interested in understanding better how to do this. ), A vector of cell names to use as a subset. ## [1] stats graphics grDevices utils datasets methods base control_subset <- RunPCA(control_subset, npcs = 30, verbose = FALSE) b, Violin plots of frequencies of CD21CD27+, CD21CD27, CD21+CD27+ and CD21+CD27 cells within S+ Bm cells are shown at acute infection (n=23) and months 6 (n=52) and 12 post-infection (n=16). c, Frequency (median interquartile range) of S+ (left) and N+ (right) GC B cells within total B cells are given in tonsils of SARS-CoV-2-vaccinated and in recovered individuals. Further information on research design is available in the Nature Portfolio Reporting Summary linked to this article. Thank you @satijalab !!!! 5a,b) identified S+ Bm cells in the blood and tonsils of both vaccinated and recovered individuals, whereas N+ Bm cells were enriched only in recovered individuals (Fig. One limitation of our study is that we performed the clonal analysis after vaccination recall, because the numbers of S+ Bm cells during acute SARS-CoV-2 infection were too low for our sequencing approach. Most functions now take an assay parameter, but you can set a Default Assay to avoid repetitive statements. # One of these Assay objects is called the "default assay", meaning it's used for all analyses and visualization. Shown are 30 most frequently used VH segments, sorted by hierarchical clustering, with colors indicating frequencies. Nature 566, 496502 (2019). (2023)Cite this article. Med. SARS-CoV-2-specific Bm cells were identified using probes of biotinylated SARS-CoV-2 spike (S) and receptor-binding domain (RBD) protein multimerized with fluorophore-labeled streptavidin (SAV) and characterized using a 28-color spectral flow cytometry panel (Fig. 1e,f). Hi all, Statistical analysis was performed with GraphPad Prism (version 9.4.1, GraphPad Software, USA) and R (version 4.1.0). What were the most popular text editors for MS-DOS in the 1980s? assay = NULL, 1 Overview of SARS-CoV-2 cohorts analyzed in this study. I think of this as if you FACS sorted cells and were to analyze them independently of the other cell types). Commun. You can read more on the concept here in Martin's paper. I have increased the resolution on FindClusters to analyze the integrated object and get my cluster of interested subclustered enough for DEG analysis but would simply like a new UMAP plot to visualize expression within that group of clusters. Austin, J. W. et al. 8d,e). Conversely, the frequency of S+ CD21CD27 Bm cells rose quickly and remained stable over 150days post-vaccination, accounting for about 20% of S+ Bm cells (Fig. S+ Bm cells continued to show lower but still significantly increased proliferation at month 6, and only returned to background levels at month 12 post-infection (Fig. ## [52] metap_1.8 viridisLite_0.4.1 xtable_1.8-4 Cao, J. et al. Can be used to downsample the data to a certain 35, 255284 (2017). Seurat provides many prebuilt themes that can be added to ggplot2 plots for quick customization, | Theme | Function | Finally, CD14 and CXCL10 are genes that show a cell type specific interferon response. Nat. Each set of modal data (eg. Immunity 51, 398410.e5 (2019). | object@dr$pca | object[["pca"]] | Note that @timoast from the Seurat team recommended otherwise, although I never seen an explanation why would this not best way to go. Frequencies of S+ Bm cells were comparable in patients with mild and severe COVID-19 (Fig. The cohort size was based on sample availability. c, Frequency of S+ Bm cells in total B cells was measured by flow cytometry at acute infection (n=59) and months 6 (n=61) and 12 post-infection (n=17). ; NRP 78 Implementation Programme to C.C. While I did not test the above, I tested running FindVariableFeatures() (or not), and I recommend re-running FindVariableFeatures(). Independent datasets were then integrated using Seurats anchoring-based integration method. operators sufficient to make every possible logical expression? 9b). The beginning of pseudotime was manually set inside the partition with mostly unswitched B cells. CD21CD27 Bm cells were reported to be able to secrete antibodies when receiving T cell help and to act as antigen-presenting cells24. The text was updated successfully, but these errors were encountered: @attal-kush I hope its okay to piggyback of your question. During acute infection S+ CD21CD27+ Bm cells and CD21CD27 Bm cells represented on average 48.1% and 16.4% of total S+ Bm cells, respectively, and they strongly declined at month 6 (6.3% and 5.3%) and month 12 (3.7% and 6.6%) post-infection (Fig. c, Pie chart show the percentage of SWT binders that also bind RBD in scRNA-seq dataset. The alternative would be to subset() the population of interest and run the complete preprocessing including integration only on those cells again. Numbers inside donut plots represent counts of S+ Bm cells. Lines connect samples of same individual. Nat. a, Flow cytometry plots show decoy S+ (top) and nucleocapsid (N)+ Bm cells (bottom) in paired tonsil and blood samples of a SARS-CoV-2-vaccinated (CoV-T1; left) and SARS-CoV-2-recovered patient (CoV-T2; right). Subsetting from seurat object based on orig.ident? Seurat continues to use t-distributed stochastic neighbor embedding (t-SNE) as a powerful tool to visualize and explore these datasets. ), Swiss Academy of Medical Sciences (SAMW) fellowships (#323530-191230 to Y.Z. Med. Systemic and mucosal antibody responses specific to SARS-CoV-2 during mild versus severe COVID-19. ## [46] scales_1.2.1 mvtnorm_1.1-3 spatstat.random_3.1-3 4f,g). As one can see in the pic below, the quality is quite different in each of the duplicated conditions. The frequency of blood S+ Bm cells was approximately fivefold increased post-vaccination at month 12 compared with pre-vaccination at month 6 post-infection (Fig. 2 and 5. An AUC value of 1 means that expression values for this gene alone can perfectly classify the two groupings (i.e. 3d). Profiling B cell immunodominance after SARS-CoV-2 infection reveals antibody evolution to non-neutralizing viral targets. g, Frequencies (n=29 pairs; left) and pie charts (right) of indicated S+ Bm cell subsets are provided at indicated timepoints. We identified 16 shared SWT+ Bm cell clones between these compartments (Fig. What was the actual cockpit layout and crew of the Mi-24A? @MediciPrime That looks correct to me, though your resolution=0.2 parameter is quite low. MathJax reference. 5f,g). ## [91] RANN_2.6.1 pbapply_1.7-0 future_1.31.0 Can I general this code to draw a regular polyhedron? PhenoGraph clustering identified an IgG+CD21CD27 cluster (cluster 2), which was TbethiCD11c+FcRL5+, and CD21CD27+ clusters characterized by high expression of CD71, Blimp-1 and Ki-67 (clusters 1, 7 and 8) (Extended Data Fig. What you could have written would have been something like: Which gives the same result as my earlier subset() call. We found that S+ CD21CD27 Bm cells showed signs of increased antigen processing and presentation; how much this might translate into truly increased capacity of antigen presentation is unclear43. The flow cytometry dataset is available upon request from the corresponding authors. Robbiani, D. F. et al. | object@data | GetAssayData(object = object) | a, Representative flow cytometry plots of decoy S+ Bm cells are displayed at pre-vaccination (preVac; left; month 6) and day 78 post-vaccination (postVac; right; month 12 post-infection) in patient CoV-P3. They were also enriched in gene transcripts involved in interferon (IFN)- and BCR signaling and showed high expression of integrins ITGAX, ITGB2 and ITGB7 (Fig. control_subset <- RunPCA(control_subset, npcs = 30, verbose = FALSE, features = Variable Features(control_subset)) ), # S3 method for Seurat For UMAP generation in the SARS-CoV-2 Infection Cohort datasets, the embedding parameters were manually set to a=1.4 and b=0.75. AutoPointSize: Automagically calculate a point size for ggplot2-based. Sign up for the Nature Briefing newsletter what matters in science, free to your inbox daily. Circulating and intrahepatic antiviral B cells are defective in hepatitis B. J. Clin. Nature 584, 437442 (2020). ## What woodwind & brass instruments are most air efficient? batch effect correction), and to perform comparative scRNA-seq analysis of across experimental conditions. Takes either a list of cells to use as a subset, or a parameter (for example, a gene), to subset on. 6d,e). Below, we demonstrate methods for scRNA-seq integration as described in Stuart*, Butler* et al, 2019 to perform a comparative analysis of human immune cells (PBMC) in either a resting or interferon-stimulated state. Lines connect samples of same individual. Maturation and persistence of the anti-SARS-CoV-2 memory B cell response. Segment usage between Bm cell subsets was compared using edgeR (v3.36). 4c). Immunol. I have a few questions and was hoping you can help me address them; As an internal reference for SHM counts in nave B cells, we co-sorted nave B cells in one experiment of the SARS-CoV-2 Infection Cohort. Are || and ! #2812 (comment). a, Dot plots and medians of frequencies of S+ Bm cells are provided at baseline (n=10), week 2 post-second dose (n=10) and month 6 post-second dose (n=11). Immunol. To extend our analyses to SARS-CoV-2-specific Bm cells in the peripheral lymphoid organs, we analyzed paired tonsil and blood samples from a cohort of 16 patients (9 females and 7 males) undergoing tonsillectomy who were exposed to SARS-CoV-2 by infection, vaccination or both. ), Filling the Gap Program of UZH (to M.E.R. Subsequent reclustering of Bm cells resolved six clusters (Fig. 6 scRNA-seq analysis of B cells in tonsils and blood. The transcription factors ZEB2 and T-bet cooperate to program cytotoxic T cell terminal differentiation in response to LCMV viral infection. Jenks, S. A. et al. Policy. d, Shown are representative histograms of Ki-67 in patient CoV-P2 (left) and violin plots of percentages of Ki-67+ S+ Bm cells compared with S Bm cells (right) at indicated timepoints. Results were filtered for gene sets that were significantly enriched with adjusted P<0.05. The standard Seurat workflow takes raw single-cell expression data and aims to find clusters within the data. object, Freudenhammer, M., Voll, R. E., Binder, S. C., Keller, B. If NULL Victora, G. D. & Nussenzweig, M. C. Germinal centers. But I especially don't get why this one did not work: If anyone can tell me why the latter did not function I would appreciate it. Long-lived plasma cells can continuously secrete high-affinity antibodies that are protective against a homologous pathogen7, whereas Bm cells encode a broader repertoire which allows protection against variants of the initial pathogen after restimulation8. Why are these constructs using pre and post-increment undefined behavior? First the following steps were performed in the order that they were displayed: SCTransform, SelectIntegrationFeatures, PrepSCTIntegration, FindIntegrationAnchors, IntegrateData, RunPCA and RunUMAP. Accessing data in Seurat is simple, using clearly defined accessors and setters to quickly find the data needed. ## Immunity 55, 945964 (2022). Nature 602, 148155 (2021). 2e), which correlated with an improved binding breadth, as measured by variant-binding ability of SWT+ Bm cells (Fig. WNN clustering of all sequenced Bm cells identified ten clusters that, on the basis of the expression of cell surface markers and Ig isotype, were merged into five subsets annotated as CD21CD27+CD71+ activated Bm cells, CD21CD27FcRL5+ Bm cells, CD21+CD27 resting Bm cells, CD21+CD27+ resting Bm cells and unswitched CD21+ Bm cells (Fig. I.E.A. New blog post from our CEO Prashanth: Community is the future of AI, Improving the copy in the close modal and post notices - 2023 edition, Manually define clusters in Seurat and determine marker genes, Trim Seurat object to contain expression info only for selected genes, Seurat VlnPlot presenting expression of multiple genes in a single cluster. Dominguez, C. X. et al. All samples were analyzed by flow cytometry, and paired week 2, month 6 post-second dose and week 2 post-third dose samples from three patients were additionally assessed by scRNA-seq. d, Clonality of S+ Bm cells was analyzed preVac and postVac in scRNA-seq dataset. One way to look broadly at these changes is to plot the average expression of both the stimulated and control cells and look for genes that are visual outliers on a scatter plot. The clonality distance threshold was set to 0.20 for the longitudinal analysis of the SARS-CoV-2 Infection Cohort dataset and to 0.05 for the SARS-CoV-2 Tonsil Cohort dataset. ## locale: For the same reasons, I felt this was the most intuitive way. 8 SARS-CoV-2-specific B. How to set the 'features.to.integrate' as all the features? Everyone: I strongly suggest using the RNA assay for all DE. If so, would only performing batch correction on batches of the same diet and merging all the diets together without batch correction be a valid method of retaining gene expression differences between diet but not batches? 2019 as referred to by @tilofreiwald. CAS The single-cell transcriptional landscape of mammalian organogenesis. T-bet+ B cells have a protective role in mouse models of acute and chronic viral infections38,42. 4e). Annu. conceived the project, designed experiments and interpreted data. I followed a similar approach to @attal-kush. ## [5] stxBrain.SeuratData_0.1.1 ssHippo.SeuratData_3.1.4 Box plots show median, box limits, and interquartile ranges (IQR), with whiskers representing 1.5x IQR and outliers. If split.by is not NULL, the ncol is ignored so you can not arrange the grid. Did the Golden Gate Bridge 'flatten' under the weight of 300,000 people in 1987? 3 Identification of SARS-CoV-2 S, Extended Data Fig. The commands are largely similar, with a few key differences: Normalize datasets individually by SCTransform (), instead of NormalizeData () prior to integration Prolonged evolution of the human B cell response to SARS-CoV-2 infection.