Skip to content

Commit

Permalink
Merge pull request #453 from akmorrow13/pileup
Browse files Browse the repository at this point in the history
GA4GHDataSource only requests reads not in cache
  • Loading branch information
armish committed Feb 21, 2017
2 parents ae44838 + b71d626 commit 5b7858a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/main/sources/GA4GHDataSource.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,17 @@ function create(spec: GA4GHSpec): AlignmentDataSource {

interval = expandRange(interval);

// select only intervals not yet loaded into coveredRangesß
var intervals = interval.complementIntervals(coveredRanges);

// We "cover" the interval immediately (before the reads have arrived) to
// prevent duplicate network requests.
coveredRanges.push(interval);
coveredRanges = ContigInterval.coalesce(coveredRanges);
fetchAlignmentsForInterval(interval, null, 1 /* first request */);

intervals.forEach(i => {
fetchAlignmentsForInterval(i, null, 1 /* first request */);
});
}

function notifyFailure(message: string) {
Expand Down

0 comments on commit 5b7858a

Please sign in to comment.