# ChainAdapter

Auto-generated from the config schema in the source — see the [config guide](https://jbrowse.org/jb2/docs/config_guide) for concepts. Provided by the `comparative-adapters` plugin. [View source](https://github.com/GMOD/jbrowse-components/blob/main/plugins/comparative-adapters/src/ChainAdapter/configSchema.ts).

## Example usage

```js
{
  type: 'SyntenyTrack',
  trackId: 'my_track',
  name: 'My track',
  assemblyNames: ['hg19', 'hg38'],
  adapter: {
    type: 'ChainAdapter',
    uri: 'https://example.com/aln.chain',
    queryAssembly: 'hg19',
    targetAssembly: 'hg38',
  },
}
```

Reads UCSC chain alignment files, which need the query and target assembly
names.

## Related links

- **Track:** [SyntenyTrack](../syntenytrack)
- **Display:** [ChordSyntenyDisplay](../chordsyntenydisplay)
- **Display:** [DotplotDisplay](../dotplotdisplay)
- **Display:** [LGVSyntenyDisplay](../lgvsyntenydisplay)
- **Display:** [LinearMarkDisplay](../linearmarkdisplay)
- **Display:** [LinearSyntenyDisplay](../linearsyntenydisplay)
- **Display:** [MultiWaySyntenyDisplay](../multiwaysyntenydisplay)

## Config slots

These slots go inside the track's `adapter`: `"adapter": { "type": "ChainAdapter", ... }`. It also accepts the [shorthand](https://jbrowse.org/jb2/docs/config_guides/file_types#the-uri-shorthand) keys `uri`, `baseUri` in place of writing a location slot out. Slot types (`fileLocation`, `frozen`, ...) are explained in the [config slot types reference](https://jbrowse.org/jb2/docs/config_guides/slot_types). Slots a base configuration contributes are listed here too, so this table is the whole surface.

| Slot | Description |
| --- | --- |
| **chainLocation**<br>[`fileLocation`](https://jbrowse.org/jb2/docs/config_guides/slot_types#filelocation) = <code>{ uri: '/path/to/file.chain', locationType: 'UriLocation' }</code> | location of the UCSC chain file, as used by `liftOver` and produced by `axtChain`. May be gzipped; the whole file is read into memory. |
| **assemblyNames**<br>[`stringArray`](https://jbrowse.org/jb2/docs/config_guides/slot_types#stringarray) = <code>[]</code> | Array of assembly names to use for this file. The query assembly name is the first value in the array, target assembly name is the second |
| **targetAssembly**<br>[`string`](https://jbrowse.org/jb2/docs/config_guides/slot_types#string) = <code>''</code> | Alternative to assemblyNames: the target assembly name |
| **queryAssembly**<br>[`string`](https://jbrowse.org/jb2/docs/config_guides/slot_types#string) = <code>''</code> | Alternative to assemblyNames: the query assembly name |

