[med-svn] [gmap] 10/12: Imported Upstream version 2015-12-31.v6
Alex Mestiashvili
malex-guest at moszumanska.debian.org
Fri Jan 29 15:33:07 UTC 2016
This is an automated email from the git hooks/post-receive script.
malex-guest pushed a commit to branch master
in repository gmap.
commit 8a67df83267430406283c667d6b6e079b584cdd0
Author: Alexandre Mestiashvili <alex at biotec.tu-dresden.de>
Date: Fri Jan 29 16:16:14 2016 +0100
Imported Upstream version 2015-12-31.v6
---
ChangeLog | 5 ++
src/dynprog_genome.c | 139 +++++++++++++++++++++++----------------------------
2 files changed, 67 insertions(+), 77 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 950af6e..cb8f107 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2016-01-21 twu
+
+ * dynprog_genome.c: Fixed bug in checking bestrL before it is computed,
+ resulting in no splicing solutions
+
2016-01-15 twu
* stage1hr.c: Fixed array overflow involving MAX_ANCHORS algorithm
diff --git a/src/dynprog_genome.c b/src/dynprog_genome.c
index 8e41ef3..5687b0f 100644
--- a/src/dynprog_genome.c
+++ b/src/dynprog_genome.c
@@ -1,4 +1,4 @@
-static char rcsid[] = "$Id: dynprog_genome.c 181911 2016-01-07 21:25:51Z twu $";
+static char rcsid[] = "$Id: dynprog_genome.c 182795 2016-01-21 19:51:16Z twu $";
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
@@ -787,7 +787,7 @@ bridge_intron_gap_8_intron_level (int *bestrL, int *bestrR, int *bestcL, int *be
}
*best_introntype = NONINTRON;
- return (int) bestscore;
+ return bestscore;
}
@@ -1455,11 +1455,13 @@ bridge_intron_gap_8_site_level (int *bestrL, int *bestrR, int *bestcL, int *best
FREEA(left_probabilities);
FREEA(right_probabilities);
- if (halfp == true) {
+ if (bestscore < 0) {
+ return bestscore;
+ } else if (halfp == true) {
scoreI = intron_score(&introntype,leftdi[*bestcL],rightdi[*bestcR],cdna_direction,canonical_reward,finalp);
- return (int) (bestscore - scoreI/2);
+ return (bestscore - scoreI/2);
} else {
- return (int) bestscore;
+ return bestscore;
}
}
@@ -1542,9 +1544,11 @@ bridge_intron_gap_8_ud (int *bestrL, int *bestrR, int *bestcL, int *bestcR,
}
#endif
- get_splicesite_probs(&(*left_prob),&(*right_prob),*bestcL,*bestcR,
- left_known,right_known,leftoffset,rightoffset,chroffset,chrhigh,
- cdna_direction,watsonp);
+ if (finalscore >= 0) {
+ get_splicesite_probs(&(*left_prob),&(*right_prob),*bestcL,*bestcR,
+ left_known,right_known,leftoffset,rightoffset,chroffset,chrhigh,
+ cdna_direction,watsonp);
+ }
FREEA(right_known);
FREEA(left_known);
@@ -1794,7 +1798,7 @@ bridge_intron_gap_16_intron_level (int *bestrL, int *bestrR, int *bestcL, int *b
}
*best_introntype = NONINTRON;
- return (int) bestscore;
+ return bestscore;
}
@@ -2461,11 +2465,13 @@ bridge_intron_gap_16_site_level (int *bestrL, int *bestrR, int *bestcL, int *bes
FREEA(left_probabilities);
FREEA(right_probabilities);
- if (halfp == true) {
+ if (bestscore < 0) {
+ return bestscore;
+ } else if (halfp == true) {
scoreI = intron_score(&introntype,leftdi[*bestcL],rightdi[*bestcR],cdna_direction,canonical_reward,finalp);
- return (int) (bestscore - scoreI/2);
+ return (bestscore - scoreI/2);
} else {
- return (int) bestscore;
+ return bestscore;
}
}
@@ -2550,9 +2556,11 @@ bridge_intron_gap_16_ud (int *bestrL, int *bestrR, int *bestcL, int *bestcR,
}
#endif
- get_splicesite_probs(&(*left_prob),&(*right_prob),*bestcL,*bestcR,
- left_known,right_known,leftoffset,rightoffset,chroffset,chrhigh,
- cdna_direction,watsonp);
+ if (finalscore >= 0) {
+ get_splicesite_probs(&(*left_prob),&(*right_prob),*bestcL,*bestcR,
+ left_known,right_known,leftoffset,rightoffset,chroffset,chrhigh,
+ cdna_direction,watsonp);
+ }
FREEA(right_known);
FREEA(left_known);
@@ -2661,7 +2669,7 @@ bridge_intron_gap_intron_level (int *bestrL, int *bestrR, int *bestcL, int *best
}
*best_introntype = NONINTRON;
- return (int) bestscore;
+ return bestscore;
}
@@ -3106,11 +3114,13 @@ bridge_intron_gap_site_level (int *bestrL, int *bestrR, int *bestcL, int *bestcR
FREEA(left_probabilities);
FREEA(right_probabilities);
- if (halfp == true) {
+ if (bestscore < 0) {
+ return bestscore;
+ } else if (halfp == true) {
scoreI = intron_score(&introntype,leftdi[*bestcL],rightdi[*bestcR],cdna_direction,canonical_reward,finalp);
- return (int) (bestscore - scoreI/2);
+ return (bestscore - scoreI/2);
} else {
- return (int) bestscore;
+ return bestscore;
}
}
@@ -3204,9 +3214,11 @@ bridge_intron_gap (int *bestrL, int *bestrR, int *bestcL, int *bestcR,
}
#endif
- get_splicesite_probs(&(*left_prob),&(*right_prob),*bestcL,*bestcR,
- left_known,right_known,leftoffset,rightoffset,chroffset,chrhigh,
- cdna_direction,watsonp);
+ if (finalscore >= 0) {
+ get_splicesite_probs(&(*left_prob),&(*right_prob),*bestcL,*bestcR,
+ left_known,right_known,leftoffset,rightoffset,chroffset,chrhigh,
+ cdna_direction,watsonp);
+ }
FREEA(right_known);
FREEA(left_known);
@@ -3743,25 +3755,16 @@ Dynprog_genome_gap (int *dynprogindex, int *finalscore, int *new_leftgenomepos,
#endif
mismatchtype,open,extend,lbandR,/*for revp true*/!jump_late_p,/*revp*/true);
- if (bestrL < 0) {
- debug3(printf("No solution found\n"));
- FREEA(rev_gsequenceR_alt);
- FREEA(rev_gsequenceR);
- FREEA(gsequenceL_alt);
- FREEA(gsequenceL);
-
- return (List_T) NULL;
-
- } else if ((*finalscore = bridge_intron_gap_8_ud(&bestrL,&bestrR,&bestcL,&bestcR,
- &(*introntype),&(*left_prob),&(*right_prob),
- matrix8L_upper,matrix8L_lower,matrix8R_upper,matrix8R_lower,
- directions8L_upper_nogap,directions8L_lower_nogap,
- directions8R_upper_nogap,directions8R_lower_nogap,
- gsequenceL,gsequenceL_alt,&(rev_gsequenceR[glengthR-1]),&(rev_gsequenceR_alt[glengthR-1]),
- goffsetL,rev_goffsetR,rlength,glengthL,glengthR,
- cdna_direction,watsonp,lbandL,ubandL,lbandR,ubandR,defect_rate,
- canonical_reward,goffsetL,rev_goffsetR,
- chrnum,chroffset,chrhigh,halfp,finalp,jump_late_p)) < 0) {
+ if ((*finalscore = bridge_intron_gap_8_ud(&bestrL,&bestrR,&bestcL,&bestcR,
+ &(*introntype),&(*left_prob),&(*right_prob),
+ matrix8L_upper,matrix8L_lower,matrix8R_upper,matrix8R_lower,
+ directions8L_upper_nogap,directions8L_lower_nogap,
+ directions8R_upper_nogap,directions8R_lower_nogap,
+ gsequenceL,gsequenceL_alt,&(rev_gsequenceR[glengthR-1]),&(rev_gsequenceR_alt[glengthR-1]),
+ goffsetL,rev_goffsetR,rlength,glengthL,glengthR,
+ cdna_direction,watsonp,lbandL,ubandL,lbandR,ubandR,defect_rate,
+ canonical_reward,goffsetL,rev_goffsetR,
+ chrnum,chroffset,chrhigh,halfp,finalp,jump_late_p)) < 0) {
FREEA(rev_gsequenceR_alt);
FREEA(rev_gsequenceR);
FREEA(gsequenceL_alt);
@@ -3886,25 +3889,16 @@ Dynprog_genome_gap (int *dynprogindex, int *finalscore, int *new_leftgenomepos,
#endif
mismatchtype,open,extend,lbandR,/*for revp true*/!jump_late_p,/*revp*/true);
- if (bestrL < 0) {
- debug3(printf("No solution found\n"));
- FREEA(rev_gsequenceR_alt);
- FREEA(rev_gsequenceR);
- FREEA(gsequenceL_alt);
- FREEA(gsequenceL);
-
- return (List_T) NULL;
-
- } else if ((*finalscore = bridge_intron_gap_16_ud(&bestrL,&bestrR,&bestcL,&bestcR,
- &(*introntype),&(*left_prob),&(*right_prob),
- matrix16L_upper,matrix16L_lower,matrix16R_upper,matrix16R_lower,
- directions16L_upper_nogap,directions16L_lower_nogap,
- directions16R_upper_nogap,directions16R_lower_nogap,
- gsequenceL,gsequenceL_alt,&(rev_gsequenceR[glengthR-1]),&(rev_gsequenceR_alt[glengthR-1]),
- goffsetL,rev_goffsetR,rlength,glengthL,glengthR,
- cdna_direction,watsonp,lbandL,ubandL,lbandR,ubandR,defect_rate,
- canonical_reward,goffsetL,rev_goffsetR,
- chrnum,chroffset,chrhigh,halfp,finalp,jump_late_p)) < 0) {
+ if ((*finalscore = bridge_intron_gap_16_ud(&bestrL,&bestrR,&bestcL,&bestcR,
+ &(*introntype),&(*left_prob),&(*right_prob),
+ matrix16L_upper,matrix16L_lower,matrix16R_upper,matrix16R_lower,
+ directions16L_upper_nogap,directions16L_lower_nogap,
+ directions16R_upper_nogap,directions16R_lower_nogap,
+ gsequenceL,gsequenceL_alt,&(rev_gsequenceR[glengthR-1]),&(rev_gsequenceR_alt[glengthR-1]),
+ goffsetL,rev_goffsetR,rlength,glengthL,glengthR,
+ cdna_direction,watsonp,lbandL,ubandL,lbandR,ubandR,defect_rate,
+ canonical_reward,goffsetL,rev_goffsetR,
+ chrnum,chroffset,chrhigh,halfp,finalp,jump_late_p)) < 0) {
FREEA(rev_gsequenceR_alt);
FREEA(rev_gsequenceR);
@@ -4011,23 +4005,14 @@ Dynprog_genome_gap (int *dynprogindex, int *finalscore, int *new_leftgenomepos,
mismatchtype,open,extend,lbandL,ubandR,
/*for revp true*/!jump_late_p,/*revp*/true,/*saturation*/NEG_INFINITY_INT);
- if (bestrL < 0) {
- debug3(printf("No solution found\n"));
- FREEA(gsequenceL_alt);
- FREEA(rev_gsequenceR_alt);
- FREEA(gsequenceL);
- FREEA(rev_gsequenceR);
-
- return (List_T) NULL;
-
- } else if ((*finalscore = bridge_intron_gap(&bestrL,&bestrR,&bestcL,&bestcR,
- &(*introntype),&(*left_prob),&(*right_prob),
- matrixL,matrixR,directionsL_nogap,directionsR_nogap,
- gsequenceL,gsequenceL_alt,&(rev_gsequenceR[glengthR-1]),&(rev_gsequenceR_alt[glengthR-1]),
- goffsetL,rev_goffsetR,rlength,glengthL,glengthR,
- cdna_direction,watsonp,extraband_paired,defect_rate,
- canonical_reward,goffsetL,rev_goffsetR,
- chrnum,chroffset,chrhigh,halfp,finalp,jump_late_p)) < 0) {
+ if ((*finalscore = bridge_intron_gap(&bestrL,&bestrR,&bestcL,&bestcR,
+ &(*introntype),&(*left_prob),&(*right_prob),
+ matrixL,matrixR,directionsL_nogap,directionsR_nogap,
+ gsequenceL,gsequenceL_alt,&(rev_gsequenceR[glengthR-1]),&(rev_gsequenceR_alt[glengthR-1]),
+ goffsetL,rev_goffsetR,rlength,glengthL,glengthR,
+ cdna_direction,watsonp,extraband_paired,defect_rate,
+ canonical_reward,goffsetL,rev_goffsetR,
+ chrnum,chroffset,chrhigh,halfp,finalp,jump_late_p)) < 0) {
FREEA(gsequenceL_alt);
FREEA(rev_gsequenceR_alt);
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/gmap.git
More information about the debian-med-commit
mailing list