+
Skip to content

Fail to infer insert size distribution when no pairs are within boundaries (re issue 108) #141

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

Merged
merged 1 commit into from
Jul 30, 2017

Conversation

jmarshall
Copy link
Contributor

@tillea's issue #108 appears to be caused by there being no sufficiently good pairs when calculating avg and std, leading to avg=NAN std=NAN and a later malloc failure when asked to malloc an insane amount of memory.

This suggested patch returns from bsw2_stat() with r.failed = 1 in this case, as in other cases of insufficient read pairs. I am not familiar enough with the implications of “failure to infer insert size distribution” to judge whether this is the best approach.

Just as we set r.failed and return early if there are no high-quality
read pairs at all, also do so if there are none within the calculated
boundaries.  This avoids returning avg=NAN std=NAN, which leads to
malloc(INFINITY) and a crash; fixes lh3#108.
@lh3 lh3 merged commit 87ed015 into lh3:master Jul 30, 2017
@jmarshall jmarshall deleted the bwasw-nan branch July 31, 2017 08:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载