Skip to main content

Crate bedpull

Crate bedpull 

Source
Expand description

§bedpull

CIGAR-aware sequence extraction from BAM and PAF alignment files using BED coordinates.

Standard coordinate-lifting tools (liftOver, samtools faidx) work purely in reference space: an inserted sequence has no reference coordinate, so it is silently dropped when you lift a BED interval. bedpull avoids this by walking the CIGAR string of each alignment, tracking both the reference position and the read position simultaneously. Insertions that fall inside — or immediately adjacent to — a BED region are captured automatically.

§Extraction modes

ModeRequired flagsDescription
BAM--bamQuery an indexed BAM for reads overlapping each BED region.
PAF--paf --query_refBuild/load a byte-offset index of a PAF file, find overlapping alignments, extract from the query FASTA.

§Library usage

use bedpull::{BamConfig, PafIndex, get_read_cuts};

See the individual module docs for full API details.

Re-exports§

pub use cigar::CigarOp;
pub use cigar::CigarOps;
pub use cigar::ToCigarOps;
pub use paf::PafIndex;
pub use paf::PafIndexEntry;
pub use paf::PafRecord;
pub use paf::read_paf_record_at_offset;
pub use paf::read_paf_record_from_reader;
pub use reads::BamConfig;
pub use reads::BamRead;
pub use reads::PafRead;
pub use reads::StitchConfig;
pub use reads::get_bam_reads;
pub use reads::get_cram_reads;
pub use reads::get_paf_reads;
pub use utils::ReadCuts;
pub use utils::calculate_qscore;
pub use utils::extract_from_fasta_coords;
pub use utils::extract_from_fasta_coords_reader;
pub use utils::get_read_cuts;
pub use utils::read_bed;
pub use utils::revcomp;
pub use utils::write_fasta_record;
pub use utils::write_fastq_record;

Modules§

bed
cigar
paf
reads
utils