Skip to content
Commits on Source (5)
2020-01-20 Martin C. Frith <Martin C. Frith>
* scripts/last-postmask, test/last-postmask-test.out, test/last-
postmask-test.sh:
last-postmask: fix crash on length-1 DB name
[1015a8df8312] [tip]
* scripts/last-train:
last-train: fix occasional crashes since v1020
[b6a6f4a9d738]
2019-12-23 Martin C. Frith <Martin C. Frith>
* src/Alignment.cc, src/GappedXdropAligner.hh,
src/GappedXdropAlignerDna.cc, src/mcf_simd.hh:
Make it usable without SSE/SIMD
[4270e27518ca] [tip]
[4270e27518ca]
2019-12-20 Martin C. Frith <Martin C. Frith>
......
last-align (1047-1) unstable; urgency=medium
* Team upload.
* New upstream version
-- Michael R. Crusoe <michael.crusoe@gmail.com> Fri, 24 Jan 2020 16:21:19 +0100
last-align (1045-1) unstable; urgency=medium
* Team upload.
......
......@@ -3,8 +3,6 @@ Bug-Debian: https://bugs.debian.org/943148
Author: Andreas Tille <tille@debian.org>
Last-Update: Fri, 22 Nov 2019 11:23:44 +0100
Index: last-align/scripts/last-dotplot
===================================================================
--- last-align.orig/scripts/last-dotplot
+++ last-align/scripts/last-dotplot
@@ -1,4 +1,4 @@
......@@ -13,7 +11,7 @@ Index: last-align/scripts/last-dotplot
# Read pair-wise alignments in MAF or LAST tabular format: write an
# "Oxford grid", a.k.a. dotplot.
@@ -262,12 +262,12 @@ def mergedRanges(ranges):
@@ -262,12 +262,12 @@
yield oldBeg, maxEnd
def mergedRangesPerSeq(coverDict):
......@@ -28,7 +26,7 @@ Index: last-align/scripts/last-dotplot
def trimmed(seqRanges, coverDict, minAlignedBases, maxGapFrac, endPad, midPad):
maxEndGapFrac, maxMidGapFrac = twoValuesFromOption(maxGapFrac, ",")
@@ -308,7 +308,7 @@ def rangesWithStrandInfo(seqRanges, stra
@@ -308,7 +308,7 @@
def natural_sort_key(my_string):
'''Return a sort key for "natural" ordering, e.g. chr9 < chr10.'''
parts = re.split(r'(\d+)', my_string)
......@@ -37,7 +35,7 @@ Index: last-align/scripts/last-dotplot
return parts
def nameKey(oneSeqRanges):
@@ -577,7 +577,7 @@ def drawJoins(im, alignments, bpPerPix,
@@ -577,7 +577,7 @@
def expandedSeqDict(seqDict):
'''Allow lookup by short sequence names, e.g. chr7 as well as hg19.chr7.'''
newDict = seqDict.copy()
......@@ -46,7 +44,7 @@ Index: last-align/scripts/last-dotplot
if "." in name:
base = name.split(".")[-1]
if base in newDict: # an ambiguous case was found:
@@ -611,7 +611,7 @@ def readBed(fileName, rangeDict):
@@ -611,7 +611,7 @@
yield layer, color, seqName, beg, end
def commaSeparatedInts(text):
......@@ -55,8 +53,6 @@ Index: last-align/scripts/last-dotplot
def readGenePred(opts, fileName, rangeDict):
for line in myOpen(fileName):
Index: last-align/scripts/last-map-probs
===================================================================
--- last-align.orig/scripts/last-map-probs
+++ last-align/scripts/last-map-probs
@@ -1,4 +1,4 @@
......@@ -65,8 +61,6 @@ Index: last-align/scripts/last-map-probs
# Copyright 2010, 2011, 2012, 2014 Martin C. Frith
Index: last-align/scripts/last-postmask
===================================================================
--- last-align.orig/scripts/last-postmask
+++ last-align/scripts/last-postmask
@@ -1,4 +1,4 @@
......@@ -75,7 +69,7 @@ Index: last-align/scripts/last-postmask
# Copyright 2014 Martin C. Frith
@@ -37,7 +37,7 @@ def complement(base):
@@ -37,7 +37,7 @@
def fastScoreMatrix(rowHeads, colHeads, matrix, deleteCost, insertCost):
matrixLen = 128
......@@ -84,17 +78,15 @@ Index: last-align/scripts/last-postmask
fastMatrix = [[defaultScore for i in range(matrixLen)]
for j in range(matrixLen)]
for i, x in enumerate(rowHeads):
@@ -111,7 +111,7 @@ def doOneFile(lines):
@@ -111,7 +111,7 @@
if i.startswith("B="): bIns = int(i[2:])
if i.startswith("e="): minScore = int(i[2:])
if i.startswith("S="): strandParam = int(i[2:])
- if nf > 1 and max(map(len, fields)) == 1:
+ if nf > 1 and max(list(map(len, fields))) == 1:
- if nf > 2 and max(map(len, fields)) == 1:
+ if nf > 2 and max(list(map(len, fields))) == 1:
colHeads = fields[1:]
elif nf == len(colHeads) + 2 and len(fields[1]) == 1:
rowHeads.append(fields[1])
Index: last-align/scripts/last-train
===================================================================
--- last-align.orig/scripts/last-train
+++ last-align/scripts/last-train
@@ -1,4 +1,4 @@
......@@ -103,7 +95,7 @@ Index: last-align/scripts/last-train
# Copyright 2015 Martin C. Frith
# References:
@@ -248,7 +248,7 @@ def writeScoreMatrix(outFile, matrix, pr
@@ -248,7 +248,7 @@
writeMatrixBody(outFile, prefix, alphabet, matrix, "%6s")
def matProbsFromCounts(counts, opts):
......@@ -112,8 +104,6 @@ Index: last-align/scripts/last-train
if opts.revsym: # add complement (reverse strand) substitutions
counts = [[counts[i][j] + counts[-1-i][-1-j] for j in r] for i in r]
if opts.matsym: # symmetrize the substitution matrix
Index: last-align/scripts/maf-convert
===================================================================
--- last-align.orig/scripts/maf-convert
+++ last-align/scripts/maf-convert
@@ -1,4 +1,4 @@
......@@ -122,8 +112,6 @@ Index: last-align/scripts/maf-convert
# Copyright 2010, 2011, 2013, 2014 Martin C. Frith
# Read MAF-format alignments: write them in other formats.
# Seems to work with Python 2.x, x>=6
Index: last-align/scripts/maf-cut
===================================================================
--- last-align.orig/scripts/maf-cut
+++ last-align/scripts/maf-cut
@@ -1,4 +1,4 @@
......@@ -132,7 +120,7 @@ Index: last-align/scripts/maf-cut
from __future__ import print_function
@@ -70,12 +70,12 @@ def cutMafRecords(mafLines, alnBeg, alnE
@@ -70,12 +70,12 @@
def mafFieldWidths(mafRecords):
sRecords = (i for i in mafRecords if i[0] == "s")
......@@ -148,8 +136,6 @@ Index: last-align/scripts/maf-cut
print("%*s %-*s %*s %*s %*s %*s %*s" % tuple(formatParams))
def cutOneMaf(cutRange, mafLines):
Index: last-align/scripts/maf-join
===================================================================
--- last-align.orig/scripts/maf-join
+++ last-align/scripts/maf-join
@@ -1,4 +1,4 @@
......@@ -158,7 +144,7 @@ Index: last-align/scripts/maf-join
# Copyright 2009, 2010, 2011 Martin C. Frith
@@ -229,7 +229,7 @@ def nextWindow(window, theInput, referen
@@ -229,7 +229,7 @@
while True:
maf = theInput.peek()
if maf.after(referenceMaf): break
......@@ -167,8 +153,6 @@ Index: last-align/scripts/maf-join
if not maf.before(referenceMaf): yield maf
except StopIteration: pass
Index: last-align/scripts/maf-swap
===================================================================
--- last-align.orig/scripts/maf-swap
+++ last-align/scripts/maf-swap
@@ -1,4 +1,4 @@
......@@ -177,7 +161,7 @@ Index: last-align/scripts/maf-swap
# Read MAF-format alignments, and write them, after moving the Nth
# sequence to the top in each alignment.
@@ -69,12 +69,12 @@ def flippedMafRecords(mafLines):
@@ -69,12 +69,12 @@
def sLineFieldWidths(mafLines):
sLines = (i for i in mafLines if i[0] == "s")
......
......@@ -111,7 +111,7 @@ def doOneFile(lines):
if i.startswith("B="): bIns = int(i[2:])
if i.startswith("e="): minScore = int(i[2:])
if i.startswith("S="): strandParam = int(i[2:])
if nf > 1 and max(map(len, fields)) == 1:
if nf > 2 and max(map(len, fields)) == 1:
colHeads = fields[1:]
elif nf == len(colHeads) + 2 and len(fields[1]) == 1:
rowHeads.append(fields[1])
......
......@@ -382,7 +382,7 @@ def balancedScale(nearScale, *args):
if abs(value) <= 0:
return nearScale
oldLower = oldUpper = nearScale
while True: # xxx
while oldUpper < 2 * nearScale: # xxx ???
newLower = oldLower / bump
lowerValue = scoreImbalance(newLower, *args)
if (lowerValue < 0) != (value < 0):
......@@ -395,6 +395,7 @@ def balancedScale(nearScale, *args):
func = scoreImbalance if value < 0 else negScoreImbalance
return rootOfIncreasingFunction(func, oldUpper, newUpper, *args)
oldUpper = newUpper
return 0.0
def scoresAndScale(originalScale, matParams, delRatios, insRatios):
while True:
......@@ -402,6 +403,7 @@ def scoresAndScale(originalScale, matParams, delRatios, insRatios):
delCosts = gapCostsFromProbRatios(originalScale, *delRatios)
insCosts = gapCostsFromProbRatios(originalScale, *insRatios)
scale = balancedScale(originalScale, matScores, delCosts, insCosts)
if scale > 0:
rowFreqs = homogeneousLetterFreqs(scale, zip(*matScores))
colFreqs = homogeneousLetterFreqs(scale, matScores)
if all(i >= 0 for i in rowFreqs + colFreqs):
......