Skip to content

Commit

Permalink
Add name+source example in volvox
Browse files Browse the repository at this point in the history
  • Loading branch information
cmdcolin committed Aug 23, 2022
1 parent 3a2f0e8 commit 813e237
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
4 changes: 3 additions & 1 deletion plugins/wiggle/src/MultiWiggleAdapter/MultiWiggleAdapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,10 @@ export default class MultiWiggleAdapter extends BaseFeatureDataAdapter {
// something, but it is static for this particular multi-wiggle adapter type
async getSources() {
const adapters = await this.getAdapters()
return adapters.map(({ dataAdapter, source, ...rest }) => ({
console.log({ adapters })
return adapters.map(({ dataAdapter, source, name, ...rest }) => ({
name: source,
__name: name,
...rest,
}))
}
Expand Down
10 changes: 6 additions & 4 deletions test_data/volvox/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -607,28 +607,30 @@
"type": "MultiWiggleAdapter",
"subadapters": [
{
"source": "k1",
"name": "k1",
"source": "j1",
"type": "BigWigAdapter",
"bigWigLocation": {
"uri": "v1.cram.bw"
}
},
{
"source": "k2",
"name": "k2",
"source": "j2",
"type": "BigWigAdapter",
"bigWigLocation": {
"uri": "v2.cram.bw"
}
},
{
"source": "k3",
"name": "k3",
"type": "BigWigAdapter",
"bigWigLocation": {
"uri": "v3.cram.bw"
}
},
{
"source": "k4",
"name": "k4",
"type": "BigWigAdapter",
"bigWigLocation": {
"uri": "v4.cram.bw"
Expand Down
3 changes: 2 additions & 1 deletion website/docs/config_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -689,7 +689,8 @@ Example with group field
}
```

The "name" or "source" field on the subadapters will be used as the subtrack label
The "name" or "source" field on the subadapters will be used as the subtrack
label (where, "source" will be given priority over "name" if specified)

### QuantitativeTrack config

Expand Down

0 comments on commit 813e237

Please sign in to comment.