jbrowse-plugin-msaview 2.7.4 → 2.8.0

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.
@@ -15,18 +15,22 @@ const useStyles = makeStyles()({
15
15
  selectField: {
16
16
  width: 180,
17
17
  },
18
+ // A GRID, not a wrapping flex row of fixed-width items. The old form was three
19
+ // 160px columns inside a 560px box, which is five rows for thirteen species and
20
+ // eight for twenty-three -- and the checkbox list is the tallest thing in the
21
+ // dialog, so those rows are the dialog's height. Five auto-fitted columns is
22
+ // five rows for twenty-three, i.e. more species in less space, and it reflows
23
+ // rather than being pinned to a width the dialog may not have.
18
24
  speciesBox: {
19
- display: 'flex',
20
- flexWrap: 'wrap',
21
- maxWidth: 560,
22
- marginTop: 12,
25
+ display: 'grid',
26
+ gridTemplateColumns: 'repeat(auto-fit, minmax(130px, 1fr))',
27
+ maxWidth: 700,
28
+ marginTop: 4,
23
29
  },
30
+ // The label carries the row height; the default control padding is what makes
31
+ // 23 rows of it tall.
24
32
  species: {
25
- width: 160,
26
- },
27
- infoText: {
28
- marginTop: 20,
29
- maxWidth: 620,
33
+ marginRight: 0,
30
34
  },
31
35
  });
32
36
  const OrthologPanel = observer(function ({ handleClose, feature, model, }) {
@@ -43,20 +47,19 @@ const OrthologPanel = observer(function ({ handleClose, feature, model, }) {
43
47
  const taxa = COMMON_SPECIES.map(s => s.taxId).filter(t => !excluded.includes(t));
44
48
  return (React.createElement(React.Fragment, null,
45
49
  React.createElement(LaunchPanelContent, { error: e },
46
- React.createElement(Typography, null, "Builds the alignment from NCBI's precomputed orthologs \u2014 one gene per species \u2014 instead of searching. There is no job to wait on: the NCBI lookups take about a second, and only the multiple alignment at EBI costs real time (~10s), against 10+ minutes for BLAST. Rows come out labelled by species rather than by accession, and NCBI's CDD domains are overlaid automatically."),
50
+ React.createElement(Typography, { variant: "body2" }, "NCBI's precomputed orthologs, one gene per species, aligned at EBI in seconds rather than the 10+ minutes BLAST takes."),
47
51
  React.createElement("div", null,
48
52
  React.createElement(TextField2, { variant: "outlined", label: "Query species", className: classes.selectField, select: true, value: taxId, onChange: event => {
49
53
  setTaxId(Number(event.target.value));
50
54
  }, helperText: "the species this gene is from" }, COMMON_SPECIES.map(s => (React.createElement(MenuItem, { value: s.taxId, key: s.taxId }, s.label)))),
51
55
  React.createElement(MsaAlgorithmSelect, { className: classes.selectField, value: msaAlgorithm, onChange: setMsaAlgorithm })),
52
- React.createElement(Typography, { variant: "subtitle2", style: { marginTop: 12 } }, "Species to include (those without an ortholog are skipped)"),
56
+ React.createElement(Typography, { variant: "subtitle2", style: { marginTop: 8 } }, "Species to include (those without an ortholog are skipped)"),
53
57
  React.createElement("div", { className: classes.speciesBox }, COMMON_SPECIES.map(s => (React.createElement(FormControlLabel, { className: classes.species, key: s.taxId, control: React.createElement(Checkbox, { checked: !excluded.includes(s.taxId), onChange: event => {
54
58
  setExcluded(event.target.checked
55
59
  ? excluded.filter(t => t !== s.taxId)
56
60
  : [...excluded, s.taxId]);
57
61
  } }), label: s.label })))),
58
- React.createElement(TranscriptSelector, { feature: feature, ...transcriptSelection }),
59
- React.createElement(Typography, { className: classes.infoText, variant: "body2" }, "The query row is the transcript selected above, not NCBI's representative protein, so the alignment stays linked to the genome view at codon resolution.")),
62
+ React.createElement(TranscriptSelector, { feature: feature, ...transcriptSelection })),
60
63
  React.createElement(SubmitCancelActions, { submitDisabled: !proteinSequence || taxa.length < 2, onSubmit: () => {
61
64
  try {
62
65
  if (selectedTranscript) {
@@ -20,7 +20,13 @@ export default function TranscriptSelector({ feature, options, selectedId, selec
20
20
  const [showSequence, setShowSequence] = useState(false);
21
21
  return (React.createElement(React.Fragment, null,
22
22
  React.createElement("div", { className: classes.flex },
23
- React.createElement(TextField, { variant: "outlined", label: `Choose isoform of ${getGeneDisplayName(feature)}`, select: true, className: classes.minWidth, value: selectedId, onChange: event => {
23
+ React.createElement(TextField, { variant: "outlined", label: `Choose isoform of ${getGeneDisplayName(feature)}`,
24
+ // The query row is this transcript rather than NCBI's representative
25
+ // protein, which is what keeps the alignment linked to the genome view
26
+ // at codon resolution. It used to be a paragraph under the panel; as
27
+ // helper text it says the same thing where the choice is made and
28
+ // costs no height of its own.
29
+ helperText: "the query row, so the alignment stays linked to the genome view", select: true, className: classes.minWidth, value: selectedId, onChange: event => {
24
30
  setSelectedId(event.target.value);
25
31
  } }, options.map(val => {
26
32
  const inSet = validIds