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

Uploaded Python 3

File details

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

File metadata

  • Download URL: primalbedtools-0.6.0.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.0.tar.gz
Algorithm Hash digest
SHA256 33a87ac18b0f835c7185b7678d0a9d3f50838d5a85aa212452ba0331f05dde55
MD5 b8fe89c8a658200a0e8ddfeb6180a741
BLAKE2b-256 81c64052f556be32cc744e47681364cce295293012d428ddd6f56db3cb6c4fdf

See more details on using hashes here.

File details

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

File metadata

  • Download URL: primalbedtools-0.6.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 431bc04cbe3b6b4586170f60aa7dcf2fb31d481f07db6c6f7e01e9d0948755ee
MD5 83c111db175979944245f4df02c40aac
BLAKE2b-256 3ebfb8d3075328b942edd8ce07a2305ad4bcf627131f8349227ece8e3d318407

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