Skip to content

Commit

Permalink
Fix failed regexing of sp. name from URL
Browse files Browse the repository at this point in the history
  • Loading branch information
glarue committed Mar 15, 2021
1 parent 8676891 commit 7727943
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion jgi-query.py
Original file line number Diff line number Diff line change
Expand Up @@ -950,7 +950,7 @@ def download_list(url_list, timeout=120, retries=3):
sys.exit("No organism specified. Exiting now.")
else:
sys.exit("No organism specified. Exiting now.")
org_regex = re.compile(r'\.jgi.+\.(?:gov|org).+\/(.+)\/(?!\/)')
org_regex = re.compile(r'\.jgi.+\.(?:gov|org).*\/(.+)\/(?!\/)')
try: # see if it's in address form
# organism = re.search("\.jgi.+\.(?:gov|org)/(.+)/", org_input).group(1)
organism = org_regex.search(org_input).group(1)
Expand Down

0 comments on commit 7727943

Please sign in to comment.