├── src ├── app │ ├── gene │ │ ├── store │ │ │ ├── selectors │ │ │ │ ├── index.ts │ │ │ │ ├── family │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── omitted.selector.ts │ │ │ │ │ └── family-state.selector.ts │ │ │ │ ├── layout │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── layout-state.selector.ts │ │ │ │ │ └── left-slider.selector.ts │ │ │ │ ├── plots │ │ │ │ │ ├── index.ts │ │ │ │ │ └── local-plots.selector.ts │ │ │ │ ├── gene │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── gene-state.selector.ts │ │ │ │ │ └── genes.selector.ts │ │ │ │ ├── chromosome │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── clustered-chromosomes.selector.ts │ │ │ │ │ └── chromosome-state.selector.ts │ │ │ │ ├── pairwise-blocks │ │ │ │ │ ├── index.ts │ │ │ │ │ └── pairwise-blocks-state.selector.ts │ │ │ │ └── micro-tracks │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── micro-tracks-state.selector.ts │ │ │ │ │ └── micro-tracks.selector.ts │ │ │ ├── utils │ │ │ │ ├── index.ts │ │ │ │ └── track-id.ts │ │ │ ├── index.ts │ │ │ ├── actions │ │ │ │ ├── family.actions.ts │ │ │ │ ├── layout.actions.ts │ │ │ │ ├── region.actions.ts │ │ │ │ ├── chromosome.actions.ts │ │ │ │ ├── micro-tracks.actions.ts │ │ │ │ └── pairwise-blocks.actions.ts │ │ │ ├── effects │ │ │ │ ├── index.ts │ │ │ │ └── family.effects.ts │ │ │ └── reducers │ │ │ │ ├── family.reducer.ts │ │ │ │ └── layout.reducer.ts │ │ ├── components │ │ │ ├── forms │ │ │ │ ├── filters │ │ │ │ │ └── index.ts │ │ │ │ ├── params │ │ │ │ │ └── index.ts │ │ │ │ └── index.ts │ │ │ ├── viewers │ │ │ │ ├── context-menu │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── context-menu.component.html │ │ │ │ │ └── context-menu.component.scss │ │ │ │ ├── plot │ │ │ │ │ ├── index.ts │ │ │ │ │ └── plot.shim.ts │ │ │ │ ├── micro │ │ │ │ │ └── index.ts │ │ │ │ ├── macro-circos │ │ │ │ │ ├── index.ts │ │ │ │ │ └── macro-circos.layout.ts │ │ │ │ ├── macro-legend │ │ │ │ │ ├── index.ts │ │ │ │ │ └── macro-legend.layout.ts │ │ │ │ ├── micro-legend │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── micro-legend.layout.ts │ │ │ │ │ └── micro-legend.shim.ts │ │ │ │ ├── macro │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── macro.layout.ts │ │ │ │ │ └── macro.shim.ts │ │ │ │ ├── golden-viewer.scss │ │ │ │ └── index.ts │ │ │ ├── details │ │ │ │ ├── gene │ │ │ │ │ ├── index.ts │ │ │ │ │ └── gene-detail.layout.ts │ │ │ │ ├── family │ │ │ │ │ ├── index.ts │ │ │ │ │ └── family-detail.layout.ts │ │ │ │ ├── track │ │ │ │ │ ├── index.ts │ │ │ │ │ └── track-detail.layout.ts │ │ │ │ ├── details.scss │ │ │ │ └── index.ts │ │ │ ├── tooltips │ │ │ │ ├── gene │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── gene-tooltip.tooltip.ts │ │ │ │ │ └── gene-tooltip.component.ts │ │ │ │ ├── html │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── html-tooltip.component.ts │ │ │ │ │ └── html-tooltip.tooltip.ts │ │ │ │ ├── plot │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── plot-tooltip.component.ts │ │ │ │ │ └── plot-tooltip.tooltip.ts │ │ │ │ ├── process │ │ │ │ │ ├── index.ts │ │ │ │ │ └── process-tooltip.tooltip.ts │ │ │ │ ├── macro-block │ │ │ │ │ ├── index.ts │ │ │ │ │ └── macro-block-tooltip.tooltip.ts │ │ │ │ └── index.ts │ │ │ ├── gene.component.scss │ │ │ ├── gene.component.html │ │ │ ├── header │ │ │ │ ├── index.ts │ │ │ │ └── header-left.component.ts │ │ │ ├── left-slider.component.scss │ │ │ ├── pipeline.component.html │ │ │ ├── inter-app-communication.component.html │ │ │ ├── left-slider.component.html │ │ │ ├── pipeline.shim.ts │ │ │ ├── left-slider.component.ts │ │ │ └── index.ts │ │ ├── models │ │ │ ├── mixins │ │ │ │ ├── cluster.model.ts │ │ │ │ ├── drawable.model.ts │ │ │ │ ├── html-attributes.model.ts │ │ │ │ ├── index.ts │ │ │ │ └── alignment.model.ts │ │ │ ├── region.model.ts │ │ │ ├── shims │ │ │ │ ├── name-source-id.ts │ │ │ │ ├── gene-map.ts │ │ │ │ ├── index.ts │ │ │ │ ├── track-map.ts │ │ │ │ ├── family-count-map.ts │ │ │ │ ├── endpoint-genes.ts │ │ │ │ ├── track-to-interval.ts │ │ │ │ ├── reference-block-map.ts │ │ │ │ ├── block-index-map.ts │ │ │ │ └── macro-blocks.ts │ │ │ ├── pair.model.ts │ │ │ ├── pairwise-block.model.ts │ │ │ ├── algorithm.model.ts │ │ │ ├── pairwise-blocks.model.ts │ │ │ ├── index.ts │ │ │ ├── params │ │ │ │ ├── micro-filters.model.ts │ │ │ │ ├── macro-filters.model.ts │ │ │ │ ├── micro-order.model.ts │ │ │ │ ├── macro-order.model.ts │ │ │ │ ├── clustering.model.ts │ │ │ │ ├── source.model.ts │ │ │ │ ├── query.model.ts │ │ │ │ ├── block.model.ts │ │ │ │ └── alignment.model.ts │ │ │ ├── gene.model.ts │ │ │ ├── track.model.ts │ │ │ └── process.model.ts │ │ ├── utils │ │ │ ├── regexp-or.util.ts │ │ │ ├── index.ts │ │ │ └── instantiate-and-populate.util.ts │ │ ├── algorithms │ │ │ ├── utils │ │ │ │ ├── track-name.util.ts │ │ │ │ ├── index.ts │ │ │ │ ├── pairwise-blocks-name.util.ts │ │ │ │ ├── algorithm-map.util.ts │ │ │ │ └── regexp-factory.util.ts │ │ │ ├── index.ts │ │ │ ├── alignment.algorithm.ts │ │ │ └── micro-order.algorithm.ts │ │ ├── animations │ │ │ ├── index.ts │ │ │ └── toggle-slider.animation.ts │ │ ├── constants │ │ │ ├── linkages.ts │ │ │ ├── index.ts │ │ │ └── regex.ts │ │ ├── services │ │ │ ├── shims │ │ │ │ ├── grpc-region-to-model.shim.ts │ │ │ │ ├── index.ts │ │ │ │ ├── grpc-track-to-model.shim.ts │ │ │ │ └── grpc-blocks-to-model.shim.ts │ │ │ ├── plots.service.ts │ │ │ ├── family.service.ts │ │ │ ├── layout.service.ts │ │ │ └── index.ts │ │ ├── directives │ │ │ ├── sidebar-toggle.directive.ts │ │ │ ├── index.ts │ │ │ ├── on-resize.directive.ts │ │ │ └── sidebar.directive.ts │ │ ├── gene-routing.module.ts │ │ └── gene.module.ts │ ├── search │ │ ├── store │ │ │ ├── selectors │ │ │ │ ├── index.ts │ │ │ │ ├── search │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── query.selector.ts │ │ │ │ │ ├── search.selector.ts │ │ │ │ │ └── search-state.selector.ts │ │ │ │ └── params │ │ │ │ │ └── index.ts │ │ │ ├── utils │ │ │ │ ├── action-id.ts │ │ │ │ ├── index.ts │ │ │ │ └── track-id.ts │ │ │ ├── index.ts │ │ │ ├── effects │ │ │ │ └── index.ts │ │ │ ├── reducers │ │ │ │ ├── params.reducer.ts │ │ │ │ └── index.ts │ │ │ └── actions │ │ │ │ └── search.actions.ts │ │ ├── models │ │ │ ├── index.ts │ │ │ ├── result.model.ts │ │ │ └── params │ │ │ │ ├── index.ts │ │ │ │ └── source.model.ts │ │ ├── services │ │ │ └── index.ts │ │ ├── components │ │ │ ├── index.ts │ │ │ └── search.component.scss │ │ ├── search-routing.module.ts │ │ └── search.module.ts │ ├── store │ │ ├── selectors │ │ │ ├── index.ts │ │ │ └── router │ │ │ │ └── index.ts │ │ ├── utils │ │ │ ├── action-id.ts │ │ │ ├── index.ts │ │ │ └── custom-router-state-serializer.util.ts │ │ ├── index.ts │ │ ├── effects │ │ │ ├── index.ts │ │ │ └── router.effects.ts │ │ ├── reducers │ │ │ ├── router.reducer.ts │ │ │ └── index.ts │ │ └── actions │ │ │ └── router.actions.ts │ ├── core │ │ ├── utils │ │ │ ├── array-flatten.util.ts │ │ │ ├── enumerable-properties.util.ts │ │ │ ├── counter.util.ts │ │ │ ├── pick.util.ts │ │ │ ├── execute-function-by-name.util.ts │ │ │ ├── save-file.util.ts │ │ │ ├── placeholder-replace.util.ts │ │ │ ├── index.ts │ │ │ ├── id-array.util.ts │ │ │ ├── element-is-visible.util.ts │ │ │ ├── object-merge.util.ts │ │ │ ├── set-operations.util.ts │ │ │ ├── comparators.util.ts │ │ │ ├── pair-set.util.ts │ │ │ └── selector-memoization.util.ts │ │ ├── containers │ │ │ └── index.ts │ │ ├── guards │ │ │ └── index.ts │ │ ├── components │ │ │ ├── index.ts │ │ │ ├── header.component.scss │ │ │ └── header.component.ts │ │ ├── models │ │ │ ├── placeholders.model.ts │ │ │ ├── script.model.ts │ │ │ ├── index.ts │ │ │ └── params │ │ │ │ └── index.ts │ │ ├── services │ │ │ ├── index.ts │ │ │ └── http.service.ts │ │ └── core.module.ts │ ├── instructions │ │ ├── components │ │ │ ├── instructions.component.scss │ │ │ ├── index.ts │ │ │ ├── instructions.component.ts │ │ │ ├── screenshot.component.scss │ │ │ └── screenshot.component.html │ │ ├── instructions-routing.module.ts │ │ └── instructions.module.ts │ ├── widgets │ │ ├── components │ │ │ ├── index.ts │ │ │ └── search │ │ │ │ ├── index.ts │ │ │ │ ├── search-widget.component.ts │ │ │ │ ├── expand-search-widget.component.ts │ │ │ │ ├── search-widget.component.html │ │ │ │ ├── expand-search-widget.component.html │ │ │ │ ├── expand-search-widget.component.scss │ │ │ │ └── abstract-search-widget.component.ts │ │ └── widgets.module.ts │ ├── guards │ │ ├── index.ts │ │ ├── legacy-search-route.guard.ts │ │ └── legacy-multi-route.guard.ts │ └── app-routing.module.ts ├── assets │ ├── img │ │ ├── README.md │ │ └── placeholder.png │ ├── js │ │ ├── README.md │ │ ├── gcv │ │ │ ├── metrics │ │ │ │ ├── index.ts │ │ │ │ └── levenshtein.ts │ │ │ ├── alignment │ │ │ │ ├── index.ts │ │ │ │ ├── models │ │ │ │ │ ├── traceback.ts │ │ │ │ │ ├── interval.ts │ │ │ │ │ ├── scores.ts │ │ │ │ │ ├── alignment.ts │ │ │ │ │ ├── index.ts │ │ │ │ │ └── internal-alignment.ts │ │ │ │ └── utils │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── compute-score.ts │ │ │ │ │ └── alignment-interval.ts │ │ │ ├── visualization │ │ │ │ ├── index.ts │ │ │ │ └── d3.ts │ │ │ ├── graph │ │ │ │ └── index.ts │ │ │ ├── common │ │ │ │ ├── clone.ts │ │ │ │ ├── sum.ts │ │ │ │ ├── index.ts │ │ │ │ ├── get-family-size-map.ts │ │ │ │ ├── filter-by-index.ts │ │ │ │ ├── set-option.ts │ │ │ │ ├── eventbus.ts │ │ │ │ ├── matrix.ts │ │ │ │ └── colors.ts │ │ │ └── index.ts │ │ └── clustering │ │ │ ├── index.js │ │ │ └── distance.js │ ├── libs │ │ └── README.md │ └── css │ │ └── README.md ├── config │ └── img │ │ ├── favicon.ico │ │ ├── papillionoid.png │ │ └── screenshots │ │ ├── instructions-gcv.png │ │ ├── instructions-track.png │ │ ├── instructions-dotplots.png │ │ ├── instructions-gcv-1434w.png │ │ ├── instructions-gcv-360w.png │ │ ├── instructions-gcv-480w.png │ │ ├── instructions-gcv-570w.png │ │ ├── instructions-gcv-660w.png │ │ ├── instructions-track-360w.png │ │ ├── instructions-track-480w.png │ │ ├── instructions-track-570w.png │ │ ├── instructions-track-660w.png │ │ ├── instructions-macrosynteny.png │ │ ├── instructions-microsynteny.png │ │ ├── instructions-track-2786w.png │ │ ├── instructions-dotplots-1970w.png │ │ ├── instructions-dotplots-360w.png │ │ ├── instructions-dotplots-480w.png │ │ ├── instructions-dotplots-570w.png │ │ ├── instructions-dotplots-660w.png │ │ ├── instructions-macrosynteny-360w.png │ │ ├── instructions-macrosynteny-480w.png │ │ ├── instructions-macrosynteny-570w.png │ │ ├── instructions-macrosynteny-660w.png │ │ ├── instructions-microsynteny-360w.png │ │ ├── instructions-microsynteny-480w.png │ │ ├── instructions-microsynteny-570w.png │ │ ├── instructions-microsynteny-660w.png │ │ ├── instructions-macrosynteny-2576w.png │ │ └── instructions-microsynteny-1434w.png ├── environments │ ├── environment.prod.ts │ └── environment.ts ├── index.html ├── main.ts └── styles.scss ├── dep └── legumeinfo-microservices │ ├── .ctirc │ ├── tsconfig.json │ ├── scripts │ ├── clean.js │ ├── build.js │ ├── create-indexes.js │ └── get-proto.js │ ├── README.md │ ├── package.json │ └── .gitignore ├── doc └── img │ └── screenshot.png ├── .dockerignore ├── tsconfig.app.json ├── tsconfig.spec.json ├── .editorconfig ├── .browserslistrc ├── nginx └── templates │ └── default.conf.template ├── scripts └── build-dependencies.js ├── .github ├── dependabot.yml ├── workflows │ └── build-push-on-tag.yml └── ISSUE_TEMPLATE │ └── release-checklist.md ├── .gitignore ├── tsconfig.json └── .eslintrc.json /src/app/gene/store/selectors/index.ts: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/app/search/store/selectors/index.ts: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/img/README.md: -------------------------------------------------------------------------------- 1 | App images and icons go here. 2 | -------------------------------------------------------------------------------- /src/app/store/selectors/index.ts: -------------------------------------------------------------------------------- 1 | export * from './router' 2 | -------------------------------------------------------------------------------- /src/app/gene/store/utils/index.ts: -------------------------------------------------------------------------------- 1 | export * from './track-id'; 2 | -------------------------------------------------------------------------------- /src/app/search/models/index.ts: -------------------------------------------------------------------------------- 1 | export * from './result.model'; 2 | -------------------------------------------------------------------------------- /dep/legumeinfo-microservices/.ctirc: -------------------------------------------------------------------------------- 1 | { 2 | "targetExts": ["js"], 3 | } 4 | -------------------------------------------------------------------------------- /src/app/store/utils/action-id.ts: -------------------------------------------------------------------------------- 1 | export type ActionID = {action: number}; 2 | -------------------------------------------------------------------------------- /src/assets/js/README.md: -------------------------------------------------------------------------------- 1 | Non-Angular app-specific JavaScript files go here. 2 | -------------------------------------------------------------------------------- /src/assets/js/gcv/metrics/index.ts: -------------------------------------------------------------------------------- 1 | export { levenshtein } from "./levenshtein"; 2 | -------------------------------------------------------------------------------- /src/assets/libs/README.md: -------------------------------------------------------------------------------- 1 | Third-party libraries go here, e.g., jQuery, D3, etc. 2 | -------------------------------------------------------------------------------- /src/app/gene/components/forms/filters/index.ts: -------------------------------------------------------------------------------- 1 | export * from './filters.component'; 2 | -------------------------------------------------------------------------------- /src/app/gene/components/forms/params/index.ts: -------------------------------------------------------------------------------- 1 | export * from './params.component'; 2 | -------------------------------------------------------------------------------- /src/app/gene/store/selectors/family/index.ts: -------------------------------------------------------------------------------- 1 | export * from './omitted.selector'; 2 | -------------------------------------------------------------------------------- /src/app/gene/store/selectors/layout/index.ts: -------------------------------------------------------------------------------- 1 | export * from './left-slider.selector'; 2 | -------------------------------------------------------------------------------- /src/app/search/store/utils/action-id.ts: -------------------------------------------------------------------------------- 1 | export type ActionID = {action: number}; 2 | -------------------------------------------------------------------------------- /src/app/store/index.ts: -------------------------------------------------------------------------------- 1 | export * from './effects'; 2 | export * from './reducers'; 3 | -------------------------------------------------------------------------------- /src/assets/css/README.md: -------------------------------------------------------------------------------- 1 | All styles and style related files (SCSS or LESS) go here. 2 | -------------------------------------------------------------------------------- /src/app/gene/store/index.ts: -------------------------------------------------------------------------------- 1 | export * from './effects'; 2 | export * from './reducers'; 3 | -------------------------------------------------------------------------------- /src/app/search/store/index.ts: -------------------------------------------------------------------------------- 1 | export * from './effects'; 2 | export * from './reducers'; 3 | -------------------------------------------------------------------------------- /doc/img/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/legumeinfo/gcv/HEAD/doc/img/screenshot.png -------------------------------------------------------------------------------- /src/app/gene/components/viewers/context-menu/index.ts: -------------------------------------------------------------------------------- 1 | export * from './context-menu.component'; 2 | -------------------------------------------------------------------------------- /src/app/search/store/utils/index.ts: -------------------------------------------------------------------------------- 1 | export * from './action-id'; 2 | export * from './track-id'; 3 | -------------------------------------------------------------------------------- /src/config/img/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/legumeinfo/gcv/HEAD/src/config/img/favicon.ico -------------------------------------------------------------------------------- /src/environments/environment.prod.ts: -------------------------------------------------------------------------------- 1 | export const environment = { 2 | production: true 3 | }; 4 | -------------------------------------------------------------------------------- /src/app/gene/models/mixins/cluster.model.ts: -------------------------------------------------------------------------------- 1 | export interface ClusterMixin { 2 | cluster: number; 3 | } 4 | -------------------------------------------------------------------------------- /src/assets/img/placeholder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/legumeinfo/gcv/HEAD/src/assets/img/placeholder.png -------------------------------------------------------------------------------- /src/config/img/papillionoid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/legumeinfo/gcv/HEAD/src/config/img/papillionoid.png -------------------------------------------------------------------------------- /src/app/gene/components/viewers/plot/index.ts: -------------------------------------------------------------------------------- 1 | export * from './plot.component'; 2 | export * from './plot.layout'; 3 | -------------------------------------------------------------------------------- /src/app/gene/components/viewers/micro/index.ts: -------------------------------------------------------------------------------- 1 | export * from './micro.component'; 2 | export * from './micro.layout'; 3 | -------------------------------------------------------------------------------- /src/app/store/utils/index.ts: -------------------------------------------------------------------------------- 1 | export * from './action-id'; 2 | export * from './custom-router-state-serializer.util'; 3 | -------------------------------------------------------------------------------- /src/app/gene/components/details/gene/index.ts: -------------------------------------------------------------------------------- 1 | export * from './gene-detail.component'; 2 | export * from './gene-detail.layout'; 3 | -------------------------------------------------------------------------------- /src/app/gene/store/selectors/plots/index.ts: -------------------------------------------------------------------------------- 1 | export * from './local-plots.selector'; 2 | export * from './global-plots.selector'; 3 | -------------------------------------------------------------------------------- /src/assets/js/gcv/alignment/index.ts: -------------------------------------------------------------------------------- 1 | export { repeat } from "./repeat"; 2 | export { smithWaterman } from "./smith-waterman"; 3 | -------------------------------------------------------------------------------- /src/assets/js/gcv/alignment/models/traceback.ts: -------------------------------------------------------------------------------- 1 | export enum Traceback { 2 | FIRST, 3 | DIAGONAL, 4 | LEFT, 5 | UP 6 | }; 7 | -------------------------------------------------------------------------------- /src/app/gene/components/details/family/index.ts: -------------------------------------------------------------------------------- 1 | export * from './family-detail.component'; 2 | export * from './family-detail.layout'; 3 | -------------------------------------------------------------------------------- /src/app/gene/components/details/track/index.ts: -------------------------------------------------------------------------------- 1 | export * from './track-detail.component'; 2 | export * from './track-detail.layout'; 3 | -------------------------------------------------------------------------------- /src/app/gene/components/tooltips/gene/index.ts: -------------------------------------------------------------------------------- 1 | export * from './gene-tooltip.component'; 2 | export * from './gene-tooltip.tooltip'; 3 | -------------------------------------------------------------------------------- /src/app/gene/components/tooltips/html/index.ts: -------------------------------------------------------------------------------- 1 | export * from './html-tooltip.component'; 2 | export * from './html-tooltip.tooltip'; 3 | -------------------------------------------------------------------------------- /src/app/gene/components/tooltips/plot/index.ts: -------------------------------------------------------------------------------- 1 | export * from './plot-tooltip.component'; 2 | export * from './plot-tooltip.tooltip'; 3 | -------------------------------------------------------------------------------- /src/app/gene/models/mixins/drawable.model.ts: -------------------------------------------------------------------------------- 1 | export interface DrawableMixin { 2 | checked?: boolean; 3 | glyph?: string; 4 | } 5 | -------------------------------------------------------------------------------- /src/app/gene/models/region.model.ts: -------------------------------------------------------------------------------- 1 | export type Region = { 2 | gene: string; 3 | neighbors: number; 4 | source: string; 5 | } 6 | -------------------------------------------------------------------------------- /src/app/gene/components/viewers/macro-circos/index.ts: -------------------------------------------------------------------------------- 1 | export * from './macro-circos.component'; 2 | export * from './macro-circos.layout'; 3 | -------------------------------------------------------------------------------- /src/app/gene/components/viewers/macro-legend/index.ts: -------------------------------------------------------------------------------- 1 | export * from './macro-legend.component'; 2 | export * from './macro-legend.layout'; 3 | -------------------------------------------------------------------------------- /src/app/gene/components/viewers/micro-legend/index.ts: -------------------------------------------------------------------------------- 1 | export * from './micro-legend.component'; 2 | export * from './micro-legend.layout'; 3 | -------------------------------------------------------------------------------- /src/app/gene/utils/regexp-or.util.ts: -------------------------------------------------------------------------------- 1 | export function regexpOr(...args: string[]) { 2 | return args.map((r) => `(${r})`).join('|'); 3 | } 4 | -------------------------------------------------------------------------------- /src/app/gene/components/tooltips/process/index.ts: -------------------------------------------------------------------------------- 1 | export * from './process-tooltip.component'; 2 | export * from './process-tooltip.tooltip'; 3 | -------------------------------------------------------------------------------- /src/config/img/screenshots/instructions-gcv.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/legumeinfo/gcv/HEAD/src/config/img/screenshots/instructions-gcv.png -------------------------------------------------------------------------------- /src/config/img/screenshots/instructions-track.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/legumeinfo/gcv/HEAD/src/config/img/screenshots/instructions-track.png -------------------------------------------------------------------------------- /src/app/gene/components/tooltips/macro-block/index.ts: -------------------------------------------------------------------------------- 1 | export * from './macro-block-tooltip.component'; 2 | export * from './macro-block-tooltip.tooltip'; 3 | -------------------------------------------------------------------------------- /src/app/gene/components/viewers/macro/index.ts: -------------------------------------------------------------------------------- 1 | export * from './macro.component'; 2 | export * from './macro.layout'; 3 | export * from './macro.shim'; 4 | -------------------------------------------------------------------------------- /src/app/gene/models/mixins/html-attributes.model.ts: -------------------------------------------------------------------------------- 1 | export interface HTMLAttributesMixin { 2 | htmlAttributes: {[key: string]: string | Function}; 3 | } 4 | -------------------------------------------------------------------------------- /src/app/gene/models/shims/name-source-id.ts: -------------------------------------------------------------------------------- 1 | export function nameSourceID(name: string, source: string): string { 2 | return `${name}:${source}`; 3 | } 4 | -------------------------------------------------------------------------------- /src/config/img/screenshots/instructions-dotplots.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/legumeinfo/gcv/HEAD/src/config/img/screenshots/instructions-dotplots.png -------------------------------------------------------------------------------- /src/config/img/screenshots/instructions-gcv-1434w.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/legumeinfo/gcv/HEAD/src/config/img/screenshots/instructions-gcv-1434w.png -------------------------------------------------------------------------------- /src/config/img/screenshots/instructions-gcv-360w.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/legumeinfo/gcv/HEAD/src/config/img/screenshots/instructions-gcv-360w.png -------------------------------------------------------------------------------- /src/config/img/screenshots/instructions-gcv-480w.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/legumeinfo/gcv/HEAD/src/config/img/screenshots/instructions-gcv-480w.png -------------------------------------------------------------------------------- /src/config/img/screenshots/instructions-gcv-570w.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/legumeinfo/gcv/HEAD/src/config/img/screenshots/instructions-gcv-570w.png -------------------------------------------------------------------------------- /src/config/img/screenshots/instructions-gcv-660w.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/legumeinfo/gcv/HEAD/src/config/img/screenshots/instructions-gcv-660w.png -------------------------------------------------------------------------------- /src/config/img/screenshots/instructions-track-360w.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/legumeinfo/gcv/HEAD/src/config/img/screenshots/instructions-track-360w.png -------------------------------------------------------------------------------- /src/config/img/screenshots/instructions-track-480w.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/legumeinfo/gcv/HEAD/src/config/img/screenshots/instructions-track-480w.png -------------------------------------------------------------------------------- /src/config/img/screenshots/instructions-track-570w.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/legumeinfo/gcv/HEAD/src/config/img/screenshots/instructions-track-570w.png -------------------------------------------------------------------------------- /src/config/img/screenshots/instructions-track-660w.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/legumeinfo/gcv/HEAD/src/config/img/screenshots/instructions-track-660w.png -------------------------------------------------------------------------------- /src/assets/js/gcv/alignment/models/interval.ts: -------------------------------------------------------------------------------- 1 | export type Interval = [number, number]; 2 | 3 | 4 | export type WeightedInterval = [number, number, number]; 5 | -------------------------------------------------------------------------------- /src/config/img/screenshots/instructions-macrosynteny.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/legumeinfo/gcv/HEAD/src/config/img/screenshots/instructions-macrosynteny.png -------------------------------------------------------------------------------- /src/config/img/screenshots/instructions-microsynteny.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/legumeinfo/gcv/HEAD/src/config/img/screenshots/instructions-microsynteny.png -------------------------------------------------------------------------------- /src/config/img/screenshots/instructions-track-2786w.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/legumeinfo/gcv/HEAD/src/config/img/screenshots/instructions-track-2786w.png -------------------------------------------------------------------------------- /src/app/gene/algorithms/utils/track-name.util.ts: -------------------------------------------------------------------------------- 1 | export const trackName = (track): string => { 2 | return `${track.genus}:${track.species}:${track.name}`; 3 | }; 4 | -------------------------------------------------------------------------------- /src/app/search/models/result.model.ts: -------------------------------------------------------------------------------- 1 | export type Result = { 2 | genes?: string[]; // list of gene IDs 3 | regions?: {gene: string, neighbors: number}[]; 4 | } 5 | -------------------------------------------------------------------------------- /src/app/search/store/selectors/search/index.ts: -------------------------------------------------------------------------------- 1 | export * from './query.selector'; 2 | export * from './search.selector'; 3 | export * from './search-state.selector'; 4 | -------------------------------------------------------------------------------- /src/assets/js/gcv/alignment/models/scores.ts: -------------------------------------------------------------------------------- 1 | export class Scores { 2 | match: number; 3 | mismatch: number; 4 | gap: number; 5 | threshold?: number; 6 | } 7 | -------------------------------------------------------------------------------- /src/config/img/screenshots/instructions-dotplots-1970w.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/legumeinfo/gcv/HEAD/src/config/img/screenshots/instructions-dotplots-1970w.png -------------------------------------------------------------------------------- /src/config/img/screenshots/instructions-dotplots-360w.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/legumeinfo/gcv/HEAD/src/config/img/screenshots/instructions-dotplots-360w.png -------------------------------------------------------------------------------- /src/config/img/screenshots/instructions-dotplots-480w.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/legumeinfo/gcv/HEAD/src/config/img/screenshots/instructions-dotplots-480w.png -------------------------------------------------------------------------------- /src/config/img/screenshots/instructions-dotplots-570w.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/legumeinfo/gcv/HEAD/src/config/img/screenshots/instructions-dotplots-570w.png -------------------------------------------------------------------------------- /src/config/img/screenshots/instructions-dotplots-660w.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/legumeinfo/gcv/HEAD/src/config/img/screenshots/instructions-dotplots-660w.png -------------------------------------------------------------------------------- /src/app/gene/store/selectors/gene/index.ts: -------------------------------------------------------------------------------- 1 | export * from './genes.selector'; 2 | export * from './gene-state.selector'; 3 | export * from './selected-genes.selector'; 4 | -------------------------------------------------------------------------------- /src/config/img/screenshots/instructions-macrosynteny-360w.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/legumeinfo/gcv/HEAD/src/config/img/screenshots/instructions-macrosynteny-360w.png -------------------------------------------------------------------------------- /src/config/img/screenshots/instructions-macrosynteny-480w.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/legumeinfo/gcv/HEAD/src/config/img/screenshots/instructions-macrosynteny-480w.png -------------------------------------------------------------------------------- /src/config/img/screenshots/instructions-macrosynteny-570w.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/legumeinfo/gcv/HEAD/src/config/img/screenshots/instructions-macrosynteny-570w.png -------------------------------------------------------------------------------- /src/config/img/screenshots/instructions-macrosynteny-660w.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/legumeinfo/gcv/HEAD/src/config/img/screenshots/instructions-macrosynteny-660w.png -------------------------------------------------------------------------------- /src/config/img/screenshots/instructions-microsynteny-360w.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/legumeinfo/gcv/HEAD/src/config/img/screenshots/instructions-microsynteny-360w.png -------------------------------------------------------------------------------- /src/config/img/screenshots/instructions-microsynteny-480w.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/legumeinfo/gcv/HEAD/src/config/img/screenshots/instructions-microsynteny-480w.png -------------------------------------------------------------------------------- /src/config/img/screenshots/instructions-microsynteny-570w.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/legumeinfo/gcv/HEAD/src/config/img/screenshots/instructions-microsynteny-570w.png -------------------------------------------------------------------------------- /src/config/img/screenshots/instructions-microsynteny-660w.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/legumeinfo/gcv/HEAD/src/config/img/screenshots/instructions-microsynteny-660w.png -------------------------------------------------------------------------------- /src/assets/js/clustering/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | hcluster: require("./hcluster"), 3 | Kmeans: require("./kmeans"), 4 | kmeans: require("./kmeans").kmeans 5 | }; -------------------------------------------------------------------------------- /src/config/img/screenshots/instructions-macrosynteny-2576w.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/legumeinfo/gcv/HEAD/src/config/img/screenshots/instructions-macrosynteny-2576w.png -------------------------------------------------------------------------------- /src/config/img/screenshots/instructions-microsynteny-1434w.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/legumeinfo/gcv/HEAD/src/config/img/screenshots/instructions-microsynteny-1434w.png -------------------------------------------------------------------------------- /src/app/core/utils/array-flatten.util.ts: -------------------------------------------------------------------------------- 1 | // flattens a 2d array into a 1d array 2 | export function arrayFlatten(a: T[][]): T[] { 3 | return [].concat.apply([], a); 4 | } 5 | -------------------------------------------------------------------------------- /src/app/gene/components/gene.component.scss: -------------------------------------------------------------------------------- 1 | .viewers { 2 | position: absolute; 3 | top: 57px; 4 | right: 0; 5 | bottom: 0; 6 | left: 0; 7 | overflow: hidden; 8 | } 9 | -------------------------------------------------------------------------------- /src/app/gene/models/pair.model.ts: -------------------------------------------------------------------------------- 1 | export class Pair { 2 | constructor(i: number, j: number) { 3 | this.i = i; 4 | this.j = j; 5 | } 6 | i: number; 7 | j: number; 8 | } 9 | -------------------------------------------------------------------------------- /src/app/gene/models/pairwise-block.model.ts: -------------------------------------------------------------------------------- 1 | export class PairwiseBlock { 2 | orientation: '+' | '-'; 3 | i: number; 4 | j: number; 5 | fmin: number; 6 | fmax: number; 7 | } 8 | -------------------------------------------------------------------------------- /src/app/instructions/components/instructions.component.scss: -------------------------------------------------------------------------------- 1 | $spacer: 1rem !default; 2 | 3 | .lead-banner { 4 | padding-top: $spacer * 5; 5 | padding-bottom: $spacer * 5; 6 | } 7 | -------------------------------------------------------------------------------- /.dockerignore: -------------------------------------------------------------------------------- 1 | .git 2 | dist 3 | doc 4 | e2e 5 | node_modules 6 | .dockerignore 7 | .editorconfig 8 | .gitignore 9 | CODE_OF_CONDUCT.md 10 | Dockerfile 11 | README.md 12 | compose.yml 13 | -------------------------------------------------------------------------------- /src/app/core/containers/index.ts: -------------------------------------------------------------------------------- 1 | import { AppComponent } from './app.component'; 2 | 3 | export const components: any[] = [ 4 | AppComponent 5 | ]; 6 | 7 | export * from './app.component'; 8 | -------------------------------------------------------------------------------- /src/app/gene/models/algorithm.model.ts: -------------------------------------------------------------------------------- 1 | export class Algorithm { 2 | constructor( 3 | public id: string, 4 | public name: string, 5 | public algorithm: Function 6 | ) { } 7 | } 8 | -------------------------------------------------------------------------------- /src/app/gene/models/mixins/index.ts: -------------------------------------------------------------------------------- 1 | export * from './alignment.model'; 2 | export * from './cluster.model'; 3 | export * from './drawable.model'; 4 | export * from './html-attributes.model'; 5 | -------------------------------------------------------------------------------- /src/app/store/effects/index.ts: -------------------------------------------------------------------------------- 1 | import { RouterEffects } from './router.effects'; 2 | 3 | export const effects: any[] = [ 4 | RouterEffects, 5 | ]; 6 | 7 | export * from './router.effects'; 8 | -------------------------------------------------------------------------------- /src/app/widgets/components/index.ts: -------------------------------------------------------------------------------- 1 | import * as fromSearch from './search'; 2 | 3 | export const components: any[] = [ 4 | ...fromSearch.components, 5 | ]; 6 | 7 | export * from './search'; 8 | -------------------------------------------------------------------------------- /src/app/search/services/index.ts: -------------------------------------------------------------------------------- 1 | import { SearchService } from './search.service'; 2 | 3 | export const services: any[] = [ 4 | SearchService, 5 | ]; 6 | 7 | export * from './search.service'; 8 | -------------------------------------------------------------------------------- /src/app/search/store/effects/index.ts: -------------------------------------------------------------------------------- 1 | import { SearchEffects } from './search.effects'; 2 | 3 | export const effects: any[] = [ 4 | SearchEffects, 5 | ]; 6 | 7 | export * from './search.effects'; 8 | -------------------------------------------------------------------------------- /src/app/core/guards/index.ts: -------------------------------------------------------------------------------- 1 | import { QueryParamsGuard } from './query-params.guard'; 2 | 3 | export const guards: any[] = [ 4 | QueryParamsGuard, 5 | ]; 6 | 7 | export * from './query-params.guard'; 8 | -------------------------------------------------------------------------------- /src/app/gene/store/selectors/chromosome/index.ts: -------------------------------------------------------------------------------- 1 | export * from './chromosome-state.selector'; 2 | export * from './clustered-chromosomes.selector'; 3 | export * from './selected-chromosomes.selector'; 4 | -------------------------------------------------------------------------------- /src/assets/js/gcv/alignment/models/alignment.ts: -------------------------------------------------------------------------------- 1 | export class Alignment { 2 | alignment: (number|null)[]; 3 | orientations: (null|1|-1)[]; 4 | segments: (number|null)[]; 5 | score: number; 6 | } 7 | -------------------------------------------------------------------------------- /src/app/core/components/index.ts: -------------------------------------------------------------------------------- 1 | import { HeaderComponent } from './header.component'; 2 | 3 | export const components: any[] = [ 4 | HeaderComponent, 5 | ]; 6 | 7 | export * from './header.component'; 8 | -------------------------------------------------------------------------------- /src/app/gene/algorithms/utils/index.ts: -------------------------------------------------------------------------------- 1 | export * from './algorithm-map.util'; 2 | export * from './pairwise-blocks-name.util'; 3 | export * from './track-name.util'; 4 | export * from './regexp-factory.util'; 5 | -------------------------------------------------------------------------------- /src/app/gene/models/mixins/alignment.model.ts: -------------------------------------------------------------------------------- 1 | export interface AlignmentMixin { 2 | alignment: (number|null)[]; 3 | orientations: (null|1|-1)[]; 4 | segments: (number|null)[]; 5 | score: number; 6 | } 7 | -------------------------------------------------------------------------------- /src/app/gene/store/selectors/pairwise-blocks/index.ts: -------------------------------------------------------------------------------- 1 | export * from './pairwise-blocks.selector'; 2 | export * from './pairwise-blocks-state.selector'; 3 | export * from './selected-pairwise-blocks.selector'; 4 | -------------------------------------------------------------------------------- /src/app/search/components/index.ts: -------------------------------------------------------------------------------- 1 | import { SearchComponent } from './search.component'; 2 | 3 | export const components: any[] = [ 4 | SearchComponent, 5 | ]; 6 | 7 | export * from './search.component'; 8 | -------------------------------------------------------------------------------- /src/assets/js/gcv/alignment/models/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./alignment"; 2 | export * from "./internal-alignment"; 3 | export * from "./interval"; 4 | export * from "./scores"; 5 | export * from "./traceback"; 6 | -------------------------------------------------------------------------------- /src/app/gene/algorithms/utils/pairwise-blocks-name.util.ts: -------------------------------------------------------------------------------- 1 | export const pairwiseBlocksName = (blocks): string => { 2 | return `${blocks.chromosome}:${blocks.chromosomeGenus}:${blocks.chromosomeSpecies}`; 3 | }; 4 | -------------------------------------------------------------------------------- /src/app/gene/animations/index.ts: -------------------------------------------------------------------------------- 1 | import { toggleSlider } from './toggle-slider.animation'; 2 | 3 | export const animations: any[] = [ 4 | toggleSlider, 5 | ]; 6 | 7 | export * from './toggle-slider.animation'; 8 | -------------------------------------------------------------------------------- /src/app/core/utils/enumerable-properties.util.ts: -------------------------------------------------------------------------------- 1 | export const enumerableProperties = (o: Object): string[] => { 2 | const props = []; 3 | for (let p in o) { 4 | props.push(p); 5 | } 6 | return props; 7 | }; 8 | -------------------------------------------------------------------------------- /src/app/gene/constants/linkages.ts: -------------------------------------------------------------------------------- 1 | export const LINKAGES: {id: string, name: string}[] = [ 2 | {id: 'average', name: 'Average'}, 3 | {id: 'single', name: 'Single'}, 4 | {id: 'complete', name: 'Complete'}, 5 | ]; 6 | -------------------------------------------------------------------------------- /src/app/gene/components/details/details.scss: -------------------------------------------------------------------------------- 1 | // copied from Bootstrap 2 | $spacer: 1rem !default; 3 | 4 | .details { 5 | width: 100%; 6 | height: 100%; 7 | padding: $spacer; 8 | overflow-y: auto; 9 | } 10 | -------------------------------------------------------------------------------- /src/app/gene/components/gene.component.html: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 | -------------------------------------------------------------------------------- /src/assets/js/gcv/visualization/index.ts: -------------------------------------------------------------------------------- 1 | export { Legend } from "./legend"; 2 | export { Macro } from "./macro"; 3 | export { Micro } from "./micro"; 4 | export { MultiMacro } from "./multi-macro"; 5 | export { Plot } from "./plot"; 6 | -------------------------------------------------------------------------------- /src/app/gene/constants/index.ts: -------------------------------------------------------------------------------- 1 | import { LINKAGES } from './linkages'; 2 | import { Regex } from './regex'; 3 | 4 | export const constants: any[] = [ 5 | LINKAGES, 6 | Regex, 7 | ]; 8 | 9 | export * from './linkages'; 10 | export * from './regex'; 11 | -------------------------------------------------------------------------------- /src/app/gene/store/selectors/micro-tracks/index.ts: -------------------------------------------------------------------------------- 1 | export * from './clustered-and-aligned-micro-tracks.selector'; 2 | export * from './micro-tracks.selector'; 3 | export * from './micro-tracks-state.selector'; 4 | export * from './selected-micro-tracks.selector'; 5 | -------------------------------------------------------------------------------- /src/assets/js/gcv/graph/index.ts: -------------------------------------------------------------------------------- 1 | export { Directed } from "./directed"; 2 | export { FR, frequentedRegions } from "./frequented-regions"; 3 | export { Graph } from "./graph"; 4 | export { MSAHMM } from "./msa-hmm"; 5 | export { Undirected } from "./undirected"; 6 | -------------------------------------------------------------------------------- /src/app/gene/constants/regex.ts: -------------------------------------------------------------------------------- 1 | export enum Regex { 2 | FRACTION_TO_ONE = '0\.[0]*[1-9][0-9]*|1', 3 | POSITIVE_INT = '[1-9][0-9]*', 4 | POSITIVE_INT_AND_ZERO = '0|[1-9][0-9]*', 5 | NEGATIVE_INT = '-[1-9][0-9]*', 6 | TWO_OR_GREATER = '[2-9]|[1-9]\d{1,}' 7 | } 8 | -------------------------------------------------------------------------------- /src/app/search/store/reducers/params.reducer.ts: -------------------------------------------------------------------------------- 1 | import { AppConfig } from '@gcv/core/models'; 2 | import { Params } from '@gcv/search/models/params'; 3 | 4 | 5 | export const initialState: Params = { 6 | // sources 7 | sources: AppConfig.getServerIDs(), 8 | }; 9 | -------------------------------------------------------------------------------- /src/assets/js/gcv/alignment/utils/index.ts: -------------------------------------------------------------------------------- 1 | export { alignmentInterval } from "./alignment-interval"; 2 | export { computeScore } from "./compute-score"; 3 | export { intervalsToSets } from "./intervals-to-sets"; 4 | export { mergeAlignments } from "./merge-alignments"; 5 | -------------------------------------------------------------------------------- /src/app/core/utils/counter.util.ts: -------------------------------------------------------------------------------- 1 | // keeps an internal count that is incremented at each get call 2 | class Counter { 3 | 4 | private _count = 0; 5 | 6 | getCount() { 7 | return this._count++; 8 | } 9 | } 10 | 11 | // singleton 12 | export const counter = new Counter(); 13 | -------------------------------------------------------------------------------- /src/app/gene/services/shims/grpc-region-to-model.shim.ts: -------------------------------------------------------------------------------- 1 | import { Region } from '@gcv/gene/models'; 2 | 3 | 4 | export const grpcRegionToModel = (grpcRegion, source): Region => { 5 | const region = grpcRegion.toObject(); 6 | region['source'] = source; 7 | return region as Region; 8 | } 9 | -------------------------------------------------------------------------------- /src/assets/js/gcv/common/clone.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Creates a deep copy of the given object. 3 | * @param {Object} - The object to be cloned. 4 | * @return {Object} - A deep copy of the provided object. 5 | */ 6 | export function clone(obj) { 7 | return JSON.parse(JSON.stringify(obj)); 8 | } 9 | -------------------------------------------------------------------------------- /src/app/gene/components/viewers/golden-viewer.scss: -------------------------------------------------------------------------------- 1 | .viewer { 2 | position: absolute; 3 | //top: 28px; /* room for context menu */ 4 | top: 56px; /* room for context menu */ 5 | bottom: 0; 6 | right: 0; 7 | left: 0; 8 | overflow-x: hidden; 9 | overflow-y: auto; 10 | } 11 | -------------------------------------------------------------------------------- /src/app/gene/components/forms/index.ts: -------------------------------------------------------------------------------- 1 | import { FiltersComponent } from './filters'; 2 | import { ParamsComponent } from './params'; 3 | 4 | export const components: any[] = [ 5 | FiltersComponent, 6 | ParamsComponent, 7 | ]; 8 | 9 | export * from './filters'; 10 | export * from './params'; 11 | -------------------------------------------------------------------------------- /src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Genome Context Viewer 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/app/gene/models/shims/gene-map.ts: -------------------------------------------------------------------------------- 1 | import { Gene } from '@gcv/gene/models'; 2 | 3 | 4 | export type GeneMap = {[key: string]: Gene}; 5 | 6 | 7 | export function geneMap(genes: Gene[]): GeneMap { 8 | const map: GeneMap = {}; 9 | genes.forEach((g) => map[g.name] = g); 10 | return map; 11 | } 12 | -------------------------------------------------------------------------------- /src/app/core/utils/pick.util.ts: -------------------------------------------------------------------------------- 1 | export const pick = (props, o, pickUndefined=false) => { 2 | const reducer = (accumulator, prop) => { 3 | if (prop in o || pickUndefined) { 4 | accumulator[prop] = o[prop]; 5 | } 6 | return accumulator; 7 | }; 8 | return props.reduce(reducer, {}); 9 | } 10 | -------------------------------------------------------------------------------- /tsconfig.app.json: -------------------------------------------------------------------------------- 1 | /* To learn more about this file see: https://angular.io/config/tsconfig. */ 2 | { 3 | "extends": "./tsconfig.json", 4 | "compilerOptions": { 5 | "outDir": "./out-tsc/app", 6 | "types": [] 7 | }, 8 | "files": [ 9 | "src/main.ts" 10 | ], 11 | "include": [ 12 | "src/**/*.d.ts" 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | /* To learn more about this file see: https://angular.io/config/tsconfig. */ 2 | { 3 | "extends": "./tsconfig.json", 4 | "compilerOptions": { 5 | "outDir": "./out-tsc/spec", 6 | "types": [ 7 | "jasmine" 8 | ] 9 | }, 10 | "include": [ 11 | "src/**/*.spec.ts", 12 | "src/**/*.d.ts" 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # Editor configuration, see http://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | charset = utf-8 6 | indent_style = space 7 | indent_size = 2 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | 11 | [*.ts] 12 | quote_type = single 13 | 14 | [*.md] 15 | max_line_length = off 16 | trim_trailing_whitespace = false 17 | -------------------------------------------------------------------------------- /src/app/gene/utils/index.ts: -------------------------------------------------------------------------------- 1 | import { instantiateAndPopulate } from './instantiate-and-populate.util'; 2 | import { regexpOr } from './regexp-or.util'; 3 | 4 | 5 | export const utils: any[] = [ 6 | instantiateAndPopulate, 7 | regexpOr, 8 | ]; 9 | 10 | 11 | export * from './instantiate-and-populate.util'; 12 | export * from './regexp-or.util'; 13 | -------------------------------------------------------------------------------- /src/assets/js/gcv/common/sum.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Sums the numbers in the given arrays. 3 | * @param {Array} - The array to sum. 4 | * @return {number} - The sum. 5 | */ 6 | export function sum(l) { 7 | const ls = l.filter((e) => e !== null); 8 | if (ls.length === 0) { 9 | return 0; 10 | } 11 | return ls.reduce((a, b) => a + b); 12 | } 13 | -------------------------------------------------------------------------------- /src/app/gene/components/tooltips/html/html-tooltip.component.ts: -------------------------------------------------------------------------------- 1 | // Angular 2 | import { Component, Input } from '@angular/core'; 3 | 4 | 5 | @Component({ 6 | selector: 'gcv-html-tooltip', 7 | template: `
`, 8 | standalone: false 9 | }) 10 | export class HtmlTooltipComponent { 11 | @Input() html: string; 12 | } 13 | -------------------------------------------------------------------------------- /src/app/gene/models/pairwise-blocks.model.ts: -------------------------------------------------------------------------------- 1 | import { PairwiseBlock } from './pairwise-block.model'; 2 | 3 | export class PairwiseBlocks { 4 | reference: string; 5 | referenceSource: string; 6 | chromosome: string; 7 | chromosomeSource: string; 8 | chromosomeGenus: string; 9 | chromosomeSpecies: string; 10 | blocks: PairwiseBlock[]; 11 | } 12 | -------------------------------------------------------------------------------- /src/assets/js/gcv/alignment/models/internal-alignment.ts: -------------------------------------------------------------------------------- 1 | export class InternalAlignment { 2 | coordinates: (number|null)[]; 3 | scores: (number|null)[]; 4 | } 5 | 6 | 7 | export class MergedInternalAlignment { 8 | coordinates: (number|null)[]; 9 | orientations: (null|1|-1)[]; 10 | segments: (number|null)[]; 11 | scores: (number|null)[]; 12 | } 13 | -------------------------------------------------------------------------------- /src/app/core/models/placeholders.model.ts: -------------------------------------------------------------------------------- 1 | export enum OrganismPlaceholders { 2 | Genus = 'GENUS', 3 | Species = 'SPECIES', 4 | Chromosome = 'CHROMOSOME', 5 | } 6 | 7 | export enum GenePlaceholders { 8 | Gene = 'GENE', 9 | } 10 | 11 | export enum RegionPlaceholders { 12 | Chromosome = 'CHROMOSOME', 13 | Start = 'START', 14 | Stop = 'STOP', 15 | } 16 | -------------------------------------------------------------------------------- /src/app/gene/algorithms/utils/algorithm-map.util.ts: -------------------------------------------------------------------------------- 1 | import { Algorithm } from '@gcv/gene/models'; 2 | 3 | 4 | export type AlgorithmMap = {[key: string]: Algorithm}; 5 | 6 | 7 | export function algorithmMap(algorithms: Algorithm[]): AlgorithmMap { 8 | const map: AlgorithmMap = {}; 9 | algorithms.forEach((a) => map[a.id] = a); 10 | return map; 11 | } 12 | -------------------------------------------------------------------------------- /src/app/gene/models/index.ts: -------------------------------------------------------------------------------- 1 | export * from './algorithm.model'; 2 | export * from './gene.model'; 3 | export * from './pair.model'; 4 | export * from './pairwise-block.model'; 5 | export * from './pairwise-blocks.model'; 6 | export * from './plot.model'; 7 | export * from './process.model'; 8 | export * from './region.model'; 9 | export * from './track.model'; 10 | -------------------------------------------------------------------------------- /src/app/search/components/search.component.scss: -------------------------------------------------------------------------------- 1 | form { 2 | position: relative; 3 | } 4 | select.dropdown-menu.form-control { 5 | width: 100%; 6 | } 7 | /* override the .form-control class display attribute so the select dropdown is 8 | hidden when it doesn't have the .show class */ 9 | select.dropdown-menu.form-control:not(.show) { 10 | display: none; 11 | } 12 | -------------------------------------------------------------------------------- /src/app/gene/models/shims/index.ts: -------------------------------------------------------------------------------- 1 | export * from './block-index-map'; 2 | export * from './endpoint-genes'; 3 | export * from './family-count-map'; 4 | export * from './gene-map'; 5 | export * from './macro-blocks'; 6 | export * from './name-source-id'; 7 | export * from './reference-block-map'; 8 | export * from './track-map'; 9 | export * from './track-to-interval'; 10 | -------------------------------------------------------------------------------- /src/app/guards/index.ts: -------------------------------------------------------------------------------- 1 | import { LegacyMultiRouteGuard } from './legacy-multi-route.guard'; 2 | import { LegacySearchRouteGuard } from './legacy-search-route.guard'; 3 | 4 | export const guards: any[] = [ 5 | LegacyMultiRouteGuard, 6 | LegacySearchRouteGuard, 7 | ]; 8 | 9 | export * from './legacy-multi-route.guard'; 10 | export * from './legacy-search-route.guard'; 11 | -------------------------------------------------------------------------------- /src/assets/js/gcv/common/index.ts: -------------------------------------------------------------------------------- 1 | export { clone } from "./clone"; 2 | export { colors } from "./colors"; 3 | export { eventBus } from "./eventbus"; 4 | export { filterByIndex } from "./filter-by-index"; 5 | export { getFamilySizeMap } from "./get-family-size-map"; 6 | export { matrix } from "./matrix"; 7 | export { setOption } from "./set-option"; 8 | export { sum } from "./sum"; 9 | -------------------------------------------------------------------------------- /src/app/gene/services/shims/index.ts: -------------------------------------------------------------------------------- 1 | import { grpcBlocksToModel } from './grpc-blocks-to-model.shim'; 2 | import { grpcRegionToModel } from './grpc-region-to-model.shim'; 3 | import { grpcTrackToModel } from './grpc-track-to-model.shim'; 4 | 5 | export * from './grpc-blocks-to-model.shim'; 6 | export * from './grpc-region-to-model.shim'; 7 | export * from './grpc-track-to-model.shim'; 8 | -------------------------------------------------------------------------------- /src/app/instructions/components/index.ts: -------------------------------------------------------------------------------- 1 | import { InstructionsComponent } from './instructions.component'; 2 | import { ScreenshotComponent } from './screenshot.component'; 3 | 4 | export const components: any[] = [ 5 | InstructionsComponent, 6 | ScreenshotComponent, 7 | ]; 8 | 9 | export * from './instructions.component'; 10 | export * from './screenshot.component'; 11 | -------------------------------------------------------------------------------- /src/app/core/components/header.component.scss: -------------------------------------------------------------------------------- 1 | .navbar-brand img { 2 | width: 30px; 3 | height: 30px; 4 | } 5 | .navbar-brand.brand-name span { 6 | display: block; 7 | font-size: 20px; 8 | line-height: 1em; 9 | } 10 | .navbar-brand.brand-name small { 11 | display: block; 12 | font-size: 10px; 13 | line-height: 1em; 14 | } 15 | .navbar-right { 16 | float: right; 17 | } 18 | -------------------------------------------------------------------------------- /src/app/gene/store/selectors/family/omitted.selector.ts: -------------------------------------------------------------------------------- 1 | // NgRx 2 | import { createSelector } from '@ngrx/store'; 3 | // store 4 | import { State } from '@gcv/gene/store/reducers/family.reducer'; 5 | import { getFamilyState } from './family-state.selector'; 6 | 7 | 8 | export const getOmittedFamilies = createSelector( 9 | getFamilyState, 10 | (state: State) => state.omitted, 11 | ); 12 | -------------------------------------------------------------------------------- /src/app/core/services/index.ts: -------------------------------------------------------------------------------- 1 | import { AppConfigService } from './app-config.service'; 2 | import { HttpService } from './http.service'; 3 | import { ScriptService } from './script.service'; 4 | 5 | export const services: any[] = [ 6 | AppConfigService, 7 | ScriptService, 8 | ]; 9 | 10 | export * from './app-config.service'; 11 | export * from './http.service'; 12 | export * from './script.service'; 13 | -------------------------------------------------------------------------------- /src/app/gene/store/actions/family.actions.ts: -------------------------------------------------------------------------------- 1 | import { createAction, props } from '@ngrx/store'; 2 | 3 | export const Clear = createAction('[FAMILY] CLEAR'); 4 | export const OmitFamilies = createAction( 5 | '[FAMILY] OMIT_FAMILIES', 6 | props<{families: string[]}>() 7 | ); 8 | export const IncludeFamilies = createAction( 9 | '[FAMILY] INCLUDE_FAMILIES', 10 | props<{families: string[]}>() 11 | ); 12 | -------------------------------------------------------------------------------- /src/app/gene/store/selectors/family/family-state.selector.ts: -------------------------------------------------------------------------------- 1 | // NgRx 2 | import { createSelector } from '@ngrx/store'; 3 | // store 4 | import * as fromModule from '@gcv/gene/store/reducers'; 5 | import { familyFeatureKey } from '@gcv/gene/store/reducers/family.reducer'; 6 | 7 | 8 | export const getFamilyState = createSelector( 9 | fromModule.getGeneModuleState, 10 | state => state[familyFeatureKey] 11 | ); 12 | -------------------------------------------------------------------------------- /src/app/gene/store/selectors/layout/layout-state.selector.ts: -------------------------------------------------------------------------------- 1 | // NgRx 2 | import { createSelector } from '@ngrx/store'; 3 | // store 4 | import * as fromModule from '@gcv/gene/store/reducers'; 5 | import { layoutFeatureKey } from '@gcv/gene/store/reducers/layout.reducer'; 6 | 7 | 8 | export const getLayoutState = createSelector( 9 | fromModule.getGeneModuleState, 10 | state => state[layoutFeatureKey] 11 | ); 12 | -------------------------------------------------------------------------------- /src/app/widgets/components/search/index.ts: -------------------------------------------------------------------------------- 1 | import { ExpandSearchWidgetComponent } from './expand-search-widget.component'; 2 | import { SearchWidgetComponent } from './search-widget.component'; 3 | 4 | export const components: any[] = [ 5 | ExpandSearchWidgetComponent, 6 | SearchWidgetComponent, 7 | ]; 8 | 9 | export * from './expand-search-widget.component'; 10 | export * from './search-widget.component'; 11 | -------------------------------------------------------------------------------- /src/main.ts: -------------------------------------------------------------------------------- 1 | import { enableProdMode } from "@angular/core"; 2 | import { platformBrowserDynamic } from "@angular/platform-browser-dynamic"; 3 | 4 | import { AppModule } from "./app/app.module"; 5 | import { environment } from "./environments/environment"; 6 | 7 | if (environment.production) { 8 | enableProdMode(); 9 | } 10 | 11 | platformBrowserDynamic().bootstrapModule(AppModule) 12 | .catch(err => console.log(err)); 13 | -------------------------------------------------------------------------------- /src/app/core/models/script.model.ts: -------------------------------------------------------------------------------- 1 | export class Script { 2 | scriptUrl: string; 3 | functionName: string; 4 | } 5 | 6 | 7 | export function isScript(instance: any): instance is Script { 8 | const script =