jbrowse-plugin-msaview 5.19.0 → 5.21.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.
Files changed (325) hide show
  1. package/README.md +21 -76
  2. package/dist/AddHighlightModel/GenomeMouseoverHighlight.js +2 -4
  3. package/dist/AddHighlightModel/MsaToGenomeHighlight.js +10 -5
  4. package/dist/BgzipFastaMsaAdapter/BgzipFastaMsaAdapter.d.ts +4 -2
  5. package/dist/BgzipFastaMsaAdapter/BgzipFastaMsaAdapter.js +28 -22
  6. package/dist/LaunchMsaView/codingFeature.d.ts +1 -0
  7. package/dist/LaunchMsaView/codingFeature.js +1 -1
  8. package/dist/LaunchMsaView/components/BlastQuery/BlastAutomaticPanel.js +12 -8
  9. package/dist/LaunchMsaView/components/BlastQuery/BlastManualPanel.d.ts +1 -1
  10. package/dist/LaunchMsaView/components/BlastQuery/BlastManualPanel.js +12 -20
  11. package/dist/LaunchMsaView/components/BlastQuery/BlastPanel.d.ts +1 -17
  12. package/dist/LaunchMsaView/components/BlastQuery/BlastPanel.js +8 -9
  13. package/dist/LaunchMsaView/components/BlastQuery/BlastPanel.test.d.ts +1 -0
  14. package/dist/LaunchMsaView/components/BlastQuery/BlastPanel.test.js +72 -0
  15. package/dist/LaunchMsaView/components/BlastQuery/BlastSettingsDialog.d.ts +1 -1
  16. package/dist/LaunchMsaView/components/BlastQuery/CachedBlastResults.d.ts +3 -2
  17. package/dist/LaunchMsaView/components/BlastQuery/CachedBlastResults.js +8 -11
  18. package/dist/LaunchMsaView/components/BlastQuery/CachedBlastResultsLaunch.test.d.ts +1 -0
  19. package/dist/LaunchMsaView/components/BlastQuery/CachedBlastResultsLaunch.test.js +70 -0
  20. package/dist/LaunchMsaView/components/BlastQuery/consts.d.ts +1 -1
  21. package/dist/LaunchMsaView/components/BlastQuery/consts.js +1 -1
  22. package/dist/LaunchMsaView/components/BlastQuery/useCachedBlastResults.d.ts +2 -1
  23. package/dist/LaunchMsaView/components/BlastQuery/useCachedBlastResults.js +9 -4
  24. package/dist/LaunchMsaView/components/BlastQuery/useCachedBlastResults.test.d.ts +1 -0
  25. package/dist/LaunchMsaView/components/BlastQuery/useCachedBlastResults.test.js +74 -0
  26. package/dist/LaunchMsaView/components/LaunchMsaViewDialog.js +23 -19
  27. package/dist/LaunchMsaView/components/ManualMSALoader/ManualMSALoader.js +7 -15
  28. package/dist/LaunchMsaView/components/OrthologQuery/OrthologPanel.js +7 -5
  29. package/dist/LaunchMsaView/components/OrthologQuery/QuerySpeciesSelect.d.ts +10 -4
  30. package/dist/LaunchMsaView/components/OrthologQuery/QuerySpeciesSelect.js +35 -20
  31. package/dist/LaunchMsaView/components/OrthologQuery/useQuerySpecies.test.d.ts +1 -0
  32. package/dist/LaunchMsaView/components/OrthologQuery/useQuerySpecies.test.js +94 -0
  33. package/dist/LaunchMsaView/components/PastedAlignmentFields.d.ts +8 -0
  34. package/dist/LaunchMsaView/components/PastedAlignmentFields.js +23 -0
  35. package/dist/LaunchMsaView/components/PreLoadedMSA/PreLoadedMSADataPanel.js +8 -5
  36. package/dist/LaunchMsaView/components/PreLoadedMSA/PreLoadedMSADataPanel.test.d.ts +1 -0
  37. package/dist/LaunchMsaView/components/PreLoadedMSA/PreLoadedMSADataPanel.test.js +79 -0
  38. package/dist/LaunchMsaView/components/PreLoadedMSA/fetchMSAData.d.ts +2 -1
  39. package/dist/LaunchMsaView/components/QueryRowSelector.d.ts +3 -1
  40. package/dist/LaunchMsaView/components/QueryRowSelector.js +7 -2
  41. package/dist/LaunchMsaView/components/QueryRowSelector.test.d.ts +1 -0
  42. package/dist/LaunchMsaView/components/QueryRowSelector.test.js +23 -0
  43. package/dist/LaunchMsaView/components/SubmitCancelActions.js +3 -13
  44. package/dist/LaunchMsaView/components/TabPanel.d.ts +6 -1
  45. package/dist/LaunchMsaView/components/TabPanel.js +8 -2
  46. package/dist/LaunchMsaView/components/launchPlacement.d.ts +7 -0
  47. package/dist/LaunchMsaView/components/launchPlacement.js +22 -1
  48. package/dist/LaunchMsaView/components/pastedAlignmentLaunch.test.d.ts +1 -0
  49. package/dist/LaunchMsaView/components/pastedAlignmentLaunch.test.js +102 -0
  50. package/dist/LaunchMsaView/components/transcriptChoice.d.ts +23 -0
  51. package/dist/LaunchMsaView/components/transcriptChoice.js +19 -0
  52. package/dist/LaunchMsaView/components/transcriptChoice.test.d.ts +1 -0
  53. package/dist/LaunchMsaView/components/transcriptChoice.test.js +112 -0
  54. package/dist/LaunchMsaView/components/useFeatureSequence.d.ts +0 -4
  55. package/dist/LaunchMsaView/components/useFeatureSequence.js +0 -1
  56. package/dist/LaunchMsaView/components/useTranscriptSelection.d.ts +1 -1
  57. package/dist/LaunchMsaView/components/useTranscriptSelection.js +11 -7
  58. package/dist/LaunchMsaView/detectQueryRow.d.ts +3 -2
  59. package/dist/LaunchMsaView/getTranscriptFeatures.test.d.ts +1 -0
  60. package/dist/LaunchMsaView/getTranscriptFeatures.test.js +51 -0
  61. package/dist/LaunchMsaView/index.js +3 -3
  62. package/dist/LaunchMsaView/launchTarget.d.ts +2 -1
  63. package/dist/LaunchMsaView/useQueryRowName.d.ts +1 -1
  64. package/dist/LaunchMsaView/useQueryRowName.js +6 -3
  65. package/dist/LaunchMsaView/useQueryRowName.test.js +26 -0
  66. package/dist/LaunchMsaView/util.d.ts +1 -0
  67. package/dist/LaunchMsaView/util.js +9 -16
  68. package/dist/MsaViewPanel/afterCreateAutoruns.d.ts +1 -5
  69. package/dist/MsaViewPanel/afterCreateAutoruns.js +30 -9
  70. package/dist/MsaViewPanel/connectedDomains.d.ts +11 -6
  71. package/dist/MsaViewPanel/connectedDomains.js +36 -13
  72. package/dist/MsaViewPanel/connectedDomains.test.js +60 -2
  73. package/dist/MsaViewPanel/doLaunchBlast.js +11 -11
  74. package/dist/MsaViewPanel/doLaunchBlast.test.js +34 -0
  75. package/dist/MsaViewPanel/doLaunchOrthologs.js +5 -13
  76. package/dist/MsaViewPanel/doLaunchOrthologs.test.js +24 -8
  77. package/dist/MsaViewPanel/model.d.ts +59 -7
  78. package/dist/MsaViewPanel/model.js +6 -3
  79. package/dist/MsaViewPanel/model.test.js +19 -0
  80. package/dist/MsaViewPanel/processInit.test.js +20 -0
  81. package/dist/MsaViewPanel/resolveConnectedTranscript.d.ts +1 -0
  82. package/dist/MsaViewPanel/resolveConnectedTranscript.js +3 -0
  83. package/dist/MsaViewPanel/resolveConnectedTranscript.test.js +13 -0
  84. package/dist/MsaViewPanel/sessionHighlights.d.ts +1 -1
  85. package/dist/MsaViewPanel/sessionHighlights.js +3 -5
  86. package/dist/MsaViewPanel/sessionHighlights.test.js +12 -1
  87. package/dist/MsaViewPanel/storedData.test.js +9 -0
  88. package/dist/MsaViewPanel/structureConnection.js +4 -2
  89. package/dist/MsaViewPanel/util.js +8 -6
  90. package/dist/MsaViewPanel/viewReport.d.ts +1 -1
  91. package/dist/MsaViewPanel/viewReport.js +1 -1
  92. package/dist/OrthoFinderMsaAdapter/parseResults.js +4 -5
  93. package/dist/OrthoFinderMsaAdapter/parseResults.test.js +3 -0
  94. package/dist/chunks/{AboutDialog-ZTQP5WUH.js → AboutDialog-CJ4XL3UK.js} +2 -2
  95. package/dist/chunks/{AboutDialog-ZTQP5WUH.js.map → AboutDialog-CJ4XL3UK.js.map} +1 -1
  96. package/dist/chunks/{AnnotationFileDialog-WKK4E2F6.js → AnnotationFileDialog-KW723WEQ.js} +2 -2
  97. package/dist/chunks/{AnnotationFileDialog-WKK4E2F6.js.map → AnnotationFileDialog-KW723WEQ.js.map} +1 -1
  98. package/dist/chunks/BgzipFastaMsaAdapter-4IP2B4CV.js +6 -0
  99. package/dist/chunks/BgzipFastaMsaAdapter-4IP2B4CV.js.map +7 -0
  100. package/dist/chunks/{ExportSVGDialog-HM75NXUI.js → ExportSVGDialog-DQJCRUYU.js} +2 -2
  101. package/dist/chunks/{ExportSVGDialog-HM75NXUI.js.map → ExportSVGDialog-DQJCRUYU.js.map} +1 -1
  102. package/dist/chunks/{FeatureDialog-N5ER7Y4P.js → FeatureDialog-GYN2LS6T.js} +2 -2
  103. package/dist/chunks/{FeatureDialog-N5ER7Y4P.js.map → FeatureDialog-GYN2LS6T.js.map} +1 -1
  104. package/dist/chunks/{GapThresholdDialog-2G3L5TUF.js → GapThresholdDialog-UMQRAPVE.js} +2 -2
  105. package/dist/chunks/{GapThresholdDialog-2G3L5TUF.js.map → GapThresholdDialog-UMQRAPVE.js.map} +1 -1
  106. package/dist/chunks/GoToDialog-46XQIFWE.js +2 -0
  107. package/dist/chunks/{GoToDialog-BFFKXSJB.js.map → GoToDialog-46XQIFWE.js.map} +2 -2
  108. package/dist/chunks/{HelpDialog-EWRTWXZO.js → HelpDialog-2BBMADD4.js} +2 -2
  109. package/dist/chunks/{HelpDialog-EWRTWXZO.js.map → HelpDialog-2BBMADD4.js.map} +1 -1
  110. package/dist/chunks/{HelpDialog-NSGZYIN7.js → HelpDialog-UF43YYX4.js} +2 -2
  111. package/dist/chunks/LaunchMsaViewDialog-GA7BIX6S.js +3 -0
  112. package/dist/chunks/LaunchMsaViewDialog-GA7BIX6S.js.map +7 -0
  113. package/dist/chunks/{MetadataDialog-UODKJFPM.js → MetadataDialog-MMF7FJZB.js} +2 -2
  114. package/dist/chunks/{MetadataDialog-UODKJFPM.js.map → MetadataDialog-MMF7FJZB.js.map} +1 -1
  115. package/dist/chunks/MsaViewPanel-PQSPNNDY.js +2 -0
  116. package/dist/chunks/{MsaViewPanel-AQWZ2N3P.js.map → MsaViewPanel-PQSPNNDY.js.map} +1 -1
  117. package/dist/chunks/OrthoFinderMsaAdapter-OJVBY4EU.js +2 -0
  118. package/dist/chunks/{OrthoFinderMsaAdapter-BAVVTZHO.js.map → OrthoFinderMsaAdapter-OJVBY4EU.js.map} +2 -2
  119. package/dist/chunks/{TrackInfoDialog-WAZUUZ27.js → TrackInfoDialog-NS4DEHEJ.js} +2 -2
  120. package/dist/chunks/{TrackInfoDialog-WAZUUZ27.js.map → TrackInfoDialog-NS4DEHEJ.js.map} +1 -1
  121. package/dist/chunks/{TreeNodeInfoDialog-QHA7LOXE.js → TreeNodeInfoDialog-OBMR7O4V.js} +2 -2
  122. package/dist/chunks/{TreeNodeInfoDialog-QHA7LOXE.js.map → TreeNodeInfoDialog-OBMR7O4V.js.map} +1 -1
  123. package/dist/chunks/{chunk-XNNIIXGD.js → chunk-554NJS62.js} +1 -1
  124. package/dist/chunks/{chunk-XNNIIXGD.js.map → chunk-554NJS62.js.map} +1 -1
  125. package/dist/chunks/{chunk-BD6Y2ERQ.js → chunk-7I3OPSNO.js} +2 -2
  126. package/dist/chunks/{chunk-BD6Y2ERQ.js.map → chunk-7I3OPSNO.js.map} +1 -1
  127. package/dist/chunks/{chunk-LFBMB523.js → chunk-ARBDJPYH.js} +1 -1
  128. package/dist/chunks/{chunk-LFBMB523.js.map → chunk-ARBDJPYH.js.map} +1 -1
  129. package/dist/chunks/chunk-BTRIFO6I.js +2 -0
  130. package/dist/chunks/chunk-BTRIFO6I.js.map +7 -0
  131. package/dist/chunks/chunk-CYELPIQ6.js +2 -0
  132. package/dist/chunks/chunk-CYELPIQ6.js.map +7 -0
  133. package/dist/chunks/{chunk-7ZEXFLSY.js → chunk-DH2QUEKI.js} +1 -1
  134. package/dist/chunks/{chunk-JJ3VMN7J.js → chunk-EMKI3HKF.js} +1 -1
  135. package/dist/chunks/{chunk-JJ3VMN7J.js.map → chunk-EMKI3HKF.js.map} +1 -1
  136. package/dist/chunks/{chunk-TEYYBCMF.js → chunk-GP2EFH2U.js} +2 -2
  137. package/dist/chunks/chunk-HED42VNJ.js +2 -0
  138. package/dist/chunks/{chunk-ZWQTJTRR.js.map → chunk-HED42VNJ.js.map} +2 -2
  139. package/dist/chunks/chunk-HHX32S3Y.js +2 -0
  140. package/dist/chunks/chunk-HHX32S3Y.js.map +7 -0
  141. package/dist/chunks/chunk-IPQQCLRJ.js +6 -0
  142. package/dist/chunks/{chunk-ZJGFEUGM.js.map → chunk-IPQQCLRJ.js.map} +2 -2
  143. package/dist/chunks/{chunk-PWNKL3ZK.js → chunk-K7QBHINQ.js} +2 -2
  144. package/dist/chunks/chunk-K7QBHINQ.js.map +7 -0
  145. package/dist/chunks/chunk-L72SS7RL.js +2 -0
  146. package/dist/chunks/chunk-L72SS7RL.js.map +7 -0
  147. package/dist/chunks/chunk-O2RHYDAD.js +2 -0
  148. package/dist/chunks/chunk-O2RHYDAD.js.map +7 -0
  149. package/dist/chunks/{chunk-CREQPIFJ.js → chunk-OSF7I4IV.js} +2 -2
  150. package/dist/chunks/{chunk-CREQPIFJ.js.map → chunk-OSF7I4IV.js.map} +1 -1
  151. package/dist/chunks/chunk-OUJA5TD2.js +3 -0
  152. package/dist/chunks/{chunk-WE35XW3J.js.map → chunk-OUJA5TD2.js.map} +4 -4
  153. package/dist/chunks/chunk-PKBOY6G7.js +164 -0
  154. package/dist/chunks/chunk-PKBOY6G7.js.map +7 -0
  155. package/dist/chunks/chunk-Q6V6EHAM.js +2 -0
  156. package/dist/chunks/chunk-Q6V6EHAM.js.map +7 -0
  157. package/dist/chunks/{chunk-3MNW5BKS.js → chunk-SK4K4POS.js} +1 -1
  158. package/dist/chunks/{chunk-3MNW5BKS.js.map → chunk-SK4K4POS.js.map} +1 -1
  159. package/dist/chunks/chunk-VYY4RXAG.js +2 -0
  160. package/dist/chunks/chunk-VYY4RXAG.js.map +7 -0
  161. package/dist/chunks/chunk-WD3NGEDE.js +2 -0
  162. package/dist/chunks/{chunk-DW5INM5K.js.map → chunk-WD3NGEDE.js.map} +1 -1
  163. package/dist/chunks/chunk-WWDZENCA.js +2 -0
  164. package/dist/chunks/chunk-WWDZENCA.js.map +7 -0
  165. package/dist/chunks/chunk-ZBTXUYNT.js +3 -0
  166. package/dist/chunks/chunk-ZBTXUYNT.js.map +7 -0
  167. package/dist/chunks/dist-GMA6NEO6.js +2 -0
  168. package/dist/chunks/{dist-AUOG3URS.js → dist-XUW7GG2E.js} +1 -1
  169. package/dist/chunks/{dist-AUOG3URS.js.map → dist-XUW7GG2E.js.map} +1 -1
  170. package/dist/chunks/model-KHXJLKK3.js +11 -0
  171. package/dist/chunks/model-KHXJLKK3.js.map +7 -0
  172. package/dist/chunks/renderToSvg-PNQBDJNZ.js +2 -0
  173. package/dist/jbrowse-plugin-msaview.esm.js +2 -2
  174. package/dist/jbrowse-plugin-msaview.esm.js.map +4 -4
  175. package/dist/readinessConformance.test.js +4 -1
  176. package/dist/utils/domainCache.js +3 -16
  177. package/dist/utils/ebiJobDispatcher.d.ts +4 -11
  178. package/dist/utils/ebiJobDispatcher.js +26 -5
  179. package/dist/utils/ebiJobDispatcher.test.js +71 -1
  180. package/dist/utils/fetch.js +8 -2
  181. package/dist/utils/fetch.test.d.ts +1 -0
  182. package/dist/utils/fetch.test.js +22 -0
  183. package/dist/utils/idb.d.ts +3 -1
  184. package/dist/utils/idb.js +21 -3
  185. package/dist/utils/idb.test.js +2 -5
  186. package/dist/utils/msa.js +8 -1
  187. package/dist/utils/msa.test.d.ts +1 -0
  188. package/dist/utils/msa.test.js +20 -0
  189. package/dist/utils/msaIndex.d.ts +1 -0
  190. package/dist/utils/msaIndex.js +5 -2
  191. package/dist/utils/msaRows.js +4 -1
  192. package/dist/utils/msaRows.test.d.ts +1 -0
  193. package/dist/utils/msaRows.test.js +32 -0
  194. package/dist/utils/ncbiOrthologs.d.ts +5 -7
  195. package/dist/utils/ncbiOrthologs.js +26 -24
  196. package/dist/utils/ncbiOrthologs.test.js +48 -1
  197. package/dist/utils/pantherOrthologs.d.ts +43 -3
  198. package/dist/utils/pantherOrthologs.js +26 -45
  199. package/dist/utils/searchCache.d.ts +1 -0
  200. package/dist/utils/taxonomyNames.js +3 -16
  201. package/dist/utils/unirefHomologs.js +15 -16
  202. package/dist/utils/unirefHomologs.test.js +11 -0
  203. package/dist/version.d.ts +1 -1
  204. package/dist/version.js +1 -1
  205. package/package.json +29 -27
  206. package/src/AddHighlightModel/GenomeMouseoverHighlight.tsx +2 -6
  207. package/src/AddHighlightModel/MsaToGenomeHighlight.tsx +10 -5
  208. package/src/BgzipFastaMsaAdapter/BgzipFastaMsaAdapter.ts +42 -34
  209. package/src/LaunchMsaView/codingFeature.ts +1 -1
  210. package/src/LaunchMsaView/components/BlastQuery/BlastAutomaticPanel.tsx +14 -11
  211. package/src/LaunchMsaView/components/BlastQuery/BlastManualPanel.tsx +22 -43
  212. package/src/LaunchMsaView/components/BlastQuery/BlastPanel.test.tsx +102 -0
  213. package/src/LaunchMsaView/components/BlastQuery/BlastPanel.tsx +43 -32
  214. package/src/LaunchMsaView/components/BlastQuery/BlastSettingsDialog.tsx +1 -1
  215. package/src/LaunchMsaView/components/BlastQuery/CachedBlastResults.tsx +21 -20
  216. package/src/LaunchMsaView/components/BlastQuery/CachedBlastResultsLaunch.test.tsx +92 -0
  217. package/src/LaunchMsaView/components/BlastQuery/consts.ts +1 -1
  218. package/src/LaunchMsaView/components/BlastQuery/useCachedBlastResults.test.ts +84 -0
  219. package/src/LaunchMsaView/components/BlastQuery/useCachedBlastResults.ts +13 -4
  220. package/src/LaunchMsaView/components/LaunchMsaViewDialog.tsx +72 -47
  221. package/src/LaunchMsaView/components/ManualMSALoader/ManualMSALoader.tsx +12 -37
  222. package/src/LaunchMsaView/components/OrthologQuery/OrthologPanel.tsx +20 -8
  223. package/src/LaunchMsaView/components/OrthologQuery/QuerySpeciesSelect.tsx +46 -32
  224. package/src/LaunchMsaView/components/OrthologQuery/useQuerySpecies.test.ts +108 -0
  225. package/src/LaunchMsaView/components/PastedAlignmentFields.tsx +66 -0
  226. package/src/LaunchMsaView/components/PreLoadedMSA/PreLoadedMSADataPanel.test.tsx +97 -0
  227. package/src/LaunchMsaView/components/PreLoadedMSA/PreLoadedMSADataPanel.tsx +20 -7
  228. package/src/LaunchMsaView/components/PreLoadedMSA/fetchMSAData.ts +1 -1
  229. package/src/LaunchMsaView/components/QueryRowSelector.test.tsx +44 -0
  230. package/src/LaunchMsaView/components/QueryRowSelector.tsx +9 -4
  231. package/src/LaunchMsaView/components/SubmitCancelActions.tsx +4 -16
  232. package/src/LaunchMsaView/components/TabPanel.tsx +15 -1
  233. package/src/LaunchMsaView/components/launchPlacement.tsx +29 -1
  234. package/src/LaunchMsaView/components/pastedAlignmentLaunch.test.tsx +135 -0
  235. package/src/LaunchMsaView/components/transcriptChoice.test.tsx +140 -0
  236. package/src/LaunchMsaView/components/transcriptChoice.tsx +64 -0
  237. package/src/LaunchMsaView/components/useFeatureSequence.ts +0 -1
  238. package/src/LaunchMsaView/components/useTranscriptSelection.ts +18 -10
  239. package/src/LaunchMsaView/detectQueryRow.ts +2 -2
  240. package/src/LaunchMsaView/getTranscriptFeatures.test.ts +71 -0
  241. package/src/LaunchMsaView/index.ts +4 -4
  242. package/src/LaunchMsaView/launchTarget.ts +1 -1
  243. package/src/LaunchMsaView/useQueryRowName.test.ts +35 -0
  244. package/src/LaunchMsaView/useQueryRowName.ts +10 -4
  245. package/src/LaunchMsaView/util.ts +12 -20
  246. package/src/MsaViewPanel/afterCreateAutoruns.ts +34 -11
  247. package/src/MsaViewPanel/connectedDomains.test.ts +81 -7
  248. package/src/MsaViewPanel/connectedDomains.ts +40 -13
  249. package/src/MsaViewPanel/doLaunchBlast.test.ts +43 -0
  250. package/src/MsaViewPanel/doLaunchBlast.ts +15 -13
  251. package/src/MsaViewPanel/doLaunchOrthologs.test.ts +26 -8
  252. package/src/MsaViewPanel/doLaunchOrthologs.ts +5 -12
  253. package/src/MsaViewPanel/loadProteinDomains.ts +2 -3
  254. package/src/MsaViewPanel/model.test.ts +22 -0
  255. package/src/MsaViewPanel/model.ts +9 -2
  256. package/src/MsaViewPanel/processInit.test.ts +23 -0
  257. package/src/MsaViewPanel/resolveConnectedTranscript.test.ts +17 -1
  258. package/src/MsaViewPanel/resolveConnectedTranscript.ts +4 -0
  259. package/src/MsaViewPanel/sessionHighlights.test.ts +15 -1
  260. package/src/MsaViewPanel/sessionHighlights.ts +7 -6
  261. package/src/MsaViewPanel/storedData.test.ts +11 -0
  262. package/src/MsaViewPanel/structureConnection.ts +8 -3
  263. package/src/MsaViewPanel/util.ts +9 -6
  264. package/src/MsaViewPanel/viewReport.ts +1 -1
  265. package/src/OrthoFinderMsaAdapter/parseResults.test.ts +9 -0
  266. package/src/OrthoFinderMsaAdapter/parseResults.ts +4 -5
  267. package/src/readinessConformance.test.ts +4 -3
  268. package/src/utils/domainCache.ts +3 -26
  269. package/src/utils/ebiBlast.ts +1 -3
  270. package/src/utils/ebiJobDispatcher.test.ts +84 -1
  271. package/src/utils/ebiJobDispatcher.ts +36 -6
  272. package/src/utils/fetch.test.ts +37 -0
  273. package/src/utils/fetch.ts +9 -2
  274. package/src/utils/idb.test.ts +2 -5
  275. package/src/utils/idb.ts +49 -3
  276. package/src/utils/msa.test.ts +28 -0
  277. package/src/utils/msa.ts +8 -1
  278. package/src/utils/msaIndex.ts +7 -6
  279. package/src/utils/msaRows.test.ts +35 -0
  280. package/src/utils/msaRows.ts +5 -1
  281. package/src/utils/ncbiOrthologs.test.ts +54 -0
  282. package/src/utils/ncbiOrthologs.ts +34 -26
  283. package/src/utils/pantherOrthologs.ts +41 -55
  284. package/src/utils/searchCache.ts +1 -0
  285. package/src/utils/taxonomyNames.ts +3 -26
  286. package/src/utils/unirefHomologs.test.ts +19 -0
  287. package/src/utils/unirefHomologs.ts +25 -22
  288. package/src/version.ts +1 -1
  289. package/dist/chunks/BgzipFastaMsaAdapter-Y3LYQRQL.js +0 -6
  290. package/dist/chunks/BgzipFastaMsaAdapter-Y3LYQRQL.js.map +0 -7
  291. package/dist/chunks/GoToDialog-BFFKXSJB.js +0 -2
  292. package/dist/chunks/LaunchMsaViewDialog-LRS3PIOC.js +0 -3
  293. package/dist/chunks/LaunchMsaViewDialog-LRS3PIOC.js.map +0 -7
  294. package/dist/chunks/MsaViewPanel-AQWZ2N3P.js +0 -2
  295. package/dist/chunks/OrthoFinderMsaAdapter-BAVVTZHO.js +0 -2
  296. package/dist/chunks/chunk-3JFOLUP5.js +0 -164
  297. package/dist/chunks/chunk-3JFOLUP5.js.map +0 -7
  298. package/dist/chunks/chunk-CKXVJK5K.js +0 -2
  299. package/dist/chunks/chunk-CKXVJK5K.js.map +0 -7
  300. package/dist/chunks/chunk-DW5INM5K.js +0 -2
  301. package/dist/chunks/chunk-JUE34WZU.js +0 -2
  302. package/dist/chunks/chunk-JUE34WZU.js.map +0 -7
  303. package/dist/chunks/chunk-KHRURQPK.js +0 -2
  304. package/dist/chunks/chunk-KHRURQPK.js.map +0 -7
  305. package/dist/chunks/chunk-LNMEYTCN.js +0 -2
  306. package/dist/chunks/chunk-LNMEYTCN.js.map +0 -7
  307. package/dist/chunks/chunk-PWNKL3ZK.js.map +0 -7
  308. package/dist/chunks/chunk-SIKAYSRK.js +0 -3
  309. package/dist/chunks/chunk-SIKAYSRK.js.map +0 -7
  310. package/dist/chunks/chunk-V47MJ4IY.js +0 -2
  311. package/dist/chunks/chunk-V47MJ4IY.js.map +0 -7
  312. package/dist/chunks/chunk-WE35XW3J.js +0 -3
  313. package/dist/chunks/chunk-X5QA4AF6.js +0 -2
  314. package/dist/chunks/chunk-X5QA4AF6.js.map +0 -7
  315. package/dist/chunks/chunk-ZJGFEUGM.js +0 -6
  316. package/dist/chunks/chunk-ZWQTJTRR.js +0 -2
  317. package/dist/chunks/dist-PJQ65DMT.js +0 -2
  318. package/dist/chunks/model-NYWHGBMI.js +0 -11
  319. package/dist/chunks/model-NYWHGBMI.js.map +0 -7
  320. package/dist/chunks/renderToSvg-KUOP36MW.js +0 -2
  321. /package/dist/chunks/{HelpDialog-NSGZYIN7.js.map → HelpDialog-UF43YYX4.js.map} +0 -0
  322. /package/dist/chunks/{chunk-7ZEXFLSY.js.map → chunk-DH2QUEKI.js.map} +0 -0
  323. /package/dist/chunks/{chunk-TEYYBCMF.js.map → chunk-GP2EFH2U.js.map} +0 -0
  324. /package/dist/chunks/{dist-PJQ65DMT.js.map → dist-GMA6NEO6.js.map} +0 -0
  325. /package/dist/chunks/{renderToSvg-KUOP36MW.js.map → renderToSvg-PNQBDJNZ.js.map} +0 -0
