Skip to main content

Pandas-based Data Handler for VCF, BED, and SAM Files

Project description

pdbio

Pandas-based Data Handler for VCF, BED, and SAM Files

wercker status

Installation

$ pip install -U pdbio

Python API

Example of API call

from pprint import pprint
from pdbio.vcfdataframe import VcfDataFrame

vcf_path = 'test/example.vcf'
vcfdf = VcfDataFrame(path=vcf_path)

pprint(vcfdf.header)      # list of header
pprint(vcfdf.samples)     # list of samples
print(vcfdf.df)           # VCF dataframe

vcfdf.sort()              # sort by CHROM, POS, and the other
print(vcfdf.df)           # sorted dataframe

Command-line interface

Example of commands

# Convert VCF data into sorted TSV data
$ pdbio vcf2csv --sort --tsv test/example.vcf

# Convert VCF data into expanded CSV data
$ pdbio vcf2csv --expand-info --expand-samples test/example.vcf

# Sort VCF data by CHROM, POS, and the other
$ pdbio vcfsort test/example.vcf

Run pdbio --help for more information.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for pdbio, version 0.4.2
Filename, size File type Python version Upload date Hashes
Filename, size pdbio-0.4.2-py3-none-any.whl (16.0 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size pdbio-0.4.2.tar.gz (12.0 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page