Skip to content

Conversation

@holmeso
Copy link
Contributor

@holmeso holmeso commented May 15, 2025

Description

Skip VCF records that are not in the standard list of contigs. Reason for this is that the annotation sources only supply data for the standard contigs.

Bug in nanno where contig name with numbers and letters (eg chr22_KI270739v1_random) would cause a NumberFormatException has been fixed.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

Additional unit tests have been added, existing tests pass, code has been run on vcf that highlighted these issues and now completes succesfully.

Are WDL Updates Required?

n/a

@holmeso holmeso requested a review from Copilot May 15, 2025 04:54
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes a bug in nanno by ensuring that contig names that include both numbers and letters (e.g. "chr22_KI270739v1_random") no longer cause a NumberFormatException by filtering out non-standard contigs.

  • Updated unit tests for convertContigNameToInt to cover various contig naming conventions
  • Refactored ChrPositionUtils.convertContigNameToInt to use an isDigits helper method and enhanced contig filtering logic in Annotate.java

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
qcommon/test/org/qcmg/common/util/ChrPositionUtilsTest.java Added extensive unit tests for various contig naming patterns
qcommon/src/org/qcmg/common/util/ChrPositionUtils.java Updated contig conversion logic with a new isDigits helper method
qannotate/src/au/edu/qimr/qannotate/nanno/Annotate.java Added contig filtering based on a defined set of standard GRCh38 contigs

@holmeso holmeso merged commit 626b829 into master May 15, 2025
1 check passed
@holmeso holmeso deleted the nanno_contig_int branch May 15, 2025 07:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants