Skip to main content

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

  1. Remap coordinates from one reference to another:
primalbedtools remap --bed primers.bed --msa refs.fasta --from_id ref1 --to_id ref2
  1. Sort a BED file:
primalbedtools sort input.bed > sorted.bed
  1. 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

primalbedtools-0.6.1.tar.gz (14.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

primalbedtools-0.6.1-py3-none-any.whl (15.7 kB view details)

Uploaded Python 3

File details

Details for the file primalbedtools-0.6.1.tar.gz.

File metadata

  • Download URL: primalbedtools-0.6.1.tar.gz
  • Upload date:
  • Size: 14.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.7 Darwin/23.5.0

File hashes

Hashes for primalbedtools-0.6.1.tar.gz
Algorithm Hash digest
SHA256 4f7f6274470fcc1da2fec0d1a96b5b0166ab315651df227d679ac213ab096ec5
MD5 df4b249f4f86d7348ceb909aa277273b
BLAKE2b-256 a0cf83a0f435d0ec1e220a373f51784e597e1fa056724913d417cac5f1ed4530

See more details on using hashes here.

File details

Details for the file primalbedtools-0.6.1-py3-none-any.whl.

File metadata

  • Download URL: primalbedtools-0.6.1-py3-none-any.whl
  • Upload date:
  • Size: 15.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.7 Darwin/23.5.0

File hashes

Hashes for primalbedtools-0.6.1-py3-none-any.whl
Algorithm Hash digest
SHA256 98f8d2ca9014ca5429948f52c221f7f25e564b36b17f22e0992a166e305bcded
MD5 c6b26fff2a8c3c7227ee7a20820048c0
BLAKE2b-256 a861d31406b37c7b2bfe45f198bc852e4939cc4ebcb4d12d16b24dadee43d3b4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page