statgen / bravo_vue Goto Github PK
View Code? Open in Web Editor NEWBRAVO's Vue JS based UI.
BRAVO's Vue JS based UI.
https://bravo.sph.umich.edu/region.html?variant_type=snv&chrom=11&start=5225464&stop=5229395
The gene bar component is wider than the viewing area. As a result the current location indicator doesn't track with the above and below figures as the x-axis translation is different due to a wider axis.
It appears that the /search
endpoint from the API is currently unused. The /autocomplete
endpoint is being used to handle the search requests.
searchapi
to actually used endpoint.The dashed "centerline" of IGV.js browser should be centered in the component and help the user when scrolling down through the reads to keep track of the variant's position.
The dashed line appears to the right of the position it should be bracketing. The positioning of the centerline can be made worse by resizing the web browser's window. Eventually, this will push the the "centerline" entirely to the right of the rendered component.
Provide panel component that summarizes the applied filters such that it is immediately apparent about which data displayed is affected by the filters.
The consequence, annotation, and loftee columns have special case handling between gene and region views in Bravo2. These columns remain to be implmented for src/components/tables/BaseSNVTable.vue
and
src/components/tables/RegionSNVTable.vue
On https://bravo.sph.umich.edu/freeze8/hg38/gene/snv/TTN , the server takes 10 seconds to return the summaries at the top of the page, like the number of synonymous variants, frameshifts, etc. That information could be cached to be fast after the first load. If this issue isn't relevant for the new architecture, feel free to close it.
Accessing the constants in src/domainModel/*.js
requires at least an import and possibly an additional private variable declaration to make constants available to templates.
Replace with a vue plugin such that the constants can be provided
to the app and the components that use them can simply inject
them. E.g.
// in plugins/domainModel.js
app.provide('domain', domainModel)
// in a component
export default {
inject: ['domain'],
Originally using bootstrap.js to provide modal implementation. Made figuring out what was controlling the DOM difficult to track down and adds another dependency.
Can implement in Vue using teleport.
Affects region and gene pages.
Include autocompleting search in nav bar.
Importing the tabulator tables styles using a relative path to the node module does not behave as expected.
Confoundingly, the import of the styles from the bootstrap node module behaves as expected.
The relevant docs from Vue's static asset handling indicates the tabulator-tables import should work.
// src/pages/region/main.js
import 'bootstrap/dist/css/bootstrap.css'
import 'tabulator-tables/dist/css/tabulator_bootstrap4.css'
Some discussion about this issue on a VueJS forum post
The webpack config that vue-cli ends up using can be profiled using webpack stats:
# emit webpack stats file.
npx webpack --config node_modules/@vue/cli-service/webpack.config.js --profile --json=raw-stats.json
# format emitted stats
jq . raw-stats.json > comp-stats.json
Looking at the output there, the tabulator-tables module ends up with a null
resolved module. E.g.
"resolvedModule": "./node_modules/css-loader/dist/cjs.js??clonedRuleSet-14.use[1]!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-14.use[2]!./node_modules/tabulator-tables/dist/css/tabulator_bootstrap4.css",
"type": "harmony side effect evaluation",
"active": true,
"explanation": "",
"userRequest": "../../../css-loader/dist/runtime/api.js",
"loc": "3:0-82",
"moduleId": null,
"resolvedModuleId": null
Copying the styles from the tabulator-tables module and then importing them as a project asset is the functioning workaround.
// src/pages/region/main.js
import 'bootstrap/dist/css/bootstrap.css'
import '@/assets/tabulator_workaround.css'
In the legacy (bravo2) variant page, there was a prop provided to the top level vue component for the number of samples in the underlying data set. This n_samples
was hardcoded in the flask template that was generating and serving out the enclosing page html.
<bravovariant :homepage="'{{ url_for('.home', _external = True) }}'"
:api="'{{ url_for('.home', _external = True) }}'"
:variant-id="'{{ variant_id }}'"
:total-samples="132345" />
Hard coding :total-samples="132345"
means the number of samples in the data set needs to be known by the UI at coding time. The current workaround moves this to the .env file so it only needs to be known at build time.
An way for the API to answer the question, "how many samples are in the underlying data set?".
This could be a separate endpoint or as part of the existing endpoints. Specifically the variant endpoint would need it to be included if this were the case.
In any event, this issue is blocked until it is solved in https://github.com/statgen/bravo_api
The endpoint url are terminated with .html extensions.
/region.html?variant_type=snv&chrom=11&start=5225000&stop=5229000
This is because of a limitation of webpack dev-server. It will currently serve these endpoints out with the mime-type application/octet-stream.
Serving the extension-less files on a production webserver as the correct 'text/html' mimetype is easy to accomplish.
It is making the development environment capable of doing this as well that is the blocker.
This is occurring because the webpack dev-server's underlying package, express
, uses a version of mime
will provide a default mime-type when one is not deduced from the file extension. The RFC compliant behavior would be to not provide any mime-type in this case.
Webpack's dev-server via webpack-server-middleware is doing the the correct thing and not providing a default mime-type. Unfortunately, that makes it so express
does.
The closest fix down in the stack is to allow webpack-server-middleware to be configured to emit a default mime type. Functionally, this would only cover files without extensions as there is existing configuration to add mime-type mappings for file extensions. Essentially, a PR to fulfill this feature request
Additionally the underlying express project could be updated to use a more recent version of mime
and ensure that the default mime-type is none unless explicitly configured.
On the gene page, the highlighting around the transcript when mouseover is not shifted far enough to the right.
Extend relevant components from Region Dashboard.
Apply solution from proof of concept: https://github.com/grosscol/scenery-bailiff
Blocked. Waiting for API side implementation: statgen/bravo_api#10
There is eQTL scan results for some of the genes and variants in the TOPMed set. Starting out using the Whole Blood tissue sample, there is SuSie fine mapping data (488k variants) and conditional regression data (108k varints) which have ~50k variants when collated.
SuSie data columns:
{chr}_{pos}_{ref}_{alt}
Conditional regression data columns:
Significant independent eQTL signals for each gene (generated using forward-backward linear regression)
What questions should the UI answer?
Re-using the tabulator-tables
dependency that is currently used to display a table of variants in a region or gene, design new or adapt the variant table for eQTLs.
Visual representation of the genomic region of the gene(s) and associated eQTLs.
The network calls should be sufficiently simple that the native Fetch API can handle them. This should reduce the number of dependencies and overhead.
Filters selection, columns showing selection, and panels selections are lost on reload.
Allow users to have selections persist between page reloads.
Styles were spread across and repeated in components in Bravo2.
Consolidated styles in src/assets/bravo.css
The extracted classes have not all been renamed to follow BEM conventions.
Refactor bravo classes to follow BEM conventions.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.