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

Add resolutionMultiplier config slot to BigWigAdapter #4619

Merged
merged 1 commit into from
Oct 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion plugins/wiggle/src/BigWigAdapter/BigWigAdapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,11 @@ export default class BigWigAdapter extends BaseFeatureDataAdapter {
return ObservableCreate<Feature>(async observer => {
statusCallback('Downloading bigwig data')
const source = this.getConf('source')
const resolutionMultiplier = this.getConf('resolutionMultiplier')
const { bigwig } = await this.setup(opts)
const feats = await bigwig.getFeatures(refName, start, end, {
...opts,
basesPerSpan: bpPerPx / resolution,
basesPerSpan: (bpPerPx / resolution) * resolutionMultiplier,
})

for (const data of feats) {
Expand Down
6 changes: 6 additions & 0 deletions plugins/wiggle/src/BigWigAdapter/configSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ const BigWigAdapter = ConfigurationSchema(
defaultValue: '',
description: 'Used for multiwiggle',
},

resolutionMultiplier: {
type: 'number',
defaultValue: 1,
description: 'Initial resolution multiplier',
},
},
{ explicitlyTyped: true },
)
Expand Down
1 change: 1 addition & 0 deletions test_data/config_demo.json
Original file line number Diff line number Diff line change
Expand Up @@ -901,6 +901,7 @@
"category": ["SKBR3"],
"adapter": {
"type": "BigWigAdapter",
"resolutionMultiplier": 10,
"bigWigLocation": {
"uri": "https://s3.amazonaws.com/jbrowse.org/genomes/hg19/reads_lr_skbr3.fa_ngmlr-0.2.3_mapped.bam.regions.bw",
"locationType": "UriLocation"
Expand Down
Loading