Skip to content

Commit

Permalink
Add default filters to CRAM decoder (including filter duplicates). Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jrobinso committed Jul 21, 2021
1 parent f443243 commit ef7fe8f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions js/cram/cramReader.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ class CramReader {
const records = await this.indexedCramFile.getRecordsForRange(chrIdx, bpStart, bpEnd);

for (let record of records) {

const refID = record.sequenceId;
const pos = record.alignmentStart;
const alignmentEnd = pos + record.lengthOnRef;
Expand All @@ -166,9 +167,9 @@ class CramReader {

const alignment = decodeCramRecord(record, header.chrNames);

// if (filter.pass(alignment)) {
alignmentContainer.push(alignment);
// }
if (this.filter.pass(alignment)) {
alignmentContainer.push(alignment);
}
}

alignmentContainer.finish();
Expand Down

0 comments on commit ef7fe8f

Please sign in to comment.