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.8.1.tar.gz (16.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.8.1-py3-none-any.whl (18.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: primalbedtools-0.8.1.tar.gz
  • Upload date:
  • Size: 16.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.0.0 CPython/3.12.9 Darwin/24.2.0

File hashes

Hashes for primalbedtools-0.8.1.tar.gz
Algorithm Hash digest
SHA256 65cca08936256310c5f6310c1de752c45cfc2890ab0632b8c75199333d642e46
MD5 7da649d7c5eb66f9ee0862b5bfeb87eb
BLAKE2b-256 faa3c4fac18ffea172c0dc6c2084511eb8c8ffe51372ea96f81fa6ab5dbd6e2d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: primalbedtools-0.8.1-py3-none-any.whl
  • Upload date:
  • Size: 18.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.0.0 CPython/3.12.9 Darwin/24.2.0

File hashes

Hashes for primalbedtools-0.8.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7e72b76b480dfa9e2a54c95a6fbb12fb9ad73063d4179c72c516b1236d172202
MD5 8328efe34713b70eb77ddf909a0df271
BLAKE2b-256 6f22d73efde7c87117225507e59161109abdef3f423be5f1746804997a79d834

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