Skip to content

Commit

Permalink
Output read names unless option '-id' is supplied.
Browse files Browse the repository at this point in the history
  • Loading branch information
brianwalenz committed Oct 21, 2020
1 parent 6a64765 commit ef09dea
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/overlapErrorAdjustment/fixErrors.C
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ main(int argc, char **argv) {

char const *outName = "-";

bool useNames = true;

uint32 bgnID = 1;
uint32 endID = UINT32_MAX;

Expand All @@ -58,6 +60,9 @@ main(int argc, char **argv) {
} else if (strcmp(argv[arg], "-red") == 0) {
redIn = argv[++arg];

} else if (strcmp(argv[arg], "-id") == 0) {
useNames = false;

} else if (strcmp(argv[arg], "-r") == 0) {
decodeRange(argv[++arg], bgnID, endID);

Expand Down Expand Up @@ -155,7 +160,10 @@ main(int argc, char **argv) {
Clen,
changes);

AS_UTL_writeFastA(outFASTA->file(), corBases, corBasesLen, 0, ">%d\n", curID);
if (useNames == true)
AS_UTL_writeFastA(outFASTA->file(), corBases, corBasesLen, 0, ">%s\n", read.sqRead_name());
else
AS_UTL_writeFastA(outFASTA->file(), corBases, corBasesLen, 0, ">%d\n", curID);

corBasesLen = 0; // correctRead() appends to the corBases array, which we don't want.
}
Expand Down

0 comments on commit ef09dea

Please sign in to comment.