diff --git a/src/Makefile b/src/Makefile index a3991ea74..e8081785a 100644 --- a/src/Makefile +++ b/src/Makefile @@ -14,14 +14,19 @@ CXX?=g++ # Notes: - "-Wno-sign-compare" eliminates a high number of warnings (see footnote below). Please adopt # a strict signed-only usage strategy to avoid mistakes since we are not warned about this. # - The order of object files in $(OBJS) IS IMPORTANT (see lldouble.hh) -CXXFLAGS := -Wall -Wno-sign-compare -pedantic -O3 -std=c++11 ${CXXFLAGS}#-DDEBUG -g -ggdb -pg -DDEBUG_STATES +# for debugging set +# OPT = -g +# CXXFLAGS = -DDEBUG -g -ggdb -pg -DDEBUG_STATES +# in common.mk or the environment +OPT ?= -O3 +CXXFLAGS += -Wall -Wno-sign-compare -pedantic ${OPT} -std=c++11 ifeq (,$(findstring $(ZIPINPUT),0 false False FALSE)) # if ZIPINPUT is not defined or is something else than 0, false, False or FALSE CPPFLAGS += -DZIPINPUT - LIBS = -lboost_iostreams + LIBS += -lboost_iostreams endif -INCLS = -I../include +INCLS += -I../include OBJS = genbank.o properties.o pp_profile.o pp_hitseq.o pp_scoring.o statemodel.o namgene.o \ types.o gene.o evaluation.o motif.o geneticcode.o hints.o extrinsicinfo.o projectio.o \ @@ -77,11 +82,11 @@ all: $(OBJS) $(TOBJS) $(DUMOBJS) $(PROGR) info augustus: augustus.cc $(OBJS) $(DUMOBJS) $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ $(INCLS) $(LIBS) - cp augustus ../bin/ + cp -f augustus ../bin/ etraining: etraining.cc $(TOBJS) $(OBJS) $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ $(INCLS) $(LIBS) - cp etraining ../bin/ + cp -f etraining ../bin/ evaluate: evaluate.cc $(OBJS) $(DUMOBJS) $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ $(INCLS) $(LIBS) @@ -89,31 +94,31 @@ evaluate: evaluate.cc $(OBJS) $(DUMOBJS) fastBlockSearch: fastBlockSearch.cc pp_fastBlockSearcher.o \ types.o properties.o geneticcode.o pp_profile.o lldouble.o $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ $(INCLS) $(LIBS) - cp fastBlockSearch ../bin/ + cp -f fastBlockSearch ../bin/ pp_simScore: pp_simscore.cc fasta.o types.o properties.o geneticcode.o pp_profile.o lldouble.o $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ $(INCLS) $(LIBS) - cp pp_simScore ../bin/ + cp -f pp_simScore ../bin/ prepareAlign: pp_prepare_align.cc $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ - cp prepareAlign ../bin/ + cp -f prepareAlign ../bin/ load2db: load2db.cc fasta.o hints.o types.o properties.o lldouble.o $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ $(INCLS) $(LIBS) - cp load2db ../bin/ + cp -f load2db ../bin/ load2sqlitedb: load2sqlitedb.cc fasta.o hints.o types.o properties.o lldouble.o sqliteDB.o $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ $(INCLS) $(LIBS) - cp load2sqlitedb ../bin/ + cp -f load2sqlitedb ../bin/ getSeq: getSeq.cc $(OBJS) $(DUMOBJS) $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ $(INCLS) $(LIBS) - cp getSeq ../bin/ + cp -f getSeq ../bin/ espoca: espoca.cc $(OBJS) $(DUMOBJS) $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ $(INCLS) $(LIBS) - cp espoca ../bin/ + cp -f espoca ../bin/ info: echo "$(CXXFLAGS) $(CPPFLAGS)" > $(INFO) diff --git a/src/compgenepred.cc b/src/compgenepred.cc index e116c871d..16583a661 100644 --- a/src/compgenepred.cc +++ b/src/compgenepred.cc @@ -79,7 +79,9 @@ CompGenePred::CompGenePred() : tree(Constant::treefile) { for(int j=0; j keep; // the subset of species to be kept - char buf[256]; - while(ifstrm.getline(buf,255)){ + char buf[8192]; + while(ifstrm.getline(buf, sizeof(buf)-1)){ stringstream stm(buf); string s; if(stm >> s) @@ -123,13 +123,16 @@ PhyloTree::PhyloTree(string filename){ break; } } - if(!found){ //if species name ist not in list, remove leaf + if(!found){ //if species name is not in list, remove leaf drop(species[i]); } } - if(species.size() < 2 || species.size() < keep.size()) - throw ProjectError(only_species + " has the wrong format. correct format:\n\n" + - "hg19\n" + "mm9\n" + "galGal3\n" + "...\n" + + if(numSp < 2 || numSp < keep.size()) + throw ProjectError(only_species + " has the wrong format or doesn't match tree. Correct format:\n\n" + + "hg19 /dir/to/genome/human.fa\n" + + "mm9 /dir/to/genome/mouse.fa\n" + + "galGal3 /dir/to/genome/chicken.fa\n" + + "...\n" + "The species identifiers must be the same as in the phylogenetic tree. At least two species identifiers must be given."); } else diff --git a/src/randseqaccess.cc b/src/randseqaccess.cc index e9cb132b6..19d0797c6 100644 --- a/src/randseqaccess.cc +++ b/src/randseqaccess.cc @@ -98,7 +98,8 @@ void SpeciesCollection::readExtrinsicCFGFile(vector &speciesNames){ } else{ if(find(speciesNames.begin(), speciesNames.end(), skey) == speciesNames.end()) { - throw ProjectError(skey + " is not a valid species identifier."); + throw ProjectError("species identifier '" + skey + "' referenced in extrinsicCfgFile '" + + filename + "' not found in defined set of species"); } addSpeciesToGroup(skey,groupCount); cout <<" "<