From: pschloss Date: Thu, 29 Jul 2010 04:01:58 +0000 (+0000) Subject: pds' small change to sffinfo X-Git-Url: https://git.donarmstrong.com/?p=mothur.git;a=commitdiff_plain;h=a3d9877d9c62058dbe167ceca159f4b76744f1cf pds' small change to sffinfo --- diff --git a/makefile b/makefile index dccd2c3..55039af 100644 --- a/makefile +++ b/makefile @@ -48,7 +48,7 @@ ifeq ($(strip $(USEREADLINE)),yes) -lncurses endif -USEMPI ?= yes +USEMPI ?= no ifeq ($(strip $(USEMPI)),yes) CXX = mpic++ diff --git a/sffinfocommand.cpp b/sffinfocommand.cpp index 8c0e473..cb5f874 100644 --- a/sffinfocommand.cpp +++ b/sffinfocommand.cpp @@ -584,16 +584,23 @@ int SffInfoCommand::printFastaSeqData(ofstream& out, seqRead& read, Header& head string seq = read.bases; - if (trim) { - seq = seq.substr((header.clipQualLeft-1), (header.clipQualRight-header.clipQualLeft+1)); + if(header.clipQualRight != 0){ + seq = seq.substr((header.clipQualLeft-1), (header.clipQualRight-header.clipQualLeft+1)); + } + else{ + seq = seq.substr(header.clipQualLeft-1); + } }else{ //if you wanted the sfftxt then you already converted the bases to the right case if (!sfftxt) { //make the bases you want to clip lowercase and the bases you want to keep upper case for (int i = 0; i < (header.clipQualLeft-1); i++) { seq[i] = tolower(seq[i]); } for (int i = (header.clipQualLeft-1); i < (header.clipQualRight-1); i++) { seq[i] = toupper(seq[i]); } - for (int i = (header.clipQualRight-1); i < seq.length(); i++) { seq[i] = tolower(seq[i]); } + + if(header.clipQualRight != 0){ + for (int i = (header.clipQualRight-1); i < seq.length(); i++) { seq[i] = tolower(seq[i]); } + } } }