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
|
Author: Nilesh Patra
Last-Update: 2020-09-21 15:59:19 +0000
Description: Fix name of phipack executable
--- parsnp.orig/parsnp
+++ parsnp/parsnp
@@ -137,7 +137,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)
@@ -588,7 +588,7 @@
# Check for dependencies
missing = False
- for exe in ["Profile", "raxmlHPC-PTHREADS", "harvesttools"]:
+ for exe in ["phipack-profile", "raxmlHPC", "harvesttools"]:
if shutil.which(exe) is None:
missing = True
logger.critical("{} not in system path!".format(exe))
@@ -916,7 +916,7 @@
if xtrafast or 1:
extend = False
- 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"%(extend))
inifiled = inifiled.replace("$ANCHORS", str(anchor))
@@ -973,10 +973,10 @@
logger.info("Recruiting genomes...")
if use_parsnp_mumi:
if not inifile_exists:
- command = "%s/bin/parsnp_core %sall_mumi.ini"%(PARSNP_DIR,outputDir+os.sep)
+ command = "/usr/lib/parsnp/parsnp_core %sall_mumi.ini"%(outputDir+os.sep)
else:
# TODO why are we editing the suffix of a provided file?
- command = "%s/bin/parsnp_core %s"%(PARSNP_DIR,inifile.replace(".ini","_mumi.ini"))
+ command = "/usr/lib/parsnp/parsnp_core %s"%(inifile.replace(".ini","_mumi.ini"))
run_command(command)
try:
mumif = open(os.path.join(outputDir, "all.mumi"),'r')
@@ -1179,14 +1179,14 @@
if command == "" and xtrafast and 0:
command = "%s/parsnpA_fast %sparsnpAligner.ini"%(PARSNP_DIR,outputDir+os.sep)
elif command == "":
- command = "%s/bin/parsnp_core %sparsnpAligner.ini"%(PARSNP_DIR,outputDir+os.sep)
+ command = "/usr/lib/parsnp/parsnp_core %sparsnpAligner.ini"%(outputDir+os.sep)
else:
- command = "%s/bin/parsnp_core %spsnn.ini"%(PARSNP_DIR,outputDir+os.sep)
+ command = "/usr/lib/parsnp/parsnp_core %spsnn.ini"%(outputDir+os.sep)
else:
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)
run_command(command)
if not os.path.exists(os.path.join(outputDir, "parsnpAligner.xmfa")):
@@ -1432,7 +1432,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_command(command)
os.system("mv {}/RAxML_bestTree.OUTPUT {}".format(raxml_output_dir, outputDir+os.sep+"parsnp.tree"))
|