Skip to content

Commit

Permalink
Display a quality track for the read vs ref
Browse files Browse the repository at this point in the history
  • Loading branch information
cmdcolin committed Feb 15, 2021
1 parent 11fe5d5 commit 20f9575
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
4 changes: 4 additions & 0 deletions plugins/config/src/FromConfigAdapter/configSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ export const configSchema = ConfigurationSchema(
type: 'string',
defaultValue: 'SimpleFeature',
},
noAssemblyManager: {
type: 'boolean',
defaultValue: false,
},
},
{ explicitlyTyped: true },
)
Expand Down
37 changes: 37 additions & 0 deletions plugins/linear-comparative-view/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,9 @@ function WindowSizeDlg(props: {
const [error, setError] = useState<Error>()
const windowSize = +window
const [primaryFeature, setPrimaryFeature] = useState<Feature>()

// we need to fetch the primary alignment if the selected feature is 2048.
// this should be the first in the list of the SA tag
useEffect(() => {
let done = false
;(async () => {
Expand Down Expand Up @@ -363,6 +366,40 @@ function WindowSizeDlg(props: {
},
],
},
{
id: `${Math.random()}`,
type: 'QuantitativeTrack',
configuration: {
trackId: 'qualTrack',
assemblyNames: [readAssembly],
name: 'Read quality',
type: 'QuantitativeTrack',
adapter: {
type: 'FromConfigAdapter',
noAssemblyManager: true,
features: primaryFeature
.get('qual')
.split(' ')
.map((qual, index) => {
return {
start: index,
end: index + 1,
refName: readName,
score: +qual,
assemblyName: readAssembly,
uniqueId: `feat_${index}`,
}
}),
},
},
displays: [
{
id: `${Math.random()}`,
type: 'LinearWiggleDisplay',
height: 100,
},
],
},
],
},
],
Expand Down

0 comments on commit 20f9575

Please sign in to comment.