-
Notifications
You must be signed in to change notification settings - Fork 597
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
Trim intervals loaded from interval files. #6375
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cmnbroad I'm not sure this handles every case yet.
ret.add(glParser.parseGenomeLoc(line)); | ||
final String trimmedLine = line.trim(); | ||
if (!trimmedLine.isEmpty()) { | ||
ret.add(glParser.parseGenomeLoc(trimmedLine)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is at least one other call to parseGenomeLoc that are still not trimmed. See line 332. I think it should also be trimmed or the trimming should just be pushed down into parseGenomeLoc as well to be sure that it always happens.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added trim call to GenomeParserLoc, with a test.
@Test | ||
public void testIntervalFileIntervalsAreTrimmed() throws Exception { | ||
final GenomeLoc expectedGenomeLoc = hg19GenomeLocParser.createGenomeLoc("1", 1, 10); | ||
final File gatkIntervalFile = createTempFile("testIntervalFileIntervalsAreTrimmed", ".intervals.list", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Huh, I've never seen this method which creates the temp file and writes to it before. That seems useful. Maybe it should be promote somewhere.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I moved it to IOUtils with other methods with similar functionality, though now its no longer test-only.
Back to you @lbergelson . |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Fixes #6371.