1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
|
Author: Andreas Tille <tille@debian.org>
Last-Update: Tue, 15 Dec 2015 11:35:22 +0100
Bug-Debian: https://bugs.debian.org/716581
https://bugs.debian.org/716505
Description: Fix Mayhem issues
--- a/Main.cc
+++ b/Main.cc
@@ -210,11 +210,13 @@ int main (int argc, char **argv){
ProbabilisticModel (initDistrib, gapOpen, gapExtend, emitPairs, emitSingle),
initDistrib, gapOpen, gapExtend, emitPairs, emitSingle);
- if (!enableAllPairs){
- if (enableClustalWOutput)
- alignment->WriteALN (cout);
- else
- alignment->WriteMFA (cout);
+ if (alignment) {
+ if (!enableAllPairs){
+ if (enableClustalWOutput)
+ alignment->WriteALN (cout);
+ else
+ alignment->WriteMFA (cout);
+ }
}
delete alignment;
delete sequences;
@@ -307,6 +309,10 @@ MultiSequence *DoAlign (MultiSequence *s
assert (sequences);
const int numSeqs = sequences->GetNumSequences();
+ if (numSeqs == 0) {
+ fprintf(stderr, "Zero sequences delivered to function DoAlign()\n");
+ return NULL;
+ }
VVF distances (numSeqs, VF (numSeqs, 0));
SafeVector<SafeVector<SparseMatrix *> > sparseMatrices (numSeqs, SafeVector<SparseMatrix *>(numSeqs, NULL));
|