This PR rewrites the get_mtx_metadata() function in a cleaner and more efficient way. It encapsulates the previous get_n_rows_with_comments_mtx() and get_mtx_metadata() functions into a single one, and only reads the data file once.
There is one more tiny issue. In the previous R code of get_mtx_metadata(), an error is given if n_data_points > .Machine$integer.max. However, the error message says "Numer of rows exceeds maximum value", so it needs to be clarified whether we put the limit on n_data_points, or n_features, or n_cells.
This PR rewrites the
get_mtx_metadata()
function in a cleaner and more efficient way. It encapsulates the previousget_n_rows_with_comments_mtx()
andget_mtx_metadata()
functions into a single one, and only reads the data file once.There is one more tiny issue. In the previous R code of
get_mtx_metadata()
, an error is given ifn_data_points > .Machine$integer.max
. However, the error message says "Numer of rows exceeds maximum value", so it needs to be clarified whether we put the limit onn_data_points
, orn_features
, orn_cells
.