Skip to content

Commit

Permalink
fixed conflict in pyssw.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Mengyao Zhao committed May 23, 2022
1 parent b940937 commit 714460d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
12 changes: 9 additions & 3 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)

Expand Down
7 changes: 1 addition & 6 deletions src/pyssw.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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) ()
Expand Down

0 comments on commit 714460d

Please sign in to comment.