ultimatesource / denovogear

A program to detect denovo-variants using next-generation sequencing data.
http://www.nature.com/nmeth/journal/v10/n10/full/nmeth.2611.html
GNU General Public License v3.0
49 stars 25 forks source link

Fix crashes caused by empty pedigrees #230

Closed reedacartwright closed 7 years ago

reedacartwright commented 7 years ago

dng::io::BamPileup::SelectLibraries forgets to clear the read_group_to_libraries_ map, resulting in invalid or out-of-date indexes being returned to connect read-groups to libraries.

dng::io::BamPileup now requires RG information for reads, which means that specifying one file per read-group is no longer supported. This feature had not been well maintained or supported through version, so I am retiring it.

dng::io::VcfPileup::SelectLibraries now passes nullptr to bcf_hdr_set_samples to remove all samples from the input. This prevents a cryptic error message.

Tests were added to DngCall to verify that the crashes are fixed. This requires an update of TESTDATA information.

codecov[bot] commented 7 years ago

Codecov Report

Merging #230 into develop will increase coverage by 0.1%. The diff coverage is 37.5%.

Impacted file tree graph

@@            Coverage Diff            @@
##           develop    #230     +/-   ##
=========================================
+ Coverage    66.99%   67.1%   +0.1%     
=========================================
  Files           70      70             
  Lines         6517    6520      +3     
  Branches      1139    1140      +1     
=========================================
+ Hits          4366    4375      +9     
+ Misses        1688    1684      -4     
+ Partials       463     461      -2
Impacted Files Coverage Δ
src/include/dng/io/bcf.h 64.81% <0%> (-0.9%) :arrow_down:
src/include/dng/io/bam.h 72% <100%> (+2.26%) :arrow_up:
src/lib/bam.cc 77.98% <50%> (+1.12%) :arrow_up:
src/lib/relationship_graph.cc 72.14% <0%> (+0.16%) :arrow_up:
src/lib/task/call.cc 81.81% <0%> (+0.4%) :arrow_up:
src/include/dng/library.h 55.55% <0%> (+22.22%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 21a2c36...881fdc0. Read the comment docs.