semvec/pypi-packages huggingface dataset:
unixsig 0.1.4
Python Package to Handle Unix Signals.
License: MIT
Requires Python: >=3.6

.. image:: https://img.shields.io/pypi/v/unixsig.svg
    :alt: PyPI-Server
    :target: https://pypi.org/project/unixsig/
.. image:: https://github.com/Clivern/unixsig/actions/workflows/ci.yml/badge.svg
    :alt: Build Status
    :target: https://github.com/Clivern/unixsig/actions/workflows/ci.yml

|

========
unixsig
========

    Python Package to Handle Unix Signals.


Note
====

This project is created and maintained for Cattle. see https://github.com/Clivern/Cattle
ArchR-h5ad 0.0.12
ArchR_h5ad: Read .arrow files (from ArchR) to anndata.
License: MIT
Requires Python: >3.6.0

# ArchR-h5ad

[![PyPI pyversions](https://img.shields.io/pypi/pyversions/ArchR-h5ad.svg)](https://pypi.python.org/pypi/ArchR-h5ad/)
[![PyPI version](https://badge.fury.io/py/ArchR-h5ad.svg)](https://badge.fury.io/py/ArchR-h5ad)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)

A lightweight python package to parse **[`.arrow`]()** files produced by [**ArchR**](https://www.archrproject.com) - to [**AnnData**](https://anndata.readthedocs.io/en/stable/).

## Installation

Install the last-released ([**`v0.0.12`**](https://pypi.org/project/ArchR-h5ad/0.0.12/)) distrubution from [PYPI](https://pypi.org/project/ArchR-h5ad/):

```BASH
pip install ArchR_h5ad
```

Alternatively, clone the repo to install the development version, locally:

```BASH
git clone https://github.com/mvinyard/ArchR-h5ad.git; cd ArchR_h5ad

pip install -e .
```

## A brief example

As an example, we will use the data from the ArchR [hematopoiesis tutorial](https://www.archrproject.com/articles/Articles/tutorial.html#creating-an-archrproject-1).

### Option 1. Directly read a `.arrow` file to adata
```python
import ArchR_h5ad

arrow_path = "/home/user/data/scATAC_CD34_BMMC_R1.arrow"

adata = ArchR_h5ad.read_arrow(arrow_path, use_matrix="GeneScoreMatrix")
```
<img width="900" alt="adata-GeneScoreMatrix" src="https://user-images.githubusercontent.com/47393421/168927479-8e303e28-60c4-43ce-a7d0-c826304a4ca6.png">

Alternatively, one may use the **`"TileMatrix"`** generated by ArchR. 

```python
adata = ArchR_h5ad.read_arrow(arrow_path, use_matrix="TileMatrix")
```
<img width="900" alt="adata-TileMatrix" src="https://user-images.githubusercontent.com/47393421/168928538-e909dd1b-d579-47a1-9dd6-0139ab6066fd.png">


### Option 2. Instantiate the `Arrow` class.

```python
arrow = ArchR_h5ad.Arrow(arrow_path)
arrow.to_adata()
```
<img width="900" alt="adata-GeneScoreMatrix-ArrowClass" src="https://user-images.githubusercontent.com/47393421/168928362-e351cb46-1d14-4aff-a9c8-cf84c1af07b5.png">

```python
import numpy as np

np.array(arrow.__dir__())[
    np.array([not i.startswith("__") for i in arrow.__dir__()])
].tolist()
```
<img width="900" alt="adata-GeneScoreMatrix-ArrowClass-attributes" src="https://user-images.githubusercontent.com/47393421/168928426-013057da-3bf7-4dd4-82dd-86be129a85ed.png">