Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Update CRAM conversion and round trip tests. #720
Conversation
coveralls
commented
Oct 7, 2016
coveralls
commented
Oct 7, 2016
cmnbroad
referenced
this pull request
in broadinstitute/gatk
Oct 7, 2016
Closed
Implement at least one good roundtrip test bam -> cram -> bam in htsjdk #1661
yfarjoun
added the
cram
label
Nov 22, 2016
vadimzalunin
was assigned
by droazen
Nov 29, 2016
vadimzalunin
requested changes
Jan 24, 2017
except for 2 minor changes looks very good in general, binary BAM comparison is my only concern as this depends on system properties.
| + roundTrippedBAMFile.deleteOnExit(); | ||
| + writeRecordsToFile(cramRecords, roundTrippedBAMFile, referenceFile, samHeader); | ||
| + | ||
| + Assert.assertTrue(compareMD5Digests(roundTrippedBAMFile, originalBAMInputFile)); |
vadimzalunin
Jan 24, 2017
Contributor
not sure about binary equality of BAM files, for example changing compression level will break this.
| + try (FileInputStream rtStream = new FileInputStream(tempRoundTrippedBAMFile); | ||
| + DigestInputStream rtDigestStream = new DigestInputStream(rtStream, rtMD); | ||
| + FileInputStream origStream = new FileInputStream(tempOriginalBAMFile); | ||
| + DigestInputStream origDigestStream = new DigestInputStream(origStream, origMD);) { |
| + final List<SAMRecord> recs, | ||
| + final File targetFile, | ||
| + final File referenceFile, | ||
| + final SAMFileHeader samHeader) throws IOException { |
|
Its fine with me - this PR only has test changes. |
codecov-io
commented
Feb 7, 2017
•
Codecov Report@@ Coverage Diff @@
## master #720 +/- ##
===============================================
+ Coverage 64.623% 64.737% +0.114%
- Complexity 7113 7137 +24
===============================================
Files 525 525
Lines 31679 31679
Branches 5414 5414
===============================================
+ Hits 20472 20508 +36
+ Misses 9061 9029 -32
+ Partials 2146 2142 -4
Continue to review full report at Codecov.
|
|
I'm not sure why the codecov report shows a change in src/main/java/htsjdk/samtools/util/AsyncBufferedIterator.java that looks unrelated to this PR, but is looks to be timing related. The tests are passing, so I"m merging. |
cmnbroad
merged commit 7ef0a84
into
samtools:master
Feb 8, 2017
3 of 4 checks passed
cmnbroad
deleted the
cmnbroad:cn_cram_roundtrip branch
Feb 10, 2017
vadimzalunin
added a commit
to vadimzalunin/htsjdk
that referenced
this pull request
Mar 14, 2017
|
|
cmnbroad + vadimzalunin |
42146d7
|
cmnbroad commentedOct 7, 2016
•
edited by yfarjoun
The existing CRAM compliance tests do only partial record validation after conversion, rather than testing for full record equality. This PR separates out the tests that fail if full record validation is used (tickets filed) and:
-changes the remaining tests to require full SAMRecord equality.
-Adds a BAM->CRAM->BAM round trip validation test based on an NA12878 subset.
-Removes a couple of unreferenced or duplicate alignment and reference files.
Checklist