Skip to content

Commit

Permalink
Merge branch 'stxtype' of github.com:ncbi/amr into stxtyper
Browse files Browse the repository at this point in the history
  • Loading branch information
evolarjun committed Oct 26, 2024
2 parents 53b4d2a + 8c9cf97 commit ccea0eb
Show file tree
Hide file tree
Showing 30 changed files with 1,412 additions and 638 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/ccpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ jobs:
run: |
sudo apt-get update
sudo apt-get install -y hmmer ncbi-blast+ git libcurl4-openssl-dev build-essential curl
- name: submodule checkout
run: git submodule update --init --recursive
- name: make
run: cat version.txt; make
- name: download db
Expand All @@ -26,12 +28,10 @@ jobs:
- name: make test
run: make test
- name: test for no-overwrite database update (PD-3469 / https://github.com/ncbi/amr/issues/16)
run: |
./amrfinder -u 2>&1 | tee output
fgrep 'Skipping update, use amrfinder --force_update to overwrite the existing database' output
run: ./amrfinder -u 2>&1 | fgrep 'Skipping update'
- name: make github_binaries
run: make github_binaries
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: release-binary
path: amrfinder_binaries_v*.tar.gz
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/mac_ccpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ jobs:

steps:
- uses: actions/checkout@v3
- name: submodule checkout
run: git submodule update --init --recursive
- name: prerequisites
run: |
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
Expand All @@ -29,13 +31,13 @@ jobs:
- name: make test
run: make test
- name: test for no-overwrite database update (PD-3469 / https://github.com/ncbi/amr/issues/16)
run: ./amrfinder -u 2>&1 | fgrep 'Skipping update, use amrfinder --force_update to overwrite the existing database'
run: ./amrfinder -u 2>&1 | fgrep 'Skipping update'
- name: make github_binaries
run: |
make github_binaries
version=`cat version.txt`
mv amrfinder_binaries_v$version.tar.gz amrfinder_binaries_osx_v$version.txt
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: release-binary
path: amrfinder_binaries_osx_v*.tar.gz
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
url = git@github.com:evolarjun/stxtyper.git
url = https://github.com/ncbi/stxtyper.git
41 changes: 26 additions & 15 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ COMPILE.cpp= $(CXX) $(CPPFLAGS) $(SVNREV) $(DBDIR) $(TEST_UPDATE_DB) -c

.PHONY: all clean install release stxtyper test

BINARIES= amr_report amrfinder amrfinder_index amrfinder_update fasta_check fasta_extract fasta2parts gff_check dna_mutation mutate
BINARIES= amr_report amrfinder amrfinder_index amrfinder_update fasta_check \
fasta_extract fasta2parts gff_check dna_mutation mutate

all: $(BINARIES) stxtyper

Expand All @@ -97,17 +98,17 @@ gff.o: gff.hpp common.hpp common.inc
alignment.o: alignment.hpp alignment.hpp common.inc
seq.o: seq.hpp common.hpp common.inc

amr_report.o: common.hpp common.inc gff.hpp alignment.hpp
amr_report.o: common.hpp common.inc gff.hpp alignment.hpp tsv.hpp columns.hpp version.txt
amr_reportOBJS=amr_report.o common.o gff.o alignment.o
amr_report: $(amr_reportOBJS)
$(CXX) $(LDFLAGS) -o $@ $(amr_reportOBJS)

amrfinder.o: common.hpp common.inc gff.hpp
amrfinder.o: common.hpp common.inc gff.hpp tsv.hpp columns.hpp version.txt
amrfinderOBJS=amrfinder.o common.o gff.o tsv.o
amrfinder: $(amrfinderOBJS)
$(CXX) $(LDFLAGS) -o $@ $(amrfinderOBJS) -pthread $(DBDIR)

amrfinder_update.o: common.hpp common.inc
amrfinder_update.o: common.hpp common.inc curl_easy.hpp version.txt
amrfinder_updateOBJS=amrfinder_update.o common.o curl_easy.o
amrfinder_update: $(amrfinder_updateOBJS)
@if [ "$(TEST_UPDATE)" != "" ] ; \
Expand All @@ -116,43 +117,47 @@ amrfinder_update: $(amrfinder_updateOBJS)
fi # make sure the next make command rebuilds amrfinder_update
$(CXX) $(LDFLAGS) -o $@ $(amrfinder_updateOBJS) -lcurl

amrfinder_index.o: common.hpp common.inc
amrfinder_index.o: common.hpp common.inc version.txt
amrfinder_indexOBJS=amrfinder_index.o common.o
amrfinder_index: $(amrfinder_indexOBJS)
$(CXX) $(LDFLAGS) -o $@ $(amrfinder_indexOBJS)

fasta_check.o: common.hpp common.inc
fasta_check.o: common.hpp common.inc version.txt
fasta_checkOBJS=fasta_check.o common.o
fasta_check: $(fasta_checkOBJS)
$(CXX) $(LDFLAGS) -o $@ $(fasta_checkOBJS)

fasta_extract.o: common.hpp common.inc
fasta_extract.o: common.hpp common.inc version.txt
fasta_extractOBJS=fasta_extract.o common.o
fasta_extract: $(fasta_extractOBJS)
$(CXX) $(LDFLAGS) -o $@ $(fasta_extractOBJS)

fasta2parts.o: common.hpp common.inc
fasta2parts.o: common.hpp common.inc version.txt
fasta2partsOBJS=fasta2parts.o common.o
fasta2parts: $(fasta2partsOBJS)
$(CXX) $(LDFLAGS) -o $@ $(fasta2partsOBJS)

gff_check.o: common.hpp common.inc gff.hpp
gff_check.o: common.hpp common.inc gff.hpp version.txt
gff_checkOBJS=gff_check.o common.o gff.o
gff_check: $(gff_checkOBJS)
$(CXX) $(LDFLAGS) -o $@ $(gff_checkOBJS)

dna_mutation.o: common.hpp common.inc alignment.hpp
dna_mutation.o: common.hpp common.inc alignment.hpp tsv.hpp columns.hpp version.txt
dna_mutationOBJS=dna_mutation.o common.o alignment.o
dna_mutation: $(dna_mutationOBJS)
$(CXX) $(LDFLAGS) -o $@ $(dna_mutationOBJS)

mutate.o: common.hpp common.inc alignment.hpp seq.hpp
mutate.o: common.hpp common.inc alignment.hpp seq.hpp version.txt
mutateOBJS=mutate.o common.o alignment.o seq.o
mutate: $(mutateOBJS)
$(CXX) -o $@ $(mutateOBJS)

stxtyper:
<<<<<<< HEAD
$(MAKE) -C stxtyper
=======
$(MAKE) -C stxtyper
>>>>>>> 8c9cf9776b6a801b83b13fd871167617abeba38b

clean:
rm -f *.o
Expand All @@ -170,24 +175,30 @@ install:
# amrfinder binaries for github binary release
GITHUB_FILE=amrfinder_binaries_v$(VERSION_STRING)
GITHUB_FILES = test_amrfinder.sh test_*.expected test_*.fa test_*.gff $(BINARIES)

github_binaries:
@if [ ! -e version.txt ]; \
then \
echo >&2 "version.txt required to make a distribution file"; \
false; \
fi
# first recompile amrfinder.o to pick up the new version info
rm amrfinder.o amrfinder
make
# and remove leaky NCBI paths
make clean
make all CXX=/usr/bin/g++ LD_RUN_PATH= -d
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
if [ -e $(GITHUB_FILE).tar.gz ]; then rm $(GITHUB_FILE).tar.gz; fi
cd $(GITHUB_FILE); tar cvfz ../$(GITHUB_FILE).tar.gz *
# tar cvfz $(GITHUB_FILE).tar.gz $(GITHUB_FILE)/*
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
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
./test_amrfinder.sh
make -C stxtyper test
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# WARNING: This is an experimental version that includes StxTyper

Currently it will need to be compiled from source to install.

### Downloading and compiling AMRFinderPlus with StxTyper

git clone https://github.com/ncbi/amr.git
cd amr
git checkout stxtype
git submodule update --init
make
./amrfinder -u
make test

# NCBI Antimicrobial Resistance Gene Finder (AMRFinderPlus)

This software and the accompanying database are designed to find acquired antimicrobial resistance genes and point mutations in protein and/or assembled nucleotide sequences. We have also added "plus" stress, heat, and biocide resistance and virulence factors for [some organisms](https://github.com/evolarjun/amr/wiki/Curated-organisms).
Expand Down
Loading

0 comments on commit ccea0eb

Please sign in to comment.