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.0.tar.gz (15.7 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.0-py3-none-any.whl (18.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: primalbedtools-0.8.0.tar.gz
  • Upload date:
  • Size: 15.7 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.0.tar.gz
Algorithm Hash digest
SHA256 2cc0a1473479be81ccc42947dff7e051faccbe012095c9d56e6283db2dd79e5e
MD5 3c1befd2eb2e837ca62eefbff0da8ae7
BLAKE2b-256 4093ccf9d4b5b4fa97fa7d5cc3871a55097d8375b14af3b5cd9ec7de674b7a5f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: primalbedtools-0.8.0-py3-none-any.whl
  • Upload date:
  • Size: 18.4 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3a145874220d5bb04e25fc13d731f2f51ac1b10b0919c5f6e9043938788d89c4
MD5 2264843d83d788e3649e498deb937239
BLAKE2b-256 b2418718bee482eaac68685725316d7d37d522794e1a7415e5f82e1491811b8a

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