Skip to content

Error is occurred when using the 10X 1.3M data #2

@kokitsuyuzaki

Description

@kokitsuyuzaki

Hi,

I found that this PCA is ultra-fast, but when using against 1.3M data (https://community.10xgenomics.com/t5/10x-Blog/Our-1-3-million-single-cell-dataset-is-ready-to-download/ba-p/276), a strange result is generated like this :

# U matrix of SVD
1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
...
# The diagonal elements of S matrix of SVD
0
0
0
0
0
0
0
...

Since you don't provide the source code, I still don't see the precise reasons, but I'm wondering if the initial values of the singularvectors and singularvalues are not updated for some reasons.

Have you ever tried this PCA against 10X-1.3M dataset?

After the oocPCA_csv2binary, I performed the oocRPCA like below.

library("oocRPCA")

input="10X.bin"
m=23771
n=1306127
dim=25
output1="Eigen_vectors.csv"
output2="Eigen_values.csv"

out <- oocPCA_BIN(input, m=m, n=n, k = dim, mem = 1e+10, centeringRow = TRUE, logTransform = TRUE)
NC = ncol(out$U)
write.table(out$V[,1:dim], output1, quote=FALSE, row.names=FALSE, col.names=FALSE, sep=",")
write.table(diag(out$S)[1:dim]^2/NC, output2, quote=FALSE, row.names=FALSE, col.names=FALSE, sep=",")

The CSV file is parsed from the 10X-HDF5 format like this gist.
https://gist.github.com/kokitsuyuzaki/5b6cebcaf37100c8794bdb89c7135fd5

I tried the PCA by oocPCA_BIN and oocPCA_CSV but the results were same.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions