2
$\begingroup$

I want to perform deconvolution of a small data set (3 samples of one conditions vs. 4 of another). The tool CibersortX can estimate the sample-specific expression of cells, using the bulk expression data provided, and a signature matrix of typical expression by cell type.

I suffer from a low number of samples. However, I have also a technical replicate for each of the 7. The biological replicate underwent a biochemical procedure and then was sequenced once again - however the biochemical procedure turned out not to have a strong effect, so it's more of a technical replicate than a biological one.

A large ratio of samples to cell types is good for deconvolution. What would be the effect of adding those technical replicates to the pool, and then deconvolving them using CibersortX High-Resolution mode (which outputs per-sample value)?

What would be the effect of generating pseudo-replicates (taking the replicates I have, and artificially adding noise to them ) to the pool of CibersortX High Resolution mode ?

Some more details : I intend to use a published signature matrix , averaged to two cell-types only (due to the small number of samples I have) : the cell type that which is of my primary interest (for example Monocytes/T-cells) + "All Others". I am interested in finding differentially expressed genes in that one cell type that is of interest to me.

$\endgroup$
4
  • $\begingroup$ To be clear here, we have 3+4=7 data points. What exactly do we try to ascertain? It's a pretty data-poor situation to be blunt. Multi-comparison corrections will likely eat us alive. $\endgroup$
    – usεr11852
    Commented Nov 2, 2022 at 16:06
  • $\begingroup$ Please edit the question to say more about how you will implement and apply the CIBERSORTx deconvolution. For example, do you already have cell-type-specific expression profiles; for how many cell types? Is there a particular cell type of primary interest? Is there a specific gene set in mind for comparison between conditions, as in Fig 5c of the paper, or are you proposing to find differentially expressed genes in one or more cell types from these 7 bulk samples? Please add that information to the question, as comments are easy to overlook. $\endgroup$
    – EdM
    Commented Nov 2, 2022 at 21:33
  • $\begingroup$ More information about the nature of the samples and the conditions being compared would help, too. $\endgroup$
    – EdM
    Commented Nov 2, 2022 at 21:43
  • $\begingroup$ @EdM details added to the question $\endgroup$
    – Sam
    Commented Nov 6, 2022 at 9:19

2 Answers 2

1
+150
$\begingroup$

@Niklas explains the basic issues nicely in another answer (+1). Here are some details specific to the use of CIBERSORTx. You say:

A large ratio of samples to cell types is good for deconvolution.

That might more properly be put:

A large ratio of substantially linearly independent samples to cell types is good for deconvolution.

Adding technical replicates doesn't help with that.

The first step in CIBERSORTx, whose results carry down to all subsequent steps, is to estimate the fraction of each cell type in each sample. Say that there are $c$ cell types and $k$ samples. You use a $b \times c$ matrix $B$ providing the already known relative expression levels of $b$ genes that together distinguish the $c$ cell types. You then take the corresponding rows of the observed expression matrix $M$, with rows for genes and $k$ columns for samples, and solve the following matrix equation* to get a $c \times k$ matrix $F$ related to the fraction of each cell type in each sample:

$$BF=M_{b,\cdot} $$

where $M_{b,\cdot}$ represents the subset of $M$ containing rows of genes that are included in $B$.

The first problem is that, in general, you can't solve that equation uniquely for any more cell types $c$ than you have linearly independent columns in $M_{b,\cdot}$ or rows in $B$. In this application, the number of linearly independent columns in $M_{b,\cdot}$ will be limiting. If you simply duplicate the gene-expression observations to increase the $k$ samples to $2k$, $M_{b,\cdot}$ still has at most $k$ linearly independent columns. Insofar as your technical replicates are exact, you have won nothing in terms of estimating more cell types.

Now say that your $k$ technical replicates aren't exact but have included some noise. You might have $2k$ columns in $M_{b,\cdot}$ that are technically independent linearly, but they have $k$ pairs of columns with each pair highly correlated.

That raises the second, related problem: multicollinearity resulting from this pseudoreplication with technical replicates. Multicollinearity leads to substantial imprecision when solving equations like the above. As @Niklas suggests, when you try to fit too many cell types in that situation you are essentially fitting the noise. That can adversely affect all of your cell-type proportion estimates, with details depending on your specific data set.

Insofar as your technical replicates aren't exact and you try to use them to increase the number of cell types $c$ to distinguish, you just add to the problems in deconvolution. If you have true technical replicates in RNAseq studies, it's generally better to add the per-gene counts (with correction for batch effects if needed) to get biological replicates with better precision and limit yourself to the number of comparisons that the biological replicates allow.

This difficulty in getting a reliable matrix $F$ of cell-type proportions among the samples is critical, because $F$ is used to deconvolve all of the later steps of CIBERSORTx that get gene-specific estimates of per-sample expression. It's a classic garbage-in/garbage-out problem if $F$ is error-prone.

Limitation to 2 "cell types"

The edited question indicates that you are interested in one cell type of primary interest and "all others," for a total of 2 "cell types." I'm not sure how well that will work for deconvolution when the "all other" cell type represents a large number of individual cell types whose proportions might themselves differ from sample to sample. I'm not familiar with that aspect of the literature, so make sure that the literature supports your approach for focus on a single cell type of interest.

If that is OK, you are still probably best off restricting your analysis to the 7 samples that were analyzed in the standard way without the additional "biochemical procedure." That can support 2 cell types. I suspect that you would have a hard time convincing a skeptical reviewer that it's OK to combine all 14 samples, given the difference in analysis types and the danger of pseudo-replication.

If you still want to try to include your technical not-quite-replicates, the following might be defensible.

