EddyRivasLab / hmmer

HMMER: biological sequence analysis using profile HMMs
http://hmmer.org
Other
317 stars 70 forks source link

Memory crash in hmmpfam. #36

Closed traviswheeler closed 7 years ago

traviswheeler commented 7 years ago

ID h26 TITLE Memory crash in hmmpfam. STATUS CLOSED XREF STL7 p.122. REPORTED_BY Gary Montry montry@spsoft.com, 15 Aug 2003. OPENED_DATE SRE, Wed Oct 1 12:29:25 2003 CLOSED_DATE SRE, Thu Oct 2 11:20:00 2003 DESCRIPTION
hmmpfam search with 125,000aa sequence eventually crashes because of lack of RAM, instead of successfully using small memory routines.

Problem is that the code assumed that M,N can't both grow in allocating a matrix, but that's not true in hmmpfam; after P7SmallViterbi(), we may hand various sized bits of sequence off for subalignment, with different sized models.

Wrote P7ViterbiSpaceOK(); used it instead of P7ViterbiSize() to switch between normal and small variants; allow creation routine to grow in M and N (padM and padN can both be positive); make initial allocs for hmmpfam matrices to be 300x300, to avoid pathologically asymmetric matrices.