1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129
|
#
# Unix Makefile for readseq
# to use, command me:
# % make -- or --
# % make CC=your-c-compiler-name
#
# pick an ANSI C compiler (the default Sun CC is not ANSI)
CC=gcc # Gnu C Compiler
#CC=cc # SGI Irix
#CC=vcc # some DEC Ultrix
CFLAGS+= -g -O2
#CFLAGS= -DSMALLCHECKSUM # if you prefer to use a GCG-standard 13 bit checksum
# instead of a full 32 bit checksum. This may enhance compatibility w/ GCG software
SOURCES= readseq.c ureadseq.c ureadseq.h ureadasn.c
DOCS= Readme Readseq.help Formats Stdfiles Makefile Make.com add.gdemenu *.std
# NCBI toolkit support for ASN.1 reader
# this is path to NCBI toolkit, you must set for your system:
NCBI=
#NCBI=/bio/mb/ncbi
#
OTHERLIBS=-lm
LIB1=-lncbi
LIB2=-lncbiobj
LIB3=-lncbicdr
LIB4=-lvibrant
LIB5=-lncbimmdb -lncbiid1 -lnetcli
LIB6=-lncbiacc
LIB7=-lncbitool
INCPATH=/usr/include/ncbi
#LIBPATH=$(NCBI)/lib
NCFLAGS=$(CFLAGS) -DNCBI -I$(INCPATH)
NLDFLAGS=-I$(INCPATH)
NLIBS=$(LIB1) $(LIB2) $(LIB3) $(LIB6) $(LIB7) $(LIB5) $(OTHERLIBS)
ARBFLAGS=-DARB
all: build
#build: $(SOURCES)
# @echo "Compiling readseq..."
# $(CC) $(CFLAGS) -o readseq readseq.c ureadseq.c
# if using NCBI, uncomment these lines in place of build: above
build: $(SOURCES)
@echo "Compiling readseq with NCBI toolkit support and ARB patches";
$(CC) -o readseq $(NLDFLAGS) $(NCFLAGS) $(ARBFLAGS) readseq.c ureadseq.c ureadasn.c $(NLIBS) $(LDFLAGS)
test:
@echo ""
@echo "Test for general read/write of all chars:"
./readseq -p alphabet.std -otest.alpha
-diff test.alpha alphabet.std
@echo ""
@echo "Test for valid format conversions:"
./readseq -v -p -f=ig nucleic.std -otest.ig
./readseq -v -p -f=gb test.ig -otest.gb
./readseq -v -p -f=nbrf test.gb -otest.nbrf
./readseq -v -p -f=embl test.nbrf -otest.embl
./readseq -v -p -f=gcg test.embl -otest.gcg
./readseq -v -p -f=strider test.gcg -otest.strider
./readseq -v -p -f=fitch test.strider -otest.fitch
./readseq -v -p -f=fasta test.fitch -otest.fasta
./readseq -v -p -f=pir test.fasta -otest.pir
./readseq -v -p -f=ig test.pir -otest.ig-b
-diff test.ig test.ig-b
@echo ""
@echo "Test for multiple-sequence format conversions:"
./readseq -p -f=ig multi.std -otest.m-ig
./readseq -p -f=gb test.m-ig -otest.m-gb
./readseq -p -f=nbrf test.m-gb -otest.m-nbrf
./readseq -p -f=embl test.m-nbrf -otest.m-embl
./readseq -p -f=fasta test.m-embl -otest.m-fasta
./readseq -p -f=pir test.m-fasta -otest.m-pir
./readseq -p -f=msf test.m-pir -otest.m-msf
./readseq -p -f=paup test.m-msf -otest.m-paup
./readseq -p -f=ig test.m-paup -otest.m-ig-b
-diff test.m-ig test.m-ig-b
# !!!!!
# Conversion to NCBI ASN.1 works improperly!!! It is very likely due to some
# changes in ASN.1 format specifications that this program does not take into
# account. At least, it allows inappropriate encoding to be stored as ASN.1
# data.
#
# if using NCBI, uncomment these lines
# @echo ""
# @echo "Test of NCBI ASN.1 conversions:"
# ./readseq -p -f=asn test.m-ig -otest.m-asn
# ./readseq -p -f=ig test.m-asn -otest.m-ig-c
# -diff test.m-ig test.m-ig-c
#
@echo ""
@echo "Expect differences in the header lines due to"
@echo "different format headers. If any sequence lines"
@echo "differ, or if the checksums differ, there is a problem."
@echo "----------------------"
@echo ""
@echo "To clean up test files, command me:"
@echo " make clean"
install:
install readseq $(DESTDIR)/usr/bin
install *.std $(DESTDIR)/usr/share/doc/readseq/tests
install Makefile $(DESTDIR)/usr/share/doc/readseq/tests
clean:
rm -f *.o core test.* readseq
shar:
@echo "shell archiving files..."
-rm -f readseq*.shar
mkdir readseqd
cp $(SOURCES) readseqd
cp $(DOCS) readseqd
shar -v readseqd > readseq.shar
rm -rf readseqd
|