API Reference
BioDemuX.BioDemuXBioDemuX.AbstractScoringBioDemuX.exact_alignBioDemuX.find_best_matching_bc_no_deltaBioDemuX.hamming_alignBioDemuX.match_barcode_passBioDemuX.preprocess_bc_fileBioDemuX.read_fastqBioDemuX.smart_openBioDemuX.write_fastq
BioDemuX.BioDemuX — Module
BioDemuX: High-performance, flexible demultiplexing for FASTQ files.
Exports the main execute_demultiplexing function and configuration structures.
BioDemuX.AbstractScoring — Type
This function aligns query to ref, using semiglobal alignment algorithm.
Returns
An alignment score as a float, where lower values indicate better alignment.
BioDemuX.exact_align — Method
Aligns query to ref using exact string matching (byte-by-byte comparison). No indels or mismatches allowed. We scan query across ref_search_range in ref. Returns (0.0, start_pos, end_pos) if found, otherwise (Inf, -1, -1).
BioDemuX.find_best_matching_bc_no_delta — Method
Calculate and compare the similarity of a given sequence seq with the sequences in the given DataFrame bc_df.
Returns
A tuple (min_score_bc, min_score, delta, best_start, best_end).
BioDemuX.hamming_align — Method
Aligns query to ref using Hamming distance. Indels are NOT allowed (distance = infinity if lengths differ in an alignment context, but here we scan). We scan query across ref_search_range in ref. N in query matches anything. N in ref matches only N in query. Returns (score, start_pos, end_pos).
BioDemuX.match_barcode_pass — Function
match_barcode_pass(seq::String, n::Int, config::DemuxConfig, ws::SemiGlobalWorkspace, is_pass2::Bool, stats::Union{DemuxStats,Nothing}=nothing)Helper function to run a single barcode matching pass. Returns (status, barcode_index, start_pos, end_pos). Status can be: :match, :unknown, :ambiguous.
BioDemuX.preprocess_bc_file — Method
preprocess_bc_file(bc_file::String, complement::Bool, rev::Bool)Preprocesses the barcode file (FASTA or CSV/TSV). Returns a tuple: (sequences, lengths_no_N, ids).
BioDemuX.read_fastq — Method
read_fastq(f::Function, filepath::String)Open a FASTQ file (potentially gzipped) for reading.
BioDemuX.smart_open — Method
Helper to open files with gzip support.
BioDemuX.write_fastq — Method
write_fastq(f::Function, filepath::String)Open a FASTQ file (potentially gzipped) for appending.