@jbrowse/plugin-data-management 1.4.1 → 1.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/dist/AddTrackWidget/components/TrackSourceSelect.d.ts +2 -1
  2. package/dist/AddTrackWidget/model.d.ts +1 -363
  3. package/dist/PluginStoreWidget/components/CustomPluginForm.d.ts +1 -1
  4. package/dist/PluginStoreWidget/components/PluginCard.d.ts +2 -2
  5. package/dist/SetDefaultSession/SetDefaultSession.d.ts +4 -6
  6. package/dist/index.d.ts +8 -12
  7. package/dist/plugin-data-management.cjs.development.js +627 -501
  8. package/dist/plugin-data-management.cjs.development.js.map +1 -1
  9. package/dist/plugin-data-management.cjs.production.min.js +1 -1
  10. package/dist/plugin-data-management.cjs.production.min.js.map +1 -1
  11. package/dist/plugin-data-management.esm.js +614 -507
  12. package/dist/plugin-data-management.esm.js.map +1 -1
  13. package/package.json +3 -2
  14. package/src/AddConnectionWidget/components/AddConnectionWidget.test.js +3 -8
  15. package/src/AddTrackWidget/components/AddTrackWidget.test.js +2 -3
  16. package/src/AddTrackWidget/components/AddTrackWidget.tsx +4 -2
  17. package/src/AddTrackWidget/components/ConfirmTrack.tsx +160 -88
  18. package/src/AddTrackWidget/components/TrackSourceSelect.tsx +30 -23
  19. package/src/AddTrackWidget/components/__snapshots__/AddTrackWidget.test.js.snap +157 -124
  20. package/src/AddTrackWidget/index.test.jsx +78 -26
  21. package/src/AddTrackWidget/model.ts +5 -14
  22. package/src/AssemblyManager/AssemblyAddForm.tsx +7 -6
  23. package/src/AssemblyManager/AssemblyManager.test.tsx +1 -0
  24. package/src/HierarchicalTrackSelectorWidget/components/HierarchicalTrackSelector.js +27 -17
  25. package/src/HierarchicalTrackSelectorWidget/model.js +3 -2
  26. package/src/PluginStoreWidget/components/CustomPluginForm.tsx +164 -56
  27. package/src/PluginStoreWidget/components/InstalledPlugin.tsx +10 -2
  28. package/src/PluginStoreWidget/components/PluginCard.tsx +7 -9
  29. package/src/PluginStoreWidget/components/PluginStoreWidget.test.js +9 -10
  30. package/src/PluginStoreWidget/components/PluginStoreWidget.tsx +36 -26
  31. package/src/PluginStoreWidget/components/__snapshots__/PluginStoreWidget.test.js.snap +89 -51
  32. package/src/SetDefaultSession/SetDefaultSession.test.tsx +7 -81
  33. package/src/SetDefaultSession/SetDefaultSession.tsx +51 -162
  34. package/src/index.ts +1 -51
  35. package/src/ucsc-trackhub/configSchema.js +4 -1
  36. package/src/ucsc-trackhub/model.js +31 -31
  37. package/src/ucsc-trackhub/ucscTrackHub.js +40 -12
