[med-svn] [ariba] 01/02: New upstream version 2.9.3+ds
Sascha Steinbiss
satta at debian.org
Fri Apr 28 14:58:03 UTC 2017
This is an automated email from the git hooks/post-receive script.
satta pushed a commit to branch upstream
in repository ariba.
commit db1f8f07c0943120e89024d8bd0c0117305c46bb
Author: Sascha Steinbiss <satta at debian.org>
Date: Fri Apr 28 16:52:08 2017 +0200
New upstream version 2.9.3+ds
---
ariba/pubmlst_getter.py | 10 +++++++++-
ariba/tests/data/pubmlst_rename_seqs.expected.fa | 10 ++++++++++
ariba/tests/data/pubmlst_rename_seqs.in.fa | 10 ++++++++++
setup.py | 2 +-
4 files changed, 30 insertions(+), 2 deletions(-)
diff --git a/ariba/pubmlst_getter.py b/ariba/pubmlst_getter.py
index 0f794d1..6ac8bf5 100644
--- a/ariba/pubmlst_getter.py
+++ b/ariba/pubmlst_getter.py
@@ -1,4 +1,5 @@
import tempfile
+import re
import time
import os
import shutil
@@ -79,9 +80,16 @@ class PubmlstGetter:
def _rename_seqs_in_fasta(cls, infile, outfile):
f = pyfastaq.utils.open_file_write(outfile)
file_reader = pyfastaq.sequences.file_reader(infile)
+ nodot_regex = re.compile(r'^.*(?P<separator>[^.0-9])[0-9]+$')
for seq in file_reader:
- seq.id = seq.id.replace('_', '.').replace('-', '.')
+ if seq.id.startswith('Oxf.'):
+ seq.id = 'Oxf_' + seq.id[4:]
+
+ regex_match = nodot_regex.match(seq.id)
+ if regex_match is not None:
+ seq.id = '.'.join(seq.id.rsplit(regex_match.groupdict()['separator'], maxsplit=1))
+
print(seq, file=f)
pyfastaq.utils.close(f)
diff --git a/ariba/tests/data/pubmlst_rename_seqs.expected.fa b/ariba/tests/data/pubmlst_rename_seqs.expected.fa
index 7e7fa08..d6cb400 100644
--- a/ariba/tests/data/pubmlst_rename_seqs.expected.fa
+++ b/ariba/tests/data/pubmlst_rename_seqs.expected.fa
@@ -4,3 +4,13 @@ ACGT
AAAA
>gene.3
CCCC
+>foo_gene.4
+TTTT
+>Oxf_gltA.42
+A
+>Oxf_gltA.43
+C
+>Oxf_gltA.44
+G
+>Oxf_gltA.45
+T
diff --git a/ariba/tests/data/pubmlst_rename_seqs.in.fa b/ariba/tests/data/pubmlst_rename_seqs.in.fa
index 8b1a4c7..16c443e 100644
--- a/ariba/tests/data/pubmlst_rename_seqs.in.fa
+++ b/ariba/tests/data/pubmlst_rename_seqs.in.fa
@@ -4,3 +4,13 @@ ACGT
AAAA
>gene.3
CCCC
+>foo_gene.4
+TTTT
+>Oxf.gltA.42
+A
+>Oxf.gltA-43
+C
+>Oxf.gltA_44
+G
+>Oxf.gltA?45
+T
diff --git a/setup.py b/setup.py
index 7c673d0..1f1d390 100644
--- a/setup.py
+++ b/setup.py
@@ -55,7 +55,7 @@ vcfcall_mod = Extension(
setup(
ext_modules=[minimap_mod, fermilite_mod, vcfcall_mod],
name='ariba',
- version='2.9.2',
+ version='2.9.3',
description='ARIBA: Antibiotic Resistance Identification By Assembly',
packages = find_packages(),
package_data={'ariba': ['test_run_data/*']},
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/ariba.git
More information about the debian-med-commit
mailing list