Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PCA in seapiper does not use the n_most_varying config parameter #4

Open
Nicolai-vKuegelgen opened this issue Oct 31, 2023 · 0 comments

Comments

@Nicolai-vKuegelgen
Copy link

The PCA in seaPiper can sometimes still look different than the one in the report.
The reason for this seems to be that in the report the n_most_varying paramter from the config is checked and variable genes are trimmed down to that number before calculating PCA (the default in the config file is 500):

mtx <- t(assay(RLD_BLIND))
vars <- sort(apply(mtx, 2, var), decreasing=TRUE)
sel <- names(vars)[vars > 1e-26]
if (config$report$snippet_parameters$Normalisation_QC$n_most_varying > 0)
	sel <- sel[1:min(length(sel), config$report$snippet_parameters$Normalisation_QC$n_most_varying)]
pca <- prcomp(mtx[ , sel], scale.=TRUE)

The reports in seaPiper seem to skip this step, as the PCA there resembles the one created if this subsetting step is omitted:

PCA seapiper PCA report, default config PCA report, without config/subsetting
PCA-seapiper PCA-report with default config PCA-report without subsetting
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant