jbrowse-plugin-msaview 5.19.0 → 5.20.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.
- package/README.md +21 -76
- package/dist/AddHighlightModel/GenomeMouseoverHighlight.js +2 -4
- package/dist/AddHighlightModel/MsaToGenomeHighlight.js +10 -5
- package/dist/BgzipFastaMsaAdapter/BgzipFastaMsaAdapter.d.ts +4 -2
- package/dist/BgzipFastaMsaAdapter/BgzipFastaMsaAdapter.js +28 -22
- package/dist/LaunchMsaView/codingFeature.d.ts +1 -0
- package/dist/LaunchMsaView/codingFeature.js +1 -1
- package/dist/LaunchMsaView/components/BlastQuery/BlastAutomaticPanel.js +12 -8
- package/dist/LaunchMsaView/components/BlastQuery/BlastManualPanel.d.ts +1 -1
- package/dist/LaunchMsaView/components/BlastQuery/BlastManualPanel.js +12 -20
- package/dist/LaunchMsaView/components/BlastQuery/BlastPanel.d.ts +1 -17
- package/dist/LaunchMsaView/components/BlastQuery/BlastPanel.js +8 -9
- package/dist/LaunchMsaView/components/BlastQuery/BlastPanel.test.d.ts +1 -0
- package/dist/LaunchMsaView/components/BlastQuery/BlastPanel.test.js +72 -0
- package/dist/LaunchMsaView/components/BlastQuery/BlastSettingsDialog.d.ts +1 -1
- package/dist/LaunchMsaView/components/BlastQuery/CachedBlastResults.d.ts +3 -2
- package/dist/LaunchMsaView/components/BlastQuery/CachedBlastResults.js +8 -11
- package/dist/LaunchMsaView/components/BlastQuery/CachedBlastResultsLaunch.test.d.ts +1 -0
- package/dist/LaunchMsaView/components/BlastQuery/CachedBlastResultsLaunch.test.js +70 -0
- package/dist/LaunchMsaView/components/BlastQuery/consts.d.ts +1 -1
- package/dist/LaunchMsaView/components/BlastQuery/consts.js +1 -1
- package/dist/LaunchMsaView/components/BlastQuery/useCachedBlastResults.d.ts +2 -1
- package/dist/LaunchMsaView/components/BlastQuery/useCachedBlastResults.js +9 -4
- package/dist/LaunchMsaView/components/BlastQuery/useCachedBlastResults.test.d.ts +1 -0
- package/dist/LaunchMsaView/components/BlastQuery/useCachedBlastResults.test.js +74 -0
- package/dist/LaunchMsaView/components/LaunchMsaViewDialog.js +23 -19
- package/dist/LaunchMsaView/components/ManualMSALoader/ManualMSALoader.js +7 -15
- package/dist/LaunchMsaView/components/OrthologQuery/OrthologPanel.js +7 -5
- package/dist/LaunchMsaView/components/OrthologQuery/QuerySpeciesSelect.d.ts +10 -4
- package/dist/LaunchMsaView/components/OrthologQuery/QuerySpeciesSelect.js +35 -20
- package/dist/LaunchMsaView/components/OrthologQuery/useQuerySpecies.test.d.ts +1 -0
- package/dist/LaunchMsaView/components/OrthologQuery/useQuerySpecies.test.js +94 -0
- package/dist/LaunchMsaView/components/PastedAlignmentFields.d.ts +8 -0
- package/dist/LaunchMsaView/components/PastedAlignmentFields.js +23 -0
- package/dist/LaunchMsaView/components/PreLoadedMSA/PreLoadedMSADataPanel.js +8 -5
- package/dist/LaunchMsaView/components/PreLoadedMSA/PreLoadedMSADataPanel.test.d.ts +1 -0
- package/dist/LaunchMsaView/components/PreLoadedMSA/PreLoadedMSADataPanel.test.js +79 -0
- package/dist/LaunchMsaView/components/PreLoadedMSA/fetchMSAData.d.ts +2 -1
- package/dist/LaunchMsaView/components/QueryRowSelector.d.ts +3 -1
- package/dist/LaunchMsaView/components/QueryRowSelector.js +7 -2
- package/dist/LaunchMsaView/components/QueryRowSelector.test.d.ts +1 -0
- package/dist/LaunchMsaView/components/QueryRowSelector.test.js +23 -0
- package/dist/LaunchMsaView/components/SubmitCancelActions.js +3 -13
- package/dist/LaunchMsaView/components/TabPanel.d.ts +6 -1
- package/dist/LaunchMsaView/components/TabPanel.js +8 -2
- package/dist/LaunchMsaView/components/launchPlacement.d.ts +7 -0
- package/dist/LaunchMsaView/components/launchPlacement.js +22 -1
- package/dist/LaunchMsaView/components/pastedAlignmentLaunch.test.d.ts +1 -0
- package/dist/LaunchMsaView/components/pastedAlignmentLaunch.test.js +102 -0
- package/dist/LaunchMsaView/components/transcriptChoice.d.ts +23 -0
- package/dist/LaunchMsaView/components/transcriptChoice.js +19 -0
- package/dist/LaunchMsaView/components/transcriptChoice.test.d.ts +1 -0
- package/dist/LaunchMsaView/components/transcriptChoice.test.js +112 -0
- package/dist/LaunchMsaView/components/useFeatureSequence.d.ts +0 -4
- package/dist/LaunchMsaView/components/useFeatureSequence.js +0 -1
- package/dist/LaunchMsaView/components/useTranscriptSelection.d.ts +1 -1
- package/dist/LaunchMsaView/components/useTranscriptSelection.js +11 -7
- package/dist/LaunchMsaView/detectQueryRow.d.ts +3 -2
- package/dist/LaunchMsaView/getTranscriptFeatures.test.d.ts +1 -0
- package/dist/LaunchMsaView/getTranscriptFeatures.test.js +51 -0
- package/dist/LaunchMsaView/index.js +3 -3
- package/dist/LaunchMsaView/launchTarget.d.ts +2 -1
- package/dist/LaunchMsaView/useQueryRowName.d.ts +1 -1
- package/dist/LaunchMsaView/useQueryRowName.js +6 -3
- package/dist/LaunchMsaView/useQueryRowName.test.js +26 -0
- package/dist/LaunchMsaView/util.d.ts +1 -0
- package/dist/LaunchMsaView/util.js +9 -16
- package/dist/MsaViewPanel/afterCreateAutoruns.d.ts +1 -5
- package/dist/MsaViewPanel/afterCreateAutoruns.js +30 -9
- package/dist/MsaViewPanel/doLaunchBlast.js +11 -11
- package/dist/MsaViewPanel/doLaunchBlast.test.js +34 -0
- package/dist/MsaViewPanel/doLaunchOrthologs.js +5 -13
- package/dist/MsaViewPanel/doLaunchOrthologs.test.js +24 -8
- package/dist/MsaViewPanel/model.d.ts +7 -7
- package/dist/MsaViewPanel/model.js +6 -3
- package/dist/MsaViewPanel/model.test.js +19 -0
- package/dist/MsaViewPanel/processInit.test.js +20 -0
- package/dist/MsaViewPanel/resolveConnectedTranscript.d.ts +1 -0
- package/dist/MsaViewPanel/resolveConnectedTranscript.js +3 -0
- package/dist/MsaViewPanel/resolveConnectedTranscript.test.js +13 -0
- package/dist/MsaViewPanel/sessionHighlights.d.ts +1 -1
- package/dist/MsaViewPanel/sessionHighlights.js +3 -5
- package/dist/MsaViewPanel/sessionHighlights.test.js +12 -1
- package/dist/MsaViewPanel/storedData.test.js +9 -0
- package/dist/MsaViewPanel/structureConnection.js +4 -2
- package/dist/MsaViewPanel/util.js +8 -6
- package/dist/MsaViewPanel/viewReport.d.ts +1 -1
- package/dist/MsaViewPanel/viewReport.js +1 -1
- package/dist/OrthoFinderMsaAdapter/parseResults.js +4 -5
- package/dist/OrthoFinderMsaAdapter/parseResults.test.js +3 -0
- package/dist/chunks/{AboutDialog-ZTQP5WUH.js → AboutDialog-XNWCXUML.js} +2 -2
- package/dist/chunks/{AboutDialog-ZTQP5WUH.js.map → AboutDialog-XNWCXUML.js.map} +1 -1
- package/dist/chunks/{AnnotationFileDialog-WKK4E2F6.js → AnnotationFileDialog-Z4FLEMTF.js} +2 -2
- package/dist/chunks/{AnnotationFileDialog-WKK4E2F6.js.map → AnnotationFileDialog-Z4FLEMTF.js.map} +1 -1
- package/dist/chunks/BgzipFastaMsaAdapter-4IP2B4CV.js +6 -0
- package/dist/chunks/BgzipFastaMsaAdapter-4IP2B4CV.js.map +7 -0
- package/dist/chunks/{ExportSVGDialog-HM75NXUI.js → ExportSVGDialog-T3RSUIP6.js} +2 -2
- package/dist/chunks/{ExportSVGDialog-HM75NXUI.js.map → ExportSVGDialog-T3RSUIP6.js.map} +1 -1
- package/dist/chunks/{FeatureDialog-N5ER7Y4P.js → FeatureDialog-SGSCRRJC.js} +2 -2
- package/dist/chunks/{FeatureDialog-N5ER7Y4P.js.map → FeatureDialog-SGSCRRJC.js.map} +1 -1
- package/dist/chunks/{GapThresholdDialog-2G3L5TUF.js → GapThresholdDialog-UOSORGY3.js} +2 -2
- package/dist/chunks/{GapThresholdDialog-2G3L5TUF.js.map → GapThresholdDialog-UOSORGY3.js.map} +1 -1
- package/dist/chunks/{GoToDialog-BFFKXSJB.js → GoToDialog-4NSGTRAF.js} +2 -2
- package/dist/chunks/{GoToDialog-BFFKXSJB.js.map → GoToDialog-4NSGTRAF.js.map} +1 -1
- package/dist/chunks/{HelpDialog-EWRTWXZO.js → HelpDialog-ATDGYZHQ.js} +2 -2
- package/dist/chunks/{HelpDialog-EWRTWXZO.js.map → HelpDialog-ATDGYZHQ.js.map} +1 -1
- package/dist/chunks/{HelpDialog-NSGZYIN7.js → HelpDialog-UF43YYX4.js} +2 -2
- package/dist/chunks/LaunchMsaViewDialog-AWSNOLTZ.js +3 -0
- package/dist/chunks/LaunchMsaViewDialog-AWSNOLTZ.js.map +7 -0
- package/dist/chunks/{MetadataDialog-UODKJFPM.js → MetadataDialog-VUQ4FSPL.js} +2 -2
- package/dist/chunks/{MetadataDialog-UODKJFPM.js.map → MetadataDialog-VUQ4FSPL.js.map} +1 -1
- package/dist/chunks/{MsaViewPanel-AQWZ2N3P.js → MsaViewPanel-VARPO7OL.js} +2 -2
- package/dist/chunks/OrthoFinderMsaAdapter-OJVBY4EU.js +2 -0
- package/dist/chunks/{OrthoFinderMsaAdapter-BAVVTZHO.js.map → OrthoFinderMsaAdapter-OJVBY4EU.js.map} +2 -2
- package/dist/chunks/{TrackInfoDialog-WAZUUZ27.js → TrackInfoDialog-KVLFUXQ6.js} +2 -2
- package/dist/chunks/{TrackInfoDialog-WAZUUZ27.js.map → TrackInfoDialog-KVLFUXQ6.js.map} +1 -1
- package/dist/chunks/{TreeNodeInfoDialog-QHA7LOXE.js → TreeNodeInfoDialog-WOLJQH4P.js} +2 -2
- package/dist/chunks/{TreeNodeInfoDialog-QHA7LOXE.js.map → TreeNodeInfoDialog-WOLJQH4P.js.map} +1 -1
- package/dist/chunks/{chunk-LNMEYTCN.js → chunk-44ZCMBOI.js} +1 -1
- package/dist/chunks/{chunk-LNMEYTCN.js.map → chunk-44ZCMBOI.js.map} +1 -1
- package/dist/chunks/chunk-5UVNR5ZZ.js +164 -0
- package/dist/chunks/chunk-5UVNR5ZZ.js.map +7 -0
- package/dist/chunks/{chunk-X5QA4AF6.js → chunk-6ZLRUWM2.js} +2 -2
- package/dist/chunks/{chunk-X5QA4AF6.js.map → chunk-6ZLRUWM2.js.map} +1 -1
- package/dist/chunks/{chunk-BD6Y2ERQ.js → chunk-75TUMBKQ.js} +2 -2
- package/dist/chunks/{chunk-BD6Y2ERQ.js.map → chunk-75TUMBKQ.js.map} +1 -1
- package/dist/chunks/chunk-BJPVMTGT.js +2 -0
- package/dist/chunks/chunk-BJPVMTGT.js.map +7 -0
- package/dist/chunks/{chunk-7ZEXFLSY.js → chunk-DH2QUEKI.js} +1 -1
- package/dist/chunks/chunk-GNNLVWKA.js +6 -0
- package/dist/chunks/{chunk-ZJGFEUGM.js.map → chunk-GNNLVWKA.js.map} +2 -2
- package/dist/chunks/{chunk-TEYYBCMF.js → chunk-GP2EFH2U.js} +2 -2
- package/dist/chunks/chunk-HED42VNJ.js +2 -0
- package/dist/chunks/{chunk-ZWQTJTRR.js.map → chunk-HED42VNJ.js.map} +2 -2
- package/dist/chunks/chunk-IJ2GGGFR.js +2 -0
- package/dist/chunks/{chunk-CKXVJK5K.js.map → chunk-IJ2GGGFR.js.map} +1 -1
- package/dist/chunks/{chunk-3MNW5BKS.js → chunk-KENFRWWU.js} +1 -1
- package/dist/chunks/{chunk-3MNW5BKS.js.map → chunk-KENFRWWU.js.map} +1 -1
- package/dist/chunks/chunk-L72SS7RL.js +2 -0
- package/dist/chunks/chunk-L72SS7RL.js.map +7 -0
- package/dist/chunks/{chunk-XNNIIXGD.js → chunk-N5YJBTY5.js} +1 -1
- package/dist/chunks/{chunk-XNNIIXGD.js.map → chunk-N5YJBTY5.js.map} +1 -1
- package/dist/chunks/{chunk-CREQPIFJ.js → chunk-OSF7I4IV.js} +2 -2
- package/dist/chunks/{chunk-CREQPIFJ.js.map → chunk-OSF7I4IV.js.map} +1 -1
- package/dist/chunks/chunk-OUJA5TD2.js +3 -0
- package/dist/chunks/{chunk-WE35XW3J.js.map → chunk-OUJA5TD2.js.map} +4 -4
- package/dist/chunks/chunk-Q6V6EHAM.js +2 -0
- package/dist/chunks/chunk-Q6V6EHAM.js.map +7 -0
- package/dist/chunks/{chunk-LFBMB523.js → chunk-TDFMPJVU.js} +1 -1
- package/dist/chunks/{chunk-LFBMB523.js.map → chunk-TDFMPJVU.js.map} +1 -1
- package/dist/chunks/chunk-UZ74KTAJ.js +2 -0
- package/dist/chunks/{chunk-DW5INM5K.js.map → chunk-UZ74KTAJ.js.map} +1 -1
- package/dist/chunks/chunk-WWDZENCA.js +2 -0
- package/dist/chunks/chunk-WWDZENCA.js.map +7 -0
- package/dist/chunks/{chunk-PWNKL3ZK.js → chunk-ZAUQ25BW.js} +2 -2
- package/dist/chunks/chunk-ZAUQ25BW.js.map +7 -0
- package/dist/chunks/chunk-ZBTXUYNT.js +3 -0
- package/dist/chunks/chunk-ZBTXUYNT.js.map +7 -0
- package/dist/chunks/dist-QLG7JP2Z.js +2 -0
- package/dist/chunks/model-YTUGVNIN.js +11 -0
- package/dist/chunks/model-YTUGVNIN.js.map +7 -0
- package/dist/chunks/renderToSvg-PM3HEMVM.js +2 -0
- package/dist/jbrowse-plugin-msaview.esm.js +2 -2
- package/dist/jbrowse-plugin-msaview.esm.js.map +4 -4
- package/dist/readinessConformance.test.js +4 -1
- package/dist/utils/domainCache.js +3 -16
- package/dist/utils/ebiJobDispatcher.d.ts +4 -11
- package/dist/utils/ebiJobDispatcher.js +26 -5
- package/dist/utils/ebiJobDispatcher.test.js +71 -1
- package/dist/utils/fetch.js +8 -2
- package/dist/utils/fetch.test.d.ts +1 -0
- package/dist/utils/fetch.test.js +22 -0
- package/dist/utils/idb.d.ts +3 -1
- package/dist/utils/idb.js +21 -3
- package/dist/utils/idb.test.js +2 -5
- package/dist/utils/msa.js +8 -1
- package/dist/utils/msa.test.d.ts +1 -0
- package/dist/utils/msa.test.js +20 -0
- package/dist/utils/msaIndex.d.ts +1 -0
- package/dist/utils/msaIndex.js +5 -2
- package/dist/utils/msaRows.js +4 -1
- package/dist/utils/msaRows.test.d.ts +1 -0
- package/dist/utils/msaRows.test.js +32 -0
- package/dist/utils/ncbiOrthologs.d.ts +5 -7
- package/dist/utils/ncbiOrthologs.js +26 -24
- package/dist/utils/ncbiOrthologs.test.js +48 -1
- package/dist/utils/pantherOrthologs.d.ts +43 -3
- package/dist/utils/pantherOrthologs.js +26 -45
- package/dist/utils/searchCache.d.ts +1 -0
- package/dist/utils/taxonomyNames.js +3 -16
- package/dist/utils/unirefHomologs.js +15 -16
- package/dist/utils/unirefHomologs.test.js +11 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +27 -25
- package/src/AddHighlightModel/GenomeMouseoverHighlight.tsx +2 -6
- package/src/AddHighlightModel/MsaToGenomeHighlight.tsx +10 -5
- package/src/BgzipFastaMsaAdapter/BgzipFastaMsaAdapter.ts +42 -34
- package/src/LaunchMsaView/codingFeature.ts +1 -1
- package/src/LaunchMsaView/components/BlastQuery/BlastAutomaticPanel.tsx +14 -11
- package/src/LaunchMsaView/components/BlastQuery/BlastManualPanel.tsx +22 -43
- package/src/LaunchMsaView/components/BlastQuery/BlastPanel.test.tsx +102 -0
- package/src/LaunchMsaView/components/BlastQuery/BlastPanel.tsx +43 -32
- package/src/LaunchMsaView/components/BlastQuery/BlastSettingsDialog.tsx +1 -1
- package/src/LaunchMsaView/components/BlastQuery/CachedBlastResults.tsx +21 -20
- package/src/LaunchMsaView/components/BlastQuery/CachedBlastResultsLaunch.test.tsx +92 -0
- package/src/LaunchMsaView/components/BlastQuery/consts.ts +1 -1
- package/src/LaunchMsaView/components/BlastQuery/useCachedBlastResults.test.ts +84 -0
- package/src/LaunchMsaView/components/BlastQuery/useCachedBlastResults.ts +13 -4
- package/src/LaunchMsaView/components/LaunchMsaViewDialog.tsx +72 -47
- package/src/LaunchMsaView/components/ManualMSALoader/ManualMSALoader.tsx +12 -37
- package/src/LaunchMsaView/components/OrthologQuery/OrthologPanel.tsx +20 -8
- package/src/LaunchMsaView/components/OrthologQuery/QuerySpeciesSelect.tsx +46 -32
- package/src/LaunchMsaView/components/OrthologQuery/useQuerySpecies.test.ts +108 -0
- package/src/LaunchMsaView/components/PastedAlignmentFields.tsx +66 -0
- package/src/LaunchMsaView/components/PreLoadedMSA/PreLoadedMSADataPanel.test.tsx +97 -0
- package/src/LaunchMsaView/components/PreLoadedMSA/PreLoadedMSADataPanel.tsx +20 -7
- package/src/LaunchMsaView/components/PreLoadedMSA/fetchMSAData.ts +1 -1
- package/src/LaunchMsaView/components/QueryRowSelector.test.tsx +44 -0
- package/src/LaunchMsaView/components/QueryRowSelector.tsx +9 -4
- package/src/LaunchMsaView/components/SubmitCancelActions.tsx +4 -16
- package/src/LaunchMsaView/components/TabPanel.tsx +15 -1
- package/src/LaunchMsaView/components/launchPlacement.tsx +29 -1
- package/src/LaunchMsaView/components/pastedAlignmentLaunch.test.tsx +135 -0
- package/src/LaunchMsaView/components/transcriptChoice.test.tsx +140 -0
- package/src/LaunchMsaView/components/transcriptChoice.tsx +64 -0
- package/src/LaunchMsaView/components/useFeatureSequence.ts +0 -1
- package/src/LaunchMsaView/components/useTranscriptSelection.ts +18 -10
- package/src/LaunchMsaView/detectQueryRow.ts +2 -2
- package/src/LaunchMsaView/getTranscriptFeatures.test.ts +71 -0
- package/src/LaunchMsaView/index.ts +4 -4
- package/src/LaunchMsaView/launchTarget.ts +1 -1
- package/src/LaunchMsaView/useQueryRowName.test.ts +35 -0
- package/src/LaunchMsaView/useQueryRowName.ts +10 -4
- package/src/LaunchMsaView/util.ts +12 -20
- package/src/MsaViewPanel/afterCreateAutoruns.ts +34 -11
- package/src/MsaViewPanel/doLaunchBlast.test.ts +43 -0
- package/src/MsaViewPanel/doLaunchBlast.ts +15 -13
- package/src/MsaViewPanel/doLaunchOrthologs.test.ts +26 -8
- package/src/MsaViewPanel/doLaunchOrthologs.ts +5 -12
- package/src/MsaViewPanel/loadProteinDomains.ts +2 -3
- package/src/MsaViewPanel/model.test.ts +22 -0
- package/src/MsaViewPanel/model.ts +9 -2
- package/src/MsaViewPanel/processInit.test.ts +23 -0
- package/src/MsaViewPanel/resolveConnectedTranscript.test.ts +17 -1
- package/src/MsaViewPanel/resolveConnectedTranscript.ts +4 -0
- package/src/MsaViewPanel/sessionHighlights.test.ts +15 -1
- package/src/MsaViewPanel/sessionHighlights.ts +7 -6
- package/src/MsaViewPanel/storedData.test.ts +11 -0
- package/src/MsaViewPanel/structureConnection.ts +8 -3
- package/src/MsaViewPanel/util.ts +9 -6
- package/src/MsaViewPanel/viewReport.ts +1 -1
- package/src/OrthoFinderMsaAdapter/parseResults.test.ts +9 -0
- package/src/OrthoFinderMsaAdapter/parseResults.ts +4 -5
- package/src/readinessConformance.test.ts +4 -3
- package/src/utils/domainCache.ts +3 -26
- package/src/utils/ebiBlast.ts +1 -3
- package/src/utils/ebiJobDispatcher.test.ts +84 -1
- package/src/utils/ebiJobDispatcher.ts +36 -6
- package/src/utils/fetch.test.ts +37 -0
- package/src/utils/fetch.ts +9 -2
- package/src/utils/idb.test.ts +2 -5
- package/src/utils/idb.ts +49 -3
- package/src/utils/msa.test.ts +28 -0
- package/src/utils/msa.ts +8 -1
- package/src/utils/msaIndex.ts +7 -6
- package/src/utils/msaRows.test.ts +35 -0
- package/src/utils/msaRows.ts +5 -1
- package/src/utils/ncbiOrthologs.test.ts +54 -0
- package/src/utils/ncbiOrthologs.ts +34 -26
- package/src/utils/pantherOrthologs.ts +41 -55
- package/src/utils/searchCache.ts +1 -0
- package/src/utils/taxonomyNames.ts +3 -26
- package/src/utils/unirefHomologs.test.ts +19 -0
- package/src/utils/unirefHomologs.ts +25 -22
- package/src/version.ts +1 -1
- package/dist/chunks/BgzipFastaMsaAdapter-Y3LYQRQL.js +0 -6
- package/dist/chunks/BgzipFastaMsaAdapter-Y3LYQRQL.js.map +0 -7
- package/dist/chunks/LaunchMsaViewDialog-LRS3PIOC.js +0 -3
- package/dist/chunks/LaunchMsaViewDialog-LRS3PIOC.js.map +0 -7
- package/dist/chunks/OrthoFinderMsaAdapter-BAVVTZHO.js +0 -2
- package/dist/chunks/chunk-3JFOLUP5.js +0 -164
- package/dist/chunks/chunk-3JFOLUP5.js.map +0 -7
- package/dist/chunks/chunk-CKXVJK5K.js +0 -2
- package/dist/chunks/chunk-DW5INM5K.js +0 -2
- package/dist/chunks/chunk-JUE34WZU.js +0 -2
- package/dist/chunks/chunk-JUE34WZU.js.map +0 -7
- package/dist/chunks/chunk-KHRURQPK.js +0 -2
- package/dist/chunks/chunk-KHRURQPK.js.map +0 -7
- package/dist/chunks/chunk-PWNKL3ZK.js.map +0 -7
- package/dist/chunks/chunk-SIKAYSRK.js +0 -3
- package/dist/chunks/chunk-SIKAYSRK.js.map +0 -7
- package/dist/chunks/chunk-V47MJ4IY.js +0 -2
- package/dist/chunks/chunk-V47MJ4IY.js.map +0 -7
- package/dist/chunks/chunk-WE35XW3J.js +0 -3
- package/dist/chunks/chunk-ZJGFEUGM.js +0 -6
- package/dist/chunks/chunk-ZWQTJTRR.js +0 -2
- package/dist/chunks/dist-PJQ65DMT.js +0 -2
- package/dist/chunks/model-NYWHGBMI.js +0 -11
- package/dist/chunks/model-NYWHGBMI.js.map +0 -7
- package/dist/chunks/renderToSvg-KUOP36MW.js +0 -2
- /package/dist/chunks/{HelpDialog-NSGZYIN7.js.map → HelpDialog-UF43YYX4.js.map} +0 -0
- /package/dist/chunks/{MsaViewPanel-AQWZ2N3P.js.map → MsaViewPanel-VARPO7OL.js.map} +0 -0
- /package/dist/chunks/{chunk-7ZEXFLSY.js.map → chunk-DH2QUEKI.js.map} +0 -0
- /package/dist/chunks/{chunk-TEYYBCMF.js.map → chunk-GP2EFH2U.js.map} +0 -0
- /package/dist/chunks/{dist-PJQ65DMT.js.map → dist-QLG7JP2Z.js.map} +0 -0
- /package/dist/chunks/{renderToSvg-KUOP36MW.js.map → renderToSvg-PM3HEMVM.js.map} +0 -0
package/README.md
CHANGED
|
@@ -8,92 +8,37 @@ covers the viewer itself.
|
|
|
8
8
|
|
|
9
9
|
## Gallery
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
Click a picture to open it live.
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
<table>
|
|
14
|
+
<tr><td width="50%"><a href="https://jbrowse.org/code/jb2/main/?config=https://jbrowse.org/ucsc/hg38/config.json&session=spec-{%22views%22:[{%22type%22:%22LinearGenomeView%22,%22id%22:%22lgv1%22,%22assembly%22:%22hg38%22,%22loc%22:%22chr17:7,674,170-7,674,300%22,%22tracks%22:[%22hg38-ncbiRefSeqSelect%22]},{%22type%22:%22MsaView%22,%22displayName%22:%22p53%20across%20vertebrates%22,%22msa%22:%22https://gmod.org/JBrowseMSA/demo/data/p53/p53-vertebrates.afa%22,%22tree%22:%22https://gmod.org/JBrowseMSA/demo/data/p53/p53-vertebrates.nh%22,%22query%22:%22Human%22,%22connectedViewId%22:%22lgv1%22,%22connectedTranscript%22:%22NM_000546.6%22,%22residueColor%22:{%22scale%22:{%22scheme%22:%22clustalx_protein_dynamic%22}},%22highlights%22:[{%22start%22:102,%22end%22:292,%22label%22:%22DNA-binding%22,%22color%22:%22rgba%28255,140,0,0.15%29%22},175,245,248,249,273,282],%22region%22:%22170-290%22,%22columnTracks%22:[{%22name%22:%22ClinVar%20pathogenic%20missense%22,%22color%22:%22%23c0392b%22,%22encoding%22:{%22y%22:{%22scale%22:{%22domainMax%22:8}}},%22start%22:105,%22values%22:[2,1,0,0,2,4,3,0,6,0,0,0,0,0,0,0,0,0,0,1,2,1,5,0,0,2,2,3,1,1,4,0,0,2,0,0,2,0,3,0,0,0,1,0,0,0,6,2,0,0,1,1,3,6,2,0,1,0,2,1,1,0,0,2,0,0,2,1,3,0,3,3,1,3,5,1,3,0,0,0,0,0,0,0,0,1,0,0,4,3,1,1,1,0,1,0,0,0,0,0,3,0,0,0,0,0,0,0,3,2,1,1,0,1,0,3,0,0,0,0,0,0,0,0,0,0,0,3,0,4,0,2,4,6,2,3,5,2,0,4,5,4,1,6,2,1,2,0,1,3,0,0,0,2,1,0,0,0,0,0,2,3,3,0,1,4,1,3,6,0,2,1,1,3,0,3,8,3,1,0,2,2,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,1,0,0,5,0,0,0,1,1,0,2,0,0,1]},{%22name%22:%22AlphaMissense%20mean%20%28x100%29%22,%22color%22:%22%231565c0%22,%22encoding%22:{%22y%22:{%22scale%22:{%22domainMax%22:100}}},%22values%22:[49,27,19,11,12,14,18,10,12,14,28,17,40,57,73,65,65,68,95,29,30,72,95,21,24,60,39,21,18,17,18,16,17,12,11,13,14,13,14,21,22,20,17,20,16,16,15,14,17,17,15,13,37,29,11,19,16,11,11,12,14,20,14,12,11,20,13,19,15,14,12,13,15,17,14,17,15,19,20,17,15,15,22,22,19,22,20,24,17,23,67,41,46,66,63,37,90,98,63,35,36,20,76,15,99,13,58,48,98,26,81,57,97,43,17,64,87,68,90,98,96,92,73,81,98,91,95,23,13,81,56,97,84,97,98,87,86,81,91,84,94,93,89,66,81,57,77,26,20,13,90,69,17,52,70,49,91,98,87,88,94,87,95,89,48,54,52,76,76,68,92,87,98,78,99,100,98,97,100,96,85,50,38,52,32,74,52,32,83,87,71,47,99,95,89,95,91,96,95,81,20,25,69,48,98,24,64,93,17,23,84,56,99,92,91,93,70,89,76,91,77,27,92,87,57,92,58,35,54,68,75,87,85,87,74,93,96,100,95,98,99,100,94,100,100,98,97,100,99,93,93,59,91,91,87,92,93,99,87,22,21,94,24,76,83,99,98,36,61,97,93,93,99,95,100,97,100,100,99,100,100,97,84,60,98,96,47,62,13,18,56,34,17,17,11,9,9,16,11,15,13,18,20,17,81,75,26,26,23,13,12,14,16,18,18,14,15,15,47,54,46,19,13,34,24,50,56,88,36,87,48,93,63,98,73,40,89,90,45,60,88,51,36,81,77,55,79,75,87,31,54,67,23,18,17,16,25,22,13,15,15,16,20,18,15,20,25,13,15,56,21,47,45,21,16,16,15,21,16,20,66,47,13,26,19,66,13,28,18,16,47,54,66]},{%22name%22:%22MaveDB%20nutlin-3,%20p53WT%22,%22color%22:%22%232e7d32%22,%22encoding%22:{%22y%22:{%22scale%22:{%22domainMax%22:2}}},%22start%22:27,%22values%22:[0.6,0,0.1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.1,0,0,0.2,0.4,0,0,0,0,0.1,0,0.8,0,0.7,0.3,1.6,0.1,1.4,0.1,1.3,0,0,0,0.1,0,0.1,0.5,0.2,0.4,0.4,0.8,0.8,1.4,1.5,0.1,0.1,1.2,1,1.7,1.1,1.4,1.3,0.8,0.5,0.5,0.8,0.4,1.2,0.4,1.4,0.7,1.2,0.6,1.1,0.5,0.4,0.6,1.5,1.3,0,0.7,1.3,0.3,1.4,1,1.4,0.8,1.4,0.8,1.8,0.8,0.3,0,0.2,0.8,0.4,0,0.6,0.7,1.7,1,1.2,2,1.1,0.6,2,0.8,0.7,0.3,0.1,0.4,0.2,0.3,0.1,0.1,0.5,0.8,0.1,0.1,1.4,1.6,1.4,0.7,1.3,0.1,0.1,0,0,0,0.9,0.3,1.8,0,0,1,0,0.1,0.9,0.7,1.2,1.1,1.5,1.4,0.6,1.3,0.5,1.5,0.4,0.3,0.6,0.3,0.1,0.4,0.3,0.2,0.7,0.5,0.6,1.4,0.5,1.4,0.6,1.7,1.1,1.9,0.8,1.3,1.3,1.7,0.9,1.7,2.2,2,0.9,1.5,2.1,1,1.4,0.3,1.3,1.2,1.4,0.8,1.4,1.4,0.9,0.5,0.5,0.7,0.5,0.5,0.8,1.6,1,0.9,0.8,1.5,1.3,1.5,1.5,1.7,1.8,0.5,0.4,2,0,0.9,0.6,1,0,0,1,1.8,0,0.1,0.2,0.1,0.2,0,0.1,0.4,0.4,0.3,0.4,0.6,0.4,0.6,0.5]}]},{%22type%22:%22ProteinView%22,%22uniprotId%22:%22P04637%22,%22transcriptId%22:%22NM_000546.6%22,%22connectedViewId%22:%22lgv1%22,%22connectedView%22:{%22assembly%22:%22hg38%22,%22loc%22:%22chr17:7,674,170-7,674,300%22,%22tracks%22:[%22hg38-ncbiRefSeqSelect%22]}}]}"><img src="docs/gallery/genome-link.png" alt="Hovering R248 in the p53 alignment lights its codon in the genome view" width="100%"></a><br>Hover a column, and its codon lights up in the genome view</td><td width="50%"><a href="https://jbrowse.org/code/jb2/main/?config=https://jbrowse.org/ucsc/hg38/config.json&session=spec-{%22views%22:[{%22type%22:%22LinearGenomeView%22,%22id%22:%22lgv1%22,%22assembly%22:%22hg38%22,%22loc%22:%22chr11:5,225,450-5,227,150%22,%22tracks%22:[%22hg38-ncbiRefSeqSelect%22]},{%22type%22:%22MsaView%22,%22connectedViewId%22:%22lgv1%22,%22connectedTranscript%22:%22NM_000518.5%22,%22domainsOnGenome%22:true,%22orthologParams%22:{%22taxId%22:9606,%22geneCandidates%22:[%22HBB%22],%22source%22:%22uniref%22,%22msaAlgorithm%22:%22browser%22,%22maxSpecies%22:12}}]}"><img src="docs/gallery/domains.png" alt="HBB domains from the alignment drawn as a genome track, in the colors the alignment uses" width="100%"></a><br>HBB domains drawn on the genome</td></tr>
|
|
15
|
+
<tr><td width="50%"><a href="https://jbrowse.org/code/jb2/main/?config=https://jbrowse.org/ucsc/hg38/config.json&session=spec-{%22views%22:[{%22type%22:%22LinearGenomeView%22,%22id%22:%22lgv1%22,%22assembly%22:%22hg38%22,%22loc%22:%22chr17:7,661,779-7,687,538%22,%22tracks%22:[%22hg38-ncbiRefSeqSelect%22]},{%22type%22:%22MsaView%22,%22displayName%22:%22p53%20across%20vertebrates%22,%22msa%22:%22https://gmod.org/JBrowseMSA/demo/data/p53/p53-vertebrates.afa%22,%22tree%22:%22https://gmod.org/JBrowseMSA/demo/data/p53/p53-vertebrates.nh%22,%22query%22:%22Human%22,%22connectedViewId%22:%22lgv1%22,%22connectedTranscript%22:%22NM_000546.6%22,%22residueColor%22:{%22scale%22:{%22scheme%22:%22clustalx_protein_dynamic%22}},%22highlights%22:[{%22start%22:102,%22end%22:292,%22label%22:%22DNA-binding%22,%22color%22:%22rgba%28255,140,0,0.15%29%22},175,245,248,249,273,282],%22columnTracks%22:[{%22name%22:%22ClinVar%20pathogenic%20missense%22,%22color%22:%22%23c0392b%22,%22encoding%22:{%22y%22:{%22scale%22:{%22domainMax%22:8}}},%22start%22:105,%22values%22:[2,1,0,0,2,4,3,0,6,0,0,0,0,0,0,0,0,0,0,1,2,1,5,0,0,2,2,3,1,1,4,0,0,2,0,0,2,0,3,0,0,0,1,0,0,0,6,2,0,0,1,1,3,6,2,0,1,0,2,1,1,0,0,2,0,0,2,1,3,0,3,3,1,3,5,1,3,0,0,0,0,0,0,0,0,1,0,0,4,3,1,1,1,0,1,0,0,0,0,0,3,0,0,0,0,0,0,0,3,2,1,1,0,1,0,3,0,0,0,0,0,0,0,0,0,0,0,3,0,4,0,2,4,6,2,3,5,2,0,4,5,4,1,6,2,1,2,0,1,3,0,0,0,2,1,0,0,0,0,0,2,3,3,0,1,4,1,3,6,0,2,1,1,3,0,3,8,3,1,0,2,2,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,1,0,0,5,0,0,0,1,1,0,2,0,0,1]},{%22name%22:%22AlphaMissense%20mean%20%28x100%29%22,%22color%22:%22%231565c0%22,%22encoding%22:{%22y%22:{%22scale%22:{%22domainMax%22:100}}},%22values%22:[49,27,19,11,12,14,18,10,12,14,28,17,40,57,73,65,65,68,95,29,30,72,95,21,24,60,39,21,18,17,18,16,17,12,11,13,14,13,14,21,22,20,17,20,16,16,15,14,17,17,15,13,37,29,11,19,16,11,11,12,14,20,14,12,11,20,13,19,15,14,12,13,15,17,14,17,15,19,20,17,15,15,22,22,19,22,20,24,17,23,67,41,46,66,63,37,90,98,63,35,36,20,76,15,99,13,58,48,98,26,81,57,97,43,17,64,87,68,90,98,96,92,73,81,98,91,95,23,13,81,56,97,84,97,98,87,86,81,91,84,94,93,89,66,81,57,77,26,20,13,90,69,17,52,70,49,91,98,87,88,94,87,95,89,48,54,52,76,76,68,92,87,98,78,99,100,98,97,100,96,85,50,38,52,32,74,52,32,83,87,71,47,99,95,89,95,91,96,95,81,20,25,69,48,98,24,64,93,17,23,84,56,99,92,91,93,70,89,76,91,77,27,92,87,57,92,58,35,54,68,75,87,85,87,74,93,96,100,95,98,99,100,94,100,100,98,97,100,99,93,93,59,91,91,87,92,93,99,87,22,21,94,24,76,83,99,98,36,61,97,93,93,99,95,100,97,100,100,99,100,100,97,84,60,98,96,47,62,13,18,56,34,17,17,11,9,9,16,11,15,13,18,20,17,81,75,26,26,23,13,12,14,16,18,18,14,15,15,47,54,46,19,13,34,24,50,56,88,36,87,48,93,63,98,73,40,89,90,45,60,88,51,36,81,77,55,79,75,87,31,54,67,23,18,17,16,25,22,13,15,15,16,20,18,15,20,25,13,15,56,21,47,45,21,16,16,15,21,16,20,66,47,13,26,19,66,13,28,18,16,47,54,66]},{%22name%22:%22MaveDB%20nutlin-3,%20p53WT%22,%22color%22:%22%232e7d32%22,%22encoding%22:{%22y%22:{%22scale%22:{%22domainMax%22:2}}},%22start%22:27,%22values%22:[0.6,0,0.1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.1,0,0,0.2,0.4,0,0,0,0,0.1,0,0.8,0,0.7,0.3,1.6,0.1,1.4,0.1,1.3,0,0,0,0.1,0,0.1,0.5,0.2,0.4,0.4,0.8,0.8,1.4,1.5,0.1,0.1,1.2,1,1.7,1.1,1.4,1.3,0.8,0.5,0.5,0.8,0.4,1.2,0.4,1.4,0.7,1.2,0.6,1.1,0.5,0.4,0.6,1.5,1.3,0,0.7,1.3,0.3,1.4,1,1.4,0.8,1.4,0.8,1.8,0.8,0.3,0,0.2,0.8,0.4,0,0.6,0.7,1.7,1,1.2,2,1.1,0.6,2,0.8,0.7,0.3,0.1,0.4,0.2,0.3,0.1,0.1,0.5,0.8,0.1,0.1,1.4,1.6,1.4,0.7,1.3,0.1,0.1,0,0,0,0.9,0.3,1.8,0,0,1,0,0.1,0.9,0.7,1.2,1.1,1.5,1.4,0.6,1.3,0.5,1.5,0.4,0.3,0.6,0.3,0.1,0.4,0.3,0.2,0.7,0.5,0.6,1.4,0.5,1.4,0.6,1.7,1.1,1.9,0.8,1.3,1.3,1.7,0.9,1.7,2.2,2,0.9,1.5,2.1,1,1.4,0.3,1.3,1.2,1.4,0.8,1.4,1.4,0.9,0.5,0.5,0.7,0.5,0.5,0.8,1.6,1,0.9,0.8,1.5,1.3,1.5,1.5,1.7,1.8,0.5,0.4,2,0,0.9,0.6,1,0,0,1,1.8,0,0.1,0.2,0.1,0.2,0,0.1,0.4,0.4,0.3,0.4,0.6,0.4,0.6,0.5]}],%22colWidth%22:2},{%22type%22:%22ProteinView%22,%22uniprotId%22:%22P04637%22,%22transcriptId%22:%22NM_000546.6%22,%22connectedViewId%22:%22lgv1%22,%22connectedView%22:{%22assembly%22:%22hg38%22,%22loc%22:%22chr17:7,661,779-7,687,538%22,%22tracks%22:[%22hg38-ncbiRefSeqSelect%22]}}]}"><img src="docs/gallery/overview.png" alt="The whole vertebrate p53 alignment zoomed out beside TP53, with ClinVar, AlphaMissense and MaveDB tracks above the rows" width="100%"></a><br>The whole alignment, zoomed out</td><td width="50%"><a href="https://jbrowse.org/code/jb2/main/?config=https://jbrowse.org/ucsc/hg38/config.json&session=spec-{%22views%22:[{%22type%22:%22LinearGenomeView%22,%22id%22:%22lgv1%22,%22assembly%22:%22hg38%22,%22loc%22:%22chr17:7,668,000-7,688,000%22,%22tracks%22:[%22hg38-ncbiRefSeqSelect%22]},{%22type%22:%22MsaView%22,%22connectedViewId%22:%22lgv1%22,%22connectedTranscript%22:%22NM_000546.6%22,%22allowedGappyness%22:80,%22domainsOnGenome%22:true,%22orthologParams%22:{%22taxId%22:9606,%22geneCandidates%22:[%22TP53%22],%22source%22:%22uniref%22,%22msaAlgorithm%22:%22browser%22}}]}"><img src="docs/gallery/uniref.png" alt="TP53 domains on the genome above the human p53 UniRef cluster, aligned in the browser" width="100%"></a><br>TP53 domains over its UniRef cluster</td></tr>
|
|
16
|
+
</table>
|
|
16
17
|
|
|
17
|
-
##
|
|
18
|
+
## Use it
|
|
18
19
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
- Right-click a gene and choose "MSA view...": precomputed orthologs (NCBI,
|
|
21
|
+
PANTHER), the gene's UniRef cluster, or a phmmer/blastp search at EBI
|
|
22
|
+
- Or open an alignment of your own: FASTA, Stockholm or Clustal, with an
|
|
23
|
+
optional Newick tree
|
|
24
|
+
- Every launch is also a session-spec URL, so a link can open the same view
|
|
24
25
|
|
|
25
|
-
|
|
26
|
-
https://jbrowse.org/code/jb2/main/index.html?config=https://unpkg.com/jbrowse-plugin-msaview/dist/config.json&session=share-BVmmEYAoAv&password=SuQaN
|
|
27
|
-
|
|
28
|
-
## Features
|
|
29
|
-
|
|
30
|
-
- Vertical virtualized scrolling of phylogenetic tree
|
|
31
|
-
- Vertical and horizontal virtualized scrolling of multiple sequence alignment
|
|
32
|
-
- View metadata about alignment from MSA headers (e.g. stockholm)
|
|
33
|
-
- Collapse subtrees with click action on branches which also hides gaps that
|
|
34
|
-
were introduced by that subtree in the rest of the alignment
|
|
35
|
-
- Allows "zooming out" by setting tiny rowHeight/colWidth settings
|
|
36
|
-
- Allows changing color schemes, with jalview, clustal, and other color schemes
|
|
37
|
-
- Allows toggling the branch length rendering for the phylogenetic tree
|
|
38
|
-
- Can share sessions with other users which will send relevant settings and
|
|
39
|
-
links to files to automatically open your results
|
|
40
|
-
- The tree or the MSA panel can be loaded separately from each other
|
|
41
|
-
- Builds a cross-species alignment for any gene from the genome view's
|
|
42
|
-
right-click menu: precomputed orthologs (NCBI, PANTHER), the gene's UniRef
|
|
43
|
-
cluster across all of UniProtKB, or a phmmer/blastp search at EBI
|
|
44
|
-
- Aligns and builds trees in the browser, so a UniRef launch needs no job at any
|
|
45
|
-
external service; EBI's aligners remain an option
|
|
46
|
-
- Every launch is also a session-spec URL (`orthologParams`, `searchParams`,
|
|
47
|
-
`connectedTranscript`), see [launching](docs/launching.md)
|
|
48
|
-
|
|
49
|
-
## File format supports
|
|
50
|
-
|
|
51
|
-
- FASTA formatted for MSA (e.g. gaps already inserted)
|
|
52
|
-
- Stockholm files (e.g. .stock file, with or without embedded newick tree, uses
|
|
53
|
-
stockholm-js parser. also supports "multi-stockholm" files with multiple
|
|
54
|
-
alignments embedded in a single file)
|
|
55
|
-
- Clustal files (e.g. .aln file, uses clustal-js parser)
|
|
56
|
-
- Newick (tree can be loaded separately as a .nh file)
|
|
57
|
-
|
|
58
|
-
## Availability
|
|
59
|
-
|
|
60
|
-
This plugin is installed by default on https://genomes.jbrowse.org so you can
|
|
61
|
-
use it on any species there
|
|
26
|
+
It is installed by default on https://genomes.jbrowse.org.
|
|
62
27
|
|
|
63
28
|
## Documentation
|
|
64
29
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
- [
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
- [Your own alignments](docs/your-own-alignments.md): opening an alignment you
|
|
71
|
-
made, from a file, a link, or a per-gene dataset a site configures.
|
|
72
|
-
- [BLAST](docs/blast.md): why searches run at EBI rather than NCBI, and the
|
|
73
|
-
manual route to NCBI's `nr`.
|
|
74
|
-
|
|
75
|
-
Linking and embedding:
|
|
76
|
-
|
|
77
|
-
- [Launching from a URL or code](docs/launching.md): worked session-spec links,
|
|
78
|
-
the genome connection, highlights, opening on a residue, and placement.
|
|
79
|
-
- [Launch parameters](docs/launch-parameters.md): every argument and field.
|
|
80
|
-
- [Linked views](docs/linked-views.md): how a column reaches its codon and a
|
|
81
|
-
protein3d structure.
|
|
82
|
-
- [Reading the view](docs/reading-the-view.md): `view.report` and `notices`,
|
|
83
|
-
what a launch resolved to, as data a script or an agent reads.
|
|
84
|
-
|
|
85
|
-
Working on the plugin:
|
|
86
|
-
|
|
87
|
-
- [DEVELOPERS.md](DEVELOPERS.md): running it locally, the checks, the README
|
|
88
|
-
figure and publishing.
|
|
89
|
-
|
|
90
|
-
## Publication
|
|
30
|
+
- [Alignments from a gene](docs/alignments-from-a-gene.md): align from a gene
|
|
31
|
+
- [Your own alignments](docs/your-own-alignments.md): FASTA, Stockholm, Clustal
|
|
32
|
+
- [BLAST](docs/blast.md): why searches run at EBI
|
|
33
|
+
- [Launching](docs/launching.md): open a view from a URL or code
|
|
34
|
+
- [Linked views](docs/linked-views.md): columns linked to the genome
|
|
91
35
|
|
|
92
|
-
|
|
36
|
+
## Citation
|
|
93
37
|
|
|
94
38
|
Diesh, C., Stevens, G., Bridge, C., Hogue, G., Buels, R., Cain, S., Stein, L., &
|
|
95
39
|
Holmes, I. (2026). Proteins in the Genome Browser: Integration of Phylogenies,
|
|
96
40
|
Alignments, and Structures With Nucleotide-level Evidence in JBrowse 2. Journal
|
|
97
|
-
of Molecular Biology, 169645. https://doi.org/10.1016/j.jmb.2026.169645
|
|
41
|
+
of Molecular Biology, 169645. https://doi.org/10.1016/j.jmb.2026.169645. See
|
|
42
|
+
also https://github.com/GMOD/proteinbrowser.
|
|
98
43
|
|
|
99
|
-
|
|
44
|
+
Based on work from https://github.com/ihh/abrowse.
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { getSession } from '@jbrowse/core/util';
|
|
3
3
|
import { observer } from 'mobx-react';
|
|
4
|
-
import { isMsaView } from '../MsaViewPanel/isMsaView';
|
|
5
4
|
import { hasHoverPosition, useStyles } from './util';
|
|
6
5
|
const GenomeMouseoverHighlight = observer(function ({ model, }) {
|
|
7
|
-
const { hovered
|
|
8
|
-
|
|
9
|
-
return hasMsaView && hasHoverPosition(hovered) ? (React.createElement(GenomeMouseoverHighlightRenderer, { model: model, hovered: hovered })) : null;
|
|
6
|
+
const { hovered } = getSession(model);
|
|
7
|
+
return hasHoverPosition(hovered) ? (React.createElement(GenomeMouseoverHighlightRenderer, { model: model, hovered: hovered })) : null;
|
|
10
8
|
});
|
|
11
9
|
const GenomeMouseoverHighlightRenderer = observer(function ({ model, hovered, }) {
|
|
12
10
|
const { classes } = useStyles();
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { getSession } from '@jbrowse/core/util';
|
|
3
3
|
import { observer } from 'mobx-react';
|
|
4
|
+
import { displayedRefName } from '../MsaViewPanel/displayedRefName';
|
|
4
5
|
import { connectedHighlights } from './connectedHighlights';
|
|
5
6
|
import { hasHoverPosition, useStyles } from './util';
|
|
6
7
|
const MsaToGenomeHighlight = observer(function MsaToGenomeHighlight2({ model, }) {
|
|
@@ -10,12 +11,16 @@ const MsaToGenomeHighlight = observer(function MsaToGenomeHighlight2({ model, })
|
|
|
10
11
|
});
|
|
11
12
|
const MsaToGenomeHighlightRenderer = observer(function ({ model, highlights, }) {
|
|
12
13
|
const { classes } = useStyles();
|
|
13
|
-
const { offsetPx } = model;
|
|
14
|
+
const { offsetPx, displayedRegions, assemblyNames } = model;
|
|
15
|
+
const assembly = getSession(model).assemblyManager.get(assemblyNames[0] ?? '');
|
|
14
16
|
return (React.createElement(React.Fragment, null, highlights.map(r => {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
const refName = displayedRefName({
|
|
18
|
+
displayedRegions,
|
|
19
|
+
assembly,
|
|
20
|
+
refName: r.refName,
|
|
21
|
+
});
|
|
22
|
+
const s = model.bpToPx({ refName, coord: r.start });
|
|
23
|
+
const e = model.bpToPx({ refName, coord: r.end });
|
|
19
24
|
if (s && e) {
|
|
20
25
|
const width = Math.max(Math.abs(e.offsetPx - s.offsetPx), 4);
|
|
21
26
|
const left = Math.min(s.offsetPx, e.offsetPx) - offsetPx;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { BgzfFilehandle } from '@gmod/bgzf-filehandle';
|
|
1
2
|
import { BaseAdapter } from '@jbrowse/core/data_adapters/BaseAdapter';
|
|
2
3
|
import type { MsaIndexEntry } from '../utils/msaIndex';
|
|
3
4
|
import type { BaseFeatureDataAdapter } from '@jbrowse/core/data_adapters/BaseAdapter';
|
|
@@ -6,6 +7,7 @@ export default class BgzipFastaMsaAdapter extends BaseAdapter {
|
|
|
6
7
|
configureP: Promise<BaseFeatureDataAdapter> | undefined;
|
|
7
8
|
msaRowsP: Promise<Map<string, string[]>> | undefined;
|
|
8
9
|
msaIndexP: Promise<Map<string, MsaIndexEntry> | undefined> | undefined;
|
|
10
|
+
bgzf: BgzfFilehandle | undefined;
|
|
9
11
|
configurePre(): Promise<BaseFeatureDataAdapter<import("@jbrowse/core/configuration").AnyConfigurationModel>>;
|
|
10
12
|
configure(): Promise<BaseFeatureDataAdapter<import("@jbrowse/core/configuration").AnyConfigurationModel>>;
|
|
11
13
|
readMsaIndex(location: FileLocation): Promise<Map<string, {
|
|
@@ -22,8 +24,8 @@ export default class BgzipFastaMsaAdapter extends BaseAdapter {
|
|
|
22
24
|
groupRows(): Promise<Map<string, string[]>>;
|
|
23
25
|
getMSARows(): Promise<Map<string, string[]>>;
|
|
24
26
|
getMSAList(): Promise<string[]>;
|
|
25
|
-
|
|
26
|
-
readRowsMSA(
|
|
27
|
+
getBgzf(): Promise<BgzfFilehandle>;
|
|
28
|
+
readRowsMSA(rows: string[]): Promise<string>;
|
|
27
29
|
getMSA(id: string): Promise<{
|
|
28
30
|
msa: string;
|
|
29
31
|
}>;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import { BgzfFilehandle } from '@gmod/bgzf-filehandle';
|
|
1
2
|
import { readConfObject } from '@jbrowse/core/configuration';
|
|
2
3
|
import { BaseAdapter } from '@jbrowse/core/data_adapters/BaseAdapter';
|
|
3
4
|
import { openLocation } from '@jbrowse/core/util/io';
|
|
4
5
|
import { firstValueFrom, toArray } from 'rxjs';
|
|
5
|
-
import { parseMsaIndex,
|
|
6
|
+
import { parseMsaIndex, readMsaEntry } from '../utils/msaIndex';
|
|
6
7
|
export default class BgzipFastaMsaAdapter extends BaseAdapter {
|
|
7
8
|
async configurePre() {
|
|
8
9
|
const getSubAdapter = this.getSubAdapter;
|
|
@@ -73,37 +74,42 @@ export default class BgzipFastaMsaAdapter extends BaseAdapter {
|
|
|
73
74
|
async getMSAList() {
|
|
74
75
|
return [...((await this.getMsaIndex()) ?? (await this.getMSARows())).keys()];
|
|
75
76
|
}
|
|
76
|
-
async
|
|
77
|
+
async getBgzf() {
|
|
77
78
|
const adapter = await this.configure();
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
entry,
|
|
84
|
-
})
|
|
85
|
-
: '';
|
|
79
|
+
this.bgzf ??= new BgzfFilehandle({
|
|
80
|
+
filehandle: openLocation(adapter.getConf('fastaLocation'), this.pluginManager),
|
|
81
|
+
gziFilehandle: openLocation(adapter.getConf('gziLocation'), this.pluginManager),
|
|
82
|
+
});
|
|
83
|
+
return this.bgzf;
|
|
86
84
|
}
|
|
87
|
-
async readRowsMSA(
|
|
85
|
+
async readRowsMSA(rows) {
|
|
88
86
|
const adapter = await this.configure();
|
|
89
|
-
const
|
|
90
|
-
|
|
91
|
-
.getFeaturesInMultipleRegions(rows.map(refName => ({
|
|
87
|
+
const features = await Promise.all(rows.map(refName => firstValueFrom(adapter
|
|
88
|
+
.getFeatures({
|
|
92
89
|
refName,
|
|
93
90
|
start: 0,
|
|
94
91
|
end: 1_000_000_000,
|
|
95
92
|
assemblyName: '',
|
|
96
|
-
})
|
|
97
|
-
.pipe(toArray()));
|
|
98
|
-
return features
|
|
93
|
+
})
|
|
94
|
+
.pipe(toArray()))));
|
|
95
|
+
return features
|
|
96
|
+
.flat()
|
|
97
|
+
.map(f => `>${f.get('refName')}\n${f.get('seq')}`)
|
|
98
|
+
.join('\n');
|
|
99
99
|
}
|
|
100
100
|
async getMSA(id) {
|
|
101
101
|
const index = await this.getMsaIndex();
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
}
|
|
102
|
+
const entry = index?.get(id);
|
|
103
|
+
const rows = index ? undefined : (await this.getMSARows()).get(id);
|
|
104
|
+
if (entry) {
|
|
105
|
+
return { msa: await readMsaEntry(await this.getBgzf(), entry) };
|
|
106
|
+
}
|
|
107
|
+
else if (rows) {
|
|
108
|
+
return { msa: await this.readRowsMSA(rows) };
|
|
109
|
+
}
|
|
110
|
+
else {
|
|
111
|
+
throw new Error(`${id} is not an alignment in this dataset`);
|
|
112
|
+
}
|
|
107
113
|
}
|
|
108
114
|
}
|
|
109
115
|
function withSuffix(location, suffix) {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import React, {
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
2
|
import ExpandMoreIcon from '@mui/icons-material/ExpandMore';
|
|
3
3
|
import { Accordion, AccordionDetails, AccordionSummary, MenuItem, Typography, } from '@mui/material';
|
|
4
4
|
import { observer } from 'mobx-react';
|
|
5
5
|
import { makeStyles } from 'tss-react/mui';
|
|
6
6
|
import TextField2 from '../../../components/TextField2';
|
|
7
|
-
import { getBlastViewTitle,
|
|
7
|
+
import { getBlastViewTitle, getLinearGenomeView } from '../../util';
|
|
8
8
|
import LaunchPanelContent from '../LaunchPanelContent';
|
|
9
9
|
import SequenceStatusMessage from '../SequenceStatus';
|
|
10
10
|
import SubmitCancelActions from '../SubmitCancelActions';
|
|
@@ -13,7 +13,7 @@ import { builtAlignmentLook, launchConnectedView, useLaunchSubmit, } from '../la
|
|
|
13
13
|
import { useTranscriptSelection } from '../useTranscriptSelection';
|
|
14
14
|
import CachedBlastResults from './CachedBlastResults';
|
|
15
15
|
import MsaAlgorithmSelect from './MsaAlgorithmSelect';
|
|
16
|
-
import { databaseLabel, databaseOptionsFor, defaultMaxHits, defaultSearchFor, searchProgramLabels, searchPrograms, } from './consts';
|
|
16
|
+
import { databaseLabel, databaseOptionsFor, defaultMaxHits, defaultSearchFor, searchProgramLabels, searchPrograms, snapBlastHitCount, } from './consts';
|
|
17
17
|
import { useStoredMsaAlgorithm, useStoredSearchChoice, } from './searchChoiceStorage';
|
|
18
18
|
import { useCachedBlastResults } from './useCachedBlastResults';
|
|
19
19
|
const useStyles = makeStyles()({
|
|
@@ -45,8 +45,8 @@ const BlastAutomaticPanel = observer(function ({ handleClose, feature, model, ch
|
|
|
45
45
|
const hitCount = Number(maxHits);
|
|
46
46
|
const hitCountValid = Number.isInteger(hitCount) && hitCount >= 1;
|
|
47
47
|
const isPhmmer = search.program === 'phmmer';
|
|
48
|
-
const
|
|
49
|
-
const cached = useCachedBlastResults(
|
|
48
|
+
const requestedHits = isPhmmer ? hitCount : snapBlastHitCount(hitCount);
|
|
49
|
+
const cached = useCachedBlastResults(feature);
|
|
50
50
|
const transcriptSelection = useTranscriptSelection({
|
|
51
51
|
feature,
|
|
52
52
|
view,
|
|
@@ -72,7 +72,11 @@ const BlastAutomaticPanel = observer(function ({ handleClose, feature, model, ch
|
|
|
72
72
|
isPhmmer ? null : (React.createElement(MsaAlgorithmSelect, { className: classes.selectField, value: selectedMsaAlgorithm, onChange: setSelectedMsaAlgorithm })),
|
|
73
73
|
React.createElement(TextField2, { variant: "outlined", label: "Hits", className: classes.selectField, type: "number", value: maxHits, onChange: event => {
|
|
74
74
|
setMaxHits(event.target.value);
|
|
75
|
-
}, error: !hitCountValid, helperText:
|
|
75
|
+
}, error: !hitCountValid, helperText: !hitCountValid
|
|
76
|
+
? 'a whole number, 1 or more'
|
|
77
|
+
: requestedHits === hitCount
|
|
78
|
+
? 'best-scoring sequences to keep'
|
|
79
|
+
: `EBI takes set counts, so ${requestedHits} will be requested` }),
|
|
76
80
|
React.createElement(TranscriptSelector, { feature: feature, ...transcriptSelection }),
|
|
77
81
|
React.createElement(Typography, { variant: "body2", className: classes.infoText },
|
|
78
82
|
isPhmmer
|
|
@@ -82,9 +86,9 @@ const BlastAutomaticPanel = observer(function ({ handleClose, feature, model, ch
|
|
|
82
86
|
"The EBI queue is the wait, and it runs from seconds to many minutes."),
|
|
83
87
|
cached.results.length > 0 ? (React.createElement(Accordion, { className: classes.cachedResultsAccordion },
|
|
84
88
|
React.createElement(AccordionSummary, { expandIcon: React.createElement(ExpandMoreIcon, null) },
|
|
85
|
-
React.createElement(Typography, null, "Previous
|
|
89
|
+
React.createElement(Typography, null, "Previous searches")),
|
|
86
90
|
React.createElement(AccordionDetails, null,
|
|
87
|
-
React.createElement(CachedBlastResults, { model: model,
|
|
91
|
+
React.createElement(CachedBlastResults, { model: model, submit: submit, feature: feature, cached: cached })))) : null),
|
|
88
92
|
React.createElement(SubmitCancelActions, { model: model, hint: React.createElement(SequenceStatusMessage, { status: sequenceStatus }), submitDisabled: !proteinSequence || !hitCountValid, onSubmit: placement => {
|
|
89
93
|
if (selectedTranscript) {
|
|
90
94
|
const blastParams = search.program === 'phmmer'
|
|
@@ -3,7 +3,7 @@ import type { AbstractTrackModel, Feature } from '@jbrowse/core/util';
|
|
|
3
3
|
/**
|
|
4
4
|
* The route to NCBI's `nr`, which no plugin version can query directly: NCBI
|
|
5
5
|
* stopped sending Access-Control-Allow-Origin to third-party origins, so the
|
|
6
|
-
* browser cannot read Blast.cgi at all (see docs/blast.md).
|
|
6
|
+
* browser cannot read Blast.cgi at all (see agent-docs/blast-design.md).
|
|
7
7
|
*
|
|
8
8
|
* That makes the round trip through NCBI's own site the whole feature rather
|
|
9
9
|
* than a fallback, so the panel walks it end to end. It used to hand the user a
|
|
@@ -4,11 +4,12 @@ import { Alert, Typography } from '@mui/material';
|
|
|
4
4
|
import { observer } from 'mobx-react';
|
|
5
5
|
import { makeStyles } from 'tss-react/mui';
|
|
6
6
|
import ExternalLink from '../../../components/ExternalLink';
|
|
7
|
-
import TextField2 from '../../../components/TextField2';
|
|
8
7
|
import { useQueryRowName } from '../../useQueryRowName';
|
|
9
|
-
import { cleanProteinSequence,
|
|
8
|
+
import { cleanProteinSequence, getBlastViewTitle, getLinearGenomeView, } from '../../util';
|
|
10
9
|
import LaunchPanelContent from '../LaunchPanelContent';
|
|
10
|
+
import PastedAlignmentFields from '../PastedAlignmentFields';
|
|
11
11
|
import QueryRowSelector from '../QueryRowSelector';
|
|
12
|
+
import SequenceStatusMessage from '../SequenceStatus';
|
|
12
13
|
import SubmitCancelActions from '../SubmitCancelActions';
|
|
13
14
|
import TranscriptSelector from '../TranscriptSelector';
|
|
14
15
|
import { launchConnectedView, useLaunchSubmit } from '../launchConnectedView';
|
|
@@ -18,12 +19,6 @@ const useStyles = makeStyles()({
|
|
|
18
19
|
ncbiLink: {
|
|
19
20
|
wordBreak: 'break-all',
|
|
20
21
|
},
|
|
21
|
-
textAreaFont: {
|
|
22
|
-
fontFamily: 'Courier New',
|
|
23
|
-
},
|
|
24
|
-
msaInput: {
|
|
25
|
-
marginBottom: 20,
|
|
26
|
-
},
|
|
27
22
|
step: {
|
|
28
23
|
marginTop: 20,
|
|
29
24
|
},
|
|
@@ -35,7 +30,7 @@ const useStyles = makeStyles()({
|
|
|
35
30
|
/**
|
|
36
31
|
* The route to NCBI's `nr`, which no plugin version can query directly: NCBI
|
|
37
32
|
* stopped sending Access-Control-Allow-Origin to third-party origins, so the
|
|
38
|
-
* browser cannot read Blast.cgi at all (see docs/blast.md).
|
|
33
|
+
* browser cannot read Blast.cgi at all (see agent-docs/blast-design.md).
|
|
39
34
|
*
|
|
40
35
|
* That makes the round trip through NCBI's own site the whole feature rather
|
|
41
36
|
* than a fallback, so the panel walks it end to end. It used to hand the user a
|
|
@@ -54,7 +49,7 @@ const BlastManualPanel = observer(function ({ handleClose, feature, model, child
|
|
|
54
49
|
view,
|
|
55
50
|
preferredTranscriptId,
|
|
56
51
|
});
|
|
57
|
-
const { proteinSequence, selectedTranscript, error } = transcriptSelection;
|
|
52
|
+
const { proteinSequence, selectedTranscript, error, sequenceStatus } = transcriptSelection;
|
|
58
53
|
const queryRow = useQueryRowName(msaText, proteinSequence);
|
|
59
54
|
const s2 = cleanProteinSequence(proteinSequence);
|
|
60
55
|
// a link the user follows to NCBI's own site, not something we fetch — which
|
|
@@ -68,7 +63,9 @@ const BlastManualPanel = observer(function ({ handleClose, feature, model, child
|
|
|
68
63
|
React.createElement("div", { className: classes.step },
|
|
69
64
|
React.createElement(Typography, { variant: "subtitle2" }, "1. Run the search at NCBI"),
|
|
70
65
|
React.createElement("div", { className: classes.stepBody }, proteinSequence ? (React.createElement("div", { className: classes.ncbiLink },
|
|
71
|
-
React.createElement(ExternalLink, { href: link }, link2))) : (React.createElement(Alert, { severity: "info" },
|
|
66
|
+
React.createElement(ExternalLink, { href: link }, link2))) : sequenceStatus === 'loading' ? (React.createElement(SequenceStatusMessage, { status: sequenceStatus })) : (React.createElement(Alert, { severity: "info" }, sequenceStatus === 'error'
|
|
67
|
+
? 'The protein sequence could not be loaded, so there is no link to follow.'
|
|
68
|
+
: 'This isoform has no coding sequence to search with. Pick another one above.')))),
|
|
72
69
|
React.createElement("div", { className: classes.step },
|
|
73
70
|
React.createElement(Typography, { variant: "subtitle2" }, "2. Align the hits"),
|
|
74
71
|
React.createElement("div", { className: classes.stepBody },
|
|
@@ -76,20 +73,15 @@ const BlastManualPanel = observer(function ({ handleClose, feature, model, child
|
|
|
76
73
|
React.createElement("div", { className: classes.step },
|
|
77
74
|
React.createElement(Typography, { variant: "subtitle2" }, "3. Paste the results back here"),
|
|
78
75
|
React.createElement("div", { className: classes.stepBody },
|
|
79
|
-
React.createElement(
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
React.createElement(TextField2, { variant: "outlined", label: "Tree (optional)", multiline: true, minRows: 3, maxRows: 10, fullWidth: true, slotProps: { input: { className: classes.textAreaFont } }, placeholder: "Paste the .nh Newick tree here", value: treeText, onChange: event => {
|
|
83
|
-
setTreeText(event.target.value);
|
|
84
|
-
} }),
|
|
85
|
-
React.createElement(QueryRowSelector, { ...queryRow })))),
|
|
86
|
-
React.createElement(SubmitCancelActions, { model: model, submitDisabled: !selectedTranscript || !msaText.trim(), onSubmit: placement => {
|
|
76
|
+
React.createElement(PastedAlignmentFields, { msaText: msaText, setMsaText: setMsaText, treeText: treeText, setTreeText: setTreeText }),
|
|
77
|
+
React.createElement(QueryRowSelector, { ...queryRow, sequenceStatus: sequenceStatus })))),
|
|
78
|
+
React.createElement(SubmitCancelActions, { model: model, hint: React.createElement(SequenceStatusMessage, { status: sequenceStatus }), submitDisabled: !selectedTranscript || sequenceStatus === 'loading' || !msaText.trim(), onSubmit: placement => {
|
|
87
79
|
if (selectedTranscript) {
|
|
88
80
|
submit(() => launchConnectedView({
|
|
89
81
|
view,
|
|
90
82
|
feature: selectedTranscript,
|
|
91
83
|
placement,
|
|
92
|
-
displayName:
|
|
84
|
+
displayName: getBlastViewTitle(feature, selectedTranscript),
|
|
93
85
|
querySeqName: queryRow.querySeqName,
|
|
94
86
|
querySeqOffset: queryRow.querySeqOffset,
|
|
95
87
|
data: { msa: msaText, tree: treeText },
|
|
@@ -1,22 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { AbstractTrackModel, Feature } from '@jbrowse/core/util';
|
|
3
|
-
|
|
4
|
-
readonly automatic: ({ handleClose, feature, model, children, preferredTranscriptId, }: {
|
|
5
|
-
model: AbstractTrackModel;
|
|
6
|
-
feature: Feature;
|
|
7
|
-
handleClose: () => void;
|
|
8
|
-
children: React.ReactNode;
|
|
9
|
-
preferredTranscriptId?: string;
|
|
10
|
-
}) => React.JSX.Element;
|
|
11
|
-
readonly manual: ({ handleClose, feature, model, children, preferredTranscriptId, }: {
|
|
12
|
-
children: React.ReactNode;
|
|
13
|
-
model: AbstractTrackModel;
|
|
14
|
-
feature: Feature;
|
|
15
|
-
handleClose: () => void;
|
|
16
|
-
preferredTranscriptId?: string;
|
|
17
|
-
}) => React.JSX.Element;
|
|
18
|
-
};
|
|
19
|
-
export type BlastLookupMethod = keyof typeof panelMap;
|
|
3
|
+
export type BlastLookupMethod = 'automatic' | 'manual';
|
|
20
4
|
declare const BlastPanel: ({ handleClose, model, feature, preferredTranscriptId, }: {
|
|
21
5
|
handleClose: () => void;
|
|
22
6
|
model: AbstractTrackModel;
|
|
@@ -5,6 +5,7 @@ import { observer } from 'mobx-react';
|
|
|
5
5
|
import { makeStyles } from 'tss-react/mui';
|
|
6
6
|
import { DEFAULT_EBI_EMAIL, EBI_EMAIL_STORAGE_KEY, } from '../../../utils/ebiJobDispatcher';
|
|
7
7
|
import { useLocalStorage } from '../../../utils/useLocalStorage';
|
|
8
|
+
import TabPanel from '../TabPanel';
|
|
8
9
|
import BlastAutomaticPanel from './BlastAutomaticPanel';
|
|
9
10
|
import BlastManualPanel from './BlastManualPanel';
|
|
10
11
|
import BlastMethodSelector from './BlastMethodSelector';
|
|
@@ -14,24 +15,22 @@ const useStyles = makeStyles()({
|
|
|
14
15
|
float: 'right',
|
|
15
16
|
},
|
|
16
17
|
});
|
|
17
|
-
const panelMap = {
|
|
18
|
-
automatic: BlastAutomaticPanel,
|
|
19
|
-
manual: BlastManualPanel,
|
|
20
|
-
};
|
|
21
18
|
const BlastPanel = observer(function BlastPanel({ handleClose, model, feature, preferredTranscriptId, }) {
|
|
22
19
|
const [lookupMethod, setLookupMethod] = useState('automatic');
|
|
23
20
|
const [ebiEmail, setEbiEmail] = useLocalStorage(EBI_EMAIL_STORAGE_KEY, DEFAULT_EBI_EMAIL);
|
|
24
21
|
const [settingsOpen, setSettingsOpen] = useState(false);
|
|
25
22
|
const { classes } = useStyles();
|
|
26
|
-
const
|
|
23
|
+
const methodSelector = (React.createElement(BlastMethodSelector, { lookupMethod: lookupMethod, setLookupMethod: setLookupMethod }));
|
|
27
24
|
return (React.createElement(React.Fragment, null,
|
|
28
|
-
React.createElement(Tooltip, { title: `EBI settings — jobs are submitted with ${ebiEmail.trim() || DEFAULT_EBI_EMAIL}` },
|
|
25
|
+
lookupMethod === 'automatic' ? (React.createElement(Tooltip, { title: `EBI settings — jobs are submitted with ${ebiEmail.trim() || DEFAULT_EBI_EMAIL}` },
|
|
29
26
|
React.createElement(IconButton, { className: classes.settingsButton, "aria-label": "EBI settings", size: "small", onClick: () => {
|
|
30
27
|
setSettingsOpen(true);
|
|
31
28
|
} },
|
|
32
|
-
React.createElement(SettingsIcon, null))),
|
|
33
|
-
React.createElement(
|
|
34
|
-
React.createElement(
|
|
29
|
+
React.createElement(SettingsIcon, null)))) : null,
|
|
30
|
+
React.createElement(TabPanel, { value: lookupMethod, index: "automatic" },
|
|
31
|
+
React.createElement(BlastAutomaticPanel, { model: model, feature: feature, handleClose: handleClose, preferredTranscriptId: preferredTranscriptId }, methodSelector)),
|
|
32
|
+
React.createElement(TabPanel, { value: lookupMethod, index: "manual" },
|
|
33
|
+
React.createElement(BlastManualPanel, { model: model, feature: feature, handleClose: handleClose, preferredTranscriptId: preferredTranscriptId }, methodSelector)),
|
|
35
34
|
settingsOpen ? (React.createElement(BlastSettingsDialog, { ebiEmail: ebiEmail, handleClose: settings => {
|
|
36
35
|
if (settings) {
|
|
37
36
|
setEbiEmail(settings.ebiEmail);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
// @vitest-environment jsdom
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { SimpleFeature } from '@jbrowse/core/util';
|
|
4
|
+
import { cleanup, fireEvent, render, screen } from '@testing-library/react';
|
|
5
|
+
import { observer } from 'mobx-react';
|
|
6
|
+
import { afterEach, expect, test, vi } from 'vitest';
|
|
7
|
+
import BlastPanel from './BlastPanel';
|
|
8
|
+
const mounted = vi.fn();
|
|
9
|
+
const Probe = observer(function Probe({ name, children, }) {
|
|
10
|
+
React.useEffect(() => {
|
|
11
|
+
mounted(name);
|
|
12
|
+
}, [name]);
|
|
13
|
+
return (React.createElement(React.Fragment, null,
|
|
14
|
+
children,
|
|
15
|
+
React.createElement("input", { "aria-label": `${name} input`, defaultValue: "" })));
|
|
16
|
+
});
|
|
17
|
+
vi.mock('./BlastAutomaticPanel', () => ({
|
|
18
|
+
default: observer(function ({ children }) {
|
|
19
|
+
return React.createElement(Probe, { name: "automatic" }, children);
|
|
20
|
+
}),
|
|
21
|
+
}));
|
|
22
|
+
vi.mock('./BlastManualPanel', () => ({
|
|
23
|
+
default: observer(function ({ children }) {
|
|
24
|
+
return React.createElement(Probe, { name: "manual" }, children);
|
|
25
|
+
}),
|
|
26
|
+
}));
|
|
27
|
+
afterEach(() => {
|
|
28
|
+
cleanup();
|
|
29
|
+
mounted.mockClear();
|
|
30
|
+
});
|
|
31
|
+
const feature = new SimpleFeature({
|
|
32
|
+
uniqueId: 'gene1',
|
|
33
|
+
refName: 'chr1',
|
|
34
|
+
start: 0,
|
|
35
|
+
end: 10,
|
|
36
|
+
});
|
|
37
|
+
const model = {};
|
|
38
|
+
function pick(label) {
|
|
39
|
+
const radio = screen
|
|
40
|
+
.getAllByLabelText(label)
|
|
41
|
+
.find(el => !el.closest('[hidden]'));
|
|
42
|
+
fireEvent.click(radio);
|
|
43
|
+
}
|
|
44
|
+
test('flipping Automatic and Manual keeps what each panel holds', () => {
|
|
45
|
+
render(React.createElement(BlastPanel, { handleClose: () => { }, model: model, feature: feature }));
|
|
46
|
+
fireEvent.change(screen.getByLabelText('automatic input'), {
|
|
47
|
+
target: { value: 'hit count' },
|
|
48
|
+
});
|
|
49
|
+
pick('Manual');
|
|
50
|
+
fireEvent.change(screen.getByLabelText('manual input'), {
|
|
51
|
+
target: { value: 'pasted alignment' },
|
|
52
|
+
});
|
|
53
|
+
pick('Automatic');
|
|
54
|
+
pick('Manual');
|
|
55
|
+
expect(screen.getByDisplayValue('hit count')).toBeTruthy();
|
|
56
|
+
expect(screen.getByDisplayValue('pasted alignment')).toBeTruthy();
|
|
57
|
+
expect(mounted.mock.calls).toEqual([['automatic'], ['manual']]);
|
|
58
|
+
});
|
|
59
|
+
test('only the chosen panel is shown, and Manual mounts on first use', () => {
|
|
60
|
+
render(React.createElement(BlastPanel, { handleClose: () => { }, model: model, feature: feature }));
|
|
61
|
+
expect(screen.getByLabelText('automatic input').closest('[hidden]')).toBeNull();
|
|
62
|
+
expect(screen.queryByLabelText('manual input')).toBeNull();
|
|
63
|
+
pick('Manual');
|
|
64
|
+
expect(screen.getByLabelText('automatic input').closest('[hidden]')).not.toBeNull();
|
|
65
|
+
expect(screen.getByLabelText('manual input').closest('[hidden]')).toBeNull();
|
|
66
|
+
});
|
|
67
|
+
test('the EBI settings gear is offered only where a job goes to EBI', () => {
|
|
68
|
+
render(React.createElement(BlastPanel, { handleClose: () => { }, model: model, feature: feature }));
|
|
69
|
+
expect(screen.getByLabelText('EBI settings')).toBeTruthy();
|
|
70
|
+
pick('Manual');
|
|
71
|
+
expect(screen.queryByLabelText('EBI settings')).toBeNull();
|
|
72
|
+
});
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { CachedBlastResult } from '../../../utils/blastCache';
|
|
3
|
+
import type { useLaunchSubmit } from '../launchConnectedView';
|
|
3
4
|
import type { useCachedBlastResults } from './useCachedBlastResults';
|
|
4
5
|
import type { AbstractTrackModel, Feature } from '@jbrowse/core/util';
|
|
5
6
|
/**
|
|
@@ -13,9 +14,9 @@ import type { AbstractTrackModel, Feature } from '@jbrowse/core/util';
|
|
|
13
14
|
* queried NCBI directly and blastp/quick-blastp was a real choice.
|
|
14
15
|
*/
|
|
15
16
|
export declare function describeSearch(result: CachedBlastResult): string;
|
|
16
|
-
declare const CachedBlastResults: ({ model,
|
|
17
|
+
declare const CachedBlastResults: ({ model, submit, feature, cached: { results, handleDelete, handleClearAll }, }: {
|
|
17
18
|
model: AbstractTrackModel;
|
|
18
|
-
|
|
19
|
+
submit: ReturnType<typeof useLaunchSubmit>["submit"];
|
|
19
20
|
feature: Feature;
|
|
20
21
|
/** the panel's own listing, so clearing it here empties it there too */
|
|
21
22
|
cached: ReturnType<typeof useCachedBlastResults>;
|