Skip to main content

Crate rsomics_bam_strandedness

Crate rsomics_bam_strandedness 

Source
Expand description

Infer RNA-seq library strand protocol from a BAM file and a BED12 gene model.

Mirrors the algorithm of RSeQC infer_experiment.py (LGPL):

  • reads up to sample_size mapped, non-duplicate, non-secondary, non-QC-fail reads with MAPQ ≥ mapq_cut;
  • for each read, finds overlapping genes in the BED12 model;
  • classifies the read by (read_id, map_strand, gene_strand);
  • emits forward (sp1), reverse (sp2), and undetermined fractions.

§Origin

This crate is an independent Rust reimplementation based on:

License: MIT OR Apache-2.0. Upstream credit: RSeQC https://rseqc.sourceforge.net/ (LGPL-2.1+).

Structs§

GeneIndex
Per-chromosome interval tree, mapping genomic positions → gene strands.
StrandednessResult
Result of strandedness inference.

Enums§

GeneStrand
Strand of a gene (‘+’ or ‘-’).
Protocol
Whether the BAM contains paired-end or single-end reads.

Functions§

infer_strandedness
Infer strandedness from bam_path using the gene model at bed_path.