Skip to content

Commit

Permalink
Merge pull request #8 from klarman-cell-observatory/boli
Browse files Browse the repository at this point in the history
Fixed a bug for detecting totalA or totalBC chemistry
  • Loading branch information
bli25 committed May 17, 2021
2 parents dcc9a9c + cfca35b commit 0756c33
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions generate_count_matrix_ADTs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -231,9 +231,11 @@ void detect_totalseq_type(string& extra_info) {
feature_iter = feature_index.find(binary_feature);
ntotA += (feature_iter != feature_index.end() && feature_iter->second.item_id >= 0);

binary_feature = barcode_to_binary(safe_substr(read2.seq, totalseq_BC_pos, feature_blen));
feature_iter = feature_index.find(binary_feature);
ntotBC += (feature_iter != feature_index.end() && feature_iter->second.item_id >= 0);
if (read2.seq.length() >= totalseq_BC_pos + feature_blen) {
binary_feature = barcode_to_binary(safe_substr(read2.seq, totalseq_BC_pos, feature_blen));
feature_iter = feature_index.find(binary_feature);
ntotBC += (feature_iter != feature_index.end() && feature_iter->second.item_id >= 0);
}

++cnt;
}
Expand Down

0 comments on commit 0756c33

Please sign in to comment.