package/README.md CHANGED
@@ -8,92 +8,37 @@ covers the viewer itself.
8
8
 
9
9
  ## Gallery
10
10
 
11
- ![](img/1.png)
11
+ Click a picture to open it live.
12
12
 
13
- The [demo](#demo) below: TP53 in the genome view beside a vertebrate p53
14
- alignment carrying per-residue variant tracks. Each release recaptures it with
15
- `pnpm readme-figure`.
13
+ <table>
14
+ <tr><td width="50%"><a href="https://jbrowse.org/code/jb2/main/?config=https://jbrowse.org/ucsc/hg38/config.json&amp;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&amp;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&amp;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&amp;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
- ## Demo
18
+ ## Use it
18
19
 
19
- [p53 across vertebrates, linked to the genome and the structure](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,%22placement%22:%22splitRight%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,661,779-7,687,538%22,%22tracks%22:[%22hg38-ncbiRefSeqSelect%22]}}]}):
20
- TP53 in hg38, a vertebrate p53 alignment carrying ClinVar, AlphaMissense and
21
- MaveDB per-residue tracks, and the AlphaFold model of P04637. Hovering a codon,
22
- a column or a residue lights the other two views.
23
- [Launching](docs/launching.md#the-readme-demo-taken-apart) takes the link apart.
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
- An older shared session:
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
- Using the plugin:
66
-
67
- - [Alignments from a gene](docs/alignments-from-a-gene.md): the launch dialog's
68
- sources — NCBI, PANTHER and UniRef orthologs, EBI searches — and aligning in
69
- the browser.
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
- If you find this tool useful please cite our work
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
- See also https://github.com/GMOD/proteinbrowser for overview
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, views } = getSession(model);
8
- const hasMsaView = views.some(s => isMsaView(s) && s.connectedViewId === model.id);
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
- // bpToPx matches refNames exactly, so canonicalizing "chr17" to "17"
16
- // would miss a view whose regions say "chr17"
17
- const s = model.bpToPx({ refName: r.refName, coord: r.start });
18
- const e = model.bpToPx({ refName: r.refName, coord: r.end });
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
- readIndexedMSA(index: Map<string, MsaIndexEntry>, id: string): Promise<string>;
26
- readRowsMSA(id: string): Promise<string>;
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, readMsaBlock } from '../utils/msaIndex';
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 readIndexedMSA(index, id) {
77
+ async getBgzf() {
77
78
  const adapter = await this.configure();
78
- const entry = index.get(id);
79
- return entry
80
- ? readMsaBlock({
81
- filehandle: openLocation(adapter.getConf('fastaLocation'), this.pluginManager),
82
- gziFilehandle: openLocation(adapter.getConf('gziLocation'), this.pluginManager),
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(id) {
85
+ async readRowsMSA(rows) {
88
86
  const adapter = await this.configure();
89
- const rows = (await this.getMSARows()).get(id) ?? [];
90
- const features = await firstValueFrom(adapter
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.map(f => `>${f.get('refName')}\n${f.get('seq')}`).join('\n');
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
- return {
103
- msa: await (index
104
- ? this.readIndexedMSA(index, id)
105
- : this.readRowsMSA(id)),
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,2 +1,3 @@
1
1
  import type { Feature } from '@jbrowse/core/util';
2
+ export declare function isCDS(feature: Feature): boolean;
2
3
  export declare function isCodingFeature(feature: Feature): boolean;
@@ -1,4 +1,4 @@
1
- function isCDS(feature) {
1
+ export function isCDS(feature) {
2
2
  return feature.get('type')?.toLowerCase() === 'cds';
3
3
  }
4
4
  // The feature itself counts: a viral polyprotein hangs its cleavage products
@@ -1,10 +1,10 @@
1
- import React, { useMemo, useState } from '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, getGeneIdentifiers, getLinearGenomeView, } from '../../util';
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 geneIds = useMemo(() => getGeneIdentifiers(feature), [feature]);
49
- const cached = useCachedBlastResults(geneIds);
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: "best-scoring sequences to keep" }),
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 BLAST Results")),
89
+ React.createElement(Typography, null, "Previous searches")),
86
90
  React.createElement(AccordionDetails, null,
87
- React.createElement(CachedBlastResults, { model: model, handleClose: handleClose, feature: feature, cached: cached })))) : null),
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, getGeneDisplayName, getLinearGenomeView, } from '../../util';
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" }, "Pick a transcript above to get a link carrying its protein sequence.")))),
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(TextField2, { variant: "outlined", label: "Alignment", multiline: true, minRows: 5, maxRows: 10, fullWidth: true, className: classes.msaInput, slotProps: { input: { className: classes.textAreaFont } }, placeholder: "Paste the .aln contents here", value: msaText, onChange: event => {
80
- setMsaText(event.target.value);
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: getGeneDisplayName(selectedTranscript),
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
- declare const panelMap: {
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 Panel = panelMap[lookupMethod];
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(Panel, { model: model, feature: feature, handleClose: handleClose, preferredTranscriptId: preferredTranscriptId },
34
- React.createElement(BlastMethodSelector, { lookupMethod: lookupMethod, setLookupMethod: setLookupMethod })),
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,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,5 @@
1
1
  import React from 'react';
2
- export interface BlastSettings {
2
+ interface BlastSettings {
3
3
  ebiEmail: string;
4
4
  }
5
5
  declare const BlastSettingsDialog: ({ handleClose, ebiEmail, }: {
@@ -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, handleClose, feature, cached: { results, handleDelete, handleClearAll }, }: {
17
+ declare const CachedBlastResults: ({ model, submit, feature, cached: { results, handleDelete, handleClearAll }, }: {
17
18
  model: AbstractTrackModel;
18
- handleClose: () => void;
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>;