Skip to content

Commit

Permalink
Properly report error and get features at coord 0 in read vs ref
Browse files Browse the repository at this point in the history
  • Loading branch information
cmdcolin committed May 15, 2022
1 parent a14a843 commit e566b2f
Showing 1 changed file with 7 additions and 12 deletions.
19 changes: 7 additions & 12 deletions plugins/linear-comparative-view/src/ReadVsRef.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -196,16 +196,15 @@ export function WindowSizeDlg(props: {
const { rpcManager } = getSession(track)
const adapterConfig = getConf(track, 'adapter')
const sessionId = getRpcSessionId(track)
const assemblyNames = getConf(track, 'assemblyNames')

const feats = (await rpcManager.call(sessionId, 'CoreGetFeatures', {
adapterConfig,
sessionId,
regions: [
{
refName: saRef,
start: +saStart - 1,
end: +saStart,
assemblyName: assemblyNames[0],
end: +saStart + 1,
},
],
})) as Feature[]
Expand Down Expand Up @@ -496,13 +495,8 @@ export function WindowSizeDlg(props: {
}

return (
<Dialog
open
onClose={handleClose}
aria-labelledby="alert-dialog-title"
aria-describedby="alert-dialog-description"
>
<DialogTitle id="alert-dialog-title">
<Dialog open onClose={handleClose}>
<DialogTitle>
Set window size
<IconButton
aria-label="close"
Expand All @@ -513,7 +507,9 @@ export function WindowSizeDlg(props: {
</IconButton>
</DialogTitle>
<DialogContent>
{!primaryFeature ? (
{error ? (
<Typography color="error">{`${error}`}</Typography>
) : !primaryFeature ? (
<div>
<Typography>
To accurately perform comparison we are fetching the primary
Expand All @@ -527,7 +523,6 @@ export function WindowSizeDlg(props: {
Show an extra window size around each part of the split alignment.
Using a larger value can allow you to see more genomic context.
</Typography>
{error ? <Typography color="error">{`${error}`}</Typography> : null}

<TextField
value={windowSize}
Expand Down

0 comments on commit e566b2f

Please sign in to comment.