diff --git a/src/Makefile b/src/Makefile index 3653b29..210b685 100644 --- a/src/Makefile +++ b/src/Makefile @@ -11,14 +11,14 @@ EXAMPLE = example_c EXAMPLE_CPP = example_cpp JAVA_JAR = ssw.jar JAVA_LIB = libsswjni.so -JAVA_INLCUDES = -I"$(JAVA_HOME)/include" -I"$(JAVA_HOME)/include/linux" +JAVA_INLCUDES = -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux JAVA_OBJ = ssw/Aligner.class ssw/Alignment.class ssw/Example.class .PHONY: all default java clean default: $(PROG) $(EXAMPLE) $(EXAMPLE_CPP) $(LIB) core: $(PROG) -java: $(JAVA_JAR) $(JAVA_LIB) +java: java_home $(JAVA_JAR) $(JAVA_LIB) all: default java $(LIB): ssw.c ssw.h @@ -47,7 +47,13 @@ $(JAVA_JAR): $(JAVA_OBJ) %.class: %.java javac -cp ./ $< - + +java_home: +ifndef JAVA_HOME + @$(ECHO) "ERROR: Your JAVA_HOME environment variable is not set." + exit 1 +endif + ssw.o: ssw.c ssw.h $(CC) -c -o $@ $< $(CFLAGS) diff --git a/src/pyssw.py b/src/pyssw.py index 4bd4ca9..55bd95b 100755 --- a/src/pyssw.py +++ b/src/pyssw.py @@ -3,7 +3,7 @@ Simple python wrapper for SSW library Please put the path of libssw.so into LD_LIBRARY_PATH or pass it explicitly as a parameter By Yongan Zhao (March 2016) -Revised by Mengyao Zhao on 2022-May-20 +Revised by Mengyao Zhao on 2022-May-23 """ import sys @@ -224,13 +224,8 @@ def main(args): # assume the format of the input score matrix is the same as that of http://www.ncbi.nlm.nih.gov/Class/FieldGuide/BLOSUM62.txt lEle, dEle2Int, dInt2Ele, lScore = ssw_lib.read_matrix(args.sMatrix) -<<<<<<< pyssw_fixes - if args.bBest and args.bProtein: - print >> sys.stderr, 'Reverse complement alignment is not available for protein sequences.' -======= if args.bBest and args.bProtien: sys.stderr.write('Reverse complement alignment is not available for protein sequences.\n') ->>>>>>> master # translate score matrix to ctypes mat = (len(lScore) * ct.c_int8) ()