Breakpoint Motifs¶
- class finaletoolkit.frag.BreakpointMotifFreqs(kmer_frequencies, k, quality_threshold=30)[source]¶
Genome-wide breakpoint-motif k-mer frequencies.
- Parameters:
quality_threshold (int)
- class finaletoolkit.frag.BreakpointMotifsIntervals(intervals, k, quality_threshold=30)[source]¶
Interval-stratified breakpoint-motif k-mer counts.
- Parameters:
quality_threshold (int)
- finaletoolkit.frag.region_breakpoint_motifs(input_file, contig, start, stop, refseq_file, k=6, fraction_low=10, fraction_high=600, both_strands=True, negative_strand=False, output_file=None, quality_threshold=30, verbose=False)[source]¶
Count breakpoint-motif k-mers for fragments in a region.
Unlike end motifs, the k-mer is read symmetrically around each breakpoint (
k//2bp on each side of the fragment start/stop).- Parameters:
input_file (str) – BAM/CRAM/fragment input.
contig (str) – Contig name.
start (int) – 0-based start coordinate.
stop (int) – 1-based stop coordinate.
refseq_file (str or Path) – Reference the input was aligned to.
k (int, optional) – Breakpoint-motif k-mer length (default 6).
fraction_low (int, optional) – Minimum/maximum fragment length (defaults 10/600).
fraction_high (int, optional) – Minimum/maximum fragment length (defaults 10/600).
both_strands (bool, optional) – Use both breakpoints; if
Falseonly the forward one is used unlessnegative_strandis set.negative_strand (bool, optional) – With
both_strands=False, use only the negative-strand breakpoint.output_file (str, optional) – Ignored (kept for signature compatibility).
quality_threshold (int, optional) – Minimum mapping quality (default 30).
- Returns:
Mapping of k-mer to count (all
4**kk-mers present).- Return type:
- finaletoolkit.frag.breakpoint_motifs(input_file, refseq_file, k=6, min_length=50, max_length=None, both_strands=True, negative_strand=False, output_file=None, quality_threshold=30, workers=1, verbose=False, fraction_low=None, fraction_high=None)[source]¶
Compute genome-wide breakpoint-motif frequencies.
- Parameters:
input_file (str) – BAM/CRAM/fragment input.
refseq_file (str or Path) – Reference genome.
k (int, optional) – Breakpoint-motif k-mer length (default 6).
min_length (int, optional) – Fragment-length filter (default min 50).
max_length (int, optional) – Fragment-length filter (default min 50).
both_strands (bool, optional) – Use both breakpoints (default
True).negative_strand (bool, optional) – With
both_strands=False, use only negative-strand breakpoints.output_file (str, optional) – TSV/CSV output path.
quality_threshold (int, optional) – Minimum mapping quality (default 30).
workers (int, optional) – Worker-process count (default 1).
fraction_low (int, optional) – Deprecated aliases for
min_length/max_length.fraction_high (int, optional) – Deprecated aliases for
min_length/max_length.
- Returns:
Normalized genome-wide breakpoint-motif frequencies.
- Return type:
- finaletoolkit.frag.interval_breakpoint_motifs(input_file, refseq_file, intervals, k=6, min_length=50, max_length=None, both_strands=True, negative_strand=False, output_file=None, quality_threshold=30, workers=1, verbose=False, fraction_low=None, fraction_high=None)[source]¶
Compute interval-stratified breakpoint-motif frequencies.
- Parameters:
input_file (str) – BAM/CRAM/fragment input.
refseq_file (str or Path) – Reference genome.
intervals (str or list of tuple) – BED path or list of
(chrom, start, stop, name)tuples.k (int, optional) – Breakpoint-motif k-mer length (default 6).
min_length (int, optional) – Fragment-length filter.
max_length (int, optional) – Fragment-length filter.
both_strands (bool, optional) – Use both breakpoints (default
True).negative_strand (bool, optional) – With
both_strands=False, use only negative-strand breakpoints.output_file (str, optional) – TSV/CSV output path.
quality_threshold (int, optional) – Minimum mapping quality (default 30).
workers (int, optional) – Worker-process count (default 1).
fraction_low (int, optional) – Deprecated aliases for
min_length/max_length.fraction_high (int, optional) – Deprecated aliases for
min_length/max_length.
- Returns:
Per-interval breakpoint-motif counts.
- Return type: