-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added Support for Reading Unfiltered Cell Ranger Feature Barcode Matr…
…ices (MEX Format) (#123) * Added functionality for valid barcode filtering on CrDirReader. _get_valid_barcodes() -> Returns a list of valid barcodes (indices in barcode.tsv.gz) after filtering out background barcodes for a given threshold. Iteratively read the matrix in chunks and perform the following operations: 1. Create a collection of 'batch_size' entries 2. Sum the count data and apply threshold 3. Append to valid barcodes Returns the list of valid barcodes. consume() -> Yields chunks of data from the MTX file. Iteratively read the matrix in chunks and perform the following operations: 1. Keep adding chunk to collection until the unique barcode length reaches 'batch_size' 2. Rename collection barcodes (0 to batch_size-1) 3. Convert data to sparse and yield * comments and clean up * Consume Function Updated with Polars Functionality * Updated the head reader method to include instead of . Updated other polar readers as well. Added test for empty barcodes. Added small dataset for empty barcode test
- Loading branch information
1 parent
6ed28f7
commit dc08e06
Showing
6 changed files
with
210 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,3 +18,4 @@ docs/jupyter_execute | |
.pytest_cache | ||
interrogate_badge.svg | ||
scarf/tests/datasets/* | ||
test_data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,3 +19,4 @@ loguru | |
setuptools | ||
packaging | ||
importlib_metadata | ||
polars |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters