Skip to content

Commit

Permalink
Modifications to facilitate installation
Browse files Browse the repository at this point in the history
Modified the subdirectory for StxTyper to stx and modified the
github_binary target to enable the installation of combined
AMRFinderPlus and StxTyper.
  • Loading branch information
evolarjun committed Oct 27, 2024
1 parent 8c9cf97 commit 16eacdc
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[submodule "stxtyper"]
path = stxtyper
path = stx
url = https://github.com/ncbi/stxtyper.git
21 changes: 11 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -153,20 +153,20 @@ 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) ]; \
then \
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)
Expand All @@ -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
2 changes: 1 addition & 1 deletion amrfinder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions stx
Submodule stx added at 3dede5
1 change: 0 additions & 1 deletion stxtyper
Submodule stxtyper deleted from ddc66a

0 comments on commit 16eacdc

Please sign in to comment.