Metadata-Version: 2.1
Name: counhto
Version: 1.0.0
Summary: Python package for generating hash tag oligo count matrices for demultiplexing cellranger output
Author-email: Daniel Malzl <daniel@menchelab.com>
License: MIT License
        
        Copyright (c) 2023 Daniel Malzl
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://github.com/dmalzl/countho
Keywords: bioinformatics,single cell sequencing,sequencing,NGS
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pysam (>=0.20.0)
Requires-Dist: scipy (>=1.10)

# counhto
An easy to use tool to count hashtag oligos (HTOs) from 10x cellranger count output processed with Antibody Captures for sample multiplexing

## Install
The most convenient and easy way to install the package is
```
pip install countho
```

alternatively you could also clone the repository and install it manually like
```
git clone git@github.com:dmalzl/counhto.git
cd countho
pip install .
```

## Usage
Using it is as simple as setting up a csv file with the following structure
|bamfile|barcodefile|htofile|outputdir|
|:------|:----------|:------|:--------|
|cellranger/outs/possorted_bam.bam|cellranger/outs/filtered_feature_bc_matrix/barcodes.tsv.gz|cellranger/outs/feature_ref.csv|/path/to/outputdir/|
|cellranger/outs/possorted_bam.bam|cellranger/outs/filtered_feature_bc_matrix/barcodes.tsv.gz|cellranger/outs/feature_ref.csv|/path/to/outputdir/|

and invoking countho as follows
```
countho --csv sample_csv.csv [-p n]
```

The `-p` argument specifies the number of cpus to use for processing however this only has an effect if more than one samples are supplied.

The output for each sample will then be written to the specified output directories and will have the following structure
```
/path/to/outputdir/
|__
   |__barcodes.tsv  # filtered barcodes
   |__features.tsv  # names of the HTOs as specified in the feature_ref.csv file
   |__matrix.mtx    # MatrixMarket formated count matrix of shape n_barcodes x n_HTOs
```
