Skip to content

Commit

Permalink
Add diamond support to multi-blast, and enable on ortho-site (#1197)
Browse files Browse the repository at this point in the history
* Attempt to get local dev working for multi-blast

* Upgrade recoil to work with React 18 types

* Wire multi-blast in ortho-site

* Make blastOntologyDatabase optional, and add magic string to indicate
all algorithm options are available.

* Update search name

* Handle optional blastOntologyDatabase property

* Add options for custom workspace header, and remove hardcoded path.

* Add new route for map-proteins

* add multi-blast vars to sample file

* Handle empty advanced params, allow file-only sequence param, and use file-based request if a file is provided.

* Add diamond config types and mappings with wdk search parameter values

* eValue should be a number for diamond

* Only assign parameter values when the config value is defined

* Update link in header

* Update workspace heading

* Make link relative

* Add generic method to fetch a specific report file

* Add support for customizing verbiage

* Reduce margin

* Add method to get download url for a file

* Relativize links

target can be null

* target can be null

* Add result view for diamond jobs

* go to new form for map-proteins

* fix issues with multi-blast local dev site

* Make help tab configurable

* Request headers and use for preview and download

* Make paths relative to workspace root

* Update comment

* Map stitle to new columns

* Add support for AbortSignal to usePromise

* Handle AbortSignal
  • Loading branch information
dmfalke authored Sep 24, 2024
1 parent 39d4f67 commit 78ec06f
Show file tree
Hide file tree
Showing 40 changed files with 911 additions and 257 deletions.
41 changes: 30 additions & 11 deletions packages/libs/multi-blast/config-overrides.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const path = require('path');
const webpack = require('webpack');

/*
* The following gives preference to the project's root node_modules directory when loading modules and loaders.
Expand All @@ -10,18 +10,37 @@ module.exports = function override(config, env) {
...config,
resolve: {
...config.resolve,
modules: [
path.join(__dirname, 'node_modules'),
...(config.resolve.modules || ['node_modules']),
],
fallback: {
path: 'path-browserify',
stream: 'stream-browserify',
querystring: 'querystring-es3',
assert: 'assert',
buffer: 'buffer',
fs: false,
},
},
resolveLoader: {
...config.resolveLoader,
modules: [
path.join(__dirname, 'node_modules'),
...(config.resolveLoader.modules || ['node_modules']),
plugins: [
...config.plugins,
new webpack.ProvidePlugin({
// This is needed by shape2geohash, used by MapVEuMap
process: 'process/browser',
}),
],
externals: [{ jquery: 'jQuery' }],
module: {
...config.module,
rules: [
...config.module.rules,
{
test: /\.(js|jsx|ts|tsx)$/,
exclude: /node_modules\/(?!(@veupathdb))/,
enforce: 'pre',
use: 'source-map-loader',
},
],
},
externals: [{ jquery: 'jQuery' }],
snapshot: {
managedPaths: [],
},
};
};
7 changes: 4 additions & 3 deletions packages/libs/multi-blast/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"src/lib"
],
"sideEffects": [
"*.scss"
"*.scss",
"src/globals.js"
],
"dependencies": {
"@veupathdb/coreui": "workspace:^",
Expand Down Expand Up @@ -99,9 +100,9 @@
"react-redux": "^7.2.6",
"react-router": "^5.2.0",
"react-router-dom": "^5.2.0",
"react-scripts": "4.0.1",
"react-scripts": "5.0.1",
"read": "^1.0.7",
"recoil": "^0.2.0",
"recoil": "^0.7.7",
"redux": "^4.0.0",
"sass": "^1.56.2",
"script-loader": "^0.7.2",
Expand Down
27 changes: 13 additions & 14 deletions packages/libs/multi-blast/src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,22 @@
import './globals';

// eslint-disable-next-line import/no-webpack-loader-syntax
import '!!script-loader!@veupathdb/wdk-client/vendored/jquery';
// eslint-disable-next-line import/no-webpack-loader-syntax
import '!!script-loader!@veupathdb/wdk-client/vendored/jquery-migrate-1.2.1';
// eslint-disable-next-line import/no-webpack-loader-syntax
import '!!script-loader!@veupathdb/wdk-client/vendored/jquery-ui';
// eslint-disable-next-line import/no-webpack-loader-syntax
import '!!script-loader!@veupathdb/wdk-client/vendored/jquery.qtip.min';

import React, { Suspense } from 'react';
import { Redirect, RouteComponentProps } from 'react-router';
import { RecoilRoot } from 'recoil';
import { initialize } from '@veupathdb/web-common/lib/bootstrap';
import {
BlastSummaryViewPlugin,
GenomeSummaryViewPlugin,
ResultTableSummaryViewPlugin,
} from '@veupathdb/wdk-client/lib/Plugins';
import { initialize } from '@veupathdb/wdk-client';
import { ResultTableSummaryViewPlugin } from '@veupathdb/wdk-client/lib/Plugins';
import { RouteEntry } from '@veupathdb/wdk-client/lib/Core/RouteEntry';
import { ClientPluginRegistryEntry } from '@veupathdb/wdk-client/lib/Utils/ClientPlugin';
import BlastSummaryViewPlugin from '@veupathdb/blast-summary-view/lib/Controllers/BlastSummaryViewController';

import {
OrganismParam,
Expand All @@ -28,9 +35,6 @@ import { BlastWorkspaceRouter } from './lib/controllers/BlastWorkspaceRouter';
import { isMultiBlastQuestion } from './lib/utils/pluginConfig';
import { wrapWdkService } from './lib/utils/wdkServiceIntegration';

import '@veupathdb/wdk-client/lib/Core/Style/index.scss';
import '@veupathdb/web-common/lib/styles/client.scss';

import './index.css';

initialize({
Expand Down Expand Up @@ -93,11 +97,6 @@ initialize({
name: '_default',
component: ResultTableSummaryViewPlugin,
},
{
type: 'summaryView',
name: 'genomic-view',
component: GenomeSummaryViewPlugin,
},
{
type: 'summaryView',
name: 'blast-view',
Expand Down
6 changes: 5 additions & 1 deletion packages/libs/multi-blast/src/lib/components/BlastForm.scss
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
.wdk-QuestionForm {
&MultiBlast {
> * + * {
margin-block-start: 1em;
}

.SequenceParam {
display: inline-flex;
flex-direction: column;
gap: 1em;

&Instructions {
font-size: 1.2em;
font-size: 1.1em;
}

textarea {
Expand Down
Loading

0 comments on commit 78ec06f

Please sign in to comment.