[med-svn] [Git][med-team/kineticstools][upstream] New upstream version 0.6.1+git20210811.276ca9c+dfsg
Étienne Mollier (@emollier)
gitlab at salsa.debian.org
Mon Oct 25 22:24:22 BST 2021
Étienne Mollier pushed to branch upstream at Debian Med / kineticstools
Commits:
1261423e by Étienne Mollier at 2021-10-25T22:05:02+02:00
New upstream version 0.6.1+git20210811.276ca9c+dfsg
- - - - -
9 changed files:
- .gitignore
- kineticsTools/ModificationDecode.py
- kineticsTools/MultiSiteCommon.py
- kineticsTools/MultiSiteDetection.py
- kineticsTools/WorkerProcess.py
- kineticsTools/loader.py
- kineticsTools/summarizeModifications.py
- setup.py
- test/test_loader.py
Changes:
=====================================
.gitignore
=====================================
@@ -8,3 +8,6 @@ kineticsTools.egg-info/
/nosetests.xml
/tree_predict*.so
test/cram/*.err
+test/TestOutputs.csv
+test/TestOutputs.gff
+test/nosetests.xml
=====================================
kineticsTools/ModificationDecode.py
=====================================
@@ -237,7 +237,7 @@ class ModificationDecode(MultiSiteCommon):
qvModCalls = dict()
modSeq = a.array('b')
- modSeq.fromstring(self.sequence)
+ modSeq.frombytes(bytes(self.sequence, "ascii"))
# Apply the found modifications to the raw sequence
for (pos, call) in modCalls.items():
@@ -319,7 +319,7 @@ class ModificationDecode(MultiSiteCommon):
sc = 0.0
for pos in range(start, end + 1):
ctx = sequence[(pos - self.pre):(pos + self.post + 1)
- ].tostring().decode("ascii")
+ ].tobytes().decode("ascii")
if pos in self.scores:
sc += self.scores[pos][ctx]
@@ -330,7 +330,7 @@ class ModificationDecode(MultiSiteCommon):
for pos in range(start, end + 1):
ctx = sequence[(pos - self.pre):(pos + self.post + 1)
- ].tostring().decode("ascii")
+ ].tobytes().decode("ascii")
if pos in self.scores:
scores[pos - start] = self.scores[pos][ctx]
=====================================
kineticsTools/MultiSiteCommon.py
=====================================
@@ -143,7 +143,7 @@ class MultiSiteCommon(object):
def getContextMeans(self, start, end, sequence):
meanVector = []
for pos in range(start, end + 1):
- ctx = sequence[(pos - self.pre):(pos + self.post + 1)].tostring().decode("ascii")
+ ctx = sequence[(pos - self.pre):(pos + self.post + 1)].tobytes().decode("ascii")
if ctx in self.contextMeanTable:
meanVector.append(self.contextMeanTable[ctx])
else:
=====================================
kineticsTools/MultiSiteDetection.py
=====================================
@@ -138,7 +138,7 @@ class MultiSiteDetection(object):
contexts = []
for pos in range(start, end + 1):
- ctx = sequence[(pos - self.pre):(pos + self.post + 1)].tostring()
+ ctx = sequence[(pos - self.pre):(pos + self.post + 1)].tobytes()
contexts.append(ctx)
return contexts
@@ -263,7 +263,7 @@ class MultiSiteDetection(object):
qvModCalls = dict()
dnaSeq = a.array('c')
- dnaSeq.fromstring(self.sequence)
+ dnaSeq.frombytes(bytes(self.sequence, "ascii"))
for pos in self.motifPositions:
if pos in self.rawKinetics:
@@ -295,7 +295,7 @@ class MultiSiteDetection(object):
predictions = np.zeros(end - start + 1)
for pos in range(start, end + 1):
- ctx = sequence[(pos - self.pre):(pos + self.post + 1)].tostring()
+ ctx = sequence[(pos - self.pre):(pos + self.post + 1)].tobytes()
predictions[pos - start] = self.contextMeanTable[ctx]
return predictions
=====================================
kineticsTools/WorkerProcess.py
=====================================
@@ -124,8 +124,8 @@ class WorkerProcess(Process):
(chunkId, datum) = chunkDesc
logging.info("Got chunk: (%s, %s) -- Process: %s" %
(chunkId, str(datum), current_process()))
- result = self.onChunk(
- datum) # pylint: disable=assignment-from-none
+ result = self.onChunk( # pylint: disable=assignment-from-none
+ datum)
logging.debug("Process %s: putting result." %
current_process())
=====================================
kineticsTools/loader.py
=====================================
@@ -36,8 +36,8 @@ def getIpdModelFilename(ipdModel, majorityChem, paramsPath):
# go through each paramsPath in-order, checking if the model exists there
# or no
- for paramsPath in paramsPath:
- ipdModel = os.path.join(paramsPath, majorityChem + ".npz.gz")
+ for paramPath in paramsPath:
+ ipdModel = os.path.join(paramPath, majorityChem + ".npz.gz")
if os.path.isfile(ipdModel):
LOG.info(
"Using chemistry-matched kinetics model: {!r}".format(ipdModel))
=====================================
kineticsTools/summarizeModifications.py
=====================================
@@ -118,10 +118,10 @@ class ModificationSummary(object):
cRev = self.countModificationTypes(
[h for h in intervalHits if h['strand'] == '-'])
- rec.modsfwd = ",".join(
- [str(cFwd[x]) for x in self.knownModificationEvents]) # pylint: disable=assigning-non-slot
- rec.modsrev = ",".join(
- [str(cRev[x]) for x in self.knownModificationEvents]) # pylint: disable=assigning-non-slot
+ rec.modsfwd = ",".join( # pylint: disable=assigning-non-slot
+ [str(cFwd[x]) for x in self.knownModificationEvents])
+ rec.modsrev = ",".join( # pylint: disable=assigning-non-slot
+ [str(cRev[x]) for x in self.knownModificationEvents])
print(str(rec), file=summaryWriter)
return 0
=====================================
setup.py
=====================================
@@ -11,7 +11,7 @@ test_deps = [
setup(
name='kineticsTools',
- version='0.7.0',
+ version='0.8.0',
author='Pacific Biosciences',
author_email='devnet at pacificbiosciences.com',
license='BSD-3-Clause-Clear',
@@ -26,17 +26,14 @@ setup(
'ipdSummary = kineticsTools.ipdSummary:main',
'summarizeModifications = kineticsTools.summarizeModifications:main',
]},
- setup_requires=[
- 'pytest-runner',
- ],
install_requires=[
- 'numpy >= 1.17',
+ 'numpy >= 1.21.0',
'pbcommand >= 2.0.0',
- 'pbcore >= 2.0.0',
+ 'pbcore >= 2.2.4',
'pyBigWig',
'scipy >= 1.3',
],
tests_require=test_deps,
extras_require={'test': test_deps},
- python_requires='>=3.7',
+ python_requires='>=3.9',
)
=====================================
test/test_loader.py
=====================================
@@ -44,6 +44,10 @@ def test_path(monkeypatch):
expected = 'path1/foo.npz.gz'
assert expected == B.getIpdModelFilename(None, chem, ['path1', 'path2'])
+ # Missing path first.
+ expected = 'path1/foo.npz.gz'
+ assert expected == B.getIpdModelFilename(None, chem, ['pathmissing', 'path1', 'path2'])
+
def test_path_with_prefixed_chem(monkeypatch):
def isfile(fn):
View it on GitLab: https://salsa.debian.org/med-team/kineticstools/-/commit/1261423e060beb1b4d476cc4a3c2fde6829f6775
--
View it on GitLab: https://salsa.debian.org/med-team/kineticstools/-/commit/1261423e060beb1b4d476cc4a3c2fde6829f6775
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/20211025/8f5f6da1/attachment-0001.htm>
More information about the debian-med-commit
mailing list