Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use index chunks in pileup.formats.bam #158

Merged
merged 1 commit into from May 22, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 5 additions & 3 deletions src/BamDataSource.js
Expand Up @@ -129,9 +129,11 @@ function create(spec: BamSpec): BamDataSource {
throw new Error(`Missing indexURL from track data: ${JSON.stringify(spec)}`);
}

// TODO: pass indexChunks, see flow issue facebook/flow#437
return createFromBamFile(new BamFile(new RemoteFile(url),
new RemoteFile(indexUrl)));
// TODO: this is overly repetitive, see flow issue facebook/flow#437
var bamFile = spec.indexChunks ?
new BamFile(new RemoteFile(url), new RemoteFile(indexUrl), spec.indexChunks) :
new BamFile(new RemoteFile(url), new RemoteFile(indexUrl));
return createFromBamFile(bamFile);
}

module.exports = {
Expand Down