Skip to content

Commit

Permalink
Remove support for 'gapped' consensus sequence.
Browse files Browse the repository at this point in the history
  • Loading branch information
brianwalenz committed Jul 15, 2019
1 parent 48b24d3 commit 92f8c95
Show file tree
Hide file tree
Showing 13 changed files with 227 additions and 422 deletions.
17 changes: 9 additions & 8 deletions src/correction/falconsense.C
Original file line number Diff line number Diff line change
Expand Up @@ -216,17 +216,18 @@ generateFalconConsensus(falconConsensus *fc,
layout->_sourceBgn = (end == 0) ? (0) : (fd->pos[bgn]); // Space based (probably).
layout->_sourceEnd = (end == 0) ? (0) : (fd->pos[end - 1] + 1); // Space based.

resizeArrayPair(layout->_gappedBases, layout->_gappedQuals, layout->_gappedLen, layout->_gappedMax, end - bgn + 1, resizeArray_doNothing);
resizeArrayPair(layout->_bases, layout->_quals, layout->_basesLen, layout->_basesMax, end - bgn + 1, resizeArray_doNothing);

for (uint32 ii=bgn; ii<end; ii++) {
layout->_gappedBases[ii-bgn] = fd->seq[ii];
layout->_gappedQuals[ii-bgn] = fd->eqv[ii];
layout->_bases[ii-bgn] = fd->seq[ii];
layout->_quals[ii-bgn] = fd->eqv[ii];
}

layout->_gappedLen = end - bgn;
layout->_layoutLen = end - bgn;
layout->_basesLen = end - bgn;

layout->_gappedBases[layout->_gappedLen] = 0;
layout->_gappedQuals[layout->_gappedLen] = 0;
layout->_bases[layout->_basesLen] = 0;
layout->_quals[layout->_basesLen] = 0;

// One could dump bases and quals here, if so desired.

Expand Down Expand Up @@ -507,7 +508,7 @@ main(int argc, char **argv) {
layout->saveToStream(cnsFile);

if (seqFile)
layout->dumpFASTQ(seqFile, false);
layout->dumpFASTQ(seqFile);

delete layout;
layout = new tgTig(); // Next loop needs an existing empty layout.
Expand Down Expand Up @@ -721,7 +722,7 @@ main(int argc, char **argv) {
layout->saveToStream(cnsFile);

if (seqFile)
layout->dumpFASTQ(seqFile, false);
layout->dumpFASTQ(seqFile);

corStore->unloadTig(layout->tigID());
}
Expand Down
4 changes: 2 additions & 2 deletions src/gfa/alignGFA.C
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ public:
};

void set(tgTig *tig) {
len = tig->length(false);
len = tig->length();
seq = new char [len + 1];

memcpy(seq, tig->bases(false), len);
memcpy(seq, tig->bases(), len);

seq[len] = 0;
};
Expand Down
4 changes: 2 additions & 2 deletions src/stores/tgStore.C
Original file line number Diff line number Diff line change
Expand Up @@ -276,8 +276,8 @@ tgStore::insertTig(tgTig *tig, bool keepInCache) {

// Check that the components do not exceed the bound.
//
if (tig->_gappedLen > 0) {
uint32 len = tig->_gappedLen;
if (tig->_basesLen > 0) {
uint32 len = tig->_basesLen;
uint32 swp = 0;
uint32 neg = 0;
uint32 pos = 0;
Expand Down
Loading

0 comments on commit 92f8c95

Please sign in to comment.