CIBERSORTx does not use the labels about condition or "biochemical procedure" in its fitting. All it does is evaluate sample-specific gene expression, gene by gene, in your cell type of interest. Also, the use of "significance" tests in the steps of the method is essentially heuristic, as genes are evaluated individually without taking correlations into account and there don't seem to be corrections for multiple comparisons. Thus tests of significant differences between conditions are based on placing samples into groups defined by condition after CIBERSORTx provides gene-expression values by cell type and sample, and then evaluating cell-type-specific gene expression between the two groups.

You thus might start by using all 14 samples/replicates for the evaluation of sample-specific over/under expression of genes in your cell type of interest. Then, after CIBERSORTx, restrict your analysis of gene-expression differences between the 2 conditions to the 7 samples analyzed without the added "biochemical procedure." Your results would be further strengthened if the same differences were found when you restrict post-CIBERSORTx analysis to the 7 samples analyzed with the added "biochemical procedure."

You will need some pretty large and robust differences between conditions to find anything significant with such a small sample. With 7 different outcome values, a non-parametric rank-sum test can't establish a difference between 4 samples of 1 type and 3 of another at p < 0.05, even if they line up perfectly by sample type:

wilcox.test(1:4,5:7)
# 
#   Wilcoxon rank sum exact test
# 
# data:  1:4 and 5:7
# W = 0, p-value = 0.05714
# alternative hypothesis: true location shift is not equal to 0

So you will need to use parametric tests.

Possible alternate solution

I'm not sure that CIBERSORTx is a good choice for your situation. Even in ideal simulations like in Supplementary Figure 7c, with minimal within-cell-type variance in gene expression for each of 2 conditions, several fold gene-expression differences between conditions, and several hundred samples, the CIBERSORTx output provided highly variable per-sample estimates that underestimated the overall differences between conditions. This Cross Validated page and this Bioinformatics Stack Exchange page describe some alternate approaches.

As you already know the condition labels for your samples, the condition-agnostic per-sample evaluation by CIBERSORTx doesn't help. In a larger data set CIBERSORTx can allow for subsequent unsupervised learning, but you don't need that. The now-ancient csSAM method has an option for deconvolving and comparing two sets of samples. It doesn't seem to be maintained any more, but source code is available on GitHub. The provided installation instructions don't seem to be correct, but with the R devtools installed and the required complier I successfully used the following yesterday to install it on an Intel Macintosh running Catalina:

devtools::install_github('shenorrLabTRDF/csSAM') 

*This is done in with non-negative matrix factorization to ensure that all of the entries of $F$ are non-negative, but the principles are the same.

$\endgroup$
4
  • $\begingroup$ You say The first problem is that you can't solve that equation uniquely for any more cell types c than you have linearly independent columns in Mb,or _rows in B_ The latter part seems incorrect - the number of rows in B is the number of genes (which is not the limiting factor). $\endgroup$
    – Sam
    Commented Nov 6, 2022 at 9:24
  • $\begingroup$ Not sure your explanation is correct.I've created an artificial mixture which consists of one sample and 19 pseudo-replicates (not introducing any noise,just copied the sample values 19 times). I've also created a signature matrix with 9 cell types (by averaging the values of the different cell-types in the signature matrix ). I have managed to run CibersortX and get the cell-types fraction matrix F (not using CibersortX batch correction). The number of linearly independent samples is 1 and the number of cell types is 9, so this should not have been mathematically possible by your explanation. $\endgroup$
    – Sam
    Commented Nov 6, 2022 at 11:06
  • $\begingroup$ Even a more trivial check : I've seen that it is possible to de-convolute 1 single sample with CibersortX to get its proportions (using a signature matrix of 9 cell-types). Should not this be impossible according to what you say (the limiting step being getting the list of fractions )? Perhaps I mistunderstand something $\endgroup$
    – Sam
    Commented Nov 6, 2022 at 12:26
  • 1
    $\begingroup$ @Sam yes, in this application the number of linearly-independent columns in $M_{b,\cdot}$ is limiting. For the general matrix equation shown, the number of linearly-independent rows in $B$ could be limiting instead. You might be able to find a solution with a rank-1 expression matrix (just 1 linearly independent column) like you constructed with the pseudo-replicates, but there is no unique solution and what you are fitting with added noise is essentially the noise. I'll add a bit to the answer now that I know you are limiting to 2 cell types. $\endgroup$
    – EdM
    Commented Nov 6, 2022 at 16:40
1
$\begingroup$

Could you clarify your experimental setup and in particular what exactly your "technical" replicates are? Was the chemical treatment done on the tissue, was this a treatment of the extracted RNA, or was it a treatment of the sequencing libraries?

The effects of adding in additional samples is difficult to predict, considering these samples were treated. Although the effect was not strong, it is difficult to gauge what exactly this means; I assume it is different from no effect? Generally, I think if your cells / tissues were treated with something that has no effect you can include them as biological replicates. If this treatment was done on nucleic acids, I would rather consider them technical replicates.

Generally, I would expect that adding in pseudo-replicates will not improve your expression profiles in terms of biological insights. In fact I would rather worry that you obtain results that are a biased by the addition of noise. Generally I think that pseudo-replicates cannot improve quality of biological datasets. If you require additional samples you need to actually generate biological samples.

Of course, it is basically impossible to know what the effects would be for your particular dataset, have you actually tried including the samples, or creating pseudo-replicates, and comparing the results to your original dataset?

$\endgroup$
1
  • $\begingroup$ (+1) Very good summary of the problems with what's proposed in the question. In particular, as the Technical Perspective in Molecular Biology of the Cell , vol. 30, No. 12 says in Box 3: "Combining biological and technical replicates (pseudoreplication)" is among the "Common mistakes to avoid." $\endgroup$
    – EdM
    Commented Nov 3, 2022 at 17:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.