Skip to content

Commit

Permalink
Merge pull request #107 from apregier/parsing_fix
Browse files Browse the repository at this point in the history
Get the last > char
  • Loading branch information
apregier authored Sep 4, 2019
2 parents 5fc3076 + 8e72808 commit 3c5218a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
8 changes: 3 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@
with open('README.md') as f:
readme = f.read()

with open('LICENSE') as f:
license = f.read()

with open('svtyper/version.py') as f:
exec(f.read())

Expand All @@ -16,12 +13,13 @@
version=__version__,
description='Bayesian genotyper for structural variants',
long_description=readme,
long_description_content_type='text/markdown',
author=__author__,
author_email='colbychiang@wustl.edu',
license=license,
license='MIT License',
url='https://github.com/hall-lab/svtyper',
setup_requires=['pytest-runner'],
tests_require=['pytest'],
tests_require=['pytest==4.6.4'],
install_requires=[
'pysam>=0.15.0',
'numpy',
Expand Down
6 changes: 3 additions & 3 deletions svtyper/parsers.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,15 @@ def add_header(self, header):
elif line.split('=')[0] == '##reference':
self.reference = line.rstrip().split('=')[1]
elif line.split('=')[0] == '##INFO':
a = line[line.find('<')+1:line.find('>')]
a = line[line.find('<')+1:line.rfind('>')]
r = re.compile(r'(?:[^,\"]|\"[^\"]*\")+')
self.add_info(*[b.split('=')[1] for b in r.findall(a)])
elif line.split('=')[0] == '##ALT':
a = line[line.find('<')+1:line.find('>')]
a = line[line.find('<')+1:line.rfind('>')]
r = re.compile(r'(?:[^,\"]|\"[^\"]*\")+')
self.add_alt(*[b.split('=')[1] for b in r.findall(a)])
elif line.split('=')[0] == '##FORMAT':
a = line[line.find('<')+1:line.find('>')]
a = line[line.find('<')+1:line.rfind('>')]
r = re.compile(r'(?:[^,\"]|\"[^\"]*\")+')
self.add_format(*[b.split('=')[1] for b in r.findall(a)])
elif line[0] == '#' and line[1] != '#':
Expand Down
2 changes: 1 addition & 1 deletion svtyper/version.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
__author__ = "Colby Chiang (colbychiang@wustl.edu)"
__version__ = "v0.7.0"
__version__ = "v0.7.1"

0 comments on commit 3c5218a

Please sign in to comment.