Conversation
VARNORM always normalizes against the project default reference build. VARNORM_WITH_BUILD takes a chromSeq path as its first argument (quoted or unquoted, like refbases_with_build) and normalizes against that build, with the same options as VARNORM. This lets liftover pipelines normalize lifted variants against the target build. - VarNormAnalysis takes an optional refSeqPath; the RefSeq is created once per analysis and closed on finish. - VARNORM option parsing moved to VarNorm.parse and shared by both commands. - A missing build fails at parse time instead of silently reading as N. The check uses the unsecure reader, which is what RefSeqFromChromSeq reads with, so absolute build paths work in server mode as for refbases_with_build. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…osome files The build folder existence check failed for S3/OCI folders without a trailing slash and was meaningless on Azure. Probe <build>/chr1.txt or <build>/1.txt instead, the way RefSeqFromChromSeq reads the files, and name the probed files in the error. Explain the unsecure() reader, add tests for insertions, right shift, multiple contigs, contig start and -seg, assert exact output without a default build, and document options, chromosome naming and example paths. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
| // Object stores (S3, OCI) report a folder without a trailing slash as missing, while the chromosome | ||
| // files RefSeqFromChromSeq reads (<build>/<chrom>.txt) are there. Only the files may be probed. | ||
| String build = "s3://bucket/ref/chromSeq"; | ||
| Set<String> existing = Set.of(build + "/chr1.txt"); |
| @Test | ||
| public void testBuildValidationAcceptsChromosomeNamesWithoutChrPrefix() { | ||
| String build = "s3://bucket/ref/chromSeq"; | ||
| Set<String> existing = Set.of(build + "/1.txt"); |
| public void testBuildValidationRejectsFolderWithoutChromosomeFiles() { | ||
| String build = "s3://bucket/ref/chromSeq"; | ||
| // Even if the folder itself "exists" (Azure always says so), no chromosome file means no usable build. | ||
| Set<String> existing = Set.of(build, build + "/"); |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Jira: ENGKNOW-3940
Problem
VARNORMalways normalizes against the project default build (VarNormAnalysishard-codescreateRefSeq()). Theliftover templates in gdb-cla-queries normalize after lifting, so when the target build is not the project default
(e.g. hg38tohg19 in an hg38 project) indels are aligned against the wrong reference.
Change
New command, same options as
VARNORM:buildis a chromSeq folder, quoted or unquoted, resolved likerefbases_with_build(ProjectContext.createRefSeq(path)).VarNormAnalysisgets an optionalrefSeqPath(defaultNone, so existing callers are unchanged). The RefSeq is created once per analysis and closed on finish.VarNorm.parseand shared, not copied.Reference build <path> does not exist). Without the check,RefSeqFromChromSeqlogs a warning and returnsN, so a typo in the path would silently leave variants unnormalized.VARNORM_WITH_BUILD.rst, command index, lexer.Review note
The existence check uses
getFileReader.unsecure(), because that is the readerRefSeqFromChromSeqreads the build with.With the secure reader, absolute build paths (e.g.
/private/gorkube-mount/...) were rejected in server mode even thoughthe read itself works. This exposes no more than
refbases_with_buildalready can.Tests
UTestVarNormWithBuild(realref_minidata):varnormwhen the build equals the configured default, for'',-left,-right,-trim,-right -trimUTestVarnormAnalysis:refSeqPathusescreateRefSeq(path), never the default, and closes it.UTestCommandParsing: argument and option cases.:gortools:test: 2605 tests, 0 failures, 0 errors.Follow-up: ENGKNOW-3941 switches the gdb-cla-queries liftover templates to this command.
🤖 Generated with Claude Code