@@ -62,168 +62,201 @@ exports[`<AddTrackWidget /> renders 1`] = `
62
62
  class="MuiCollapse-wrapperInner"
63
63
  >
64
64
  <div
65
- class="makeStyles-root"
65
+ class="MuiPaper-root makeStyles-paper MuiPaper-elevation1 MuiPaper-rounded"
66
66
  >
67
67
  <div
68
- class="MuiPaper-root makeStyles-paper MuiPaper-elevation1 MuiPaper-rounded"
68
+ class="MuiBox-root MuiBox-root"
69
69
  >
70
70
  <label
71
71
  class="MuiFormLabel-root MuiInputLabel-root MuiInputLabel-animated MuiInputLabel-shrink"
72
72
  data-shrink="true"
73
- for="callback-editor"
74
73
  >
75
74
  Main file
76
75
  </label>
76
+ </div>
77
+ <div
78
+ class="MuiBox-root MuiBox-root"
79
+ >
77
80
  <div
78
- class="MuiGrid-root MuiGrid-container MuiGrid-spacing-xs-1 MuiGrid-align-items-xs-center"
81
+ class="MuiBox-root MuiBox-root"
79
82
  >
80
83
  <div
81
- class="MuiGrid-root MuiGrid-item"
84
+ aria-label="file, url, or account picker"
85
+ class="MuiToggleButtonGroup-root"
86
+ role="group"
82
87
  >
83
- <div
84
- aria-label="file or url picker"
85
- class="MuiToggleButtonGroup-root"
86
- role="group"
88
+ <button
89
+ aria-label="local file"
90
+ aria-pressed="false"
91
+ class="MuiButtonBase-root MuiToggleButton-root MuiToggleButtonGroup-grouped MuiToggleButtonGroup-groupedHorizontal"
92
+ tabindex="0"
93
+ type="button"
94
+ value="file"
87
95
  >
88
- <button
89
- aria-label="local file"
90
- aria-pressed="false"
91
- class="MuiButtonBase-root MuiToggleButton-root MuiToggleButtonGroup-grouped MuiToggleButtonGroup-groupedHorizontal"
92
- tabindex="0"
93
- type="button"
94
- value="file"
96
+ <span
97
+ class="MuiToggleButton-label"
95
98
  >
96
- <span
97
- class="MuiToggleButton-label"
98
- >
99
- File
100
- </span>
101
- <span
102
- class="MuiTouchRipple-root"
103
- />
104
- </button>
105
- <button
106
- aria-label="url"
107
- aria-pressed="true"
108
- class="MuiButtonBase-root MuiToggleButton-root MuiToggleButtonGroup-grouped MuiToggleButtonGroup-groupedHorizontal MuiToggleButton-selected"
109
- tabindex="0"
110
- type="button"
111
- value="url"
99
+ File
100
+ </span>
101
+ <span
102
+ class="MuiTouchRipple-root"
103
+ />
104
+ </button>
105
+ <button
106
+ aria-label="url"
107
+ aria-pressed="true"
108
+ class="MuiButtonBase-root MuiToggleButton-root MuiToggleButtonGroup-grouped MuiToggleButtonGroup-groupedHorizontal MuiToggleButton-selected"
109
+ tabindex="0"
110
+ type="button"
111
+ value="url"
112
+ >
113
+ <span
114
+ class="MuiToggleButton-label"
112
115
  >
113
- <span
114
- class="MuiToggleButton-label"
115
- >
116
- URL
117
- </span>
118
- <span
119
- class="MuiTouchRipple-root"
120
- />
121
- </button>
122
- </div>
116
+ URL
117
+ </span>
118
+ <span
119
+ class="MuiTouchRipple-root"
120
+ />
121
+ </button>
123
122
  </div>
124
- <div
125
- class="MuiGrid-root MuiGrid-item"
123
+ </div>
124
+ </div>
125
+ <div
126
+ class="MuiFormControl-root MuiTextField-root MuiFormControl-fullWidth"
127
+ >
128
+ <label
129
+ class="MuiFormLabel-root MuiInputLabel-root MuiInputLabel-formControl MuiInputLabel-animated MuiInputLabel-outlined"
130
+ data-shrink="false"
131
+ >
132
+ Enter URL
133
+ </label>
134
+ <div
135
+ class="MuiInputBase-root MuiOutlinedInput-root MuiInputBase-fullWidth MuiInputBase-formControl"
136
+ >
137
+ <input
138
+ aria-invalid="false"
139
+ class="MuiInputBase-input MuiOutlinedInput-input"
140
+ data-testid="urlInput"
141
+ type="text"
142
+ value=""
143
+ />
144
+ <fieldset
145
+ aria-hidden="true"
146
+ class="PrivateNotchedOutline-root MuiOutlinedInput-notchedOutline"
126
147
  >
127
- <div
128
- class="MuiFormControl-root MuiTextField-root MuiFormControl-fullWidth"
148
+ <legend
149
+ class="PrivateNotchedOutline-legendLabelled"
129
150
  >
130
- <div
131
- class="MuiInputBase-root MuiInput-root MuiInput-underline MuiInputBase-fullWidth MuiInput-fullWidth MuiInputBase-formControl MuiInput-formControl"
132
- >
133
- <input
134
- aria-invalid="false"
135
- class="MuiInputBase-input MuiInput-input"
136
- data-testid="urlInput"
137
- type="text"
138
- value=""
139
- />
140
- </div>
141
- </div>
142
- </div>
151
+ <span>
152
+ Enter URL
153
+ </span>
154
+ </legend>
155
+ </fieldset>
143
156
  </div>
144
- <p
145
- class="MuiFormHelperText-root"
146
- />
157
+ </div>
158
+ <p
159
+ class="MuiFormHelperText-root"
160
+ />
161
+ <div
162
+ class="makeStyles-spacer"
163
+ />
164
+ <div
165
+ class="MuiBox-root MuiBox-root"
166
+ >
147
167
  <label
148
168
  class="MuiFormLabel-root MuiInputLabel-root MuiInputLabel-animated MuiInputLabel-shrink"
149
169
  data-shrink="true"
150
- for="callback-editor"
151
170
  >
152
171
  Index file
153
172
  </label>
173
+ </div>
174
+ <div
175
+ class="MuiBox-root MuiBox-root"
176
+ >
154
177
  <div
155
- class="MuiGrid-root MuiGrid-container MuiGrid-spacing-xs-1 MuiGrid-align-items-xs-center"
178
+ class="MuiBox-root MuiBox-root"
156
179
  >
157
180
  <div
158
- class="MuiGrid-root MuiGrid-item"
181
+ aria-label="file, url, or account picker"
182
+ class="MuiToggleButtonGroup-root"
183
+ role="group"
159
184
  >
160
- <div
161
- aria-label="file or url picker"
162
- class="MuiToggleButtonGroup-root"
163
- role="group"
185
+ <button
186
+ aria-label="local file"
187
+ aria-pressed="false"
188
+ class="MuiButtonBase-root MuiToggleButton-root MuiToggleButtonGroup-grouped MuiToggleButtonGroup-groupedHorizontal"
189
+ tabindex="0"
190
+ type="button"
191
+ value="file"
164
192
  >
165
- <button
166
- aria-label="local file"
167
- aria-pressed="false"
168
- class="MuiButtonBase-root MuiToggleButton-root MuiToggleButtonGroup-grouped MuiToggleButtonGroup-groupedHorizontal"
169
- tabindex="0"
170
- type="button"
171
- value="file"
172
- >
173
- <span
174
- class="MuiToggleButton-label"
175
- >
176
- File
177
- </span>
178
- <span
179
- class="MuiTouchRipple-root"
180
- />
181
- </button>
182
- <button
183
- aria-label="url"
184
- aria-pressed="true"
185
- class="MuiButtonBase-root MuiToggleButton-root MuiToggleButtonGroup-grouped MuiToggleButtonGroup-groupedHorizontal MuiToggleButton-selected"
186
- tabindex="0"
187
- type="button"
188
- value="url"
193
+ <span
194
+ class="MuiToggleButton-label"
189
195
  >
190
- <span
191
- class="MuiToggleButton-label"
192
- >
193
- URL
194
- </span>
195
- <span
196
- class="MuiTouchRipple-root"
197
- />
198
- </button>
199
- </div>
200
- </div>
201
- <div
202
- class="MuiGrid-root MuiGrid-item"
203
- >
204
- <div
205
- class="MuiFormControl-root MuiTextField-root MuiFormControl-fullWidth"
196
+ File
197
+ </span>
198
+ <span
199
+ class="MuiTouchRipple-root"
200
+ />
201
+ </button>
202
+ <button
203
+ aria-label="url"
204
+ aria-pressed="true"
205
+ class="MuiButtonBase-root MuiToggleButton-root MuiToggleButtonGroup-grouped MuiToggleButtonGroup-groupedHorizontal MuiToggleButton-selected"
206
+ tabindex="0"
207
+ type="button"
208
+ value="url"
206
209
  >
207
- <div
208
- class="MuiInputBase-root MuiInput-root MuiInput-underline MuiInputBase-fullWidth MuiInput-fullWidth MuiInputBase-formControl MuiInput-formControl"
210
+ <span
211
+ class="MuiToggleButton-label"
209
212
  >
210
- <input
211
- aria-invalid="false"
212
- class="MuiInputBase-input MuiInput-input"
213
- data-testid="urlInput"
214
- type="text"
215
- value=""
216
- />
217
- </div>
218
- </div>
213
+ URL
214
+ </span>
215
+ <span
216
+ class="MuiTouchRipple-root"
217
+ />
218
+ </button>
219
219
  </div>
220
220
  </div>
221
- <p
222
- class="MuiFormHelperText-root"
221
+ </div>
222
+ <div
223
+ class="MuiFormControl-root MuiTextField-root MuiFormControl-fullWidth"
224
+ >
225
+ <label
226
+ class="MuiFormLabel-root MuiInputLabel-root MuiInputLabel-formControl MuiInputLabel-animated MuiInputLabel-outlined"
227
+ data-shrink="false"
228
+ >
229
+ Enter URL
230
+ </label>
231
+ <div
232
+ class="MuiInputBase-root MuiOutlinedInput-root MuiInputBase-fullWidth MuiInputBase-formControl"
223
233
  >
224
- Automatically inferred from the URL if not supplied
225
- </p>
234
+ <input
235
+ aria-invalid="false"
236
+ class="MuiInputBase-input MuiOutlinedInput-input"
237
+ data-testid="urlInput"
238
+ type="text"
239
+ value=""
240
+ />
241
+ <fieldset
242
+ aria-hidden="true"
243
+ class="PrivateNotchedOutline-root MuiOutlinedInput-notchedOutline"
244
+ >
245
+ <legend
246
+ class="PrivateNotchedOutline-legendLabelled"
247
+ >
248
+ <span>
249
+ Enter URL
250
+ </span>
251
+ </legend>
252
+ </fieldset>
253
+ </div>
226
254
  </div>
255
+ <p
256
+ class="MuiFormHelperText-root"
257
+ >
258
+ (Optional) The URL of the index file is automatically inferred from the URL of the main file if it is not supplied.
259
+ </p>
227
260
  </div>
228
261
  <div
229
262
  class="makeStyles-actionsContainer"
@@ -4,32 +4,51 @@ import PluginManager from '@jbrowse/core/PluginManager'
4
4
  import Plugin from '@jbrowse/core/Plugin'
5
5
  import ViewType from '@jbrowse/core/pluggableElementTypes/ViewType'
6
6
  import stateModelFactory from './model'
7
+ import Alignments from '@jbrowse/plugin-alignments'
8
+ import SVG from '@jbrowse/plugin-svg'
9
+ import Variants from '@jbrowse/plugin-variants'
10
+ import Hic from '@jbrowse/plugin-hic'
7
11
 
8
12
  function standardInitializer() {
9
- const pluginManager = new PluginManager([new FakeViewPlugin()])
13
+ const pluginManager = new PluginManager([
14
+ new FakeViewPlugin(),
15
+ new Alignments(),
16
+ new SVG(),
17
+ new Variants(),
18
+ new Hic(),
19
+ ])
10
20
  pluginManager.createPluggableElements()
11
21
  pluginManager.configure()
12
22
 
13
- const SessionModel = types.model({
14
- view: FakeViewModel,
15
- widget: stateModelFactory(pluginManager),
16
- })
23
+ const SessionModel = types
24
+ .model({
25
+ view: FakeViewModel,
26
+ widget: stateModelFactory(pluginManager),
27
+ })
28
+ .volatile(() => ({
29
+ rpcManager: {},
30
+ configuration: {},
31
+ }))
17
32
 
18
33
  // assemblyNames is defined on the view, which is done in LGV for example
19
34
  // this is really just used for convenience to automatically fill in the
20
35
  // assembly field in the form
21
- return SessionModel.create({
22
- view: {
23
- id: 'testing',
24
- type: 'FakeView',
25
- assemblyNames: ['volvox'],
26
- },
27
- widget: {
28
- type: 'AddTrackWidget',
29
- view: 'testing',
36
+ return SessionModel.create(
37
+ {
38
+ view: {
39
+ id: 'testing',
40
+ type: 'FakeView',
41
+ assemblyNames: ['volvox'],
42
+ },
43
+ widget: {
44
+ type: 'AddTrackWidget',
45
+ view: 'testing',
46
+ },
30
47
  },
31
- })
48
+ { pluginManager },
49
+ )
32
50
  }
51
+
33
52
  const realLocation = window.location
34
53
 
35
54
  // https://stackoverflow.com/a/60110508/2129219
@@ -71,7 +90,10 @@ describe('tests on an LGV type system with view.assemblyNames, using URL', () =>
71
90
 
72
91
  it('adds relative URL (BAM)', () => {
73
92
  const { widget } = session
74
- widget.setTrackData({ uri: 'volvox-sorted.bam' })
93
+ widget.setTrackData({
94
+ uri: 'volvox-sorted.bam',
95
+ locationType: 'UriLocation',
96
+ })
75
97
  expect(widget.trackName).toBe('volvox-sorted.bam')
76
98
  expect(widget.isFtp).toBe(false)
77
99
  expect(widget.isRelativeUrl).toBe(true)
@@ -81,7 +103,10 @@ describe('tests on an LGV type system with view.assemblyNames, using URL', () =>
81
103
 
82
104
  it('adds full URL (BAM)', () => {
83
105
  const { widget } = session
84
- widget.setTrackData({ uri: 'http://google.com/volvox-sorted.bam' })
106
+ widget.setTrackData({
107
+ uri: 'http://google.com/volvox-sorted.bam',
108
+ locationType: 'UriLocation',
109
+ })
85
110
  expect(widget.trackName).toBe('volvox-sorted.bam')
86
111
  expect(widget.isRelativeUrl).toBe(false)
87
112
  expect(widget.assembly).toBe('volvox')
@@ -89,7 +114,10 @@ describe('tests on an LGV type system with view.assemblyNames, using URL', () =>
89
114
 
90
115
  it('test wrongProtocol returning false', () => {
91
116
  const { widget } = session
92
- widget.setTrackData({ uri: 'http://google.com/volvox-sorted.bam' })
117
+ widget.setTrackData({
118
+ uri: 'http://google.com/volvox-sorted.bam',
119
+ locationType: 'UriLocation',
120
+ })
93
121
  setWindowLoc('http://google.com')
94
122
 
95
123
  expect(widget.wrongProtocol).toBe(false)
@@ -97,7 +125,10 @@ describe('tests on an LGV type system with view.assemblyNames, using URL', () =>
97
125
 
98
126
  it('test wrongProtocol returning true', () => {
99
127
  const { widget } = session
100
- widget.setTrackData({ uri: 'http://google.com/volvox-sorted.bam' })
128
+ widget.setTrackData({
129
+ uri: 'http://google.com/volvox-sorted.bam',
130
+ locationType: 'UriLocation',
131
+ })
101
132
  setWindowLoc('https://google.com')
102
133
  expect(widget.wrongProtocol).toBe(true)
103
134
  })
@@ -130,7 +161,10 @@ describe('tests on an view without view.assemblyNames', () => {
130
161
 
131
162
  it('adds url', () => {
132
163
  const { widget } = session
133
- widget.setTrackData({ uri: 'volvox-sorted.bam' })
164
+ widget.setTrackData({
165
+ uri: 'volvox-sorted.bam',
166
+ locationType: 'UriLocation',
167
+ })
134
168
  expect(widget.trackName).toBe('volvox-sorted.bam')
135
169
  expect(widget.isRelativeUrl).toBe(true)
136
170
  expect(widget.assembly).toBe(undefined)
@@ -149,31 +183,46 @@ describe('tests different file types', () => {
149
183
 
150
184
  it('adds bam', () => {
151
185
  const { widget } = session
152
- widget.setTrackData({ uri: 'volvox-sorted.bam' })
186
+ widget.setTrackData({
187
+ uri: 'volvox-sorted.bam',
188
+ locationType: 'UriLocation',
189
+ })
153
190
  expect(widget.trackType).toBe('AlignmentsTrack')
154
191
  })
155
192
 
156
193
  it('adds cram', () => {
157
194
  const { widget } = session
158
- widget.setTrackData({ uri: 'volvox-sorted.cram' })
195
+ widget.setTrackData({
196
+ uri: 'volvox-sorted.cram',
197
+ locationType: 'UriLocation',
198
+ })
159
199
  expect(widget.trackType).toBe('AlignmentsTrack')
160
200
  })
161
201
 
162
202
  it('adds .vcf.gz', () => {
163
203
  const { widget } = session
164
- widget.setTrackData({ uri: 'volvox-sorted.vcf.gz' })
204
+ widget.setTrackData({
205
+ uri: 'volvox-sorted.vcf.gz',
206
+ locationType: 'UriLocation',
207
+ })
165
208
  expect(widget.trackType).toBe('VariantTrack')
166
209
  })
167
210
 
168
211
  it('adds .gff3', () => {
169
212
  const { widget } = session
170
- widget.setTrackData({ uri: 'volvox-sorted.gff3' })
213
+ widget.setTrackData({
214
+ uri: 'volvox-sorted.gff3',
215
+ locationType: 'UriLocation',
216
+ })
171
217
  expect(widget.trackType).toBe('FeatureTrack')
172
218
  })
173
219
 
174
220
  it('adds .hic', () => {
175
221
  const { widget } = session
176
- widget.setTrackData({ uri: 'volvox-sorted.hic' })
222
+ widget.setTrackData({
223
+ uri: 'volvox-sorted.hic',
224
+ locationType: 'UriLocation',
225
+ })
177
226
  expect(widget.trackType).toBe('HicTrack')
178
227
  })
179
228
  })
@@ -185,7 +234,10 @@ describe('tests localpath', () => {
185
234
  })
186
235
  it('adds bam', () => {
187
236
  const { widget } = session
188
- widget.setTrackData({ localPath: 'volvox-sorted.bam' })
237
+ widget.setTrackData({
238
+ localPath: 'volvox-sorted.bam',
239
+ locationType: 'LocalPathLocation',
240
+ })
189
241
  expect(widget.trackType).toBe('AlignmentsTrack')
190
242
  expect(widget.trackName).toBe('volvox-sorted.bam')
191
243
  // the localPath is not a "relativeUrl"
@@ -6,6 +6,7 @@ import {
6
6
  guessAdapter,
7
7
  guessTrackType,
8
8
  UNSUPPORTED,
9
+ getFileName,
9
10
  } from '@jbrowse/core/util/tracks'
10
11
 
11
12
  function isAbsoluteUrl(url = '') {
@@ -17,18 +18,6 @@ function isAbsoluteUrl(url = '') {
17
18
  }
18
19
  }
19
20
 
20
- function getFileName(track: FileLocation) {
21
- const uri = 'uri' in track ? track.uri : undefined
22
- const localPath = 'localPath' in track ? track.localPath : undefined
23
- const blob = 'blobId' in track ? track : undefined
24
- return (
25
- blob?.name ||
26
- uri?.slice(uri.lastIndexOf('/') + 1) ||
27
- localPath?.slice(localPath.lastIndexOf('/') + 1) ||
28
- ''
29
- )
30
- }
31
-
32
21
  export default function f(pluginManager: PluginManager) {
33
22
  return types
34
23
  .model('AddTrackModel', {
@@ -88,7 +77,7 @@ export default function f(pluginManager: PluginManager) {
88
77
  const { trackData, indexTrackData, adapterHint } = self
89
78
 
90
79
  return trackData
91
- ? guessAdapter(trackData, indexTrackData, getFileName, adapterHint)
80
+ ? guessAdapter(trackData, indexTrackData, adapterHint, self)
92
81
  : undefined
93
82
  },
94
83
 
@@ -148,7 +137,9 @@ export default function f(pluginManager: PluginManager) {
148
137
  get trackType() {
149
138
  return (
150
139
  self.altTrackType ||
151
- (this.trackAdapter ? guessTrackType(this.trackAdapter.type) : '')
140
+ (this.trackAdapter
141
+ ? guessTrackType(this.trackAdapter.type, self)
142
+ : '')
152
143
  )
153
144
  },
154
145
  }))
@@ -149,6 +149,8 @@ const AdapterInput = observer(
149
149
  },
150
150
  )
151
151
 
152
+ const blank = { uri: '' } as FileLocation
153
+
152
154
  const AssemblyAddForm = observer(
153
155
  ({
154
156
  rootModel,
@@ -169,18 +171,17 @@ const AssemblyAddForm = observer(
169
171
  const [assemblyName, setAssemblyName] = useState('')
170
172
  const [assemblyDisplayName, setAssemblyDisplayName] = useState('')
171
173
  const [adapterSelection, setAdapterSelection] = useState(adapterTypes[0])
172
- const [fastaLocation, setFastaLocation] = useState({ uri: '' })
173
- const [faiLocation, setFaiLocation] = useState({ uri: '' })
174
- const [gziLocation, setGziLocation] = useState({ uri: '' })
175
- const [twoBitLocation, setTwoBitLocation] = useState({ uri: '' })
176
- const [chromSizesLocation, setChromSizesLocation] = useState({ uri: '' })
174
+ const [fastaLocation, setFastaLocation] = useState(blank)
175
+ const [faiLocation, setFaiLocation] = useState(blank)
176
+ const [gziLocation, setGziLocation] = useState(blank)
177
+ const [twoBitLocation, setTwoBitLocation] = useState(blank)
178
+ const [chromSizesLocation, setChromSizesLocation] = useState(blank)
177
179
 
178
180
  function createAssembly() {
179
181
  if (assemblyName === '') {
180
182
  rootModel.session.notify("Can't create an assembly without a name")
181
183
  } else {
182
184
  setFormOpen(false)
183
- // setIsAssemblyBeingEdited(true)
184
185
  let newAssembly
185
186
  if (adapterSelection === 'IndexedFastaAdapter') {
186
187
  newAssembly = {
@@ -14,6 +14,7 @@ const mockRootModel = {
14
14
  type: 'testSeqAdapter',
15
15
  twoBitLocation: {
16
16
  uri: 'test.2bit',
17
+ locationType: 'UriLocation',
17
18
  },
18
19
  },
19
20
  },