# Tag Info

5

It is indeed true that for the DE analysis one should include batch into the formula to avoid changing the original counts. Still, for everything else such as plotting heatmaps use of removeBatchEffects is perfectly fine and (at least to me) a standard and well-accepted procedure. It essentially does not matter what you use to correct for the batch effect ...

5

Look at this recent paper that uses ComBat on scRNA-seq data for batch effect removal and states that it "successfully does so". I also suggest that you check out this publication on Distribution Matching Residual-Nets. Authors evaluated their method also on scRNA-seq data and thus it may be something you are looking for. I personally played a bit with ...

4

There are competing claims regarding how well ComBat works on scRNA-seq datasets. A recent paper from John Marioni's introduces a mutual nearest neighbors method that seems to outperform ComBat in at least some relevant scenarios. In general, it's best to look at tSNE or other diagnostic plots after batch correction to see if the results seem reasonable (...

4

Yes, though thankfully Your 2018 PreD samples will help you resolve this. Simply add the batch effect to the design (~Batch + Treatment) and DESeq2 (or edgeR or Limma) will handle this for you. You do not need SVA or RUV, thankfully, since you quite cleverly sequenced one group in both batches. To clarify, your coldata will be something like: Group ...

3

For comparing the counts of different samples from DESeq2, Michael Love recommends using the variance-stabilized transform. It'd be great if you could provide some specific code examples in your question, but without that here's something that should work with the DESeq2 workflow as mentioned in the package documentation: ## [assuming "dds <- DESeq(dds)" ...

3

Yes, you can safely concatenate the technical replicates. Odds are good that these are even the same libraries just sequenced twice, so even labeling them as replicates is a bit of a stretch. As an aside, it would be surprising if you actually had a batch effect in a situation like this. You will commonly see sequencing facilities just sequence a given ...

3

Usually with microarrays you want to make a case/control comparison, so I am going to assume that. Data from different array platforms is generally difficult to compare: each platform is measuring potentially a different part of the expression of the gene (different exons or different regions), each platform is likely to need different normalisation ...

3

The help page for removeBatchEffect() explicitly states that it should not be used in conjunction with differential expression testing, so don't do that. You already have the batch effect included in your model, so you're already correcting for it when testing for differential expression. If your MDS plots suggest that samples are variably affected by the ...

3

MAGIC assumes input data has been both library-size normalized, and either log or sqrt transformed prior to imputation (see also: MAGIC tutorial). Additionally, any graph-based methods (MAGIC, PHATE, t-SNE, UMAP, spectral clustering, Louvain, etc etc) will give flawed results if your data contains a batch effect, since the neighbourhood graph would reflect ...

2

I am not sure how much you know about bioinformatics already, can you use R? For a bioinformatician looking at QC for microarrays should not be a big deal, at least for me it would take maybe a day (or two) to get this done. However, if you never used R and want to start from scratch, it depends on how quickly you learn how to deal with arrays and QC. There ...

2

See this paper from the Marioni group, where they propose a method for correcting batch effects between single cell sequencing experiments when each experiment contains different sub-populations: Large-scale single-cell RNA sequencing (scRNA-seq) data sets that are produced in different laboratories and at different times contain batch effects that ...

2

It’s right there on the cellranger manual: #aggregate results of counts for separate samples cellranger aggr #analyse the combined results cellranger reanalyze Note: I’m not sure this applies to the above case where batch effects could be an issue. However, this is how the analysis is performed for 10X data from multiple runs in principle. cellranger aggr ...

2

If you want to plot the "corrected" expression, you will need to remove the variation introduced by these surrogate variables. Removing the expression affected can introduce some bias too and it is usually not recommended (despite comBat doing so). You should apply linear algebra, you can look at here is an example how to do it: library("corpcor") s <- ...

2

To add to what @gringer, when you do use TPM, the normalization done is for both library size and gene length. When you use rlog, the normalization is done via median normalization (https://www.ncbi.nlm.nih.gov/pmc/articles/PMC2864565/). See below for a quick example about the rlog, and size factor normalization. dds=makeExampleDESeqDataSet(betaSD=0.5,...

2

You're basically subtracting a constant per-gene per-level. The relevant portion of the code is: fit <- lmFit(x,cbind(design,X.batch),...) beta <- fit$coefficients[,-(1:ncol(design)),drop=FALSE] beta[is.na(beta)] <- 0 as.matrix(x) - beta %*% t(X.batch) where x is your input matrix, design is the design matrix and X.batch is the matrix of batch and ... 1 The batch effect is expected to be the same across all samples - therefore you want to estimate its effect across all of the samples. Just add batch as an additional parameter to the linear model (this is presuming samples sequenced in the two batches have been randomised). You can show the effect of "batch effect" removal with a PCA plot by ... 1 I don't think this has anything to do with batch correction. The averages of that gene are distinctly different between groups, so it's correct that the gene is statistically significant. But with one sample driving all the difference, it's likely to be an artifact, or otherwise not fruitful to follow up on. As geek_y suggested, a filter like "omit ... 1 DESeq2 uses the batch information (and everything else in the design) to produce offsets for its GLM. For a background on that please check how linear models work, e.g. using the StatQuest series of statistics videos over at YouTube. It still operates on the raw counts. The same goes for the normalization factors. removeBatchEffect fits a linear model to the ... 1 batch = Pheno_LMS$batchId should be batch = Pheno_LMS\$BatchId, if you fix that then at least the code you showed works just fine.

1

Prepping the RNA on different days, or making Illumina libraries on different days, or having different technicians handle different samples; that can lead to batch effects. Running samples on two different days does not cause a significant batch effect, as you can plainly see in your PCA. You should just combine the fastqs.

1

You can just remove the first component from the dataset by setting the first eigenvalue to 0 in the diagonal matrix and then multiplying the SVD matrices. I am not sure which R code you are using to estimate the components (I have a comparison of PCA code in R on https://github.com/aedin/ODSC_2018/tree/master/PCA_vignette) In ade4 R package, there is a ...

1

Have you tried seurat3? Here is the reference: https://satijalab.org/seurat/v3.0/pancreas_integration_label_transfer.html

Only top voted, non community-wiki answers of a minimum length are eligible