Hot answers tagged

8 votes
Accepted

PCA plot shows big difference but not many differentially expressed genes are found

You only have 4 samples total. I think it would be difficult to not have the PCA show big differences between the groups with so few points. On the other hand, for differential expression, it is hard ...
user avatar
  • 2,099
4 votes
Accepted

3D PCA group labelling

You can easily color 3D pca plots in R based on the code given below: ...
user avatar
4 votes
Accepted

Should PCA be standardized for gene expression?

When the gene expression is scaled and centred you reduce the difference between genes. Imagine you have one gene A that is highly expressed usually and has a standard deviation of 500 units ...
user avatar
  • 4,622
4 votes
Accepted

How to interpret PCA output statistically and biologically?

All that plots like this are telling you is that there are some genes that contribute more to the variability seen between your various samples than others. In an ideal world these genes will also be ...
user avatar
  • 19.3k
4 votes

How are Principal Component analyses and Admixture analyses from a genetic alignment different?

Just to add to the great summary by Devon Ryan: admixture analysis tools are much more flexible than PCA (which is just a fixed mathematical operation), so they can be designed to incorporate LD ...
user avatar
  • 463
4 votes
Accepted

What does PCA mean on GWAS

From my memory of what a statistician told me, a PCA aims to determine independent linear combinations of variables (i.e. genotypes) that account for the most variation in the dataset. With 10 million ...
user avatar
  • 11.5k
3 votes
Accepted

What is a sensible number of gene/observations to explain PCA variance?

The general goal of PCA in RNA-seq can be stated as, "I'd like a low-dimension representation of my data to allow easy assessment of the gross structure of my samples, specifically for assessing ...
user avatar
  • 19.3k
3 votes

Pre-filtering genes for Principal Component Analysis

You can filter out genes that do not show variation across samples, they would not differentiate samples anyway. For the specifics on how to do so, please see the ...
user avatar
  • 3,472
3 votes
Accepted

Interpreting this PCA plot for RNA-seq

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 ...
user avatar
  • 19.3k
3 votes
Accepted

Understanding PCHeatmap outputs

The PCHeatmap function (renamed DimHeatmap in Seurat v3) can be used to help determine the number of principal components to use ...
user avatar
  • 674
3 votes
Accepted

PCA on genotype matrix with multiple alleles

You can make a 'dummy variable' for each allele. That means that you don't have info per SNP, but for SNPs with more alleles, the allele is present (1) or not (0).
user avatar
  • 3,521
3 votes
Accepted

How are Principal Component analyses and Admixture analyses from a genetic alignment different?

The fundamental difference lies mostly in the math. An admixture analysis involves assuming that genotypes (or more likely, genotype likelihoods) in an unknown sample can be modeled with Hardy-...
user avatar
  • 19.3k
3 votes
Accepted

Using external list of PCs for clustering

There is a way to do this, and even better--there is documentation for how to do it! No surprise coming from the Satija Lab. In the vignette they perform multidimensional scaling, but the idea is the ...
user avatar
  • 1,119
2 votes

Error in annotating row names as data points in a PCA plot

Maybe try ...
user avatar
2 votes

PCA on genotype matrix with multiple alleles

I recommend the Hamming distance and doing a multidimensional scaling (a procedure similar to PCA but for distances), that way you don't create new variables for the same position. The distance ...
user avatar
  • 4,622
2 votes

Hierarchial PCA Clustering with duplicated row names

Try to make your rownames unique first. So if you have this matrix with duplicate rownames: ...
user avatar
  • 3,521
2 votes
Accepted

Perplexity is too large

I was using dudi_pca incorrectly. The supplied parameter to as.matrix() should have been ...
user avatar
2 votes

What does PCA mean on GWAS

PCA = principle component analysis and a multivariate statistic, today it is trendily retermed "unsupervised learning" and here is likely being deployed for individuals within your data set. It works ...
user avatar
  • 6,977
2 votes
Accepted

Performing PCA for the samples and for the genes

First of all, I am not a statistician but have been performing RNA-seq analysis for a while, here is my take: I think performing PCA on the samples makes sense in terms of mathematics. What I mean is ...
user avatar
  • 3,472
2 votes

PCA plot in R coloured by sample type

Can't say I've ever used autoplot, but this is fairly easy to achieve using "base" ggplot. One thing autoplot does is put the axis on the same scale reflecting the percentage variation ...
user avatar
  • 311
1 vote
Accepted

PCA plot in R coloured by sample type

I've found this the way to work with autoplot (ggfortify's prcomp autoplot) - Use a df that has the field you need for color as the first column (to make things easy), then do: ...
user avatar
  • 1,378
1 vote

Biology behind PCA analysis based on SNP

First of all, PCA is a technique for dimension reduction. Basically, the goal is to compare tens of thousands of SNPs in Drosophila. Now if you only have 2 SNPs, you can plot them on a 2D scatter plot....
user avatar
1 vote

Performing PCA for the samples and for the genes

It is quite possible to make a PCA plot with the samples. Follow this tutorial : https://hbctraining.github.io/DGE_workshop/lessons/03_DGE_QC_analysis.html
user avatar
  • 121
1 vote

Performing PCA for the samples and for the genes

If you use, say, R's prcomp, you can use my_pca_object$x to get PC coordinates for the samples, and my_pca_object$rotation to ...
user avatar
  • 1,678
1 vote
Accepted

data visualization RNAseq : scaling data for PCA and cluster dendogram

Scaling (or centering) makes the genes comparable: Putting the expression levels of genes in the same scale (i.e. between 0 and 1) sustains that all of your genes contribute equally to the PCA or ...
user avatar
  • 3,472
1 vote

the variation between treatments is less than the variation between replicates in RNA-seq data

If you got DEGs with statistically significant p-values after multiple testing following a valid pipeline, I'd believe that, even if looking at the first few PCs doesn't look promising.
user avatar
  • 1,678
1 vote
Accepted

How to identify latent variables in single-cell RNA-Seq data

I think to identify latent variables, PCA is probably not going to work. NMF might be worth trying. You might want to check out a method called consensus NMF (cNMF) (https://elifesciences.org/articles/...
user avatar
1 vote

K means clustering, would PCA be a better option?

I would stay away from using k-means, and instead use a method that doesn't a priori define a number of clusters to detect. It also looks as though your clusters aren't exactly spherical, which is an ...
user avatar
1 vote
Accepted

Illustrate a 3D visualisation of the three main PCs using plot3d() package in R?

Regarding your question on how to decide which PCs to choose for plotting, prcomp is ordering PCs by their proportions in the variance. For example, using the ...
user avatar
  • 1,021
1 vote

Interpreting this PCA plot for RNA-seq

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 ...
user avatar
  • 1,678

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