Skip to content

Commit

Permalink
Updated check for dependencies and fixed spelling error in arguments.
Browse files Browse the repository at this point in the history
  • Loading branch information
jimkaminski committed Jan 15, 2016
1 parent cdf6075 commit d5d0897
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 10 deletions.
12 changes: 6 additions & 6 deletions shortbred_identify.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
from Bio.Data import CodonTable
from Bio import SeqIO

VERSION="0.9.1"
VERSION="0.9.2"

###############################################################################
#COMMAND LINE ARGUMENTS
Expand Down Expand Up @@ -86,10 +86,10 @@
grpInput.add_argument('--goi', type=str, dest='sGOIProts',default= "", help='Enter the path and name of the proteins of interest file.')
grpInput.add_argument('--ref', type=str, dest='sRefProts',default= "", help='Enter the path and name of the file containing reference protein sequences.')
grpInput.add_argument('--refdb', type=str, dest='dirRefDB', default= "",help='Can be specified in place of reference proteins [--ref]. Enter the path and name for a blastdb of reference proteins.')
grpInput.add_argument('--goiblast', type=str, default = "", dest='sGOIBlast', help='Used when modifying existing ShortBRED-Identiy results. Enter the path and name of the blast results from the goi-to-goi search.')
grpInput.add_argument('--refblast', type=str, dest='sRefBlast', default= "", help='Used when modifying existing ShortBRED-Identiy results. Enter the path and name of the blast results from the goi-to-ref search.')
grpInput.add_argument('--goiclust', type=str, default ="", dest='sClust', help='Used when modifying existing ShortBRED-Identiy results. Enter the path and name of the clustered genes of interest file.')
grpInput.add_argument('--map_in', type=str, dest='sMapIn',default="", help='Used when modifying existing ShortBRED-Identiy results. Enter the path and name of the two column file connecting proteins to families.')
grpInput.add_argument('--goiblast', type=str, default = "", dest='sGOIBlast', help='Used when modifying existing ShortBRED-Identify results. Enter the path and name of the blast results from the goi-to-goi search.')
grpInput.add_argument('--refblast', type=str, dest='sRefBlast', default= "", help='Used when modifying existing ShortBRED-Identify results. Enter the path and name of the blast results from the goi-to-ref search.')
grpInput.add_argument('--goiclust', type=str, default ="", dest='sClust', help='Used when modifying existing ShortBRED-Identify results. Enter the path and name of the clustered genes of interest file.')
grpInput.add_argument('--map_in', type=str, dest='sMapIn',default="", help='Used when modifying existing ShortBRED-Identify results. Enter the path and name of the two column file connecting proteins to families.')



Expand Down Expand Up @@ -153,7 +153,7 @@
#return iReturnCode

print "Checking dependencies..."
src.CheckDependency(args.strUSEARCH,"","Usearch")
src.CheckDependency(args.strUSEARCH,"","usearch")
src.CheckDependency(args.strBLASTP,"-h","blastp")
src.CheckDependency(args.strMUSCLE,"-h","muscle")
src.CheckDependency(args.strCDHIT,"-h","cdhit")
Expand Down
2 changes: 1 addition & 1 deletion shortbred_quantify.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
from Bio.Seq import Seq
from Bio import SeqIO

VERSION="0.9.1"
VERSION="0.9.2"


################################################################################
Expand Down
12 changes: 9 additions & 3 deletions src/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,15 @@ def check_file(strPath):
return

def CheckDependency(strCmd,strArg,strIntendedProgram):

if (os.path.isfile(distutils.spawn.find_executable(strCmd))==False):
raise IOError("\nShortBRED was unable to find " + strIntendedProgram + " at the path *" + strCmd + "*\nPlease check that the program is installed and the path is correct.")
#print strCmd
#print distutils.spawn.find_executable("usearch")
#print distutils.spawn.find_executable("ls")
#print os.access("usearch",os.F_OK)
#print distutils.spawn.find_executable("muscle")
#print distutils.spawn.find_executable("cd-hit")

if ((distutils.spawn.find_executable(strCmd))==None):
raise IOError("\nShortBRED was unable to find " + strIntendedProgram + " at the path *" + strCmd + "*\nPlease check that the program is installed and the path is correct. Please note that ShortBRED will not be able to use the unix alias for the program.")
#print "\nShortBRED was unable to load " + strIntendedProgram + "at the path " + strCmd + "\nPlease check to make sure the program is installed and the path is correct."
sys.exit(1)

Expand Down

0 comments on commit d5d0897

Please sign in to comment.