semvec/pypi-packages huggingface dataset:
BinToGene 1.23
A bin to gene conversion package.
Requires Python: >=3.7

<h2>BinToGene</h2>
Library to convert a cell-by-bin matrix to cell-by-gene, i.e., it replaces
the promoter accessibility with a gene activiy score.
This can be useful, for e.g., when one wishes to use existing gene expression
tools to a sc-ATAC-seq cell-by-bin matrix.</br></br>

The package uses a gencode file (v34) to determine start and end locations
for protein coding genes. This interval is then extended by fixed or gene-length
dependent values to get a new interval I=(start-v1, end+v2). Then the bins in
the provided data matrix are searched to see if they intersect I. An efficient
binary search implementation is used to determine the first and last bin for
which such intersection is found. Then the values of the bins are added or
averaged as specified by the user. The resulting vector is a count vector for
the gene in consideration. Note, the counts here do not represent expression
of the gene, but chromatin accessibility counts in the case of sc-ATAC-seq.
In the end, these vectors are stacked to form a cell-by-gene matrix.
Tools that are used for analyzing gene expression data can be useful in
analyzing the cell-by-gene matrix formed this way.

Example

```python
import numpy as np

x = np.random.randint(0, 2, (200, 4000)) # your cell by bin matrix

bin_names = ['chr1:0-1000', 'chr1:1001-2000', ...] # your list of bin names

btg = BinToGene()  # Use default interval extension parameters
counts, ids = btg.convert(x, bin_names, prefix='chr', delim1=':', delim2='-')
```

Example of a cell-by-gene matrix obtained via UMAP after running some basic preprocessing
<img src="https://github.com/ferrocactus/BinToGene/blob/master/src/images/example.png" style="zoom:82%;" />
tabarnak-desjare 0.0.7
transcoder FFmpeg based wrapper
Requires Python: >=3.7

# tabarnak - transcoder [FFmpeg](https://ffmpeg.org/) based utility tool
![Port au Persil](https://github.com/desjare/tabarnak/blob/main/.www/tabarnak.png?raw=true)

![Build Status](https://travis-ci.com/desjare/tabarnak.svg?branch=main)
![Pylint](https://github.com/desjare/tabarnak/workflows/Pylint/badge.svg)
![codecov](https://codecov.io/gh/desjare/tabarnak/branch/main/graph/badge.svg?token=OTM2MYLPOM)

# Description
In the Province of Québec tabarnak is a swear derived from the tabernacle but it is an acronym for:

**T**ranscoder **A**ll **B**asically **A**ccessible **R**esolutely **N**ot **A**ll **K**lingon

> Le tact dans l'audace, c'est de savoir jusqu'où on peut aller trop loin. 

Jean Cocteau

This script is used to convert video or audio media files to modern codecs such as HEVC, VP9, AV1 (experimental) or Opus. It walks into a directory and probes media files for video or audio that are not encoded with specified codec (default HEVC). Then it transcodes them. The idea is to use a more modern codec that has a better quality/bitrate ratio. Resulting files are significantly smaller than original h264, mpeg2, mpeg4 or likely any other formats that they are currently encoded to.

tabarnak uses [crf](https://trac.ffmpeg.org/wiki/Encode/H.265) encoding. All channels are copied. The audio is converted by ffmpeg to ogg vorbis by default.

tabarnak won’t delete or clean up your files. It will skip files that are already done. Basic sanity check is performed after encoding and it will print a warning if the input and output size do not match.

If you plan to use your media files with a chrome cast, be sure the buy **chromecast ultra** since the 3rd generation chromecast does not support HEVC.

## Features

* Easy to use out of the box
  * input & output directory support
  * keep relative path option for transcoding entire hierarchy of media files
  * copy your metadata (default) or not
* Basic default configuration for basic codecs such as h264, hevc, vp9 & opus
* Custom configuration workflow using either json or yaml
* Configurable logging including basic [prometheus](https://prometheus.io/) support
* Transcoder stats output (yaml)
* Automatic tests

## Usage

### Install
pip3 install tabarnak-desjare

### Getting help
For help:
tabarnak -h

### Example usage

#### transcode all media files recursively using h264 codec and output them to the output directory 
tabarnak --input-dir . --output-dir output --h264

#### transcode your entire music library recursively using opus codec in ogg container while keeping your directory structure and copy non media files
tabarnak --copy --opus --keep-relative-path --map-args "-map 0:0 " --output-dir your_output_dir

Note that the mapping argument is necessary since iTunes files may contain unwanted tracks that prevent files to be recognised by music players.

## Requirements
* [python3](https://www.python.org/) (tested with python 3.7 and 3.8)
* [ffmpeg](https://ffmpeg.org/) in your path

I prepared a tutorial video to learn how to do that on Windows 10:
https://gist.github.com/desjare/adc1514d46bcb38414a5e2a602f6d12d
textimage 1.0.2
puts text on image
Keywords: Pillow,PIL,Image Manipulation,text,text on image

Description
Write text on image with text wrap.

Libraries used
from PIL import Image
from PIL import ImageFont
from PIL import ImageDraw
import textwrap
import random
import string

Usage
from textimage import textimage
writetext('text', 'font_directory', 'font_size', 'image_directory', 'width', 'height', 'output_directory')


Change Log
==========

1.0.0 (28/12/2020)
------------------
- First Release

1.0.1 (28/12/2020)
------------------
- Fixed required 'install_requires' in 'setup.py'

1.0.2 (28/12/2020)
------------------
- Bugfixes