BiocGenerics
This package aims to provide common generics, much like R/Bioconductor. These generics allow users to operate on different objects is a consistent and reliable way.
Install
Install package from PyPI
pip install biocgenerics
Combine
Combine provide multiple functions to concatenate sequences and array-like objects.
combine_seqs: Combine 1-dimensional sequences or vector-like objects.combine_rows: Combine n-dimensional or DataFrame like objects along the first dimension.combine_cols: Combine n-dimensional or DataFrame like objects along the second dimension.
from biocgenerics import combine_seqs, combine_rows
# example to combine multiple sequences
x = [1, 2, 3]
y = [0.1, 0.2]
print(combine_seqs(x, y))
# Works across types as well,
# e.g. sparse and dense matrices
num_cols = 20
x = np.ones(shape=(10, num_cols))
y = sp.identity(num_cols)
print(combine_rows(x, y))
Additionally, the combine generic, automatically dispatches to either combine_seqs or combine_cols methods depending on the inputs.
Set and Access names
Reliably access row and column names of Dataframe-like objects.
rownames: Access row names of the object.set_rownames: Set new row names.colnames: Access column names.set_colnames: Set new column names.
import pandas as pd
from biocgenerics import rownames
df1 = pd.DataFrame([["a", 1], ["b", 2]], columns=["letter", "number"])
rownames(df1)
Check out the S4Vectors package for more information.
Note
This project has been set up using PyScaffold 4.4. For details and usage information on PyScaffold see https://pyscaffold.org/.
Release files for BiocGenerics 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| BiocGenerics-0.1.3.tar.gz | 27.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| BiocGenerics-0.1.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 40.1 kB
Release files / BiocGenerics-0.1.3.tar.gz
| Download URL | BiocGenerics-0.1.3.tar.gz |
|---|---|
| Size | 27.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cea3cdd08f631fe38c791d303b59702d2d8a9b3d6400ccf2dd8f84d02b68902b
|
|
BLAKE2b-256 checksum How to use checksums |
7146db6a42607a35798e5dcad2fade8b74a5bcdc8966ee31984ca8e712e7736d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.18
|
Release files / BiocGenerics-0.1.3-py3-none-any.whl
| Download URL | BiocGenerics-0.1.3-py3-none-any.whl |
|---|---|
| Size | 13.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7e664ff375763cd4289c1b02f50efe5c17cff8b4d8dbadf45cd5f8a9a891eedd
|
|
BLAKE2b-256 checksum How to use checksums |
a9551da79e8b7dc1ac1fa12e1622cfeb1689ff0e42add2b739d21117b4311743
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.18
|