File: replace-float-with-double.patch

package info (click to toggle)
seqprep 1.3.2-8
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 64,448 kB
  • sloc: ansic: 2,431; python: 165; sh: 89; makefile: 39
file content (40 lines) | stat: -rw-r--r-- 2,032 bytes parent folder | download | duplicates (5)
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
39
40
Author: Graham Inggs <ginggs@debian.org>
Last-Update: Sun, 27 Sep 2015 11:52:43 +0200
Bug-Debian: http://bugs.debian.org/789829
Description: replace all instances of the 'float' datatype in SeqPrep.c with 'double'

--- a/SeqPrep.c
+++ b/SeqPrep.c
@@ -139,12 +139,12 @@ int main( int argc, char* argv[] ) {
   int min_ol_adapter = DEF_OL2MERGE_ADAPTER;
   int min_ol_reads = DEF_OL2MERGE_READS;
   unsigned short int min_read_len =DEF_MIN_READ_LEN;
-  float min_match_adapter_frac = DEF_MIN_MATCH_ADAPTER;
-  float min_match_reads_frac = DEF_MIN_MATCH_READS;
-  float max_mismatch_adapter_frac = DEF_MAX_MISMATCH_ADAPTER;
-  float max_mismatch_reads_frac = DEF_MAX_MISMATCH_READS;
+  double min_match_adapter_frac = DEF_MIN_MATCH_ADAPTER;
+  double min_match_reads_frac = DEF_MIN_MATCH_READS;
+  double max_mismatch_adapter_frac = DEF_MAX_MISMATCH_ADAPTER;
+  double max_mismatch_reads_frac = DEF_MAX_MISMATCH_READS;
 
-  float read_frac_thresh = DEF_READ_GAP_FRAC_CUTOFF;
+  double read_frac_thresh = DEF_READ_GAP_FRAC_CUTOFF;
   unsigned short max_mismatch_adapter[MAX_SEQ_LEN+1];
   unsigned short max_mismatch_reads[MAX_SEQ_LEN+1];
   unsigned short min_match_adapter[MAX_SEQ_LEN+1];
@@ -312,10 +312,10 @@ int main( int argc, char* argv[] ) {
 
   //Calculate table matching overlap length to min matches and max mismatches
   for(i=0;i<MAX_SEQ_LEN+1;i++){
-    max_mismatch_reads[i] = floor(((float)i)*max_mismatch_reads_frac);
-    max_mismatch_adapter[i] = floor(((float)i)*max_mismatch_adapter_frac);
-    min_match_reads[i] = ceil(((float)i)*min_match_reads_frac);
-    min_match_adapter[i] = ceil(((float)i)*min_match_adapter_frac);
+    max_mismatch_reads[i] = floor(((double)i)*max_mismatch_reads_frac);
+    max_mismatch_adapter[i] = floor(((double)i)*max_mismatch_adapter_frac);
+    min_match_reads[i] = ceil(((double)i)*min_match_reads_frac);
+    min_match_adapter[i] = ceil(((double)i)*min_match_adapter_frac);
   }
   //get length of forward and reverse primers
   int forward_primer_len = strlen(forward_primer);