Utilities to use across the biocpy packages.
Project description
Utilities for BiocPy
Motivation
This repository contains a variety of simple utilities for the BiocPy project, mostly convenient aspects of R that aren't provided by base Python. The aim is to simplify development of higher-level packages like scranpy and singler that would otherwise have to implement these methods individually.
Available utilities
match
import biocutils
biocutils.match(["A", "C", "E"], ["A", "B", "C", "D", "E"])
## [0, 2, 4]
factor
import biocutils
biocutils.factorize(["A", "B", "B", "A", "C", "D", "C", "D"])
## (['A', 'B', 'C', 'D'], [0, 1, 1, 0, 2, 3, 2, 3])
intersect
import biocutils
biocutils.intersect(["A", "B", "C", "D"], ["D", "A", "E"])
## ['A', 'D']
union
import biocutils
biocutils.union(["A", "B", "C", "D"], ["D", "A", "E"])
## ['A', 'B', 'C', 'D', 'E']
subset
import biocutils
biocutils.subset(["A", "B", "C", "D", "E"], [0, 2, 4])
## ['A', 'C', 'E']
import numpy as np
y = np.array([10, 20, 30, 40, 50])
biocutils.subset(y, [0, 2, 4])
## array([10, 30, 50])
is_list_of_type
Checks if all elements of a list or tuple are of the same type.
import biocutils
import numpy as np
x = [np.random.rand(3), np.random.rand(3, 2)]
biocutils.is_list_of_type(x, np.ndarray)
## True
and many more. Check out the documentation for more information.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file biocutils-0.4.0.tar.gz.
File metadata
- Download URL: biocutils-0.4.0.tar.gz
- Upload date:
- Size: 70.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0bbd796cb58b95c7847ce798f2c7a6dbc117b5c84d3920c041ed230883fa3220
|
|
| MD5 |
4ccd14e80b1cd37190cf69cff3cd4983
|
|
| BLAKE2b-256 |
33cd78a379a6942eb30b7380f0789670bf739a6d0086159a637da97aece63cf3
|
Provenance
The following attestation bundles were made for biocutils-0.4.0.tar.gz:
Publisher:
publish-pypi.yml on BiocPy/BiocUtils
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
biocutils-0.4.0.tar.gz -
Subject digest:
0bbd796cb58b95c7847ce798f2c7a6dbc117b5c84d3920c041ed230883fa3220 - Sigstore transparency entry: 1328914917
- Sigstore integration time:
-
Permalink:
BiocPy/BiocUtils@57e3fde3f2622efa1f7af0530881c60064f12a97 -
Branch / Tag:
refs/tags/0.4.0 - Owner: https://github.com/BiocPy
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@57e3fde3f2622efa1f7af0530881c60064f12a97 -
Trigger Event:
push
-
Statement type:
File details
Details for the file biocutils-0.4.0-py3-none-any.whl.
File metadata
- Download URL: biocutils-0.4.0-py3-none-any.whl
- Upload date:
- Size: 56.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ee9d02f1f2596f2ebe6fd2afbcd989be47f81be6783402aff1bdb4561ea7953a
|
|
| MD5 |
e377202016e3bb9ffc60a018163348e9
|
|
| BLAKE2b-256 |
ca935a06a74730cba742277cce0d0cb4681a0b80d955364b485bb28b5631420a
|
Provenance
The following attestation bundles were made for biocutils-0.4.0-py3-none-any.whl:
Publisher:
publish-pypi.yml on BiocPy/BiocUtils
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
biocutils-0.4.0-py3-none-any.whl -
Subject digest:
ee9d02f1f2596f2ebe6fd2afbcd989be47f81be6783402aff1bdb4561ea7953a - Sigstore transparency entry: 1328915077
- Sigstore integration time:
-
Permalink:
BiocPy/BiocUtils@57e3fde3f2622efa1f7af0530881c60064f12a97 -
Branch / Tag:
refs/tags/0.4.0 - Owner: https://github.com/BiocPy
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@57e3fde3f2622efa1f7af0530881c60064f12a97 -
Trigger Event:
push
-
Statement type: