Author: tille
Date: 2008-12-10 16:22:25 +0000 (Wed, 10 Dec 2008)
New Revision: 2767

Added:
   trunk/packages/euler2/trunk/debian/patches/20_exit_better_than_crash.patch
Modified:
   trunk/packages/euler2/trunk/debian/patches/20_perl_warnings.patch
   trunk/packages/euler2/trunk/debian/patches/series
Log:
Euler2 has a limit of 75000 sequences hardcoded.  I have no idea in how far it 
might make
sense to simply increase this number or whether there are other constraints 
given the fact
that there does not exist a check for exceeding this limit.


Added: 
trunk/packages/euler2/trunk/debian/patches/20_exit_better_than_crash.patch
===================================================================
--- trunk/packages/euler2/trunk/debian/patches/20_exit_better_than_crash.patch  
                        (rev 0)
+++ trunk/packages/euler2/trunk/debian/patches/20_exit_better_than_crash.patch  
2008-12-10 16:22:25 UTC (rev 2767)
@@ -0,0 +1,20 @@
+File readpar.c contains the definition of the maximum number of sequences:
+      max_seq = 75000;
+but there is no check whether this limit is exceeded somewhere.  If you have
+larger data sets the program trans_qual (and probably others using readseq1by1)
+will just crash.  This check at least results in an error message and exiting
+the program (harsh but at least more helpful than a crash).
+--- euler-2.0.orig/readseq1by1.c
++++ euler-2.0/readseq1by1.c
+@@ -171,6 +171,11 @@
+                       }
+                       n = 0;
+                       k ++;
++                      if ( k > max_seq ) {
++                              fprintf(stderr, "Number of sequence exceeds 
maximum allowed number (%i)\n", max_seq);
++                              fprintf(stderr, "The first string that can not 
be read is '%s'\n", str);
++                              exit(-1);
++                      }
+                       sscanf(&str[1], "%s", src_name[k]);
+               } else {
+                       for(i = 0; i < strlen(str); i ++)       {

Modified: trunk/packages/euler2/trunk/debian/patches/20_perl_warnings.patch
===================================================================
--- trunk/packages/euler2/trunk/debian/patches/20_perl_warnings.patch   
2008-12-10 12:38:53 UTC (rev 2766)
+++ trunk/packages/euler2/trunk/debian/patches/20_perl_warnings.patch   
2008-12-10 16:22:25 UTC (rev 2767)
@@ -23,3 +23,14 @@
        system("mv reads.tmp.score reads.txt.score");
        system("$MYHOME/overlapper-all -i reads.txt -q reads.txt.score -o 
reads.aln -l $overlen -p 200 -d $min_id -H");
        $i = $i + 1;
+--- euler-2.0.orig/eubatch.pl
++++ euler-2.0/eubatch.pl
+@@ -455,7 +455,7 @@
+         if(${quality_file} ne "${fasta_file}.qual")   {
+               `cp ${quality_file} ${fasta_file}.qual`;
+         }
+-        do_cmd($params, "trans_qual", "$EBIN/trans_qual -i $fasta_file -o 
$fasta_file.reads $cmdhtml ");
++        do_cmd($params, "trans_qual", "$EBIN/trans_qual -i $fasta_file -o 
$fasta_file.reads $cmdhtml ") || die("Command trans_qual failed.");
+         do_cmd($params, "errcorr-lapper-pair-mem",
+                "$EBIN/errcorr-lapper-pair-mem.pl ${fasta_file}.reads 
${fasta_file}.reads.score $min_length $min_id");
+       } else {

Modified: trunk/packages/euler2/trunk/debian/patches/series
===================================================================
--- trunk/packages/euler2/trunk/debian/patches/series   2008-12-10 12:38:53 UTC 
(rev 2766)
+++ trunk/packages/euler2/trunk/debian/patches/series   2008-12-10 16:22:25 UTC 
(rev 2767)
@@ -2,3 +2,4 @@
 20_gcc4_static.patch
 10_euler2_path_on_debian.patch
 20_perl_warnings.patch
+20_exit_better_than_crash.patch


_______________________________________________
debian-med-commit mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/debian-med-commit

Reply via email to