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

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for primalbedtools-0.6.2.tar.gz
Algorithm Hash digest
SHA256 fe8d656fef3824c9f9af623cdad61a2ee00ca829c5856522b5f5b8a05d8860dc
MD5 9401973f18b2804910c88a1a3b19d849
BLAKE2b-256 a26799c73f4949e7f8a58999af9df2cc3fa4179eb503a468e622a1c35b2f5b9f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: primalbedtools-0.6.2-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/24.2.0

File hashes

Hashes for primalbedtools-0.6.2-py3-none-any.whl
Algorithm Hash digest
SHA256 aaff1a44235f67f08b2acff623dfc37f01054fcec2d6dec25ee5ed6416defbc1
MD5 9eb94c62d9ccc75a84f57757f996294f
BLAKE2b-256 71a1a36e100ae069e4fa7fb3c5c8a8552cd14561ae3d687fa2c45807bdb3df74

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