jbrowse-plugin-msaview 2.7.4 → 2.8.1
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.
- package/dist/LaunchMsaView/components/OrthologQuery/OrthologPanel.js +16 -13
- package/dist/LaunchMsaView/components/TranscriptSelector.js +7 -1
- package/dist/MsaViewPanel/model.d.ts +4 -4
- package/dist/jbrowse-plugin-msaview.umd.production.min.js +15 -15
- package/dist/jbrowse-plugin-msaview.umd.production.min.js.map +3 -3
- package/dist/utils/ncbiOrthologs.d.ts +34 -4
- package/dist/utils/ncbiOrthologs.js +38 -2
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +2 -2
- package/src/LaunchMsaView/components/OrthologQuery/OrthologPanel.tsx +22 -22
- package/src/LaunchMsaView/components/TranscriptSelector.tsx +6 -0
- package/src/utils/ncbiOrthologs.ts +38 -2
- package/src/version.ts +1 -1
|
@@ -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: '
|
|
20
|
-
|
|
21
|
-
maxWidth:
|
|
22
|
-
marginTop:
|
|
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
|
-
|
|
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,
|
|
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:
|
|
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)}`,
|
|
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
|
|
@@ -53,7 +53,7 @@ export default function stateModelFactory(): import("@jbrowse/mobx-state-tree").
|
|
|
53
53
|
bgColor: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
54
54
|
colorSchemeName: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
55
55
|
showColumnStats: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
56
|
-
msaFormat: import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").ISimpleType<import("
|
|
56
|
+
msaFormat: import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").ISimpleType<import("react-msaview").MSAFormat>>;
|
|
57
57
|
}, "height" | "id" | "type" | "allowedGappyness" | "colWidth" | "collapsed" | "currentAlignment" | "data" | "drawMsaLetters" | "featureFilters" | "gffFilehandle" | "hideGaps" | "highlightColumns" | "msaFilehandle" | "relativeTo" | "rowHeight" | "scrollX" | "scrollY" | "scrollZoom" | "showDomains" | "showOnly" | "subFeatureRows" | "treeFilehandle" | "treeMetadataFilehandle" | "turnedOffTracks"> & {
|
|
58
58
|
id: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
59
59
|
showDomains: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
@@ -507,7 +507,7 @@ export default function stateModelFactory(): import("@jbrowse/mobx-state-tree").
|
|
|
507
507
|
setColorSchemeName(name: string): void;
|
|
508
508
|
setBgColor(arg: boolean): void;
|
|
509
509
|
setShowColumnStats(arg: boolean): void;
|
|
510
|
-
setMSAFormat(arg?: import("
|
|
510
|
+
setMSAFormat(arg?: import("react-msaview").MSAFormat): void;
|
|
511
511
|
} & {
|
|
512
512
|
headerHeight: number;
|
|
513
513
|
status: {
|
|
@@ -594,7 +594,7 @@ export default function stateModelFactory(): import("@jbrowse/mobx-state-tree").
|
|
|
594
594
|
readonly noDomains: boolean;
|
|
595
595
|
menuItems(): never[];
|
|
596
596
|
readonly treeMetadata: Record<string, Record<string, string> | undefined>;
|
|
597
|
-
readonly MSA: import("
|
|
597
|
+
readonly MSA: import("react-msaview").MSAParserType | null;
|
|
598
598
|
readonly numColumns: number;
|
|
599
599
|
readonly tree: import("react-msaview").NodeWithIds;
|
|
600
600
|
readonly rowNames: string[];
|
|
@@ -956,7 +956,7 @@ export default function stateModelFactory(): import("@jbrowse/mobx-state-tree").
|
|
|
956
956
|
bgColor: boolean;
|
|
957
957
|
colorSchemeName: string;
|
|
958
958
|
showColumnStats: boolean;
|
|
959
|
-
msaFormat: import("
|
|
959
|
+
msaFormat: import("react-msaview").MSAFormat | undefined;
|
|
960
960
|
drawLabels: boolean;
|
|
961
961
|
labelsAlignRight: boolean;
|
|
962
962
|
treeAreaWidth: number;
|