Pipeline components to extract features from variants.
Project description
Bearclaw
Components to help extract features from variants, to be used as part of a pipeline.
Installation
pip3 install bearclaw
Usage
from bearclaw.preprocessing import VariantDataGenerator
from bearclaw.transforms import spectrum
# Dataframe containing locations of VCF files and labels.
dataframe = DataFrame({
"vcf": [
"src/test/resources/GRCh37/sample1.vcf",
"src/test/resources/GRCh37/sample2.vcf",
],
"class": [1, 0],
})
# Transform VCF files into features using `spectrum`, which counts the number of variants by flanking context.
dg = VariantDataGenerator(transform=spectrum)
# Convert dataframe to label `y` and features `X_spectrum` using `spectrum`.
X_spectrum, y = dg.flow_from_dataframe(dataframe, x_col="vcf")
Reference documentation
https://hylkedonker.gitlab.io/bearclaw/
License
The code in this repository is licensed under the MIT License.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
bearclaw-0.0.4.tar.gz
(182.4 kB
view details)
Built Distribution
bearclaw-0.0.4-py3-none-any.whl
(168.3 kB
view details)
File details
Details for the file bearclaw-0.0.4.tar.gz
.
File metadata
- Download URL: bearclaw-0.0.4.tar.gz
- Upload date:
- Size: 182.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a284937580c14da2708b6f5f33675bab368fb9f7bd00f8f5ade4ca8dfd510190 |
|
MD5 | 8ef80fb79cce807c59eb0204d81d3b40 |
|
BLAKE2b-256 | 92593c88fbb0bc49150a16ba77e4487acf6fb5a3342d5ae3cd89d1f2122d37db |
File details
Details for the file bearclaw-0.0.4-py3-none-any.whl
.
File metadata
- Download URL: bearclaw-0.0.4-py3-none-any.whl
- Upload date:
- Size: 168.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fb74b280b5db43649fe2edc64d6cb72b34643b21ec57c79351a991623a2c90b2 |
|
MD5 | caa18f25dcbaab4037ff6567824c7311 |
|
BLAKE2b-256 | a96aa2f01d02a4ce9120adf409464f2903fc43c49b176225effd9ee2d9375d6d |