EvaluatedApplications.HoloGenome 0.2.0

dotnet add package EvaluatedApplications.HoloGenome --version 0.2.0
                    
NuGet\Install-Package EvaluatedApplications.HoloGenome -Version 0.2.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="EvaluatedApplications.HoloGenome" Version="0.2.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="EvaluatedApplications.HoloGenome" Version="0.2.0" />
                    
Directory.Packages.props
<PackageReference Include="EvaluatedApplications.HoloGenome" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add EvaluatedApplications.HoloGenome --version 0.2.0
                    
#r "nuget: EvaluatedApplications.HoloGenome, 0.2.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package EvaluatedApplications.HoloGenome@0.2.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=EvaluatedApplications.HoloGenome&version=0.2.0
                    
Install as a Cake Addin
#tool nuget:?package=EvaluatedApplications.HoloGenome&version=0.2.0
                    
Install as a Cake Tool

HoloGenome

Encode DNA as phasor holograms whose geometry comes from measured DNA physics, not invented constants. Experimental (0.x). Research and education only: no health, disease-risk or drug-response output.

  • Each base is a Phasor symbol face.
  • Bases ride a helical carrier: the phase advances by each dinucleotide step's measured twist (Olson et al. 1998, PNAS 95:11163, Table 1, built in), or by a constant 34.3 degrees, or not at all.
  • Optional local-shape layer: minor groove width, propeller twist, roll and helix twist per base, read from a pentamer table you supply (no third-party shape data ships in this package).
  • A window of sequence becomes one fixed-width vector (HoloCodec planar layout) you can store in HoloDb, compare by dot product, or feed to any regression.
  • GenomeWindowStore keeps windows in a HoloDb table with ordinary SQL columns beside the hologram.
  • Graded scores, no files or console (runs in Blazor WebAssembly): hand over sequences and a measurement column and get the correlation with a block-resampled 95% interval for a zero-parameter helical score, a trained hologram readout, or a fitted phasor model that reports the helical period it found in bases per turn.

Quick start

dotnet add package EvaluatedApplications.HoloGenome
using HoloDb;
using HoloGenome;

var encoder = new GenomeEncoder(new GenomeEncoderOptions { Dim = 512, Twist = OlsonTwist.Instance });
double[] h = encoder.Encode("ATGCGTACGTTAGCAAAAATTTTTGCGCGATCGATCGTAGCTAGCTAGCA");
Console.WriteLine($"{h.Length} reals; helix turns: {encoder.HelixPhases("ATGCGTACGT")[^1] / (2 * Math.PI):F2}");

var db = new HoloDbService(new HoloDbOptions());
var store = new GenomeWindowStore(db);
store.Put([new GenomeWindow(1, "demo", 0, "ATGCGTACGT", encoder.Encode("ATGCGTACGT"))]);
Console.WriteLine(store.Get(1)!.Sequence);   // ATGCGTACGT

Grade a score against measurements (the data here is synthetic, a stand-in for a laboratory column):

using HoloGenome;

var rng = new Random(7);
var sequences = Enumerable.Range(0, 300)
    .Select(_ => new string(Enumerable.Range(0, 50).Select(_ => "ACGT"[rng.Next(4)]).ToArray())).ToList();
var planted = new PhasorPeriodModel(
    [0.3, 0.1, -0.2, 0.05, 0.4, 0.8, -0.1, 0.0, 0.2, -0.6],
    [0.0, 0.2, 0.1, -0.1, 0.3, -0.5, 0.05, 0.1, 0.4, 0.2],
    periodBasesPerTurn: 10.4);
var measurements = planted.Scores(sequences).Select(v => v + 0.3 * (rng.NextDouble() - 0.5)).ToList();

ScoreGrade g = GenomeScorer.GradeHelical(sequences, measurements);   // zero parameters, nothing fitted
Console.WriteLine($"helical score: r = {g.Pearson:F3} [{g.Low:F3}, {g.High:F3}] over {g.N} sequences");

PhasorPeriodModel fit = PhasorPeriodModel.Fit(sequences, measurements);   // period free, starts at 12 bases per turn
Console.WriteLine($"fitted period: {fit.PeriodBasesPerTurn:F2} bases per turn (Olson table: {HelicalScore.OlsonPeriodBasesPerTurn:F2})");

Public surface

