sha256
stringlengths
64
64
language
stringclasses
28 values
size
int32
1
491k
lines
int32
1
23.2k
content
stringlengths
1
200k
6e9b0037cbb91b2d8bc7551219713422d6cc46ff15f4d0d91781589126d0b788
Rust
15,792
366
//! HTML report assembly — the string-templating engine. //! //! Reproduces Perl `bismark2summary:1376-1719` mutation-for-mutation, in //! order (§2.9). The two riskiest behaviors are pinned here: //! //! - **Section deletion uses TWO independent predicates** (§2.9 ⚠ box, //! Reviewer A C2): the *numbers* sections ke...
2dd992318f9f76d84e34817288ff6eb6b4e207c8660aa33e5d02cc9c1ce9ce8e
Rust
16,126
532
//! Permit pool implementation with typestate for compile-time state transition safety. //! //! Slot poisoning is a pool-level property: a poisoned slot is permanently removed //! from the pool regardless of whether a prediction was active on it. use std::sync::Arc; use std::sync::Mutex as StdMutex; use std::sync::ato...
9bcb3bf1f16bfc7e7ddbf035e3c8d0819a007e428dd4089bc43a89da1a7f16bf
Rust
16,288
426
//! Whole-genome FASTA reader for Bismark genome folders, faithful to Perl //! `read_genome_into_memory` + `extract_chromosome_name` (as used by both //! `coverage2cytosine` and the standalone `NOMe_filtering`). //! //! This is a **shared, tier-parameterized** promotion of the reader that //! `bismark-coverage2cytosine...
933824f07e99bc43ffa10a933880abefb64dd9e32210fc3f5fe48c2746fbbb4b
Rust
16,531
431
//! Command-line interface for `deduplicate_bismark`. //! //! [`Cli`] is the clap-derived parser. [`Cli::validate`] resolves the //! parsed arguments into a [`ResolvedConfig`] and rejects unsupported / //! conflicting flag combinations: //! //! - `--barcode` / `--umi` → engages UMI-aware dedup (v1.2+; tail-of-qname //!...
28ffc1cf2f4bdcb0a51e8e1cff57bc55b035eae3850732d69f5953fcefba905a
Rust
16,605
453
//! Phase B byte-identity golden tests + streaming edge cases. //! //! Goldens in `tests/data/coverage2cytosine/phase_b/*.golden` are generated by //! `tests/data/coverage2cytosine/phase_b/generate_goldens.sh` from the repo's Perl //! `coverage2cytosine` v0.25.1 (self-contained Perl). The Rust binary's output //! must ...
017305d5001ed3f9b30ffa735ac36dd68dcd39c9342101611d45023e2e262380
Rust
16,629
448
//! Report parsers and the per-sample metric record. //! //! Mirrors Perl `bismark2summary:248-385`. Every field is a `String` that //! starts empty (`''` in Perl) so the `.txt` reproduces Perl's "not found = //! empty cell" semantics byte-for-byte (§2.6). Parsing is **last-match-wins** //! (scan every line; a later ma...
26455d75bb0f007a5171a853cf1522ed2d3f20509ab85243c5506c52a9ca953a
Rust
16,678
548
//! Perl-oracle byte-identity gate (the primary acceptance test). //! //! For each fixture shape, build a report set in a temp dir, run BOTH the //! Perl `bismark2summary` (v0.25.1) and the Rust `bismark2summary_rs`, and //! assert: //! - `.txt` is **byte-for-byte identical**; //! - `.html` is **byte-identical after no...
126935ec6f6949a324a277212058a9f02026845d6f00a12cc9ce5a8dcd02cd51
Rust
17,079
420
//! MAPQ computation — a verbatim port of Perl `calc_mapq` (3923–4186), both the //! **end-to-end** and **`--local`** branches (the local ladder, `4082-4178`, ships for //! Bowtie 2 since #981 and HISAT2 since the HISAT2-`--local` work). //! //! The returned MAPQ integers are **byte-identity-critical** — they land in t...
cbeacf96a65bd6c0902f2e2e0fee7e9fe44281c11f1a1382838eecde78d20c2e
Rust
17,223
502
//! The byte-identity core: bisulfite conversion of FASTA sequences. //! //! Faithful to Perl `process_sequence_files` (lines 360–516). The transform //! operates on **raw line bytes including the terminator**, so CRLF stays CRLF //! and a final line without a newline keeps none — never trim-and-re-emit. //! //! Per se...
c20eca0133503b34d3b3d7c25167f8e9d20e27a0b68b44d5828beaf229229551
Rust
17,759
461
//! `--genomic_composition`: the mono- + di-nucleotide frequency table //! `<genome>/genomic_nucleotide_frequencies.txt`, **byte-identical** to Perl //! `bismark_genome_preparation`'s `get_genomic_frequencies` / `process_sequence` //! / `read_genome_into_memory` (lines 518–570, 665–751). //! //! **This is NOT the conve...
2a1758a93949cbe7f0519634e3dfde1f80473d1fb2d9bedbe21e817bdc7eb681
Rust
17,990
546
use std::sync::atomic::{AtomicBool, Ordering}; use std::time::Duration; use std::collections::HashMap; use axum::http::HeaderMap; use opentelemetry::propagation::{Extractor, Injector, TextMapPropagator as _}; use opentelemetry::trace::{TraceContextExt as _, TracerProvider as _}; use opentelemetry::{Context, KeyValue}...
fb42011b8368ed9cff1adc088cab09f194b5c70ad1d83199e761b24df2ff92f2
Rust
18,558
415
//! Methylation-call classification + per-record extraction kernel. //! //! Phase B (rev 1): delegates the CIGAR walk + `-`-strand orientation //! correction to `bismark-io 1.0.0-beta.6`'s `BismarkRecord::iter_aligned`. //! Per SPEC §7.1 rev 2 note, the kernel is a thin filter over that iterator. use crate::io::Bismar...
b9766da29d7068ce41ab66d6874dccc2a7044fa37b2b6aa145561897729836a5
Rust
18,704
468
//! Per-read genomic-sequence counting. //! //! For each read with a clean CIGAR (no `I/D/S/N`), bam2nuc takes the GENOMIC //! sequence at the read's mapped span — `substr(chr, POS-1, len(SEQ))`, NOT the //! read's own bases (Perl `generate_nucleotide_report` `:109-142`) — reverse- //! complements it for reverse-strand...
571c558dc944520a1ee652067c1ee472df6be3bfe6b6f3e1905a571df3aba527
Rust
18,786
554
use anyhow::Context; use async_channel::{Receiver, Sender, TryRecvError, TrySendError}; use brush_dataset::scene_batch::SceneLoader; use brush_render::{camera::Camera, gaussian_splats::Splats}; use burn::tensor::ElementConversion; use burn::{backend::Autodiff, module::AutodiffModule}; use burn_wgpu::{JitBackend, Runtim...
e674ef12b147182950ee6d71ec257dd332dae9c71e6ef95ce65399255626091a
Rust
18,790
478
//! `--drach` / `--m6A` — the standalone DRACH-motif (m6A) report. //! //! Mirrors Perl `generate_DRACH_report:1075-1383`: a **standalone early-exit //! mode** (invoked from `lib::run` *instead of* the normal cytosine report — //! Perl `:38-42`). It re-reads the coverage file, buffers one chromosome at a //! time, scan...
22fbae6add2a9324ac1927fdcde200ae6764809e9ca95913232cf9b008f42bfe
Rust
18,935
464
//! `bismark-dedup` — Rust port of Bismark Perl's `deduplicate_bismark` script. //! //! This crate is the first downstream binary of the Bismark Rust rewrite, built //! on top of [`bismark_io`] for all BAM/SAM/CRAM I/O. The binary is installed as //! `deduplicate_bismark` during the v0.26 → v1.0 coexistence period. //!...
e324026d7515e2be399698a4f4351936dd24a24cdbfc3795e27ba2341c7122f1
Rust
19,115
547
use anyhow::Result; use brush_render::gaussian_splats::Splats; use brush_render::{AutodiffBackend, Backend, RenderAux}; use burn::lr_scheduler::linear::{LinearLrScheduler, LinearLrSchedulerConfig}; use burn::lr_scheduler::LrScheduler; use burn::nn::loss::HuberLossConfig; use burn::optim::adaptor::OptimizerAdaptor; use ...
035817124bfce1ffd32afb7ec05798668e27399e032a76d2e2dc66627d92063e
Rust
19,178
574
//! Output processing for prediction results. //! //! Converts Python prediction output to JSON-serializable format: //! - Pydantic models -> dict (via model_dump() / dict()) //! - Dataclasses -> dict (via dataclasses.asdict()) //! - Enums -> .value //! - datetime -> .isoformat() //! - PathLike -> base64 data URL //! -...
a6ac700310a23a5947766a8cda7328e2b280d23248df58ba98c9f358f65f9f8b
Rust
19,360
468
//! Real-data byte-identity gate for `deduplicate_bismark_rs`. //! //! This is **the headline correctness test** for `bismark-dedup` v1.0: //! given a real Bismark-aligned BAM, the Rust port must produce a //! deduplicated BAM with the **same set of retained qnames** as //! Bismark Perl v0.25.1, AND a deduplication rep...
1988628912dac4eaeeb267b4fe17a26553d7af3220eaafe1575222bee3973462
Rust
19,361
417
//! Aggregated extraction state — file handles, M-bias counters, splitting //! report. //! //! Owned by the SE/PE pipeline; created at `extract_se` entry and dropped //! at exit. Per SPEC §6.1 + §6.3: per-call helpers receive `&mut ExtractState` //! rather than 14 positional args. use std::path::Path; use crate::extr...
7f13232f16608991f76a0718ab8ce0556a837ff0973c6e00d77d7d428e723010
Rust
19,539
420
//! In-memory aggregation of methylation calls into per-position counts, //! plus chromosome ordering — the most byte-identity-load-bearing module //! (SPEC §2.1, decision D3). //! //! Replaces Perl's pre-split-to-temp-files + per-file `sort -k4,4n` + //! sequential tally (`bismark2bedGraph:160-506`) with a direct in-m...
ddeab5fd3a683c1103d152a8264ae075251a6fc6525a42cca7b5e1cb1c77f90d
Rust
19,575
623
//! Phase E unit tests — output-mode dispatch + gzip + yacht row format. //! //! Kernel `mbias_only_silence` tests live in `se_phase_b.rs` where the //! synthetic-record helpers are defined; this file is pure mode/key/yacht //! testing that needs no synthetic BAM records. #![allow(non_snake_case)] use std::fs; use st...
da5666ff9f87098363b6e3091ca509c379d94df8e82ca175f3e193d38e235e97
Rust
19,602
506
//! End-to-end tests for v1.x: multiple input files + single-end //! coordinate-sorted input. //! //! Builds synthetic BAMs in-test (no Perl/samtools toolchain), runs the //! `bismark_methylation_extractor_rs` binary, and asserts the v1.x contract: //! //! - SE coordinate-sorted input is ACCEPTED (explicit `--single-en...
4afd4b7c1ae2a5cb82b8e51081821a9a640fed07f1e2b5fdb79ee074784b0081
Rust
20,601
580
//! Integration tests for `bismark_genome_preparation_rs`. //! //! - Binary end-to-end with a **fake indexer** (`BISMARK_BIN`) so the run //! completes without a real `bowtie2-build` installed; asserts the converted //! CT/GA FASTA bytes. //! - **Perl oracle**: runs the actual `bismark_genome_preparation` and the R...
8a0c1373b7519aadce16f4858973717615acc6367e71191a98fefeac0f16afb7
Rust
20,679
567
//! Core dedup primitives. //! //! Pure logic, no I/O. The two types here are: //! //! - [`DedupKey`] — the value used to detect duplicates. Single key shape //! serves both single-end and paired-end (SE uses `end == start`), and is //! used for BOTH the seen-set and the positions-counter. That last point //! mat...
bd4c76e3209a3b3031bdecb120cd7bb49eee5a6814911e75c73261c849d91fbd
Rust
20,931
481
//! Phase D unit tests — M-bias.txt writer, filename derivation, //! MbiasTable::max_position, SE-vs-PE section ordering, finalize ordering. //! //! Test names mirror plan §7.1's labels. End-to-end smoke that runs the //! binary on real BAMs lives at `tests/mbias_writer_phase_d_smoke.rs`. #![allow(non_snake_case)] us...
04f099eb48b3e315fd1c7094553217eb5c51416270c2c29f23a10018bfa5e181
Rust
20,990
558
//! The GpC-context report (`--gc`/`--gc_context`) + NOMe-Seq GpC filtering. //! //! Mirrors Perl `generate_GC_context_report:751-1073`: a SECOND genome walk — //! run after the core report + context summary — that re-reads the same //! coverage file and, for every `GC` dinucleotide of each *covered* chromosome, //! em...
8b05499a9bf8c039cfc4fadf1537fd189d7c4a6586486ca8abaae0aa34208b1c
Rust
21,017
642
//! Webhook sender for async predictions. //! //! Implements the cog webhook protocol: //! - Throttling (default 500ms between non-terminal updates) //! - Terminal webhooks retried with exponential backoff //! - WEBHOOK_AUTH_TOKEN bearer authentication //! - Events filtering (start, output, logs, completed) //! //! # P...
b31d20003a1f8f78a53be44488c269691a9c893ae98069c0d5eb085cf0ed7700
Rust
22,587
633
//! Input validation against the OpenAPI schema. //! //! Validates prediction inputs before dispatching to the Python worker. //! Strips unknown fields silently and catches missing required fields //! with clear error messages (matching the format users expect from pydantic). use std::collections::HashSet; use serde_...
bc238f0240b95edd8ee32c8663ad337191d35f12b7738b9d4691e108c57498db
Rust
22,588
651
//! Phase E end-to-end smoke tests. //! //! Spawn the `bismark_methylation_extractor_rs` binary with each of the //! Phase E output modes (`--comprehensive`, `--merge_non_CpG`, both, //! `--yacht`, `--mbias_only`) and `--gzip`, on a synthetic SE-directional //! BAM, and assert: //! - exit code 0, //! - the expected...
73806ff8d28dd47038726c76e79082b2a392953c229d00f13d6f1ee97d3fa03d
Rust
22,993
641
//! #1025 Phase 2, integration tests for the BINSEQ (`.vbq`) → temp-FASTQ transcode. //! //! Builds real (tiny) VBQ files with the `binseq` writer (re-exported by the lib under //! the `binseq-input` feature), then checks `transcode_binseq_to_fastq_se`/`_pe` produce //! the expected `bqtools decode`-equivalent FASTQ, e...
b3709d8fad52953d36ae4c8b1036f360de3e1ea88e457ec49d99414bc272fbc3
Rust
23,058
647
//! Log routing via prediction_id ContextVar. //! //! Architecture: //! - Rust owns a ContextVar `_coglet_prediction_id` that holds the current prediction ID //! - Rust maintains a registry mapping prediction_id -> SlotSender //! - SlotLogWriter reads the ContextVar to route logs to the correct sender //! //! This desi...
2823303e35632f189b37fb0e690b3446bb199a214b615cd33be3ac4f72ea0015
Rust
23,248
434
//! Command-line surface (clap derive). //! //! Declares the **full** Bismark option set (the `GetOptions` block, Perl //! 7317–7382) so `--help` and `@PG` argv fidelity are complete, but only the //! **v1 spine** (Bowtie2 + FastQ + directional + SE) is *wired* downstream by //! [`crate::aligner::config`]. Options excl...
15f05d79d5b4aefdda03c8b0ea024c2d172c59b4051242630cfb77983ec783cf
Rust
23,550
774
//! Wire protocol types for parent-worker communication. //! //! Two channels: //! - **Control channel** (stdin/stdout): Init, Cancel, Shutdown, Ready, Idle //! - **Slot sockets**: Prediction data, streaming logs (per-slot to avoid HOL blocking) use std::collections::HashMap; use serde::{Deserialize, Serialize}; use...
43569c9dc14681f2b4d6b1d357e8ada49ca477b338fc9da7a0fba24885767113
Rust
23,716
614
//! The per-read NOMe-Seq filtering pipeline — the byte-identity crux. //! //! Ported from Perl `NOMe_filtering` `per_read_filtering:48-230` (the streaming //! loop + the in-loop/EOF flush) and `cytosine_lookup:242-391` (the C/G walk + //! NOMe filter + tally). The output is the always-gzipped `.manOwar.txt.gz` //! per...
d988eb8f42d9f7f52df224c1f274f49b354cd4820430971f7ecf90549dda82c2
Rust
24,307
697
//! coglet-python: PyO3 bindings for coglet. mod audit; mod cancel; mod input; mod log_writer; mod metric_scope; mod output; mod predictor; mod sentry_integration; mod worker_bridge; use std::sync::Arc; use std::sync::atomic::{AtomicBool, Ordering}; use pyo3::prelude::*; use pyo3_stub_gen::derive::*; use tracing::{I...
635040fa4d399758e6c36b19dea77c8dfadf39a9ebb28dc5b52d3181dfd48fbc
Rust
25,417
748
//! Command-line interface for `coverage2cytosine`. //! //! [`Cli`] is the clap-derived parser; [`Cli::validate`] resolves it into a //! [`ResolvedConfig`], reproducing every Perl `process_commandline` //! (`coverage2cytosine:1990-2197`) validation rule. All v1.x niche flags are //! now supported — `--gc`/`--nome-seq` ...
47a0c49049164adcae3c4e13ae00a66b71961b7088e2eae1df331509b6f679d9
Rust
25,622
611
//! Genome folder + bisulfite-index + raw-FASTA discovery. //! //! Mirrors Perl `bismark` 7604–7800 / `read_genome_into_memory` 5031–50: //! - the genome folder is made **absolute** (Perl `chdir`+`getcwd`); //! - the Bowtie 2 small index (`BS_CT.{1,2,3,4,rev.1,rev.2}.bt2`) is required, //! with a **large** (`.bt2l`) ...
f17f3074d9c2decf2f3e385a93c6b0f58a75a164c9d7a73f2fb92cc8b64ede7d
Rust
25,814
653
//! The Bismark alignment report (`<name>_bismark_bt2_SE_report.txt`) — a port of //! the report header (Perl `start_methylation_call_procedure_single_ends` //! 1642/1711–1729) and `print_final_analysis_report_single_end` (1964–2144), //! plus the trailing wall-clock line (926–927). //! //! **Byte-identity gate** (Phas...
e153cf0e55d00231659386b8cd04ee598b618276e7548ce5f611438f777883b1
Rust
26,823
745
//! Input processing for cog predictors. //! //! This module handles file downloads for cog predictor inputs. //! Input validation is performed at the HTTP edge using the OpenAPI schema; //! the worker only needs to download URLPath inputs and pass them through. use std::collections::HashSet; use pyo3::prelude::*; us...
09354a39639c9c38bcb6059f4e1ab4d2063a402b833164c677e61d2ec7f4d861
Rust
26,854
582
//! #1025 Phase 2 + Phase 3, Arc Institute BINSEQ (`.vbq` / `.cbq`) read input. //! //! Bismark has no native BINSEQ input. This module transcodes a BINSEQ file into a //! temporary FASTQ that byte-matches what `bqtools decode` would emit, so the //! **existing, byte-frozen** bisulfite-convert -> align -> merge pipelin...
830735f15e68f2b9b7c8ccb616d414a4520b5796a8f66e3ceddff44636511840
Rust
26,982
738
//! End-to-end integration tests for `methylation_consistency_rs`. //! //! Each test builds a synthetic Bismark BAM with the raw noodles writer (so we //! can inject arbitrary records, including the XM-less record needed for the //! graceful-stop test), runs the binary via `assert_cmd`, then reads the //! output BAMs b...
314f0f655078a6bd44b9c832a9583bdf6ce5ac647bfdb203f207319e7a2c0260
Rust
27,089
715
//! #787 Illumina 5-Base DUPLEX-consensus pairing + per-molecule reconciliation. //! //! DRAGEN's 5-Base library is `nonrandom-duplex`: each original DNA molecule yields a //! top-strand (OT) read and a bottom-strand (OB) read, tagged with complementary //! ("swapped") UMIs. Pairing those two strands into a *duplex fam...
5071b39bdbcf2f777dc5eba946562c3db9c90ba609b83fbf42ebd3d1269afd35
Rust
28,089
853
//! Metric scope: type-safe metric recording with ContextVar routing. //! //! Two PyO3 classes: //! - `Scope` — the per-prediction context, obtained via `current_scope()` //! - `MetricRecorder` — the `scope.metrics` sub-object with type invariant //! enforcement, dict-style access, and accumulation modes //! //! All ...
36a2477b71f5116fde60b1fc004b2857e398dde66bcffd501203c1ed5f7e5432
Rust
30,474
773
//! Bismark-flavoured CIGAR helpers as an extension trait on //! [`noodles_sam::alignment::record_buf::Cigar`]. //! //! Centralises the off-by-one-prone CIGAR arithmetic in one place so every //! downstream binary inherits the same correct computation. In particular, //! [`CigarExt::reference_end`] is the direct preven...
6221f51b655e8390b99559ae5bdf9117cefac3e73140a6c17153e606da28debc
Rust
34,058
802
//! In-process rammap [`SamStream`] — the load-bearing seam for byte-identical //! `bismark --rammap` WITHOUT spawning the `rammap` subprocess (epic //! `06152026_rammap-library-integration`, Phase 1). //! //! For each converted FastQ read, [`InProcessAlignerStream`] calls //! `rammap::Aligner::map_seq_with` and yields...
23e993f63a2f91f924e70bf83d94156ab346930bcc2a9cb9cd87e43e4abc8939
Rust
34,072
825
//! BAM, SAM, and CRAM writers consuming [`BismarkRecord`]s. //! //! Mirrors the structure of [`crate::io::read`]: //! //! - `BamWriter<W>`, `SamWriter<W>`, `CramWriter<W>` are the concrete //! writers. Each has a `from_path` constructor and a generic `new`. //! - `AnyWriter` enum + `open_writer` path-dispatcher cove...
48aaf1482ef46d1aa67ad0a6c56bf2aea46384ec7143c01f2c0ccaa834a6882c
Rust
34,246
824
//! Bismark-aware record wrapper. //! //! [`BismarkRecord`] wraps [`noodles_sam::alignment::RecordBuf`] with eager //! strand classification at parse time. The per-record strand is derived //! once from the XR/XG tags and stored as a typed field — never recomputed. //! //! See `DESIGN.md` Q1 for the rationale: this is ...
b92dd1c8c2d613c8acdf4821ef571b5badc25dd94a13d60e5d423d2bd75c891f
Rust
34,746
868
//! Phase 2 — in-process file-coupled orchestration of `bismark2bedGraph` + //! `coverage2cytosine`. //! //! After extraction writes the per-context split files, the extractor drives //! the bedGraph + cytosine-report tools **in-process** (no fork/exec, no Perl): //! it builds the argv each standalone binary would rece...
eed09dd61ca63d9345eac6c57b439e3d1e78cc13aee828301ae5e56a50414206
Rust
35,780
958
//! Bridge between coglet-worker's PredictHandler trait and PythonPredictor. use std::collections::HashMap; use std::sync::{Arc, Mutex}; use std::thread::JoinHandle; use pyo3::prelude::*; use pyo3::types::PyDict; use coglet_core::bridge::protocol::SlotId; use coglet_core::worker::{PredictHandler, PredictResult, Setu...
a8949e361b786bb6724c2f4a9a80910db9d99d1596e6d1ffb33c47d417846002
Rust
36,372
945
use std::mem::{offset_of, size_of}; use crate::camera::Camera; use crate::dim_check::DimCheck; use crate::kernels::{ GatherGrads, GetTileBinEdges, MapGaussiansToIntersect, ProjectBackwards, ProjectSplats, ProjectVisible, Rasterize, RasterizeBackwards, }; use crate::BurnBack; use brush_kernel::{ bitcast_te...
8752faab1d026f2366921fb707309cf4af73a500b1f9f8c493844e9a679633bd
Rust
37,551
888
//! Assembly of the Bowtie 2 `aligner_options` string — **byte-identity-critical**. //! //! The push order below is verified against Perl `bismark` 7838–8142 and is the //! literal option string each Bowtie 2 instance receives (the per-instance //! `--norc`/`--nofw` is added later, NOT here). Order (rev-1, dual-review)...
3c78b0c3aef4a9556aa2c2e18ade8a4c5f52404a210c5cfc34b6cb5c8580da43
Rust
37,745
1,060
//! Worker subprocess - runs inside the Python subprocess. //! //! This module provides the child-side of the worker subprocess protocol. //! The parent side (spawning, message routing) is in orchestrator.rs. //! //! Architecture: //! - Control channel (stdin/stdout): Cancel, Shutdown signals + Ready, Idle responses //...
7c1fddaa63c1f2c91bbfee4fd404a964e4086e5e238e65681e796509ecd9dbbd
Rust
38,922
1,016
//! Phase 2 — in-process file-coupled orchestration: bridge-parity tests. //! //! These tests prove the **config bridge** between the extractor and the //! in-process `bismark2bedGraph` / `coverage2cytosine` crates is correct: //! the argv the extractor builds, the filenames it derives, and the kept-set //! it forwards...
b310744e382c653a431762fc709b551eba5949fd3ef1b4ae0bb8cd10c78bdf4d
Rust
40,276
1,132
//! Phase 9b — order-preserving file-level threading (`--multicore`/`--parallel`). //! //! `--parallel N` (N > 1) splits each read file (SE) or mate-pair (PE) into **N //! contiguous chunks**, runs the full convert → 2–4 Bowtie 2 → lockstep-merge //! pipeline ([`crate::aligner::process_se_chunk`]/[`crate::aligner::proc...
5b1e38094055cf15c719f7a0d1ba633313bd22b04af23c598b945470b862e9d8
Rust
42,124
1,222
//! Prediction state tracking. use std::collections::{HashMap, VecDeque}; use std::sync::Arc; use std::time::Instant; use tokio::sync::Notify; pub use tokio_util::sync::CancellationToken; use crate::bridge::protocol::{LogSource, MetricMode}; use crate::webhook::{WebhookEventType, WebhookSender}; pub const STREAM_CH...
cccf42570eeea16aeaf34e43cc6b8cac0d19fcd5d5ce76bcb36e6946557b39f6
Rust
42,663
1,137
//! Command-line interface for `bismark_methylation_extractor`. //! //! All 35 Perl flags from [SPEC §3](../../SPEC.md) are mapped to clap-derived //! fields below. [`Cli::validate`] returns a [`ResolvedConfig`] after //! checking every documented mutex pair + precondition from SPEC §11 + //! Perl source. //! //! ## Fl...
d93c531aa7dbf07b1429bfd56080c2d8f868fffcdbd28ca327886e6cb87a7153
Rust
42,878
1,079
//! #787 Illumina 5-Base SYNTHETIC GROUND-TRUTH gate, using the REAL minimap2. //! //! A true "concordance vs DRAGEN" gate is impossible without DRAGEN (proprietary //! FPGA, no reference output) and without a public raw 5-Base dataset. This is the //! achievable, stronger substitute: we synthesize reads from a known r...
31d669f1887e05bf2993edbf34db0881cf71a1e1cf0c502451b65e5072223a26
Rust
44,654
1,158
//! The core genome-wide cytosine report — the byte-identity crux. //! //! Mirrors Perl `generate_genome_wide_cytosine_report:168-745` + //! `process_unprocessed_chromosomes:1388-1565`: stream the coverage file one //! chromosome at a time, walk every `C`/`G` in that chromosome's genome //! sequence with exact `pos = i...
aa6e3695e69e74c6035c4e30fd27f73ad01b71f57d55a320bcdc5b55a06a1f1e
Rust
46,589
1,205
//! Phase B unit tests — kernel + routing + output map + state machinery. //! //! Organisation mirrors the plan §7.1 test list, grouped by module under //! `#[cfg(test)] mod` blocks. Heavy synthetic-record construction sits in //! a `helpers` module shared by all groups. //! //! End-to-end smoke that runs the binary on...
434ff076a7b70915aac080f422d9ea727f06c3bdd3be69ab2365de496bd19cf4
Rust
46,771
1,294
use chashmap::CHashMap; use itertools::Itertools; use programinduction::{ lambda::{self, Expression}, ECFrontier, Task, }; use rayon::prelude::*; use std::cmp::Ordering; use std::collections::{HashMap, HashSet}; use std::f64; use std::hash::{Hash, Hasher}; use std::sync::{Arc, Weak}; const EPSILON: f64 = 0.001...
5c0fd654c0c3e14fe7687bb7dff5dbe5f3f3cf4c051f6a160de0dbdc274a83c5
Rust
48,756
1,218
//! Genomic-sequence extraction + the `XM` methylation call — a port of Perl //! `extract_corresponding_genomic_sequence_single_end` (4273–4467) and //! `methylation_call` (4800–5018), plus `reverse_complement` (5161). //! //! For one `UniqueBest` alignment, pull the genomic window (read length + 2 //! context bases) m...
62fa1bf9487bb813e784eab7e5a0f09e294d65d02736d46385373387ee524b41
Rust
55,093
1,454
//! Phase F byte-identity tests. //! //! Three categories of assertion: //! 1. **Legacy vs parallel** — `extract_se` / `extract_pe` (single-threaded, //! Phase B/C reference) vs `extract_se_parallel` / `extract_pe_parallel` //! (the new pipeline) on the same input. Byte-identical output is the //! load...
fc319fa3d1172f0e01c90a73dc37408406dfdaf8dd287f05a0517a922a80a710
Rust
56,238
1,443
//! Dedup pipeline: orchestrates `bismark-io` reader/writer + the //! [`crate::dedup::dedup::DedupState`] primitives into a working dedup loop. //! //! The two public entry points: //! //! - [`run_single`] — one input file, one output file, one report. //! - [`run_multiple`] — N input files treated as one combined stre...
b0a9072024bc9aadfb4625961c0bb6dd665057c550d2ce6ad395a95e901a1ced
Rust
57,324
1,389
//! BAM, SAM, and CRAM readers that yield [`BismarkRecord`]s. //! //! All three readers wrap their underlying noodles reader and produce //! [`BismarkRecord`] via [`BismarkRecord::from_noodles_record`]. The //! iterator-level adapter: //! //! - **Silently filters unmapped reads** (SAM FLAG & 0x4). The //! [`BismarkRe...
9c745baa5e9ec967414f3c4d6fd4a91e3a69427791c81aab3f205a782434e30b
Rust
61,840
1,594
//! Phase 3a — streaming bedGraph tee: byte-identity gate + ownership + D5. //! //! Phase 3a feeds methylation calls into a `bismark::bedgraph::Aggregator` IN //! MEMORY during extraction (the tee at the shared `write_call` funnel) and //! writes the `.bedGraph`/`.cov.gz` from `agg.into_sorted()` instead of //! re-read...
5beab878f787195ae1259c3efa477a45bc26188e5685b781e91f6eb549e79fc2
Rust
62,652
1,622
//! Single-instance Bowtie 2 stream + SAM-line parse — the lockstep primitive. //! //! Spawns ONE Bowtie 2 subprocess against the converted temp FastQ, skips the //! SAM header, and exposes a *peek + advance* interface (`current()` / //! `advance()`) over parsed [`SamRecord`]s. Phase 4 drives 2–4 of these in //! read-I...
8abf77d150dda9619fd8947589964fe86f87bc5c513a790a9981ef3372cf2d27
Rust
63,761
1,780
//! Bisulfite best-alignment merge — a port of Perl `check_results_single_end` //! (2702–3151) for single-end directional reads (2 instances). //! //! For one original read, drive the per-instance [`SamStream`]s in read-ID //! lockstep, pick the unique best alignment by `AS` across instances (handling //! same-thread a...
ffd4899f2fa5a694b48573f5ea5913fc6d564395a48c99b0d9c86445f0f7e4e0
Rust
64,059
1,401
//! Per-(mode-key) split-file map + splitting-report writer. //! //! The `(key, filename)` list comes from [`crate::extractor::output_mode::mode_keys`] //! (all 5 non-`MbiasOnly` modes); each file is a plain `File` or a parallel-gzip //! `ParCompress<Gzip>` when `--gzip` is set. `MbiasOnly` yields an empty map //! (`ro...
80bf068835ef4974664d84fcc40f3d0764bdf9f93b3dec79cdbff26ae128c6be
Rust
64,564
1,897
//! PredictionService: Transport-agnostic prediction lifecycle management. //! //! This service is the single owner of prediction state. It manages: //! - Slot management (PermitPool for concurrency control) //! - Prediction lifecycle (DashMap of active predictions) //! - Cancellation (cancel tokens + orchestrator dele...
152eb6267d46e8c7fc06699d43316fd1d51d2ec7883771c886576105a2447a1a
Rust
68,162
1,795
//! Python predictor loading and invocation. use std::sync::{Arc, OnceLock}; use pyo3::exceptions::PyValueError; use pyo3::prelude::*; use pyo3::types::{PyDict, PyTuple}; use coglet_core::worker::SlotSender; use coglet_core::{PredictionError, PredictionOutput, PredictionResult}; use crate::cancel; use crate::input:...
0944af9aa879f36ee0bf5abce4be565bbed9b9a3da417d35d77c279d09333a4d
Rust
68,839
1,656
//! Phase C unit tests — PE extraction loop, overlap detection, per-mate //! ignore trims, SE-vs-PE auto-detect. //! //! Test names mirror plan §7.1's labels. End-to-end smoke that runs the //! binary on a synthetic PE BAM lives at `tests/pe_phase_c_smoke.rs`. #![allow(non_snake_case)] use bismark::extractor::call::{...
f12cfe4c60a445f48db47fa1fbe3e8cf14756807c2128a2282c4fb99a5d58ce3
Rust
69,440
1,755
//! Bisulfite read conversion — the C→T-converted temp FastQ that Bowtie 2 reads. //! //! Mirrors Perl `biTransformFastQFiles` (5489–5651) + `fix_IDs` (6235–6246) for //! the v1 spine (FastQ, single-end, directional). The output temp file must be //! **byte-identical** to Perl's so Bowtie 2 receives identical input. Th...
92e896a9a990365db0c741f485d0deb3d19b1652961eecf93abd6eed4b028fcc
Rust
71,058
1,624
//! Phase F: rayon-based `--multicore N` pipeline (byte-identical to `--multicore 1`). //! //! Architecture per `SPEC.md §6.4 + §9` and `plans/05262026_bismark-extractor/PHASE_F_PLAN.md` rev 1: //! //! ```text //! ┌─ worker 1 ─┐ //! input BAM ──▶ producer ──▶ worker 2 ──▶ collector ──▶ split files + M...
d99b369786824aeacfce6f9c053fc80ec147aa9430bfa7f8d62aad1f62dd1b5a
Rust
71,215
2,086
//! HTTP route handlers. use std::convert::Infallible; use std::sync::Arc; use std::time::Duration; #[cfg(feature = "tracing")] use axum::extract::MatchedPath; use axum::{ Router, body::Body, extract::{DefaultBodyLimit, Path, State}, http::{HeaderMap, Request, StatusCode}, middleware::{self, Next}...
ed2becab9b47c91e39fa27e1ec68681801f5c9d4d3418897fcf7ec9429e62c32
Rust
74,213
1,867
//! SAM/BAM record + header assembly — a port of Perl `generate_SAM_header` //! (8452–8484), `single_end_SAM_output` (8489–8711), `make_mismatch_string` //! (9252–9595), `hemming_dist` (9235), and `revcomp` (9228). //! //! Builds the noodles [`Header`] (`@HD`/`@SQ`/`@PG`) and, per `UniqueBest` //! alignment, a [`Bismar...
6f72d94aa029c5135828181553bfed00105ed95d87bc3126181403e95a99615b
Rust
75,494
1,851
//! Orchestrator - manages worker subprocess lifecycle and event loop. //! //! Flow: //! 1. Spawn worker subprocess //! 2. Send Init message, wait for Ready //! 3. Populate PermitPool with slot sockets //! 4. Run event loop routing responses to predictions //! 5. On worker crash: fail all predictions, shut down use st...
cd7d3c29b08d61222d1b5a685172afa4ba25e33e4b946ee9a33b15c57ea63abb
Rust
85,576
2,323
//! Integration tests for `deduplicate_bismark_rs` end-to-end. //! //! Each test: //! 1. Constructs a synthetic Bismark BAM at a temp path via `bismark-io`'s //! `BamWriter` (records hand-built with the right strand tags, CIGAR, //! flags, etc.). //! 2. Spawns the `deduplicate_bismark_rs` binary via `assert_cmd` ...
f873f16a6957757287861cc699d1f78c8b0a322076a21fae904ebc3a6c3810c8
Rust
100,553
2,376
//! `--combined_index` (v2) strand classification + per-read selection. //! //! **Opt-in, never-silent, concordance-gated — NOT byte-identical** to the //! faithful per-strand-instance path. The combined index is searched in ONE //! both-strands Bowtie 2 pass per read-conversion (`-k 2`, no `--norc`/`--nofw`); //! each...
3a0451194065dcdd43f4ebaddeb748754a1f90712eb668ce53d11185b27e3040
Rust
105,589
2,418
//! Resolved run configuration — the typed seam (`RunConfig`) that Phase 1 //! produces and Phases 2–10 consume. //! //! [`resolve`] mirrors Perl `process_command_line`'s precedence: aligner → //! library type → format → genome/reads → discovery → aligner detection → //! `aligner_options` → output target. Only the **v1...
75e991dac00d8414506bfa5d4f69bc04d431bb47701d8c2329f3eec7ecfe238e
Rust
200,721
4,802
//! `bismark-aligner` — Rust port of the Perl `bismark` aligner **wrapper**. //! //! `bismark` is not an aligner: it converts reads (C→T, plus the G→A complement //! for non-directional), drives 2–4 external **Bowtie 2** instances against the //! bisulfite-converted indexes, merges/scores their SAM in read-ID lockstep,...
50539c93130b96099d1e081f0e351b38bd7414a0b35aad09c5d07c8795ac0a05
Rust
200,813
5,020
//! End-to-end CLI tests for Phase 1 (`bismark_rs`): parse → discover → detect → //! options → resolved-config summary, plus the deferral/validation error paths. //! //! Aligner detection runs `bowtie2 --version`; tests that reach detection use a //! tiny **fake** `bowtie2` (reports `version 2.5.5`) via `--path_to_bowt...
616ccd0d834669bd276115cd0158d47d6a5013577c1a1c4ff924118f157af2a2
SAS
2,016
76
/* Generated Code (IMPORT) */ /* Source File: P americana experiment.jmp */ /* Source Path: /folders/myshortcuts/MyFolders */ /* Code generated on: 5/9/19, 5:04 PM; UPDATED 6/27/2024*/ /* Code for analyses of brown trout response to extra-large prey */ %web_drop_table(WORK.IMPORT1); FILENAME REFFILE '/home/u1856827/M...
ffcabebcfdbfc5664371f97898eca0b381fd41665a44a2a2e8147df5fb61b94e
SAS
2,269
80
/* Generated Code (IMPORT) */ /* Source File: Brown trout Prey Memory Analyses.jmp */ /* Source Path: /folders/myshortcuts/MyFolders */ /* Code generated on: 5/9/19, 12:57 PM; UPDATED 6/27/2024*/ /* Code for analysis of brown trout prey memory extinction */ %web_drop_table(WORK.memory); FILENAME REFFILE '/home/u1856...
4cc5303d3dc5664595c309f55089affd10daa1fe49a97aadc7fbe3b38ecad7b7
SAS
3,337
113
/* Generated Code (IMPORT) */ /* Source File: ExposureRatioData.jmp */ /* Source Path: /home/u1856827/My SAS Files/Brown trout feeding */ /* Code generated on: 7/2/24, 4:19 PM */ %web_drop_table(WORK.IMPORT1); FILENAME REFFILE '/home/u1856827/My SAS Files/Brown trout feeding/ExposureRatioData.jmp'; PROC IMPORT DATA...
6a9c0b1e89944bb15bf2abf86cdd7ab91dae3aabf21d6d266614e763e3ec62d4
SPSS
457
8
MIXED sc_AI BY Run Performance Instruction /CRITERIA=DFMETHOD(SATTERTHWAITE) CIN(95) MXITER(100) MXSTEP(10) SCORING(1) SINGULAR(0.000000000001) HCONVERGE(0, ABSOLUTE) LCONVERGE(0, ABSOLUTE) PCONVERGE(0.000001, ABSOLUTE) /FIXED= Performance Run*Performance | SSTYPE(3) /METHOD=ML /PRINT=DESCRIPTIVES SOL...
16450cd63475a668d862b8ce548ac1628f3e6ebf2d558873097898a51c7eda77
SPSS
459
8
MIXED sc_dACC BY Run Performance Instruction /CRITERIA=DFMETHOD(SATTERTHWAITE) CIN(95) MXITER(100) MXSTEP(10) SCORING(1) SINGULAR(0.000000000001) HCONVERGE(0, ABSOLUTE) LCONVERGE(0, ABSOLUTE) PCONVERGE(0.000001, ABSOLUTE) /FIXED= Performance Run*Performance | SSTYPE(3) /METHOD=ML /PRINT=DESCRIPTIVES S...
ce97f0158fbd90aac61018c3e640a36a1a4216cf34c7d9ec2ee70c5d9628b250
SPSS
462
8
MIXED sc_put BY Run Performance Instruction /CRITERIA=DFMETHOD(SATTERTHWAITE) CIN(95) MXITER(100) MXSTEP(10) SCORING(1) SINGULAR(0.000000000001) HCONVERGE(0, ABSOLUTE) LCONVERGE(0, ABSOLUTE) PCONVERGE(0.000001, ABSOLUTE) /FIXED= Run Performance Run*Performance | SSTYPE(3) /METHOD=ML /PRINT=DESCRIPTIVES...
a94fe69a1eb383116d1f19f63cbfbb52338653296e0dbcbe41c05651ea4bf7c6
SPSS
472
9
MIXED Errors_number BY Run Instruction /CRITERIA=DFMETHOD(SATTERTHWAITE) CIN(95) MXITER(100) MXSTEP(10) SCORING(1) SINGULAR(0.000000000001) HCONVERGE(0, ABSOLUTE) LCONVERGE(0, ABSOLUTE) PCONVERGE(0.000001, ABSOLUTE) /FIXED= Run Instruction | SSTYPE(3) /METHOD=ML /PRINT=DESCRIPTIVES SOLUTION /RANDOM...
f8e31d0a584f26a7e7b3d50fb855138cd3c075b4377a1307e4bcbade32136538
SPSS
1,708
63
* Encoding: UTF-8. * Attempt 1 on Making REDCap Data Export Cleanup * *Open terminal, get the pathway for the bin folder of contents for SPSS statistics, then set cd to the bin folder there* *cd /Applications/IBM\ SPSS\ Statistics/SPSS\ Statistics.app/Contents/bin * *Need to install pandas: ./statisticspython3 -m p...
9da586f0bacc9ffa6c86a4f84931874f28ab79eba544e507cd215abfdb1cfdd9
Scala
552
27
import org.openbabel._ object OBTest { def main(args: Array[String]) { println("Loading openbabel_java...") System.loadLibrary("openbabel_java") println("Running OBTest...") run } def run() { val c = new OBConversion val mol = new OBMol c.SetInFormat("smi") c.ReadString(mol, "...
bc009bfbd072b2283ee639b39b096b1d1b4a8a3753807dd4ab86d567cd9b91fc
Shell
15
1
Rscript FigS1.R
24b0081a84c613632dfc90b873c83543871bcf26df8dedf868b9b44652811109
Shell
17
1
main/run_main.sh
f4d050b1914434fb849be8aacf28bde1d18fedb6c85cc5f2bd2e0357db57f5f1
Shell
31
1
python setup.py build install
a598977a5604c9d15d1b77023a7adcd2646a426e31a5503159fefa182ff824ba
Shell
35
3
bbr_thr=0.6 max_FC=5 min_length=240
bd59c07c7286153efd94afa06e6513e65a3a0e8fa35221872f61854928c0d50e
Shell
36
1
python3 setup.py build_ext --inplace
5a93e67ff69e61ad3263d15b8bccc733ade88d06dcb826e832ec94b8c366835c
Shell
37
3
for i in ../bin/test_* do $i done
727bb2d1619b26d6a6b8333d96322d3575f30d9480ac42e5a43f3441297c2017
Shell
39
2
# run PlatformIO builds platformio run
39cbaeb8bbbf3ffc531f81835b6039ef22b2d7e3ea1e4154ef557a570af950dc
Shell
41
1
docker run --rm -it ghcr.io/hdegen/hornet
608c875b758a814914a0e10795ad7a94360bde3cf2c48c3f9dea4ef43412091f
Shell
42
1
# do nothing HIVE_HOME already set by env