Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed a bug where invalid feature file intervals weren't being checked for validity against the sequence dictionary #7295

Merged
merged 8 commits into from Jun 22, 2021

Conversation

jamesemery
Copy link
Collaborator

Fixes #7289

Copy link
Collaborator

@droazen droazen left a comment

Choose a reason for hiding this comment

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

@jamesemery Back to you with my comments

@@ -405,7 +405,7 @@ public GenomeLoc createGenomeLoc(final Feature feature) {
*/
public GenomeLoc createGenomeLoc(final Locatable locatable) {
Utils.nonNull(locatable, "the input locatable cannot be null");
return createGenomeLoc(locatable.getContig(), locatable.getStart(), locatable.getEnd());
return createGenomeLoc(locatable.getContig(), locatable.getStart(), locatable.getEnd(), true);
Copy link
Collaborator

Choose a reason for hiding this comment

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

There are a number of other overloads of createGenomeLoc() above, and some appear to default to false for mustBeOnReference. For example, public GenomeLoc createGenomeLoc(String contig, int index, final int start, final int stop). Have you confirmed that these additional overloads are not used in any of the interval loading codepaths? Should we create a ticket to change them to default to true?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'm worried about breaking something or adding expensive validation operations onto some other tools accidentally. I'll create a ticket to do this audit at this point and we can tackle this later. My priority now is to get this guardrail in for the parser argument that gets triggered by users.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

File outOfBoundsBedFile = new File(INTERVAL_TEST_DATA + "bad_interval_span.bed"); // this bed file has a bogus interval the extends past the end of the
// this should throw a user exception because of the invalid interval
IntervalUtils.featureFileToIntervals(hg19GenomeLocParser, outOfBoundsBedFile.getAbsolutePath());
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Add similar tests with an out-of-bounds interval in Picard and GATK format interval files

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

added

@jamesemery
Copy link
Collaborator Author

@droazen responded to comments and back to you.

@jamesemery jamesemery assigned droazen and unassigned jamesemery Jun 9, 2021
@jamesemery jamesemery force-pushed the je_edgecaseInActivityProfileState branch from f46f525 to 4aa6737 Compare June 11, 2021 16:27
@jamesemery
Copy link
Collaborator Author

jamesemery commented Jun 14, 2021

@droazen I would rather not get into why exactly the CNV tests are relying on bogus intervals that don't pass validation and what to do about it on this branch. I would rather get this version of things in now to help in at least the -L interval file use case

Copy link
Collaborator

@droazen droazen left a comment

Choose a reason for hiding this comment

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

@jamesemery Back to you with a few additional comments

@jamesemery
Copy link
Collaborator Author

@droazen responded

@gatk-bot
Copy link

Travis reported job failures from build 34651
Failures in the following jobs:

Test Type JDK Job ID Logs
integration openjdk11 34651.12 logs

@jamesemery
Copy link
Collaborator Author

@droazen this has passed tests

Copy link
Collaborator

@droazen droazen left a comment

Choose a reason for hiding this comment

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

+1

@droazen droazen merged commit 7893010 into master Jun 22, 2021
@droazen droazen deleted the je_edgecaseInActivityProfileState branch June 22, 2021 17:32
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.

4.2.0.0 : HC java.lang.IllegalStateException: Padded span must contain active span
3 participants