Skip to content

Commit

Permalink
find EC after destrand
Browse files Browse the repository at this point in the history
  • Loading branch information
mfansler committed May 31, 2020
1 parent 1dace1b commit 9b2cc60
Showing 1 changed file with 5 additions and 12 deletions.
17 changes: 5 additions & 12 deletions src/ProcessReads.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1482,29 +1482,22 @@ void BUSProcessor::processBuffer() {
u.clear();

// process 2nd read
index.match(seq,seqlen, v);
index.match(seq, seqlen, v);

// collect the target information
int ec = -1;
int r = tc.intersectKmers(v, v2, false,u);
if (!u.empty()) {
ec = tc.findEC(u);
}

int r = tc.intersectKmers(v, v2, false, u);

// optional strand-specificity
if (mp.opt.strand_specific && !u.empty()) {
/* debugging
std::cerr << "[info] applying strand specificity" << std::endl;
*/

int p = -1;
Kmer km;
KmerEntry val;

if (!v.empty()) {
vtmp.clear();
bool firstStrand = (mp.opt.strand == ProgramOptions::StrandType::FR);
p = findFirstMappingKmer(v,val);
p = findFirstMappingKmer(v, val);
km = Kmer((seq+p));
bool strand = (val.isFw() == (km == km.rep())); // k-mer maps to fw strand?
// might need to optimize this
Expand Down Expand Up @@ -1541,7 +1534,7 @@ void BUSProcessor::processBuffer() {
b.flags = (uint32_t) flags[i / jmax];
}

//ec = tc.findEC(u);
ec = tc.findEC(u);

// count the pseudoalignment
if (ec == -1 || ec >= counts.size()) {
Expand Down

0 comments on commit 9b2cc60

Please sign in to comment.