1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74
|
Author: Nilesh Patra
Last-Update: 2020-09-21
Description: Fix name of phipack executable
Forwarded: not-needed
--- parsnp.orig/parsnp
+++ parsnp/parsnp
@@ -196,7 +196,7 @@
def run_phipack(query,seqlen,workingdir):
currdir = os.getcwd()
os.chdir(workingdir)
- command = "Profile -o -v -n %d -w 100 -m 100 -f %s > %s.out"%(seqlen,query,query)
+ command = "phipack-profile -o -v -n %d -w 100 -m 100 -f %s > %s.out"%(seqlen,query,query)
run_command(command, 1)
os.chdir(currdir)
@@ -695,7 +695,7 @@
missing = True
logger.critical("{} not in system path!".format(exe))
if use_phipack:
- exe = "Profile"
+ exe = "phipack-profile"
if shutil.which(exe) is None:
missing = True
logger.critical("{} not in system path!".format(exe))
@@ -710,7 +710,7 @@
logger.critical("No fasttree executable found in system path!".format(exe))
missing = missing or (not has_fasttree)
else:
- exe = "raxmlHPC-PTHREADS"
+ exe = "raxmlHPC"
if shutil.which(exe) is None:
missing = True
logger.critical("{} not in system path!".format(exe))
@@ -1039,7 +1039,7 @@
'''
# global extend, inifiled, file_string, cnt
logger.debug("Writing .ini file")
- inifiled = open("%s/template.ini" % (PARSNP_DIR), 'r').read()
+ inifiled = open("/usr/share/parsnp/template.ini", 'r').read()
inifiled = inifiled.replace("$REF", ref)
inifiled = inifiled.replace("$EXTEND", "%d" % (args.extend))
inifiled = inifiled.replace("$ANCHORS", str(args.min_anchor_length))
@@ -1138,7 +1138,7 @@
if not os.path.exists(inifile):
logger.error("ini file %s does not exist!\n"%(inifile))
sys.exit(1)
- command = "%s/bin/parsnp_core %s"%(PARSNP_DIR,inifile)
+ command = "/usr/lib/parsnp/parsnp_core %s"%(inifile)
# with open(f"{outputDir}/parsnpAligner.out", 'w') as stdout_f, open(f"{outputDir}/parsnpAligner.err", 'w') as stderr_f:
# rc = run_command(command, ignorerc=1, stdout=stdout_f, stderr=stderr_f, prepend_time=True)
rc = run_logged_command(command=command, ignorerc=1, label="parsnp-aligner", outputDir=outputDir)
@@ -1360,10 +1360,10 @@
logger.info("Filtering genomes...")
if use_parsnp_mumi:
if not inifile_exists:
- command = f"{PARSNP_DIR}/bin/parsnp_core {outputDir}/config/all_mumi.ini"
+ command = f"/usr/lib/parsnp/parsnp_core {outputDir}/config/all_mumi.ini"
else:
# TODO why are we editing the suffix of a provided file?
- command = f"{PARSNP_DIR}/bin/parsnp_core {inifile.replace('.ini', '_mumi.ini')}"
+ command = f"/usr/lib/parsnp/parsnp_core {inifile.replace('.ini', '_mumi.ini')}"
run_logged_command(command=command, outputDir=outputDir, label="parsnp-mumi")
# Takes eeach sequence and computes its mumi distance to the reference
try:
@@ -1796,7 +1796,7 @@
break
if not use_fasttree:
with TemporaryDirectory() as raxml_output_dir:
- command = "raxmlHPC-PTHREADS -m GTRCAT -p 12345 -T %d -s %s -w %s -n OUTPUT"%(threads,outputDir+os.sep+"parsnp.snps.mblocks", raxml_output_dir)
+ command = "raxmlHPC -m GTRCAT -p 12345 -T %d -s %s -w %s -n OUTPUT"%(threads,outputDir+os.sep+"parsnp.snps.mblocks", raxml_output_dir)
run_logged_command(command, outputDir=outputDir, label="raxml")
shutil.move(f"{raxml_output_dir}/RAxML_bestTree.OUTPUT", outputDir + os.sep + "parsnp.tree")
|