-
Notifications
You must be signed in to change notification settings - Fork 2
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
Error is occurred when using the 10X 1.3M data #2
Comments
Hi @kokitsuyuzaki, thanks for your interest in oocPCA! Firstly, we do provide the source code...it is in this very repository you are making the issue in! The As for your particular problem, it most likely has to do with the input format. Would you mind sending, say, the first 100 lines of the CSV to me along with the oocPCA_csv2binary call you are using to generate 10X.bin? Thanks! |
Oh, sorry... I extracted the top 100 rows from the huge 10X-CSV file. To binarize the CSV file, I performed the code like below. library("oocRPCA")
oocPCA_csv2binary("10X.csv", "10X.bin") |
Thanks! When I run the following:
I get
This does not mean they are "correct," but at least that they certainly are not the identity matrix and zero matrix that you are getting. Can you try this too? Just trying to replicate your result with this smaller matrix, if possible. Also, what platform are you on? I did the above experiment with OS X. |
The program is performed on the CentOS machine. Yes, your program can be performed properly, when the matrix is small. I found that a reason of the error; when the CSV file is extremely huge, the binary file is not generated by oocPCA_csv2binary() for some reasons. In my environment, I made some CSV files from the original matrix as follows;
Next, I performed oocPCA_csv2binary() against the CSV files.
Finally, I confirmed the binary files are generated and it is found that only 10X_20000row.bin is not generated.
The same situation may be reproducible by constructing the same size of matrix as follows.
In my script, touch command is performed against the generated binary, so this process can generate the empty binary file. If the input the binary file is empty, oocPCA_BIN() generates the initial value of eigenvalues and eigenvectors, because no row vectors are specified (I think, this is reasonable). |
Sorry to be getting back to you so late on this. Thanks for tracking the problem down to the csv2binary function. How much memory does your computer have? As you can see here, the csv2binary binary actually allocates Clearly, having enough memory to convert the file defeats the purpose of using out of core PCA entirely! However, the csv2binary function was not really intended to be used for anything except testing the software. If you have a CSV file--can you just use the In any case, the csv2binary function should definitely be fixed to read/write a line at a time, as opposed to reading the whole file in and then writing it. |
I cannot trace the precise machine environment, but the memory space of the machines ranges over 96GB to 128GB.
Ok, I clearly understand the reason. Please think about the implementation of incremental read/write of csv2binary function, when you have energy enough to spare for the implementation. Thanks, Koki |
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 :
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.
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.
The text was updated successfully, but these errors were encountered: