Comments (8)
Yes, in scater the exprs
values will be cpm'd as well as log-transformed. For every setting, as far as I can see, apart from paedagogical discussions, the exprs
values should be log2(cpm) - it would never make sense in an actual analyses to use log2(counts) or similar, since you will have differences between cells driven by completely technical factors like sequencing depth.
For the sake of the course, if you want to demonstrate what PCA on log2-counts looks like, then we could do:
set_exprs(sce, "log2_counts") <- log2(counts(sce) + 1)
plotPCA(sce, exprs_values = "log2_counts")
We should make the point in the course that this is not something that you would ever want to do in practice, but can show it to demonstrate what's going on.
That said, if we're doing PCA on log2-counts to make a point, then we could just as well do PCA on counts, with the caveat that this is "not something you should try at home".
For actual visualizations in analysis, the expression values used need to account for differences in sequencing depth to make cells at all comparable, so cpm/tpm/fpkm are required, and log-transforming them makes most sense.
from scrna.seq.course.
OK, that sounds good to me. I agree that in the context of the course, makes sense to build up counts --> cpm --> further normalisation. We can say in discussion that in a real analysis it makes most sense to go straight to log2(cpm) for visualization, and from there assess further downstream normalization approaches.
from scrna.seq.course.
Looks like there is no log-transform
parameter in the plotPCA() function, so we won't be able to easily create a PCA plot of a given scater object slot...
Davis, is there any way of implementing this functionality?
from scrna.seq.course.
Shouldn't we just make sure we log-transform the data before doing PCA? PCA on count data is not a great idea.
from scrna.seq.course.
Ok, but how do we do that in a simple way? If we use expression values, they will be not just log-transformed but also cpm-ed?
from scrna.seq.course.
Great, thanks for that Davis! I've implemented your suggested scenario:
set_exprs(sce, "log2_counts") <- log2(counts(sce) + 1)
plotPCA(sce, exprs_values = "log2_counts")
Building it now, hopefully the build will not FAIL :-) But at least we will be doing something reasonable, what we've had so far (raw counts everywhere) was really not ideal!
from scrna.seq.course.
My logic is - we shouldn't use cpm before the normalisation step, that is why I decided to go for log2_counts
.
from scrna.seq.course.
Yes, I've added a comment just after we introduce log2_counts
(it's not live yet). BTW, the builds was ok, so the new PCAs are already online. Thanks again for your help, Davis!
from scrna.seq.course.
Related Issues (20)
- Add SCnorm & scone to normalization HOT 2
- Simulated vs Real data vs Integrated RNA seq data analysis HOT 2
- Update CCA for Seurate v3 - all different. HOT 1
- Add sparse vs dense matrices to intro to R section.
- can not open "file:///home/jovyan/.local/share/jupyter/runtime/nbserver-6-open.html" HOT 2
- "trim_galore" command could not be found HOT 4
- STAR_explanation.png is missing HOT 3
- Could you please provide some intermediate files so people like me can go through the whole classes? HOT 2
- Molecules.txt from tung data
- function isSpike is deprecated HOT 2
- Issues with defunct functions HOT 2
- Can not run the docker image HOT 4
- File molecules.txt missing HOT 5
- Can I change the docker image port ? HOT 3
- code missing in the biological-analysis#clust-methods HOT 3
- Incompatibilities between R and R studio HOT 1
- Question about Exercise 2 in section 5.2.3 (Matrix Statistics)
- There is no data/tung folder HOT 4
- Leidenalg not found error HOT 1
- Cannot open jupyter notebook linked by the docker container HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from scrna.seq.course.