Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Fix for issue #513: NPE in ValidateSamFile with CRAM #735
Conversation
coveralls
commented
Oct 28, 2016
|
@yfarjoun could you take a look, please? |
yfarjoun
added the
cram
label
Nov 22, 2016
vadimzalunin
was assigned
by droazen
Jan 10, 2017
|
Can you review? |
| + validationStringency(ValidationStringency.SILENT). | ||
| + referenceSequence(new File(TEST_DATA_DIR, "nm_tag_validation.fa")). | ||
| + open(new File(TEST_DATA_DIR, "nm_tag_validation.cram")); | ||
| + final ReferenceSequenceFile reference = new FastaSequenceFile(new File(TEST_DATA_DIR, "nm_tag_validation.fa"), true); |
vadimzalunin
Jan 24, 2017
Contributor
just to be sure there is no index/dictionary involved:
final ReferenceSequenceFile reference = new FastaSequenceFile(new File(TEST_DATA_DIR, "nm_tag_validation.fa"), true);
final SamReader samReader = SamReaderFactory.
makeDefault().
validationStringency(ValidationStringency.SILENT).
referenceSource(new ReferenceSource(reference)).
...
ekazachkova
Jan 30, 2017
Contributor
@vadimzalunin I can not understand why do we need this check: this test will always fail since cram reader can't work with reference without index. Could you please clarify your comment?
|
Also, we have discovered that our test data aren't valid: cram file is not paired with reference. So we have regenerated them. |
|
Could you please check the CRAM file? Reference MD5 checksums don't seem to match.
|
|
ooops, @vadimzalunin thanks for remark |
|
verbal thumbs from vadim. |
yfarjoun
merged commit 6d22658
into
samtools:master
Mar 7, 2017
magicDGS
added a commit
to magicDGS/htsjdk
that referenced
this pull request
Mar 8, 2017
|
|
ekazachkova + magicDGS |
78ca562
|
ekazachkova commentedOct 28, 2016
Fix for issue #513:
Current Htsjdk implementation throws NullPointerException during NM tag validation in SamFileValidator because getSequenceDictionary() method in ReferenceFileWalker returns null without .dict file. We propose check result of getSequenceDictionary() for null. If this method returns null don't throw any exceptions and continue processing as if reference isn't indexed. Also, we added new unit test to check code correctness.
Checklist