From 16eacdceadfda77e10208e65eb53cdb09ec2e1ae Mon Sep 17 00:00:00 2001 From: Arjun Prasad Date: Sun, 27 Oct 2024 16:45:21 -0400 Subject: [PATCH] Modifications to facilitate installation Modified the subdirectory for StxTyper to stx and modified the github_binary target to enable the installation of combined AMRFinderPlus and StxTyper. --- .gitmodules | 2 +- Makefile | 21 +++++++++++---------- amrfinder.cpp | 2 +- stx | 1 + stxtyper | 1 - 5 files changed, 14 insertions(+), 13 deletions(-) create mode 160000 stx delete mode 160000 stxtyper diff --git a/.gitmodules b/.gitmodules index 967e68e..34da84e 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ [submodule "stxtyper"] - path = stxtyper + path = stx url = https://github.com/ncbi/stxtyper.git diff --git a/Makefile b/Makefile index 3e9fd13..112d885 100644 --- a/Makefile +++ b/Makefile @@ -153,12 +153,12 @@ mutate: $(mutateOBJS) $(CXX) -o $@ $(mutateOBJS) stxtyper: - $(MAKE) -C stxtyper + $(MAKE) -C stx clean: rm -f *.o rm -f $(BINARIES) - $(MAKE) -C stxtyper clean + $(MAKE) -C stx clean install: @if [ ! -e $(DESTDIR)$(bindir) ]; \ @@ -166,7 +166,7 @@ install: mkdir -p $(DESTDIR)$(bindir); \ fi $(INSTALL) $(BINARIES) $(DESTDIR)$(bindir) - make -C stxtyper install PREFIX=$(PREFIX) bindir=$(bindir) + make -C stx install PREFIX=$(PREFIX) bindir=$(bindir) # amrfinder binaries for github binary release GITHUB_FILE=amrfinder_binaries_v$(VERSION_STRING) @@ -181,19 +181,20 @@ github_binaries: # first recompile amrfinder.o to pick up the new version info # and remove leaky NCBI paths make clean - make all CXX=/usr/bin/g++ LD_RUN_PATH= -d + make all CXX=/usr/bin/g++ LD_RUN_PATH= mkdir $(GITHUB_FILE) echo $(VERSION_STRING) > $(GITHUB_FILE)/version.txt cp $(GITHUB_FILES) $(GITHUB_FILE) - make -C stxtyper install INSTALL_DIR=../$(GITHUB_FILE)/stxtyper - cp stxtyper/test_stxtyper.sh stxtyper/version.txt $(GITHUB_FILE)/stxtyper - mkdir $(GITHUB_FILE)/stxtyper/test - cp -R stxtyper/test/*.fa stxtyper/test/*.expected $(GITHUB_FILE)/stxtyper/test + make -C stx + make -C stx install INSTALL_DIR=../$(GITHUB_FILE)/stx CXX=/usr/bin/g++ LD_RUN_PATH= + cp stx/test_stxtyper.sh stx/version.txt $(GITHUB_FILE)/stx + mkdir $(GITHUB_FILE)/stx/test + cp -R stx/test/*.fa stx/test/*.expected $(GITHUB_FILE)/stx/test if [ -e $(GITHUB_FILE).tar.gz ]; then rm $(GITHUB_FILE).tar.gz; fi - cd $(GITHUB_FILE); tar cvfz ../$(GITHUB_FILE).tar.gz * + cd $(GITHUB_FILE); ln -s stx/stxtyper .; tar cvfz ../$(GITHUB_FILE).tar.gz * rm -r $(GITHUB_FILE)/* rmdir $(GITHUB_FILE) test: $(DISTFILES) Makefile *.cpp *.hpp *.inc test_dna.fa test_prot.fa test_prot.gff test_dna.fa test_dna.expected test_prot.expected test_both.expected - make -C stxtyper test + make -C stx test ./test_amrfinder.sh diff --git a/amrfinder.cpp b/amrfinder.cpp index bfbe5c3..fe158c4 100644 --- a/amrfinder.cpp +++ b/amrfinder.cpp @@ -845,7 +845,7 @@ struct ThisApplication : ShellApplication prog2dir ["amr_report"] = execDir; prog2dir ["dna_mutation"] = execDir; prog2dir ["fasta_extract"] = execDir; - prog2dir ["stxtyper"] = execDir + "stxtyper/"; + prog2dir ["stxtyper"] = execDir + "stx/"; if (pgap) diff --git a/stx b/stx new file mode 160000 index 0000000..3dede55 --- /dev/null +++ b/stx @@ -0,0 +1 @@ +Subproject commit 3dede555786e61abc04361d8b972c765031fe79c diff --git a/stxtyper b/stxtyper deleted file mode 160000 index ddc66ab..0000000 --- a/stxtyper +++ /dev/null @@ -1 +0,0 @@ -Subproject commit ddc66abc95a0d74c4fbd0729dde1a7f772686b8d