CCBR / RENEE

A comprehensive quality-control and quantification RNA-seq pipeline
https://CCBR.github.io/RENEE/
MIT License
4 stars 4 forks source link

RNA Report fails if there aren't 3 PCA's detected #104

Closed slsevilla closed 10 months ago

slsevilla commented 10 months ago

Problem:

I ran a small test set through RENEE v2.5.11 and it failed at the RNA report. The failure occured at the prcomp step which will identify the PCA axis to use downstream. This occurs because the current code is hardcoded to select the first 3 PCA's:

pc3 <- round(pca$sdev[3]^2 / sum(pca$sdev^2) * 100, 2)

My data set only included 2 samples which were replicates of one another, which meant that the third PCA data values were close to 0 and therefore excluded from the dataset.

Solution

Update the code to determine if there are three PCA's values. If there are, then utilize these three values. If there is not then only use the first two values.