Skip to content

Commit

Permalink
Clean up path resolution and close #25
Browse files Browse the repository at this point in the history
  • Loading branch information
ar0ch committed Feb 17, 2017
1 parent 7d8e463 commit 212e785
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions stringMLST.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
except ImportError:
from urllib import urlopen, urlretrieve
import argparse
version = """ stringMLST v0.3.5 (updated : February 16, 2017) """
version = """ stringMLST v0.3.6 (updated : February 16, 2017) """
"""
LICENSE TERMS FOR stringMLST
1. INTENT/PURPOSE:
Expand Down Expand Up @@ -1422,7 +1422,17 @@ def checkParams(buildDB, predict, config, k, listMode, list, batch, dir, fastq1,
os.makedirs(dbPrefix.rsplit("/",1)[0])
except OSError:
pass
filePrefix = dbPrefix
if len(re.findall("/", dbPrefix)) == 0:
filePrefix = dbPrefix + "/" + species
elif len(re.findall("/", dbPrefix)) == 1 and len(dbPrefix.rsplit("/",1)[1]) > 0:
filePrefix = dbPrefix
elif len(re.findall("/", dbPrefix)) == 1 and len(dbPrefix.rsplit("/",1)[1]) == 0:
filePrefix = dbPrefix + species
elif len(re.findall("/", dbPrefix)) > 1:
if dbPrefix.endswith('/'):
filePrefix = dbPrefix + species
else:
filePrefix = dbPrefix
config = filePrefix + "_config.txt"
profileURL = get_links(species,schemes)
get_files(profileURL)
Expand Down

0 comments on commit 212e785

Please sign in to comment.