brentp / somalier

fast sample-swap and relatedness checks on BAMs/CRAMs/VCFs/GVCFs... "like damn that is one smart wine guy"
MIT License
262 stars 35 forks source link

nan values break output .html #13

Closed JosephMcCarter closed 5 years ago

JosephMcCarter commented 5 years ago

One of the sample I used had low coverage (~0.5X) which caused a number of nan's in the html data, which broke it for a cohort of 500 samples.

{"sample":"I-H-134715-T2-1-D1-1","gt_depth_mean":0.0,"gt_depth_std":nan,"gt_depth_skew":nan,"depth_mean":0.1543086172344688,"depth_std":0.5164978344309251,"depth_skew":4.036674201975204,"ab_mean":0.0,"ab_std":nan,"ab_skew":nan,"pct_other_alleles":27.21822541966425,"n_hom_ref":0,"n_het":0,"n_hom_alt":0,"n_unknown":998,"n_known":0},

brentp commented 5 years ago

thanks for reporting. you can probably get around this for now by editing the html file to include:

var nan = NaN

just after the first <script> directive. But I will fix this properly for the next release.

brentp commented 5 years ago

I have just pushed a fix for this. The new release will be out today or tomorrow. Thanks again for reporting.

JosephMcCarter commented 5 years ago

Thank you!