Abstract
Introduction:
RNA sequencing (RNA-seq) can measure whole transcriptome gene expression from tissues or even individual cells, providing a powerful tool to study the immune response. Analysis of RNA-seq data involves mapping relatively short sequence reads to a reference genome, and quantifying genes based on the position of alignments relative to annotated genes. While this is usually robust, genetic polymorphism or genome/annotation inaccuracies result in genes with systematically missing or inaccurate data. These issues are frequently hidden or ignored, yet are highly relevant to immunologic data, where balancing selection has generated many polygenic gene families not accurately represented in a ‘one-size-fits-all’ reference genome.
Methods:
Here we present nimble, a tool to supplement standard RNA-seq pipelines. Nimble uses a previously developed pseudoaligner to process either bulk- or single-cell RNA-seq data using custom gene spaces. Importantly, nimble can apply customizable scoring criteria to each gene set, tailored to the biology of those genes.
Results:
We demonstrate that nimble recovers data in diverse contexts, ranging from simple cases (e.g., incorrect gene annotation or viral RNA), to complex immune genotyping (e.g., major histocompatibility or killer-immunoglobulin-like receptors). We use this enhanced capability to identify killer-immunoglobulin-like receptor expression specific to tissue-resident memory T cells and demonstrate allele-specific regulation of MHC alleles after Mycobacterium tuberculosis stimulation.
Discussion:
Combining nimble data with standard pipelines enhances the fidelity and accuracy of experiments, maximizing the value of expensive datasets, and identifying cellular subsets not possible with standard tools alone.
Introduction
RNA-sequencing (RNA-seq) and single-cell RNA-sequencing (scRNA-seq) technologies provide transcriptome-wide quantification in a sample of interest. In the case of scRNA-seq, transcriptomes are captured from individual cells, allowing for high-resolution observations of cellular function and differentiation. These high-dimensional data benefit the analysis of large populations of cells, such as those common in immunologic data. The rapid and accurate production of these data relies on complex software quantification toolchains. The process of transcript quantification is characterized by many technical decision points which, while generally obscured from downstream analysis, have a profound impact on the produced count data, depending on the quantification method of choice and its interaction with the reference genome.
The bioinformatic processing of RNA-seq and scRNA-seq data involves several steps. In most cases, short reads are aligned to a reference genome which is annotated for gene and features. In general, one genome is used to represent the diversity of the entire species. After alignment, an algorithm is run to assign reads to genes/features, producing gene counts. There are many established tools and pipelines for RNA-seq analysis. STAR is a commonly used alignment tool that can align reads by local positional alignment to a reference genome or transcriptome in a splice-aware manner (). Kallisto performs transcript quantification by pseudoalignment of reads to a reference genome, without undergoing an expensive positional alignment process first (). Feature calling is sometimes included with the aligner, and is sometimes performed using a separate tool, such as HTseq (). Especially for scRNA-seq analyses, it is common for vendors to wrap all steps into one pipeline, such as the 10x Genomics CellRanger software. While these tools have differences in their implementation, they each function by aligning all data from a sample to a single reference genome, and they score genes/features using a ‘one-size-fits-all’ logic that treats all genes identically. This approach can work quite well and is probably the desirable approach for most genes.
There are nonetheless situations where standard pipelines are systematically inaccurate or sub-optimal (Figure 1). Complex regions of the genome, especially gene families with copy number differences and/or segmental duplication, are difficult to accurately assemble when generating reference genomes. If the reference genome is inaccurate or incomplete, this results in feature counting artifacts, such as missing counts for expected genes. If a gene that is transcribed is not represented in the reference genome, the RNA-seq reads from that gene can misalign to the closest available gene, inflating these counts and providing misleading data. Improved genomic assemblies, especially those generated from long read sequencing, will improve this to a point; however, there are gene families with characteristics that remain problematic. Instances where two highly similar genes are encoded in the genome can result in alignment ambiguity or multi-mapped reads, which are often discarded, resulting in lost data. Some gene families have high degrees of variation between individuals, meaning it is extremely difficult to represent genomic diversity of the species with one single reference genome. Examples of these include the major histocompatibility complex (MHC), which is the most variable region of primate genomes, or killer immunoglobulin-like receptors (–). In the case of MHC class I, in addition to variable gene content in some species, there is extremely high allelic diversity, with thousands of known alleles (). While most RNA-seq and scRNA-seq analyses are designed to ignore allelic variation, the identity of the expressed MHC alleles for a subject is critical to antigen recognition, and thus higher resolution genotyping is often needed. Standard RNA-seq pipelines generally treat quantification of all genes identically, which does not permit adaptation of feature calling to match the biology or differing needs of certain gene families.
Figure 1
To address the limitations of standard RNA-seq and scRNA-seq pipelines, we developed nimble, a lightweight tool intended to provide supplemental gene counts to complement standard pipelines (Figure 1). Nimble is designed to be executed against one or more customizable gene spaces, where each gene space contains a focused set of reference sequences to address a specific question. Nimble uses a previously published pseudoalignment engine to align reads against these references (), followed by customizable logic for feature calling. The combination of these two capabilities allows nimble to quantify both simple and complex gene families, especially when the biology or characteristics of these genes are problematic for the standard one-size-fits all alignment and feature calling pipelines.
Results
Design of nimble and concordance with standard pipelines
Nimble is the combination of a previously developed pseudoaligner and customizable feature-calling algorithm, designed to allow the user to perform targeted quantification of one or more panels of interest. While nimble is primarily designed to address complex genomic regions, we first constructed a panel of “simple” genes that lack the complex genetics or high intra-species variation that can confound standard RNA-seq pipelines. We processed a single-cell RNA-seq (scRNA-seq) dataset from rhesus macaque peripherical blood mononuclear cells (PBMC) and compared the counts obtained by the CellRanger pipeline using the Mmul10 reference genome (“CellRanger/Mmul10”) against the counts obtained by nimble using this custom gene space (Figure 2). We contrasted un-normalized raw counts in aggregate, prior to downstream normalization or other processing, to provide the most direct comparison of alignment behavior. The results are highly similar both when comparing the total counts per gene (Figure 2), and the per-cell counts (Figure 2). While there is minor variation between the tools, this is likely due to differences in alignment algorithm or scoring thresholds. While nimble is not designed to completely replace standard alignment and feature calling pipelines, to provide a more comprehensive comparison of nimble with standard pipelines we generated a nimble library containing the complete 15,782 genes defined in the MMul_10 genome, and compared the resulting per-cell counts against the same data processed with CellRanger/MMul_10. The results were highly concordant, with a Pearson correlation of 0.968 (Supplementary Figure 1). Together, these data indicate that nimble’s alignment pipeline captures similar count data to standard pipelines, establishing nimble’s accuracy when aligning to a straightforward gene space. Nimble’s performance scales with available hardware via thread-level parallelism and will attempt to fully-saturate the provided cores. RAM usage is low, requiring memory only for the reference de Bruijn graph and 50 UMIs of buffered data from the input.bam file. In one example, aligning 491 million paired-end reads to a ~2,200-feature MHC reference completed in 225 minutes on 18 CPUs, sustaining ~36,000 reads/sec. Performance scales in a nearly linear manner with CPU count.
Figure 2
Quantification of genes missing from the reference genome enhances measurement of B cell class switching
A second straightforward usage of nimble is to quantify genes or features not annotated or misannotated in the reference genome. While this is less common for the human genome, the genomes of model organisms frequently have less complete or accurate gene models. While gene models can be corrected, generating counts for missing features, at least for most scRNA-seq pipelines, requires repeating the entire alignment. Rhesus macaques encode both CD27 and immunoglobulin heavy constant delta (IGHD), and while the sequence for these genes is present in the MMul_10 genome, neither are annotated in the NCBI gene build (version 103). Both genes provide useful information about B cell differentiation states (). To overcome this, we generated a nimble reference containing these genes, along with the remaining Ig heavy chains (IGHA, IGHE, IGHM, IGHG1, IGHG2, IGHG3, and IGHG4) to provide a comparison against standard pipelines (Supplementary Table S1). We processed a previously published rhesus macaque reference B cell dataset using this reference space (Figure 3). This dataset contains B cells of multiple differentiation states, including Pre-B cells, mature B cells, germinal center (GC), and plasma cells (Figure 3). Nimble successfully generated missing count data for CD27, demonstrating expression primarily in the “innate-like” CD40- mature B cell cluster, with limited expression among GC cells (Figure 3). IGHD is upregulated primarily in pre-B cells and the mature B cell cluster (Figure 3). Finally, we used the nimble immunoglobulin heavy chain expression data to classify B cell class switching status (Figure 3). For each B cell maturation type, we observe a predominant class-switching status: pre-B and mature B cells were predominately not class switched, while germinal center and plasma cells were predominately class-switched, reflecting their antigen-exposed state. Additionally, as cells transition through the class switch recombination process, we observe many different “mixed” expression states, at a diminished ratio compared to cells that fall into one of the two main class-switching categories. Organizing the cell categories by stage in the B cell maturation and differentiation process, we see the expected transition of B cells from not class-switched to class-switched over time. Taken together, these data demonstrate a case where a new nimble gene space allowed for cell classification beyond what is possible using standard pipelines alone.
Figure 3
Quantification of extra-genomic features
Many experiments require the quantification of features not encoded by the normal species genome, including the sequences of viral or bacterial pathogens, or exogenous genes (e.g., GFP). A common way to address this situation today is to append the exogenous sequence(s) to the species genome and align data to this new composite “genome”. While this is a viable option much of the time, alterations to the base genome can require re-processing of data, creates issues recombining or merging cohorts (it is more complex to merge counts when not aligned to the identical genomic space). Nimble provides an option to rapidly generate counts for any number of custom features, at any point after the primary alignment is performed, which can either be merged to the primary count matrix or treated separately.
To demonstrate examples of this, we analyzed virally infected cells. First, we performed scRNA-seq on primary normal human dermal fibroblasts experimentally infected with Chikungunya virus (CHIKV; strain SL-15649), as well as uninfected controls (Figure 4A). These were processed on separate lanes, and therefore the CHIKV-exposure status of each cell is known. We began by processing using the standard CellRanger/Mmul10 pipeline. PCA/UMAP analyses revealed two main transcriptional clusters, which largely separate the CHIKV-infected from uninfected cells (Figure 4). We aligned these populations to a custom nimble gene space containing the CHIKV genome, generating per-cell counts. CHIKV-expression corresponded extremely well with the expected groups, with virtually all CHIKV-exposed cells expressing high levels of CHIKV and no CHIKV detected in the control cells. This indicates that nimble is accurately and specifically detecting CHIKV (Figures 4B).
Figure 4

