Repository navigation
Conversation
VCF 4.2 permits N in REF and ALT, and `.` as ALT when there is no alternate allele. DnaSequence accepts N, and the new AlternateAllele additionally accepts `.`, so barcode and primer sequences stay free of `.`. 🤖 Generated with Claude Code
Code coverage overviewLanguages: PHP PHP / code-coverage/phpunit
View coverage of the 7 most impacted files.
ℹ️ Calculations represent line coverage. Results may change as calculations are updated. |
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.
VariantIdentifier::parse()andDnaSequencethrow on alleles that VCF 4.2 explicitly permits:Nin REF and ALT, and.as ALT when a site has no alternate allele.Variant callers emit both, so consumers parsing real VCF data fail on valid lines.
This PR accepts them.
DnaSequenceacceptsN, the IUPAC code for any base.complement()already leaves it unchanged.AlternateAllele extends DnaSequenceadditionally accepts exactly.and offersisMissing().parseDash()andparseCanonical()acceptNand an ALT of., and build anAlternateAllelefor ALT.VariantIdentifier::$alternatestaysDnaSequence, so existing readers keep working.`.` lives in AlternateAllele, not in DnaSequence, to keep primer and barcode validation strict
DnaSequencealso validates primer and index barcode sequences..is not sequence content but the VCF missing value, so allowing it there would let.pass as a primer or barcode, withlength()1 andreverseComplement()..Only the ALT position of a variant may hold it, see section 1.4.1 of https://samtools.github.io/hts-specs/VCFv4.2.pdf.
For agents 🤖: draft, waiting for review
make testandmake stanpass.make rectoralready fails on master withUndefined constant PHPUnitSetList::PHPUNIT_40; not touched here.length()of.stays 1 on purpose, matching what consumers computed withstrlenbefore.🤖 Generated with Claude Code