pyBCS
This is a python library to create a BioTuring Compressed Study (bcs) file from an AnnData (scanpy) object.
bcs files can be imported directly into BBrowser, a software for single-cell data.
Visit our github for more detail.
Installation
pip install pyBCS-bioturing
Examples
Create a bcs file from common formats
Scanpy
from pyBCS import scanpy2bcs
scanpy2bcs.format_data("/mnt/example/data.h5ad", "/mnt/example/data.bcs",
input_format="h5ad", graph_based="louvain")
If your data has antibody-derived tags (ADT), you can put ADT expression data in the obs as cell metadata with a distinguishable suffix. For example, ADT expression of CD45 will be CD45_TotalSeqC. In such cases, you can declare cite_seq_suffix when using format_data():
scanpy2bcs.format_data("/mnt/example/data.h5ad", "/mnt/example/data.bcs",
input_format="h5ad", graph_based="louvain", cite_seq_suffix="_TotalSeqC")
SPRING
from pyBCS import scanpy2bcs
scanpy2bcs.format_data("/mnt/example/spring_study", "/mnt/example/data.bcs",
input_format="spring",
graph_based="louvain")
Loom
from pyBCS import scanpy2bcs
scanpy2bcs.format_data("/mnt/example/data.loom", "/mnt/example/data.bcs",
input_format="loom",
barcode_name="CellID",
feature_name="Gene",
dimred_keys={"tsne":["tsne1", "tsne2"]})
Abloom
from pyBCS import scanpy2bcs
scanpy2bcs.format_data("/mnt/example/data.loom", "/mnt/example/data.bcs",
input_format="abloom",
barcode_name="observation_id",
feature_name="accession_id",
graph_based="cluster")
Create a folder from OME-TIFF files (Nanostring DSP)
In this example, we use OME class from pyBCS to load information from OME-TIFF format. An OME object requires 2 arguments: (1) an excel that has SegmentProperties and TargetCountMatrix, (2) a folder that has all the OME-TIFF files for that excel file. After loading data, you can use .write() to create a folder that has all the neccessary components for BBrowser.
from pyBCS import OME
ome = OME('path/to/excel_file.xlsx', 'path/to/tif/folder')
ome.write('path/to/output_folder')
Metadata
Release files for pyBCS-bioturing 0.4.10
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pyBCS-bioturing-0.4.10.tar.gz | 18.0 kB | Without provenance | Details for pyBCS-bioturing-0.4.10.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pyBCS_bioturing-0.4.10-py3-none-any.whl | Python 3 | none | any | Details for pyBCS_bioturing-0.4.10-py3-none-any.whl |
Total release size: 36.3 kB
Release files / pyBCS-bioturing-0.4.10.tar.gz
| Download URL | pyBCS-bioturing-0.4.10.tar.gz |
|---|---|
| Size | 18.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5591c9db40610c8bb2b64308eeaf638c8f15926c14c0a2967e94242788c0df12
|
|
BLAKE2b-256 checksum How to use checksums |
a986411e7c2bef22f30dd373b579828d98a66f1a24b5a51a73066b7f84b69b65
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.10
|
Release files / pyBCS_bioturing-0.4.10-py3-none-any.whl
| Download URL | pyBCS_bioturing-0.4.10-py3-none-any.whl |
|---|---|
| Size | 18.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ceaf1056eb9279ab216d03408a65e66bb8242f9d8cfaad575582c1f0079f598b
|
|
BLAKE2b-256 checksum How to use checksums |
ec36f8b7f727050cee2e2e7f34c27b287b53ae9592a7d59cd02fb0ab2ef78096
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.10
|
Security for pyBCS-bioturing 0.4.10
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.