Skip to content

Commit

Permalink
remove flag sse4_2, improved lookup binaries, fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pirovc committed Jul 10, 2019
1 parent 6e666e8 commit c8adcea
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 41 deletions.
5 changes: 3 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ endif()

# seqan specific flags:

add_compile_options( -static -msse4.2 -march=native )
add_compile_options( -static -march=native )

# Enable offset:

Expand Down Expand Up @@ -145,7 +145,8 @@ if( VERBOSE_CONFIG )
message( STATUS " Build type : ${CMAKE_BUILD_TYPE}" )
message( STATUS " CMAKE_CXX_FLAGS : ${CMAKE_CXX_FLAGS}" )
message( STATUS " INCLUDE_DIRS : ${INCLUDE_DIRS}" )

cmake_host_system_information(RESULT HAS_SSE42 QUERY HAS_SSE2)
message( STATUS " HAS_SSE42 : ${HAS_SSE42}" )
get_directory_property( dirCompileOptions COMPILE_OPTIONS )
message( STATUS " COMPILE_OPTIONS : ${dirCompileOptions}" )
endif()
Expand Down
62 changes: 25 additions & 37 deletions src/ganon/ganon.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,39 +124,29 @@ def main(arguments=None):

args.taxsbp_path = args.taxsbp_path + "/" if args.taxsbp_path else ""

ganon_build_exec = shutil.which("ganon-build")
for p in [None, args.ganon_path, args.ganon_path+"build/"]:
ganon_build_exec = shutil.which("ganon-build", path=p)
if ganon_build_exec is not None: break
if ganon_build_exec is None:
ganon_build_exec = shutil.which("ganon-build", path=args.ganon_path)
if ganon_build_exec is None:
ganon_build_exec = shutil.which("ganon-build", path=args.ganon_path+"build/")
if ganon_build_exec is None:
print_log("ganon-build binary was not found. Please inform a specific path with --ganon-path\n")
return 1

ganon_get_len_taxid_exec = shutil.which("ganon-get-len-taxid.sh")
print_log("ganon-build binary was not found. Please inform a specific path with --ganon-path\n")
return 1

for p in [None, args.ganon_path, args.ganon_path+"scripts/", args.ganon_path+"../scripts/"]:
ganon_get_len_taxid_exec = shutil.which("ganon-get-len-taxid.sh", path=p)
if ganon_get_len_taxid_exec is not None: break
if ganon_get_len_taxid_exec is None:
ganon_get_len_taxid_exec = shutil.which("ganon-get-len-taxid.sh", path=args.ganon_path)
if ganon_get_len_taxid_exec is None:
ganon_get_len_taxid_exec = shutil.which("ganon-get-len-taxid.sh", path=args.ganon_path+"scripts/")
if ganon_get_len_taxid_exec is None:
ganon_get_len_taxid_exec = shutil.which("ganon-get-len-taxid.sh", path=args.ganon_path+"../scripts/")
if ganon_get_len_taxid_exec is None:
print_log("ganon-get-len-taxid.sh script was not found. Please inform a specific path with --ganon-path\n")
return 1

taxsbp_exec = shutil.which("taxsbp")
print_log("ganon-get-len-taxid.sh script was not found. Please inform a specific path with --ganon-path\n")
return 1

for p in [None, args.taxsbp_path, "taxsbp/"]:
taxsbp_exec = shutil.which("taxsbp", path=p)
if taxsbp_exec is not None: break
taxsbp_exec = shutil.which("taxsbp.py", path=p)
if taxsbp_exec is not None: break
if taxsbp_exec is None:
taxsbp_exec = shutil.which("taxsbp", path=args.taxsbp_path)
if taxsbp_exec is None:
taxsbp_exec = shutil.which("TaxSBP.py", path=args.taxsbp_path)
if taxsbp_exec is None:
taxsbp_exec = shutil.which("taxsbp", path="taxsbp/")
if taxsbp_exec is None:
taxsbp_exec = shutil.which("TaxSBP.py", path="taxsbp/")
if taxsbp_exec is None:
print_log("TaxSBP executable (TaxSBP.py or taxsbp) were not found. Please inform the path of the scripts with --taxsbp-path\n")
return 1

print_log("TaxSBP script (taxsbp or taxsbp.py) were not found. Please inform the path of the scripts with --taxsbp-path\n")
return 1

if args.taxdump_file and ((len(args.taxdump_file)==1 and not args.taxdump_file[0].endswith(".tar.gz")) or len(args.taxdump_file)>3):
print_log("Please provide --taxdump-file taxdump.tar.gz or --taxdump-file nodes.dmp names.dmp [merged.dmp] or leave it empty for automatic download \n")
return 1
Expand All @@ -180,14 +170,12 @@ def main(arguments=None):

if args.which=='classify':

ganon_classify_exec = shutil.which("ganon-classify")
for p in [None, args.ganon_path, args.ganon_path+"build/"]:
ganon_classify_exec = shutil.which("ganon-classify", path=p)
if ganon_classify_exec is not None: break
if ganon_classify_exec is None:
ganon_classify_exec = shutil.which("ganon-classify", path=args.ganon_path)
if ganon_classify_exec is None:
ganon_classify_exec = shutil.which("ganon-classify", path=args.ganon_path+"build/")
if ganon_classify_exec is None:
print_log("ganon-classify binary was not found. Please inform a specific path with --ganon-path\n")
return 1
print_log("ganon-classify binary was not found. Please inform a specific path with --ganon-path\n")
return 1

if args.skip_lca and not args.output_file_prefix:
print_log("--output-file-prefix is mandatory without LCA\n")
Expand Down
2 changes: 1 addition & 1 deletion tests/ganon/integration/test_classify.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from pathlib import Path
from src.ganon import ganon

class TestBuild(unittest.TestCase):
class TestClassify(unittest.TestCase):
def test_build(self):
"""
Test if classify on sample data is working
Expand Down
2 changes: 1 addition & 1 deletion tests/ganon/integration/test_update.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from pathlib import Path
from src.ganon import ganon

class TestBuild(unittest.TestCase):
class TestUpdate(unittest.TestCase):
def test_build(self):
"""
Test if update on sample data is working
Expand Down

0 comments on commit c8adcea

Please sign in to comment.