Skip to content

Commit

Permalink
added check for pos range
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthew Lyon committed Jul 25, 2019
1 parent 30b67f1 commit 1cb8a72
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion gwas_results.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,8 @@ def read_from_file(

try:
pos = int(float(s[pos_field])) # float is for scientific notation
except ValueError as e:
assert pos > 0
except (ValueError, AssertionError) as e:
logging.warning("Skipping {}: {}".format(s, e))
continue

Expand Down
2 changes: 1 addition & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@


def main():
version = "1.0.0"
version = "1.0.1"

parser = argparse.ArgumentParser(description='Map GWAS summary statistics to VCF/BCF')
parser.add_argument('-v', '--version', action='version', version='%(prog)s {}'.format(version))
Expand Down

0 comments on commit 1cb8a72

Please sign in to comment.