Skip to content

Commit a7cb2b5

Browse files
authored
Merge pull request #65 from ramprasadn/master
Fix argument mismatch
2 parents 87a4c36 + 2bb2be9 commit a7cb2b5

File tree

3 files changed

+10
-9
lines changed

3 files changed

+10
-9
lines changed

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
ext_modules = []
2020

2121
setup(name='svdb',
22-
version='2.8.0',
22+
version='2.8.1',
2323
url="https://github.com/J35P312/SVDB",
2424
author="Jesper Eisfeldt",
2525
author_email="jesper.eisfeldt@scilifelab.se",

svdb/__main__.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,16 +36,17 @@ def make_query_calls (args, queries, keyword):
3636
args.query_vcf = output_file
3737
else:
3838
print("please ensure that both count and frequency tags are specified for all samples")
39+
elif len(queries) > 1 and not args.prefix:
40+
print("ERROR: Please provide a prefix")
41+
quit()
42+
elif len(queries) == 1 and args.prefix:
43+
output_file = args.prefix + "_query.vcf"
44+
query_module.main(args, output_file)
3945
else:
40-
if args.prefix:
41-
output_file = args.prefix + "_query.vcf"
42-
else:
43-
output_file=None
44-
45-
query_module.main(args,output_file)
46+
query_module.main(args)
4647

4748
def main():
48-
version = "2.8.0"
49+
version = "2.8.1"
4950
parser = argparse.ArgumentParser(
5051
"""SVDB-{}, use the build module to construct databases, use the query module to query the database usign vcf files, or use the hist module to generate histograms""".format(version), add_help=False)
5152
parser.add_argument('--build', help="create a db",

svdb/query_module.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from . import database, overlap_module, readVCF
99

1010

11-
def main(args, output_file):
11+
def main(args, output_file=None):
1212
# start by loading the variations
1313
queries = []
1414
if args.prefix:

0 commit comments

Comments
 (0)