Skip to content

Conversation

@holmeso
Copy link
Contributor

@holmeso holmeso commented Apr 18, 2024

Description

Updated qprofiler so that it will only attempt to cast/parse SAM attribute into a particular type if it is an instanceof that type.

Fixes # 353

Type of change

Please delete options that are not relevant.

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

How Has This Been Tested?

Unit test has been added and code has been run against BAM file that produced the error originally (successfully)

Are WDL Updates Required?

no

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Another Check the type of the attribute before attempting to parse it to Integer/Character/etc

fix #353
@holmeso
Copy link
Contributor Author

holmeso commented Apr 18, 2024

Apologies - this is hard to review because of the whole file formatting that I did. Key lines of BamSummaryReport file are 579-588, and 629-645.

@delocalizer delocalizer self-assigned this Apr 18, 2024
Copy link
Contributor

@delocalizer delocalizer left a comment

Choose a reason for hiding this comment

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

Looks good, thanks for the fix!

}
}

parseStringAttribute(record.getAttribute("RG"), tagRGLineLengths);
Copy link
Contributor

Choose a reason for hiding this comment

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

I understand that this parse* naming is consistent with the usage already established in this file but would you consider using instead aggregate* or accumulate* for these two new methods.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yep - good idea

@holmeso holmeso merged commit 3d10edf into master Apr 19, 2024
@holmeso holmeso deleted the qp_tags_gub branch April 19, 2024 01:36
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