Quantification of viral RNA to illustrate detection of extra-genomic features. Panels (A–C) display the results of primary human fibroblasts infected with CHIKV at high MOI, followed by scRNA-seq. Uninfected fibroblasts were included as a control and processed in a physically separate lane. (A) The UMAP displays a dimensional reduction of these cells, colored by infection status. (B) The same UMAP as (A), colored by nimble-generated quantification of CHIKV RNA, demonstrating that CHIKV is specifically detected in CHIKV-infected fibroblasts and absent in uninfected controls. (C) The bar plot quantifies the percentage of CHIKV-positive cells for each fibroblast population from (A). Panels (D–F) display scRNA-seq data generated from B cells obtained from an adrenal mass identified in a cynomolgus macaque. (D) The UMAP displays a dimensional reduction of adrenal mass-derived B cells. (E) The same reduction as (D), colored by nimble-generated LCV expression data. LCV is a ubiquitous opportunistic virus that infects B cells and can induce lymphoma. (F) The violin plot quantifies the same nimble-generated LCV expression data shown in (E), demonstrating upregulation of LCV in B cell cluster 1. Collectively, these data provide two examples where nimble provides a simple solution to quantify transcripts not encoded by the host genome.
Because the CHIKV experiment involved experimental viral infection, it was obviously important to quantify CHIKV, and the proper CHIKV reference sequence was known prior to analysis. Therefore, alignment of data to an augmented genome and using standard pipelines would be as effective as nimble. This situation is not always true. Next, we performed scRNA-seq on cells cultured from an adrenal mass detected in an immunosuppressed cynomolgus macaque (
Resolution of complex, multigenic families such as NKG2 and KIRs
The examples shown thus far would be possible using standard scRNA-seq analysis pipelines, although there are situations when it might be more convenient or flexible to generate these data using nimble. There are nonetheless many gene families, particularly those with gene duplication or variable copy number, where aligning data and calling features in one-size-fits-all logic creates artifacts. When aligning RNA-seq data to a reference, an important technical decision point, which is often obscured from the end-user, is whether to discard alignments that are mapped to multiple features. These ambiguous “multi-mapped” reads are often discarded in standard pipelines, which can result in the systematic loss of biologically important data. The NKG2 genes are a family of cell surface receptors expressed on NK cells and a subset of T cells (
Figure 5

Summarization of NKG and KIR expression across T and NK populations. (A) The bar plot displays the magnitude of aggregated counts for NKG2A and NKG2D, demonstrating that nimble and CellRanger/Mmul10 exhibit similar behavior for these two features. (B) The bar plot displays the magnitude of aggregated counts for NKG2C, NKG2E, as well as reads that mapped to both NKG2C and NKG2E, which are two functionally similar genes with high sequence similarity. Critically, the difference in ambiguity resolution strategies between CellRanger/Mmul10 and nimble leads to a significant disparity in the number of counts generated for these features. Because nimble can be configured to retain and report ambiguous results, we can recover more counts for the activating NKG2C/E case than standard pipelines. (C) The bar plots display the percentage of cells across the RIRA T and NK cell types that are positive for various KIR genes. (D) The bar plots display the percentage of RIRA T and NK cells that express nimble-generated NKG data across various RIRA tissue types. (E) A similar set of bar plots as (D), displaying the percentage of RIRA T and NK cells that express nimble-generated KIR data across various RIRA tissue types. (F) The UMAP displays a dimensional reduction of a population of effector T and NK cells colored by RIRA subtype. (G) The bar plot represents the percent of cells that express NKG across the clusters we defined in (F). (H) A similar bar plot to (G), representing the percent of cells that express KIR across the clusters we defined in (F).
In additional to the NKG2 family, the killer immunoglobulin-like receptors (KIRs) are a well-characterized polygenic gene family also involved in NK and T cell signaling (
Characterization of NKG2 and KIR expression in NK and T cells
The enhanced NKG2 and KIR data obtained by nimble allow more detailed characterization of the expression patterns of these functionally important receptors. Because the data in Figure 5 are derived from a comprehensive single-cell atlas, they provide an ideal dataset in which to characterize expression patterns (
Quantifying major histocompatibility class I and II allelic expression
The major histocompatibility complex (MHC) is among the most polymorphic in the genome and presents multiple challenges for traditional RNA-seq analyses. Because of the high importance of MHC/HLA genotyping and the unique challenges, an entire field has emerged dedicated to MHC genotyping (
Figure 6

High-resolution MHC genotyping and quantification using nimble. All panels summarize scRNA-seq data obtained from sorted T cells of four rhesus macaques. (A) A schematic of the MHC region, illustrating the hypervariability of the region. (B) The pie chart summarizes the alignment status for all MHC reads, as assigned by the standard CellRanger/Mmul10 pipeline. Because the Mmul10 genome only contains a handful of MHC-I or MHC-I-like genes, any read with sufficient sequence similarity will map to one of these loci. Note, the genes with “LOC” designations indicate a gene that was not assigned a formal name in the NCBI gene build. This is both a reflection of the incomplete MHC sequence present in the Mmul10 genome, and the imprecision of count data with respect to the MHC. (C) The Sankey plot summarizes all reads assigned to Mamu-A by the CellRanger/Mmul10 pipeline, which is compared against the higher resolution MHC genotype data generated by nimble. While many reads are from Mamu -A, where nimble simply reports a higher resolution genotype, a significant number of the reads assigned to Mamu-A are from Mamu-B alleles, highlighting the inaccuracy of MHC data from standard pipelines. (D) The tile plot summarizes the concordance between nimble-generated data and MHC typing data generated on the same animals using an independent sequence-based genotyping (SBT) assay. Panels E-H provide a proof-of-concept example to illustrate how MHC typing data can be used to demultiplex pooled cells from scRNA-seq experiments. (E) The UMAP displays a dimensional reduction computed from nimble-generated MHC allele data across the same subjects as shown in (C) and (A), colored by unsupervised cluster identity. (F) The same UMAP as (E), colored by known subject identity. (G) The bar plot shows the proportion of cells within each unsupervised cluster assigned to each subject. Together, (E–G) indicates that MHC allele expression per-subject is relatively unique, and that using it to perform unsupervised clustering recovers many subject-specific clusters. (H) For the heatmap, we compute a gene module per-subject by getting the top differential genes by cluster, indicating that each subject has a set of unique MHC alleles that uniquely identify them, thereby driving cluster differentiation.
To demonstrate the ability of nimble to generate high-resolution and accurate MHC typing from scRNA-seq data, we processed scRNA-seq data from four rhesus macaques against a reference space with 2,379 MHC-I and MHC-II alleles (Supplementary Table S1). Unlike prior figures, nimble was run in a mode to report only perfect sequence matches, which is essential for the MHC, where nucleotide differences as little a single base pair change alter peptide binding potential, necessitating high-resolution allele-level genotyping. While the database contained all known rhesus macaque MHC alleles, the resulting data were summarized by lineage (e.g. two-digit typing) (
High-resolution MHC typing from scRNA-seq can assign scRNA-seq transcriptomes to subject
Due to cost, it is common to pool samples in single-cell RNA-seq experiments. Multiple methods exist to demultiplex samples, including cell hashing reagents and genotype-based approaches (
Differential regulation of individual MHC alleles following Mtb lysate exposure
MHC expression can be altered in response to pathogens, although most data measure global regulation of all alleles from a given MHC locus, since allele resolution of expression has been difficult to measure (
Figure 7

Detection of variance in MHC allele expression between stim and control data. (A) The bar plot displays the magnitude and variation of the aggregated expression difference between stim and control data for each MHC locus. (B) A similar bar plot to (A), displaying the percentage difference and variance of the number of cells that express each MHC locus, compared between stim and control data. (C, D) The dot plots show the top variable alleles for each subject. For each allele, the data are split between stim and control expression. Negative percentage values indicate expression in unstimulated cells, while positive percentage values indicate expression in stimulated cells. The x-axis is the magnitude of the expression for each allele. The dot size and color represent the “skewedness” of the expression toward stim or control data, indicating an upregulation. (E) In the bar plot, we rank all MHC alleles across the subjects by mean “skewedness” and display the top twenty-five, allowing us to identify alleles that are systematically upregulated in either the stim or the control data.
When the data are summarized at the allele-level, a more complex picture emerges (Figures 7C, D). First, the per-cell expression of each MHC allele varies heavily both at rest and post-stimulation. Certain MHC alleles are expressed by nearly all cells (e.g., Mamu-A1*004), while some are only expressed by a small fraction of cells (e.g., Mamu-A1*008 or Mamu-DRB1*10). Second, individual alleles behave differently after Mtb exposure, with some alleles increasing significantly relative to controls, some unchanged, and some even decreasing (e.g., Mamu−DRB5*03). When summarized across all rhesus macaques, Mamu-B*053 showed the highest increase after exposure, while Mamu-DRB1*10 showed the highest decrease (Figure 7E). These data, while proof-of-concept, demonstrate that there is high variability in expression at the level of MHC allele, and that allele-specific regulation occurs. This level of information is largely undetected by standard analysis pipelines. These changes could have implications for antigen selection in vaccines and could contribute to the protective effects of certain MHC alleles.
Discussion
Dominant RNA-seq and scRNA-seq pipelines are designed to produce reliable quantification across the genome as a whole. Reads are typically aligned to a single reference genome that is intended to represent the genomic diversity of the entire species. While these can be very effective, there are gene families and genomic regions with characteristics that are problematic for standard pipelines, especially polygenic regions with differences in gene content between subjects. These include regions where it is extremely difficult for one reference genome to faithfully represent the diversity of the species (e.g. MHC/HLA or KIR), and situations where the species simply encodes multiple copies of highly similar genes (e.g. NKG2C/E). There are also more mundane situations where standard pipelines can fail or be sub-optimal, including detection of exogenous RNA (e.g., a virus) or simple errors in the gene model. Here, we presented nimble, a novel and flexible tool to address these gaps, especially where the underlying biology doesn’t lend itself to a one-size-fits-all algorithm. Nimble supplements standard pipelines by aligning data to custom gene spaces, with customizable criteria for feature calling, which can be adapted to the needs of that gene family.
We demonstrate the value of nimble through multiple examples. To validate accuracy, we demonstrate concordance between nimble and the standard CellRanger pipeline, using a set of typical single-copy, relatively conserved genes. Nimble can be used to address technical issues in the genome or gene model, as shown for CD27 and IGHD, or for the quantification of viral expression. Nimble is especially powerful for complex, polygenic gene families, because it can perform feature calling using settings more appropriate for each gene family. We show that nimble can recover otherwise discarded expression data for NKG2 genes and used nimble to characterize NKG2 and KIR expression in T and NK cells. These analyses identified previously unreported enrichment of inhibitory KIR expression in tissue resident memory T cells. Finally, nimble can resolve high-resolution MHC expression data, which revealed significant expression differences at the allele-level, and allele-specific changes after Mtb exposure. Collectively, these demonstrate a range of situations where nimble can augment standard RNA-seq pipelines to recover potentially valuable data.
There are many efforts to improve the quality of reference genomes, including the new generation of so-called telomere-to-telomere (T2T) genomes (
Nimble, as the name suggests, is designed to be lightweight and flexible. We presented a set of examples where it is useful, but others may exist. One potential use-case is quantification of isoforms, in which case the reference might contain a handful of isoforms for the gene of interest. This supplemental alignment and count data makes it feasible to identify previously missed patterns of expression across diverse species and cell types.
Methods
Nimble aligner
The data presented here were processed using a novel toolchain developed for the purpose of aligning RNA-seq data to arbitrary reference spaces. Nimble provides various facilities for curating these custom reference libraries, aligning sequence data, and reporting properties of the alignment data for the purpose of quality control. The tool takes RNA-seq data in a variety of formats and a set of custom reference libraries as input and produces one count matrix per library. To create a custom gene space, the user can provide a set of Entrez identifiers, a CSV, or a FASTA file. The nimble library file produced allows the user to customize values for aligner filter behavior, such as minimum read length for a passing alignment, the maximum allowable mismatches, or sequence trimming strictness, among several others. The tool and detailed documentation about its usage and configuration options is available on GitHub (https://github.com/BimberLab/nimble).
Nimble incorporates a previously developed, multithreaded pseudoalignment algorithm to align RNA-seq data to these custom gene spaces (
The nimble alignment pipeline provides several additional layers of filtration for the alignment count matrix, depending on the format of the input data. All alignments are subject to alignment length, mismatch, and trimming filters. In the case of paired-end input reads, there are optional filters for asserting read-pair alignment orientations relative to the reference space, and several options for producing a single set of calls from differing alignments between two sequences in the same read-pair. Finally, nimble can transform the counts-per-molecule matrix produced from 10x scRNA-seq input data into a counts-per-cell matrix by intersecting on the molecule and cell barcodes to conform to the expected data format for downstream packages like Seurat.
Animal subjects
All study macaques were housed at the Oregon National Primate Research Center (ONPRC) in animal biosafety level 2 rooms with autonomously controlled temperature, humidity, and lighting. Macaques were fed commercially prepared primate chow twice daily and received supplemental fresh fruit or vegetables daily. Fresh, potable water was provided via automatic water systems. During all protocol time points, body weight and complete blood counts were collected and animals underwent anesthesia support and monitoring. The ONPRC Institutional Animal Care and Use Committee approved macaque care and all experimental protocols and procedures. The ONPRC is a Category I facility. The American Association for Accreditation of Laboratory Animal Care fully accredits the Laboratory Animal Care and Use Program at the ONPRC. It has an approved assurance (no. A3304-01) for the care and use of animals on file with the National Institutes of Health Office for Protection from Research Risks. The Institutional Animal Care and Use Committee adheres to national guidelines established in the Animal Welfare Act (7 U.S. Code, sections 2131–2159) and the Guide for the Care and Use of Laboratory Animals, Eighth Edition, as mandated by the U.S. Public Health Service Policy.
Tissue collection and processing
Cell isolation from PBMC and solid tissues were acquired and processed to single-cell suspensions using previously published methods, summarized below (
Cell hashing
Cell hashing was used for most scRNA-seq samples, with the MULTI-Seq lipid labeling system (
Single-cell RNA sequencing
The isolated single cell suspensions were then processed for single-cell RNA sequencing using the 10x Genomics Chromium platform, using 5’ v2 or HT chemistry, following the manufacturer’s protocols, including feature barcoding library preparation. To improve capture of MULTI-Seq fragments, we added the following primer, 5’-CCTTGGCACCCGAGAATTCC-3’, at 2.5uM to the 10x cDNA synthesis step. Generation of VDJ enriched libraries followed manufacturer’s instructions with the exception that macaque-specific TCR constant region primers were used in place of human-specific TCR enrichment primers for macaque cells (
Single-cell RNA-seq processing
Raw sequence reads were processed using 10X Genomics Cell Ranger software (version 8.0.1). The resulting sequence data were aligned to the MMul_10 genome (assembly ID: GCF_003339765.1) with NCBI gene build 103. Cell demultiplexing used a combination of algorithms, including GMM-demux, demuxEM and BFF, implemented using the cellhashR package (
Major histocompatibility complex analysis
Genotyping for Major Histocompatibility Complex class I (MHC-I) allele was performed using a PCR amplicon-based method, as previously described 78,79. For nimble-generated MHC data, normalization was performed per cell by dividing the raw reads for each MHC allele by the sum of reads from each MHC locus (i.e. total MHC-A, total MHC-B, etc.).
Chikungunya virus infection
Primary normal human dermal fibroblasts (NHDFs) were experimentally infected with Chikungunya virus strain SL-15649, obtained from Dr. Mark Heise (University of North Carolina at Chapel Hill). NHDFs were plated into 6-well plates, cultured in DMEM containing 10% FBS and 1X PSG, and incubated overnight at 37°C with 5% CO2. Cells were infected in triplicate wells with CHIKV SL-15649 at a multiplicity of infection equal to 1. At 24 hours post infection the cells were trypsinized and washed twice with DMEM-10 and once with PBS.
Mycobacterium lysate exposure assay
Mononuclear cells isolated from bronchoalveolar lavage (BAL) fluid were incubated at 37°C under a humidified 5% CO2 atmosphere. These cells were rested for 4 hours, and then either exposed to Mtb lysate (BEI NR-14822 at 6uL/Test) for 4 hours or cultured without Mtb lysate as a control. After incubation, cells were processed using the 10x Genomic Chromium system, as described above.
Statements
Data availability statement
The datasets presented in this study can be found in online repositories. The names of the repository/repositories and accession number(s) can be found in the article/Supplementary Material.
Ethics statement
Ethical approval was not required for the studies on humans in accordance with the local legislation and institutional requirements because only commercially available established cell lines were used. The animal study was approved by ONPRC Institutional Animal Care and Use Committee. The study was conducted in accordance with the local legislation and institutional requirements.
Author contributions
SB: Formal analysis, Methodology, Software, Writing – original draft. GM: Formal analysis, Methodology, Software, Writing – review & editing. MK: Formal analysis, Methodology, Software, Writing – review & editing. GB: Formal analysis, Methodology, Software, Writing – review & editing. BV-M: Investigation, Resources, Writing – review & editing. SO: Investigation, Resources, Writing – review & editing. SF: Investigation, Resources, Writing – review & editing. WG: Investigation, Resources, Writing – review & editing. CN: Investigation, Resources, Writing – review & editing. DD: Investigation, Resources, Writing – review & editing. AS: Investigation, Resources, Writing – review & editing. TB: Investigation, Resources, Writing – review & editing. AB-A: Investigation, Resources, Writing – review & editing. NH: Investigation, Resources, Writing – review & editing. HW: Investigation, Resources, Writing – review & editing. CW: Investigation, Resources, Writing – review & editing. CB: Investigation, Resources, Writing – review & editing. JVS: Investigation, Resources, Writing – review & editing. CL: Investigation, Resources, Writing – review & editing. MA: Investigation, Resources, Writing – review & editing. RR: Funding acquisition, Writing – review & editing. DS: Funding acquisition, Writing – review & editing. JBS: Funding acquisition, Writing – review & editing. AO: Funding acquisition, Writing – review & editing. SH: Funding acquisition, Investigation, Resources, Writing – review & editing. LP: Funding acquisition, Writing – review & editing. BB: Conceptualization, Methodology, Software, Supervision, Writing – original draft.
Funding
The author(s) declare financial support was received for the research and/or publication of this article. This work was supported by the National Institute of Allergy and Infectious Diseases (NIAID) grants and contracts 75N93019C00070 (to LP), P01AI177688-01 (to LP) R01AI161010 (to RR), R01AI129703 (to JBS), U19 AI142759-01 (to DS), as well as Bill and Melinda Gates Foundation grant INV-002377 (to LP), INV-055706 (subaward to BB), and the Oregon National Primate Research Center Core grant from the National Institutes of Health, Office of the Director (P51OD011092). The research reported in this publication used computational infrastructure supported by the Office of Research Infrastructure Programs, Office of the Director, of the National Institutes of Health under Award Number S10OD034224.
Acknowledgments
We also thank Dr. Katinka Vigh-Conrad for assistance with figures.
Conflict of interest
The authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.
Generative AI statement
The author(s) declare that no Generative AI was used in the creation of this manuscript.
Publisher’s note
All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors and the reviewers. Any product that may be evaluated in this article, or claim that may be made by its manufacturer, is not guaranteed or endorsed by the publisher.
Author disclaimer
The content is solely the responsibility of the authors and does not necessarily represent the official views of the National Institutes of Health.
Supplementary material
The Supplementary Material for this article can be found online at: https://www.frontiersin.org/articles/10.3389/fimmu.2025.1596760/full#supplementary-material
Supplementary Figure 1Comparison of nimble to CellRanger for genome-wide alignment. While nimble is not designed to completely replace standard alignment and feature calling pipelines, to provide a more comprehensive comparison of nimble with standard pipelines we generated a nimble library containing the complete 15,782 genes defined in the MMul_10 genome, and compared the resulting per-cell counts against the same data processed with CellRanger/MMul_10. The scatter plot presents the counts for each gene obtained using nimble relative to the CellRanger pipeine. Results were highly concordant, with a Pearson correlation of 0.968 (Supplementary Figure 1). Together, these data indicate that nimble’s alignment pipeline captures similar count data to standard pipelines, establishing nimble’s accuracy when aligning to a straightforward gene space.
References
1
DobinADavisCASchlesingerFDrenkowJZaleskiCJhaSet al. STAR: ultrafast universal RNA-seq aligner. Bioinformatics. (2013) 29:15–21. doi: 10.1093/bioinformatics/bts635
2
SullivanDKMinKHJHjorleifssonKELuebbertLHolleyGMosesLet al. kallisto, bustools, and kb-python for quantifying bulk, single-cell, and single-nucleus RNA-seq. Nat Protoc. (2025) 20(3):587-607. doi: 10.1038/s41596-024-01057-0
3
PutriGHAndersSPylPTPimandaJEZaniniF. Analysing high-throughput sequencing data in Python with HTSeq 2.0. Bioinformatics. (2022) 38:2943–5. doi: 10.1093/bioinformatics/btac166
4
ParhamP. MHC class I molecules and KIRs in human history, health and survival. Nat Rev Immunol. (2005) 5:201–14. doi: 10.1038/nri1570
5
RobinsonJBarkerDJMarshSGE. 25 years of the IPD-IMGT/HLA database. HLA. (2024) 103:e15549. doi: 10.1111/tan.15549
6
NomuraTMatanoT. Association of MHC-I genotypes with disease progression in HIV/SIV infections. Front Microbiol. (2012) 3:234. doi: 10.3389/fmicb.2012.00234
7
ParhamPGuethleinLA. Genetics of natural killer cells in human health, disease, and survival. Annu Rev Immunol. (2018) 36:519–48. doi: 10.1146/annurev-immunol-042617-053149
8
RobinsonJWallerMJParhamPBodmerJGMarshSG. IMGT/HLA Database–a sequence database for the human major histocompatibility complex. Nucleic Acids Res. (2001) 29:210–3. doi: 10.1093/nar/29.1.210
9
WalkerBDKorberBT. Immune control of HIV: the obstacles of HLA and viral diversity. Nat Immunol. (2001) 2:473–5. doi: 10.1038/88656
10
Genomics, x. Rust Pseudoaligner. Available online at: https://github.com/10XGenomics/rust-pseudoaligner (accessed April 01, 2025).
11
WuYCKiplingDDunn-WaltersDK. The relationship between CD27 negative and positive B cell populations in human peripheral blood. Front Immunol. (2011) 2:81. doi: 10.3389/fimmu.2011.00081
12
WuHLWeberWCShriver-MunschCSwansonTNorthrupMPriceHet al. Viral opportunistic infections in Mauritian cynomolgus macaques undergoing allogeneic stem cell transplantation mirror human transplant infectious disease complications. Xenotransplantation. (2020) 27:e12578. doi: 10.1111/xen.12578
13
Marr-BelvinAKCarvilleAKFaheyMABoisvertKKlumppSAOhashiMet al. Rhesus lymphocryptovirus type 1-associated B-cell nasal lymphoma in SIV-infected rhesus macaques. Vet Pathol. (2008) 45:914–21. doi: 10.1354/vp.45-6-914
14
WuHLWeberWCWaytashekCMBoyleCDReedJSBatemanKBet al. A model of lymphocryptovirus-associated post-transplant lymphoproliferative disorder in immunosuppressed Mauritian cynomolgus macaques. PLoS Pathog. (2024) 20:e1012644. doi: 10.1371/journal.ppat.1012644
15
CarvilleAEvansTIReevesRK. Characterization of circulating natural killer cells in neotropical primates. PLoS One. (2013) 8:e78793. doi: 10.1371/journal.pone.0078793
16
WalterLPetersenB. Diversification of both KIR and NKG2 natural killer cell receptor genes in macaques - implications for highly complex MHC-dependent regulation of natural killer cells. Immunology. (2017) 150:139–45. doi: 10.1111/imm.12666
17
WroblewskiEEParhamPGuethleinLA. Two to tango: co-evolution of hominid natural killer cell receptors and MHC. Front Immunol. (2019) 10:177. doi: 10.3389/fimmu.2019.00177
18
SiemaszkoJMarzec-PrzyszlakABogunia-KubikK. NKG2D natural killer cell receptor-A short description and potential clinical applications. Cells. (2021) 10(6):1420. doi: 10.3390/cells10061420
19
Rhesus Immune Reference Atlas (RIRA): A multi-tissue single-cell landscape of immune cells(2025). Available online at: https://github.com/BimberLab/RIRA (accessed April 01, 2025).
20
BimberBNEvansDT. The killer-cell immunoglobulin-like receptors of macaques. Immunol Rev. (2015) 267:246–58. doi: 10.1111/imr.12329
21
RobinsonJGuethleinLAMaccariGBlokhuisJBimberBNde GrootNGet al. Nomenclature for the KIR of non-human species. Immunogenetics. (2018) 70(9):571-83. doi: 10.1007/s00251-018-1064-4
22
KumarBVMaWMironMGranotTGuyerRSCarpenterDJet al. Human tissue-resident memory T cells are defined by core transcriptional and functional signatures in lymphoid and mucosal sites. Cell Rep. (2017) 20:2921–34. doi: 10.1016/j.celrep.2017.08.078
23
BromleySKAkbabaHManiVMora-BuchRChasseAYSamaAet al. CD49a regulates cutaneous resident memory CD8(+) T cell persistence and response. Cell Rep. (2020) 32:108085. doi: 10.1016/j.celrep.2020.108085
24
WalzerTMarcaisASaltelFBellaCJurdicPMarvelJ. Cutting edge: immediate RANTES secretion by resting memory CD8 T cells following antigenic stimulation. J Immunol. (2003) 170:1615–9. doi: 10.4049/jimmunol.170.4.1615
25
Daza-VamentaRGlusmanGRowenLGuthrieBGeraghtyDE. Genetic divergence of the rhesus macaque major histocompatibility complex. Genome Res. (2004) 14:1501–15. doi: 10.1101/gr.2134504
26
RobinsonJMalikAParhamPBodmerJGMarshSG. IMGT/HLA database–a sequence database for the human major histocompatibility complex. Tissue Antigens. (2000) 55:280–7. doi: 10.1034/j.1399-0039.2000.550314.x
27
WisemanRWKarlJABimberBNO’LearyCELankSMTuscherJJet al. Major histocompatibility complex genotyping with massively parallel pyrosequencing. Nat Med. (2009) 15:1322–6. doi: 10.1038/nm.2038
28
BoggyGBimberBN. cellhashR: An R package designed to demultiplex cell hashing data(2021). Available online at: https://github.com/bimberlab/cellhashr (accessed April 1, 2025).
29
StoeckiusMZhengSHouck-LoomisBHaoSYeungBZMauckWM3rdet al. Cell Hashing with barcoded antibodies enables multiplexing and doublet detection for single cell genomics. Genome Biol. (2018) 19:224. doi: 10.1186/s13059-018-1603-1
30
XinHLianQJiangYLuoJWangXErbCet al. GMM-Demux: sample demultiplexing, multiplet detection, experiment planning, and novel cell-type verification in single cell sequencing. Genome Biol. (2020) 21:188. doi: 10.1186/s13059-020-02084-2
31
McGinnisCSPattersonDMWinklerJConradDNHeinMYSrivastavaVet al. MULTI-seq: sample multiplexing for single-cell RNA sequencing using lipid-tagged indices. Nat Methods. (2019) 16:619–26. doi: 10.1038/s41592-019-0433-8
32
GreeneJMWisemanRWLankSMBimberBNKarlJABurwitzBJet al. Differential MHC class I expression in distinct leukocyte subsets. BMC Immunol. (2011) 12:39. doi: 10.1186/1471-2172-12-39
33
TingJPTrowsdaleJ. Genetic control of MHC class II expression. Cell. (2002) 109 Suppl:S21–33. doi: 10.1016/s0092-8674(02)00696-7
34
NurkSKorenSRhieARautiainenMBzikadzeAVMikheenkoAet al. The complete sequence of a human genome. Science. (2022) 376:44–53. doi: 10.1126/science.abj6987
35
ZhangSXuNFuLYangXMaKLiYet al. Integrated analysis of the complete sequence of a macaque genome. Nature. (2025) 640(8059):714-21. doi: 10.1038/s41586-025-08596-w
36
WangTAntonacci-FultonLHoweKLawsonHALucasJKPhillippyAMet al. The Human Pangenome Project: a global resource to map genomic diversity. Nature. (2022) 604:437–46. doi: 10.1038/s41586-022-04601-8
37
LiHDurbinR. Fast and accurate short read alignment with Burrows-Wheeler transform. Bioinformatics. (2009) 25:1754–60. doi: 10.1093/bioinformatics/btp324
38
BolgerAMLohseMUsadelB. Trimmomatic: a flexible trimmer for Illumina sequence data. Bioinformatics. (2014) 30:2114–20. doi: 10.1093/bioinformatics/btu170
39
ZevinASMoatsCMayDWangariSMillerCAhrensJet al. Laparoscopic technique for serial collection of liver and mesenteric lymph nodes in macaques. J Vis Exp. (2017) (123):55617. doi: 10.3791/55617
40
PitcherCJHagenSIWalkerJMLumRMitchellBLMainoVCet al. Development and homeostasis of T cell memory in rhesus macaque. J Immunol. (2002) 168:29–43. doi: 10.4049/jimmunol.168.1.29
41
KauffmanKDSallinMASakaiSKamenyevaOKabatJWeinerDet al. Defective positioning in granulomas but not lung-homing limits CD4 T-cell interactions with Mycobacterium tuberculosis-infected macrophages in rhesus macaques. Mucosal Immunol. (2018) 11:462–73. doi: 10.1038/mi.2017.60
42
BurwitzBJWettengelJMMuck-HauslMARingelhanMKoCFestagMMet al. Hepatocytic expression of human sodium-taurocholate cotransporting polypeptide enables hepatitis B virus infection of macaques. Nat Commun. (2017) 8:2146. doi: 10.1038/s41467-017-01953-y
43
HansenSGZakDEXuGFordJCMarshallEEMalouliDet al. Prevention of tuberculosis in rhesus macaques by a cytomegalovirus-based vaccine. Nat Med. (2018) 24:130–43. doi: 10.1038/nm.4473
44
GaublommeJTLiBMcCabeCKnechtAYangYDrokhlyanskyEet al. Nuclei multiplexing with barcoded antibodies for single-nucleus genomics. Nat Commun. (2019) 10:2907. doi: 10.1038/s41467-019-10756-2
45
BoggyGJMcElfreshGMahyariEVenturaABHansenSGPickerLJet al. BFF and cellhashR: analysis tools for accurate demultiplexing of cell hashing data. Bioinformatics. (2022) 38(10):2791-801. doi: 10.1093/bioinformatics/btac213
46
McGinnisCSMurrowLMGartnerZJ. DoubletFinder: doublet detection in single-cell RNA sequencing data using artificial nearest neighbors. Cell Syst. (2019) 8:329–337.e324. doi: 10.1016/j.cels.2019.03.003
47
ButlerAHoffmanPSmibertPPapalexiESatijaR. Integrating single-cell transcriptomic data across different conditions, technologies, and species. Nat Biotechnol. (2018) 36:411–20. doi: 10.1038/nbt.4096
Summary
Keywords
single-cell RNA-seq (scRNA-seq), T cells, bioinformatics, immunogenetics, major histocompatability complex (MHC)
Citation
Benjamin S, McElfresh GW, Kaza M, Boggy GJ, Varco-Merth B, Ojha S, Feltham S, Goodwin W, Nkoy C, Duell D, Selseth A, Bennett T, Barber-Axthelm A, Haese NN, Wu H, Waytashek C, Boyle C, Smedley JV, Labriola CS, Axthelm MK, Reeves RK, Streblow DN, Sacha JB, Okoye AA, Hansen SG, Picker LJ and Bimber BN (2025) An immune-focused supplemental alignment pipeline captures information missed from dominant single-cell RNA-seq analyses, including allele-specific MHC-I regulation. Front. Immunol. 16:1596760. doi: 10.3389/fimmu.2025.1596760
Received
20 March 2025
Accepted
19 July 2025
Published
08 August 2025
Volume
16 - 2025
Edited by
Peter S. Linsley, Benaroya Research Institute, United States
Reviewed by
Jason Dale Turner, University of Birmingham, United Kingdom
Naresh Doni Jayavelu, Benaroya Research Institute, United States
Updates

Check for updates
Copyright
© 2025 Benjamin, McElfresh, Kaza, Boggy, Varco-Merth, Ojha, Feltham, Goodwin, Nkoy, Duell, Selseth, Bennett, Barber-Axthelm, Haese, Wu, Waytashek, Boyle, Smedley, Labriola, Axthelm, Reeves, Streblow, Sacha, Okoye, Hansen, Picker and Bimber.
This is an open-access article distributed under the terms of the Creative Commons Attribution License (CC BY). The use, distribution or reproduction in other forums is permitted, provided the original author(s) and the copyright owner(s) are credited and that the original publication in this journal is cited, in accordance with accepted academic practice. No use, distribution or reproduction is permitted which does not comply with these terms.
*Correspondence: Benjamin N. Bimber, bimber@ohsu.edu
Disclaimer
All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors and the reviewers. Any product that may be evaluated in this article or claim that may be made by its manufacturer is not guaranteed or endorsed by the publisher.