Type What it does
GenomeEncoder(GenomeEncoderOptions?) Encode(window), EncodeWindow(sequence, start, length) (outside bases = shape context only), HelixPhases(window) (cumulative angle, radians), Dim.
GenomeEncoderOptions Dim (default 512), Twist (ITwistModel?, default OlsonTwist.Instance; null = no helix phase), Shape (PentamerShapeTable?).
ITwistModel TwistDegrees(a, b) for the 5'-ab-3' step. Implementations: OlsonTwist.Instance (also Step(a, b) → StepParams with all six parameters), ConstantTwist(degrees = 34.3).
PentamerShapeTable Load(path) / Parse(lines); rows PENTAMER MGW ProT Roll1 Roll2 HelT1 HelT2; Lookup(pentamer) with reverse-complement fallback; Mean, StdDev, Standardised(v, f), Misses.
ShapeValues Mgw, ProT, Roll, HelT (Roll/HelT = mean of the two steps around the centre base).
GenomeWindowStore(HoloDbService, table = "genome_windows") Put(windows) (bulk, atomic), Get(id), All(), Count(), static Pack/Unpack (float32 base64).
Dna Normalise (rejects non-ACGT), ReverseComplement, Complement, Index.
HelicalScore Zero-parameter score: Score(sequence, period?), Scores(sequences, period?), OlsonPeriodBasesPerTurn (10.5340), OlsonMeanTwistDegrees. The AA/TT step pattern's strength at the helical period; nothing is fitted.
PhasorPeriodModel Fitted phasor model: Fit(sequences, measurements, PhasorFitOptions?) (free period by default, or FixedPeriod), PeriodBasesPerTurn, Score, Scores, Predict, P/Q/Amplitude/PhaseDegrees per step class, LossLog. Build one from known weights with the public constructor.
HologramReadout Trained readout: Fit(sequences, measurements, HologramReadoutOptions?) encodes every sequence with a GenomeEncoder, fits a cross-validated ridge on its features, Predict(sequences). GenomeEncoder.Features(hologram) is the feature layout.
RidgeReadout, RidgeModel Cross-validated ridge on any feature matrix: new RidgeReadout(rows, RidgeOptions?), Fit(y) (repeatable, cheap) → RidgeModel.Predict, Lambda.
ScoreGrader, GradeOptions, ScoreGrade, ScoreDifference Grade(scores, measurements, options) → Pearson, Spearman and a 95% block-bootstrap interval; Compare(a, b, measurements, options) → paired difference with interval; Resamples(blocks, count, seed).
GenomeScorer One-call grading: GradeHelical, GradeReadout (train set, test set), GradePhasor.
ResampleBlocks Block units for the bootstrap: Rows, Segments, Tiled(sequences, step, overlap), Groups(labels). Use them for overlapping or related sequences, where single-row intervals are too narrow.
Correlation Pearson, Spearman, Interval95.
DinucleotideShuffle The order-destroying null: Shuffle(sequence, rng) keeps dinucleotide counts and end bases; Counts.
DinucleotideClasses The ten reverse-complement step classes: Keys, IndexOf(a, b), Encode(sequence).

Gotchas

  • Sequences must be A/C/G/T. N and IUPAC codes throw rather than being guessed.
  • The hologram is an unnormalised sum over bases: longer windows have larger norms. Compare windows of equal length.
  • Stored holograms are float32: a round trip is exact to about 6e-8 relative, not to double precision.
  • Grading needs enough rows to be meaningful and honest blocks: pass ResampleBlocks for related sequences or the interval is too narrow. PhasorFitOptions.Parallel (off by default) fans the free-period fit over cores; leave it off in a browser.
  • Faces use HoloCodec's planar layout [reals | imags]; do not mix them with PhasorCodec's interleaved faces.

License

Proprietary — this package ships the compiled library only; see LICENSE for the full terms. Installing and using unmodified copies for internal evaluation and non-commercial development or testing is licensed; commercial, production, or revenue-generating use requires a separate commercial licence from the owner. No feature on this page is gated behind a tier or a licence key — every capability described works identically with or without one. Copyright (c) 2026 Dongyang Stephen Chen, trading as Evaluated Applications. All rights reserved.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.2.0 28 10/15/2026
0.1.1 101 10/3/2026
0.1.0 88 10/3/2026