From 20f9575f918f137545ec00beff5d77dd41ce8f46 Mon Sep 17 00:00:00 2001 From: Colin Date: Mon, 15 Feb 2021 14:02:59 -0700 Subject: [PATCH] Display a quality track for the read vs ref --- .../src/FromConfigAdapter/configSchema.ts | 4 ++ plugins/linear-comparative-view/src/index.tsx | 37 +++++++++++++++++++ 2 files changed, 41 insertions(+) diff --git a/plugins/config/src/FromConfigAdapter/configSchema.ts b/plugins/config/src/FromConfigAdapter/configSchema.ts index c09bd4d914..a0fa43f5ce 100644 --- a/plugins/config/src/FromConfigAdapter/configSchema.ts +++ b/plugins/config/src/FromConfigAdapter/configSchema.ts @@ -11,6 +11,10 @@ export const configSchema = ConfigurationSchema( type: 'string', defaultValue: 'SimpleFeature', }, + noAssemblyManager: { + type: 'boolean', + defaultValue: false, + }, }, { explicitlyTyped: true }, ) diff --git a/plugins/linear-comparative-view/src/index.tsx b/plugins/linear-comparative-view/src/index.tsx index 730fdc7c22..c419b6cb13 100644 --- a/plugins/linear-comparative-view/src/index.tsx +++ b/plugins/linear-comparative-view/src/index.tsx @@ -166,6 +166,9 @@ function WindowSizeDlg(props: { const [error, setError] = useState() const windowSize = +window const [primaryFeature, setPrimaryFeature] = useState() + + // 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 () => { @@ -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, + }, + ], + }, ], }, ],