A collection of tools for working with primer.bed files
Project description
PrimalBedTools
PrimalBedTools is a library for manipulating and processing BED files, particularly focused on primer-related operations. It provides several functions for common BED file operations including coordinate remapping, sorting, updating, and amplicon generation.
Functions are wrapped in a CLI for ease of use.
Installation
pip install primalbedtools
Usage
primalbedtools <command> [options]
Commands
Remap
Remaps coordinates in a BED file using a multiple sequence alignment (MSA).
primalbedtools remap --bed input.bed --msa alignment.fasta --from_id source_id --to_id target_id
Required arguments:
--bed
: Input BED file--msa
: Multiple sequence alignment file in FASTA format--from_id
: Source sequence ID to remap from--to_id
: Target sequence ID to remap to
Sort
Sorts entries in a BED file.
primalbedtools sort input.bed
Required arguments:
bed
: Input BED file to sort
Update
Updates information in a BED file, particularly primer names.
primalbedtools update input.bed
Required arguments:
bed
: Input BED file to update
Amplicon
Creates an amplicon BED file from primer pairs.
primalbedtools amplicon input.bed [--primertrim]
Required arguments:
bed
: Input BED file containing primer information
Optional arguments:
-t, --primertrim
: Generate primer-trimmed amplicons
Examples
- Remap coordinates from one reference to another:
primalbedtools remap --bed primers.bed --msa refs.fasta --from_id ref1 --to_id ref2
- Sort a BED file:
primalbedtools sort input.bed > sorted.bed
- Generate amplicons with primer trimming:
primalbedtools amplicon primers.bed --primertrim > trimmed_amplicons.bed
Output
All commands output modified BED files to stdout while preserving the original header information. The amplicon command outputs either standard or primer-trimmed amplicon coordinates based on the provided options.
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
Built Distribution
File details
Details for the file primalbedtools-0.5.0.tar.gz
.
File metadata
- Download URL: primalbedtools-0.5.0.tar.gz
- Upload date:
- Size: 14.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.6 Darwin/23.5.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 657deb7eeed584c780804d6dde9be21e1588fa333e97b4704fd64640d5ddb7f0 |
|
MD5 | fd2e60715b8f6bc678ff725edd461276 |
|
BLAKE2b-256 | 856356d2b4866c09b532bae62b6ef8cc2cbc027888f8931a10c7c53e91bb8096 |
File details
Details for the file primalbedtools-0.5.0-py3-none-any.whl
.
File metadata
- Download URL: primalbedtools-0.5.0-py3-none-any.whl
- Upload date:
- Size: 16.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.6 Darwin/23.5.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3430bb13742a746d1b33cf553a3385cce5c80e613cf64269776f5e801a1fd5e1 |
|
MD5 | c1cc0aa1af34ecca7759e4b1a028539b |
|
BLAKE2b-256 | 38362e939709cf805aa40b188b06055d3aa9fb71c3d920ca656b3a504c7075ef |