Factor Sample Filter Bug
Closed this issue · 1 comments
mbcole commented
For factor sample filter,
csum is undefined if no plotting is requested
if(plot) {
csum = cumsum((qpc$sdev^2)/sum(qpc$sdev^2)) #this
plot(csum, main = "Cumulative Quality PC Variance",
ylab = "Fraction of Total Variance")
abline(h = min_qual_variance, lty = 2, col = "red")
}
num_qual_pcs = which(csum > min_qual_variance)[1]
should be
csum = cumsum((qpc$sdev^2)/sum(qpc$sdev^2)) #should be here
if(plot) {
plot(csum, main = "Cumulative Quality PC Variance",
ylab = "Fraction of Total Variance")
abline(h = min_qual_variance, lty = 2, col = "red")
}
num_qual_pcs = which(csum > min_qual_variance)[1]