Skip to content

Commit

Permalink
check diamond
Browse files Browse the repository at this point in the history
  • Loading branch information
wdingx committed Dec 9, 2017
1 parent bab86dd commit b282589
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion panX.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,8 @@
#species=params.species_name

programs={'mcl':'mcl', 'mafft':'mafft', 'fasttree':'FastTree', 'raxml':'raxmlHPC'}
if params.diamond_path=='':
programs['diamond']='diamond'
for program_alias, program_name in programs.items():
passed=False
## check whether program_alias exists (if yes, test passed)
Expand All @@ -173,7 +175,13 @@
continue
## if the program is not installed, exit
if not passed:
print 'program '+program_name+' not found, please install it.'
if program_name=='diamond':
warning='\ndiamond not found:\nplease make sure that diamond is installed '+\
'and diamond binary file is included in the executable search path (e.g.: /usr/bin/diamond);\n'+\
'alternatively, one can specify diamond path via the parameter -dmp (e.g.: ./panX.py -dmp /mypath/diamond -fn ...)'
print warning
else:
print 'program '+program_name+' not found, please install it.'
exit()

myPangenome=pangenome(
Expand Down

0 comments on commit b282589

Please sign in to comment.