[med-svn] [Git][med-team/last-align][master] 4 commits: routine-update: New upstream version

Michael R. Crusoe gitlab at salsa.debian.org
Sun May 10 12:58:33 BST 2020



Michael R. Crusoe pushed to branch master at Debian Med / last-align


Commits:
f45477d6 by Michael R. Crusoe at 2020-05-10T13:54:29+02:00
routine-update: New upstream version

- - - - -
adc5d4bf by Michael R. Crusoe at 2020-05-10T13:54:30+02:00
New upstream version 1061
- - - - -
1ccf9750 by Michael R. Crusoe at 2020-05-10T13:54:31+02:00
Update upstream source from tag 'upstream/1061'

Update to upstream version '1061'
with Debian dir cbf4b2fe73fed25e728e720204a766e1ecd14b09
- - - - -
830a97da by Michael R. Crusoe at 2020-05-10T13:58:01+02:00
release 1061-1 to unstable

- - - - -


4 changed files:

- ChangeLog.txt
- debian/changelog
- src/tantan.cc
- src/version.hh


Changes:

=====================================
ChangeLog.txt
=====================================
@@ -1,8 +1,14 @@
+2020-05-07  Martin C. Frith  <Martin C. Frith>
+
+	* src/tantan.cc:
+	Make tantan repeat-finding faster
+	[543d36d39ce3] [tip]
+
 2020-03-16  Martin C. Frith  <Martin C. Frith>
 
 	* src/split/cbrc_split_aligner.cc, src/split/cbrc_split_aligner.hh:
 	Reduce last-split memory & time usage a bit
-	[ca3f417edc01] [tip]
+	[ca3f417edc01]
 
 	* src/split/cbrc_int_exponentiator.hh:
 	Make last-split a bit faster


=====================================
debian/changelog
=====================================
@@ -1,3 +1,10 @@
+last-align (1061-1) unstable; urgency=medium
+
+  * Team upload.
+  * New upstream version
+
+ -- Michael R. Crusoe <michael.crusoe at gmail.com>  Sun, 10 May 2020 13:57:46 +0200
+
 last-align (1060-5) unstable; urgency=medium
 
   * Team upload.


=====================================
src/tantan.cc
=====================================
@@ -274,6 +274,10 @@ struct Tantan {
     return seqPtr - seqBeg < maxRepeatOffset;
   }
 
+  int maxOffsetInTheSequence() {
+    return isNearSeqBeg() ? (seqPtr - seqBeg) : maxRepeatOffset;
+  }
+
   const uchar *seqFurthestBack() {
     return isNearSeqBeg() ? seqBeg : seqPtr - maxRepeatOffset;
   }
@@ -296,6 +300,50 @@ struct Tantan {
     }
   }
 
+  void calcForwardTransitionAndEmissionProbs() {
+    if (endGapProb > 0) {
+      calcForwardTransitionProbsWithGaps();
+      calcEmissionProbs();
+      return;
+    }
+
+    double b = backgroundProb;
+    double fromForeground = 0;
+    double *foregroundBeg = BEG(foregroundProbs);
+    const double *lrRow = likelihoodRatioMatrix[*seqPtr];
+    int maxOffset = maxOffsetInTheSequence();
+
+    for (int i = 0; i < maxOffset; ++i) {
+      double f = foregroundBeg[i];
+      fromForeground += f;
+      foregroundBeg[i] = (b * b2fProbs[i] + f * f2f0) * lrRow[seqPtr[-i-1]];
+    }
+
+    backgroundProb = b * b2b + fromForeground * f2b;
+  }
+
+  void calcEmissionAndBackwardTransitionProbs() {
+    if (endGapProb > 0) {
+      calcEmissionProbs();
+      calcBackwardTransitionProbsWithGaps();
+      return;
+    }
+
+    double toBackground = f2b * backgroundProb;
+    double toForeground = 0;
+    double *foregroundBeg = BEG(foregroundProbs);
+    const double *lrRow = likelihoodRatioMatrix[*seqPtr];
+    int maxOffset = maxOffsetInTheSequence();
+
+    for (int i = 0; i < maxOffset; ++i) {
+      double f = foregroundBeg[i] * lrRow[seqPtr[-i-1]];
+      toForeground += b2fProbs[i] * f;
+      foregroundBeg[i] = toBackground + f2f0 * f;
+    }
+
+    backgroundProb = b2b * backgroundProb + toForeground;
+  }
+
   void rescale(double scale) {
     backgroundProb *= scale;
     multiplyAll(foregroundProbs, scale);
@@ -322,8 +370,7 @@ struct Tantan {
     initializeForwardAlgorithm();
 
     while (seqPtr < seqEnd) {
-      calcForwardTransitionProbs();
-      calcEmissionProbs();
+      calcForwardTransitionAndEmissionProbs();
       rescaleForward();
       *letterProbs = static_cast<float>(backgroundProb);
       ++letterProbs;
@@ -343,8 +390,7 @@ struct Tantan {
       // a sequence:
       *letterProbs = 1 - static_cast<float>(nonRepeatProb);
       rescaleBackward();
-      calcEmissionProbs();
-      calcBackwardTransitionProbs();
+      calcEmissionAndBackwardTransitionProbs();
     }
 
     double z2 = backwardTotal();


=====================================
src/version.hh
=====================================
@@ -1 +1 @@
-"1060"
+"1061"



View it on GitLab: https://salsa.debian.org/med-team/last-align/-/compare/23dffa5cdb44a6a0af9144d40e73ecdaf3d921c9...830a97da55db70d0389a90a825c4b2c4d654f5bb

-- 
View it on GitLab: https://salsa.debian.org/med-team/last-align/-/compare/23dffa5cdb44a6a0af9144d40e73ecdaf3d921c9...830a97da55db70d0389a90a825c4b2c4d654f5bb
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20200510/987f1116/attachment-0001.html>


More information about the debian-med-commit mailing list