semvec/pypi-packages huggingface dataset:
asyncio-inspector 0.1.0
Awesome asyncio_inspector created by pappacena

---
# asyncio_inspector

[![codecov](https://codecov.io/gh/pappacena/asyncio-inspector/branch/main/graph/badge.svg?token=asyncio-inspector_token_here)](https://codecov.io/gh/pappacena/asyncio-inspector)
[![CI](https://github.com/pappacena/asyncio-inspector/actions/workflows/main.yml/badge.svg)](https://github.com/pappacena/asyncio-inspector/actions/workflows/main.yml)

Crazily simple statistics tracker for asyncio event loops, for the moments when just setting the event loop to debug mode is not enough.

This package is meant to be used to track basic statistics about asyncio event loops, so you can easily see which methods are blocking the event loop for longer, preventing other tasks from running.

## Install it from PyPI

```bash
pip install asyncio_inspector
```

## Usage

Enable inspection on any given event loop with the `inspect(event_loop)` and `uninspect(event_loop)` methods:


```py
from asyncio_inspector import inspect, uninspect

loop = asyncio.get_event_loop()
stats_tracker = inspect(loop)
loop.call_soon(my_async_function)
loop.call_soon(another_async_function)
loop.call_soon(loop.stop)

uninspect(loop)
```

Or with a context manager:

```py
loop = asyncio.get_event_loop()
with enable_inpection(loop) as stats_tracker:
    await my_async_function()
    await another_async_function()
```

Then, you will have some statistics in the stats_tracker object:

```py
stats_tracker.call_counts == {
    "my_async_function": 1,
    "another_async_function": 1
}

# Times are in nanosecs
stats_tracker.total_time == {
    "my_async_function": 123,
    "another_async_function": 333
}

stats_tracker.max_time == {
    "my_async_function": 400,
    "another_async_function": 500
}

stats_tracker.min_time == {
    "my_async_function": 100,
    "another_async_function": 200
}
```

## Development

Read the [CONTRIBUTING.md](CONTRIBUTING.md) file.
exoclasma-index 0.9.5
Reference Sequence and Capture Intervals Preparation for ExoClasma Suite
Requires Python: >=3.6
Keywords: bed,bioinformatics,fasta,indexing,restrictase

# exoclasma-index

## Description

exoclasma-index is a tools for reference sequence and capture intervals preparation, a part of upcoming ExoClasma Suite.

Features:

- Prepare FASTA reference sequence (purge names, uncompress, sort and filter contigs, etc.)
- Create restriction sites for [Juicer](https://github.com/aidenlab/juicer) as described at `config.json`.
For now available restrictases include:
	- HindIII
	- DpnII
	- MboI
	- Sau3AI
	- Arima
- Add your own restriction sites.
- Create indices for:
	- SAMtools (`samtools faidx`)
	- BWA (`bwa index`)
	- optional: GATK (`gatk CreateSequenceDictionary`)

Also, the tool can check and prepare exome BED files (captures).

**This is a pre-release. Use it at your own risk!**

## Installation

```bash
python3 -m pip install exoclasma-index
```

## Command-line dependencies

- [SAMtools](https://github.com/samtools/samtools)
- [BWA](https://github.com/lh3/bwa)
- [BEDtools](https://github.com/arq5x/bedtools2)
- [GATK](https://github.com/broadinstitute/gatk)

First three are available at Ubuntu repos:

```bash
apt install samtools bwa bedtools
```

GATK should be installed into Miniconda environment [as described by the developer](https://github.com/broadinstitute/gatk#requirements).

## Usage

### Reference preparation

```bash
exoclasma-index Reference -f ${FastaFile} -n ${ReferenceName} -p ${ParentDirectory}
```

Optional:  `-d ${ReferenceDescription}`, `--no-gatk`, `-c ${Contigs}`.

Contigs may be filtered or sorted with `-c` option.
Full list of FASTA contigs can be displayed via

```bash
exoclasma-index Contigs -f ${FastaFile}
```

### Capture preparation

```bash
exoclasma-index Capture -b ${BedFile} -n ${CaptureName} -g ${GenomeInfoJSON}
```

`GenomeInfoJSON` is a JSON file which created via `exoclasma-index Reference`.

Optional:  `-d ${ReferenceDescription}`

### Restriction sites manipulation

Restriction sites can be displayed, added, or removed:

```bash
exoclasma-index RestrictionSites
exoclasma-index AddRS -n ${RestrictionSiteName} -r ''${RestrictionSiteRegExp}''
exoclasma-index RemoveRS -n ${RestrictionSiteName}
```