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

PlotPCA.overview() modifies original mSetObj. PlotPCA.overview() and EigenMS() truncate negative values. #328

Open
maciejrosolowski opened this issue Dec 15, 2024 · 0 comments

Comments

@maciejrosolowski
Copy link

maciejrosolowski commented Dec 15, 2024

  1. The following line in the function PlotPCA.overview modifies the original mSetObj:
    mSetObj$dataSet$adjusted.mat <- table;
    It should probably be removed. In addition, the next line:
    pca <- prcomp(mSetObj$dataSet$adjusted.mat, center=T, scale=T);
    should probably be replaced with:
    pca <- prcomp(table, center=T, scale=T);
    since "table" contains the values to be used in the PCA.

  2. The following line in the function PlotPCA.overview:
    table[table < 10^-20] <- 0;
    truncates negative values at 0. Negative values can occur, if the normalized data were log-transformed. The above line could probably be removed or replaced with:
    table[abs(table) < 10^-20] <- 0;

  3. The following line in the function EigenMS:
    data.table[data.table<0]<-0
    truncates negative values at 0. It should probably be removed.

Or there is a reason why the functions PlotPCA.overview and EigenMS set negative values to 0?

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