Skip to main content

Module column_subset

Module column_subset 

Source
Expand description

Stream a column selection (and an optional row selection or renumbering) of a sparse backend into a fresh backend without materialising the survivors. Shared by the split / subsample / subset-* CLI handlers, by the in-place subset and reorder of SparseIo, and by downstream crates (faba’s qc) that filter a matrix by cells and features.

Structs§

RowMap
Where each row of the input lands in the output: to[old] is its new index, None when the row is dropped; nrow is the output’s row count. Rows may land in any order, and an output row may be fed by no input row (it is then empty), but never by two.

Functions§

stream_column_selection
Stream a column selection (with an optional row filter) into a fresh backend, without ever materialising the survivors.
stream_mapped_selection
Stream the columns selected_columns of data, in that order, into a fresh backend at file_out, its rows renumbered (dropped, reordered) by rows when given, with the given names and data’s metadata. Returns the output’s (rows, columns, non-zeros).