Out of curiosity before running it as samples are ...
# rnaseq
ž
Out of curiosity before running it as samples are still downloading: is it possible to run the pipeline with libraries of mixed type? Some are stranded some are unstranded...
m
Yes, that is no problem - you can either manually specify or use the auto detection. The respective samples will be treated accordingly. You, however, need to consider this in your downstream differential gene analysis together with other batch effects.
ž
Thanks for the reply :) i'm not sure i understand how would library strandedness impact DE analysis or is it just as a general concern because such samples are obviously from different batches? Does rnaseq pipeline not try and correct for batch effect?
m
No, the #rnaseq pipeline does not correct for batch effects. It simply generates count tables that combine the quantifications for all individual samples. See #differentialabundance for the respective downstream analysis. I have admittedly not explored the impact of stranded vs. unstranded library preparations, and simply assumed that you are speaking of combining samples for which different kits were used, but I guess special precautions apply when quantifying pseudogenes / lncRNAs / transposons / bidirectionally transcribed eRNA and other oddities. I assume that you will see batched quantification differences, because when sense and antisense transcripts become indistinguishable during library preparation, your transcript assignments will be less accurate. I recommend doing a hierarchical clustering with
ward.D2
of your samples during exploratory data analysis and using different distance metrics to explore possible batch effects (e.g. Euclidian distance vs. the Spearman (rank relationship) correlation which makes it robust to magnitude differences).
➕ 1
t
Every kit (and stranded and unstranded ones obviously work in quite different ways) has its own biases. If all of your groups were done with the same kit, you have some hope that the biases will cancel out, otherwise they may influence the results (if at all possible, make sure that the kits are not confounded with your groups, otherwise you don't know if you are measuring differences between groups or kits). And the nf-core/rnaseq pipeline has absolutely no knowledge of sample groups or batches, etc. -- each sample is processed individually, so is simply impossibly to apply any "batch correction". Even if it were possible, it would be a bad idea. Best practice is to build any batches into your statistical model, not try to "remove" them upfront. (You cannot just magically "remove" batch effects -- any manipulation of the data introduces new errors, you just hope that it does more good than harm, but it will always do both. The other thing is that some statistical methods [DESeq2, edgeR] are build on the assumption that the data is raw counts, which it won't be if you mess with it.)
✅ 1