Metadata-Version: 2.4
Name: molecule-info
Version: 1.0.1
Summary: 
License-File: LICENSE
Author: tobiaspk
Author-email: tobiaspk1@gmail.com
Requires-Python: >=3.8,<4.0
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Requires-Dist: anndata (>=0.8.0,<0.9.0)
Requires-Dist: h5py (>=3.0.0,<4.0.0)
Requires-Dist: pandas (>=2.0.0,<3.0.0)
Requires-Dist: scikit-learn (>=1.3.2,<2.0.0)
Description-Content-Type: text/markdown

# Molecule Info H5 Helpers

This repository contains a set of helper functions for reading, subsampling and in future versions visualizing the data in the molecule info h5 files as generated by cellranger.

## Installation

```bash
pip install molecule_info
```

## Usage

### Subsampling

```python
import molecule_info as mi

# read
m = mi.MoleculeInfo(path)

# subsample
m.sample_reads(1000, seed=42)

# convert to anndata
adata = m.to_adata()
```

### Select subset of features

```python
import molecule_info as mi

# read
m = mi.MoleculeInfo(path)

# select features (inplace!)
features = ["C0310", "C0311", "C0312"]
m.select_features(features)

# whitelist
barcodes = ["AAACCTGAGGAGTCTG-1", "AAACCTGAGGAGTCTC-1"]
m.select_barcodes(barcodes)

# convert to anndata
adata = m.to_adata()
```
