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

Cleaning up old interval code #6465

Merged
merged 3 commits into from
Mar 2, 2020
Merged

Conversation

lbergelson
Copy link
Member

  • Currently things are in a weird state, picard style interval lists are handled either as tribble files if they are named correctly as .interval_list
    If they are named .intervals, .picard, or .list they are loaded with a different code path.
    This unifies it so that picard files are only loaded as .interval_list and .intervals is always considered a Gatk style list

  • This removes the work around for broken 0 length intervals that was put in place a long time ago. However, the workaround was effectively removed
    for all .interval_list files in 4.1.3.0 when we started reading those through the tribble plugin. Either the broken files no longer are used or they
    are misnamed as .intervals

  • fix tests to deal correctly with .inverval_list vs .intervals

* Currently things are in a weird state, picard style interval lists are handled either as tribble files if they are named correctly as .interval_list
  If they are named .intervals, .picard, or .list they are loaded with a different code path.
  This unifies it so that picard files are only loaded as .interval_list and .intervals is always considered a Gatk style list

* This removes the work around for broken 0 length intervals that was put in place a long time ago. However, the workaround was effectively removed
  for all .interval_list files in 4.1.3.0 when we started reading those through the tribble plugin.  Either the broken files no longer are used or they
  are misnamed as .intervals

* fix tests to deal correctly with .inverval_list vs .intervals
@lbergelson
Copy link
Member Author

relevant issue is #2520

@gatk-bot
Copy link

gatk-bot commented Feb 21, 2020

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

Test Type JDK Job ID Logs
unit openjdk11 29238.14 logs
integration oraclejdk8 29238.12 logs
unit openjdk8 29238.3 logs
integration openjdk11 29238.13 logs
integration openjdk8 29238.2 logs

@lbergelson
Copy link
Member Author

@cmnbroad Maybe you can review this one?

Copy link
Collaborator

@cmnbroad cmnbroad left a comment

Choose a reason for hiding this comment

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

Two minor nits, good to go whatever you decide. Otherwise looks like a nice cleanup.

// If it's neither a Feature-containing file nor an interval file, but is an existing file, throw an error.
// Note that since contigs can contain periods in their names, we can't use the mere presence of an "extension"
// as evidence that the user intended the String to be interpreted as a file.
else if ( new File(arg).exists() ) {
throw new UserException.CouldNotReadInputFile(arg, String.format("The file %s exists, but does not contain Features " +
"(ie., is not in a supported Feature file format such as vcf, bcf, or bed), " +
"and does not have one of the supported interval file extensions (" + INTERVAL_FILE_EXTENSIONS + "). " +
"and does not have one of the supported interval file extensions (" + GATK_INTERVAL_FILE_EXTENSIONS + "). " +
Copy link
Collaborator

Choose a reason for hiding this comment

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

Kind of a nit, but this error message will no longer include ".interval_list", which is an acceptable extension.

Copy link
Member Author

Choose a reason for hiding this comment

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

technically interval_list is a feature file now

}
return ret;
} catch (final UserException e){
throw e;
Copy link
Collaborator

Choose a reason for hiding this comment

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

This block seems unnecessary ? It might be better to just rely on the next catch block, which will always include the inputPath name.

Copy link
Member Author

Choose a reason for hiding this comment

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

I think I thought it might replace a more specific error with a less specific one. Since userexceptions don't show the stack trace you'd lose the underlying one in most cases.

@lbergelson lbergelson merged commit 5e5ee07 into master Mar 2, 2020
@lbergelson lbergelson deleted the lb_cleanup_old_interval_code branch March 2, 2020 16: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.

3 participants