Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,4 +81,4 @@ jobs:
eslint_dir: ./frontend/src
eslint_extensions: ts,vue
prettier: true
prettier_dir: ./frontend/src
prettier_dir: ./frontend
1 change: 1 addition & 0 deletions frontend/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ module.exports = {
env: {
browser: true,
es2021: true,
node: true,
},
extends: ['plugin:vue/recommended', 'eslint:recommended', '@vue/typescript/recommended', 'prettier'],
ignorePatterns: ['**/*.min.js'],
Expand Down
4 changes: 2 additions & 2 deletions frontend/.prettierignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
node_modules
/dist
*.min.js
package.json
**/*.min.*
package.json
208 changes: 103 additions & 105 deletions frontend/src/components/jobs/result-tabs/PLMBlastResultsTab.vue
Original file line number Diff line number Diff line change
@@ -1,141 +1,139 @@
<template>
<Loading v-if="loading" :message="$t('loading')"/>
<div v-else class="font-small">
<b v-if="total === 0" v-text="$t('jobs.results.plmblast.noResults')"></b>
<div v-else>
<div class="result-options">
<a @click="scrollTo('visualization')">{{ $t('jobs.results.hitlist.visLink') }}</a>
<a class="mr-4" @click="scrollTo('hits')">{{ $t('jobs.results.hitlist.hitsLink') }}</a>
<a class="border-right mr-4"></a>
<a @click="download" v-text="$t('jobs.results.actions.downloadCSV')"></a>
<Loading v-if="loading" :message="$t('loading')" />
<div v-else class="font-small">
<b v-if="total === 0" v-text="$t('jobs.results.plmblast.noResults')"></b>
<div v-else>
<div class="result-options">
<a @click="scrollTo('visualization')">{{ $t('jobs.results.hitlist.visLink') }}</a>
<a class="mr-4" @click="scrollTo('hits')">{{ $t('jobs.results.hitlist.hitsLink') }}</a>
<a class="border-right mr-4"></a>
<a @click="download" v-text="$t('jobs.results.actions.downloadCSV')"></a>
</div>

</div>
<div v-html="$t('jobs.results.plmblast.numHits', { num: total })"></div>

<div v-html="$t('jobs.results.plmblast.numHits', { num: total })"></div>
<div ref="visualization" class="result-section">
<h4>{{ $t('jobs.results.hitlist.vis') }}</h4>
<hit-map :job="job" @resubmit-section="resubmitSection" />
</div>

<div ref="visualization" class="result-section">
<h4>{{ $t('jobs.results.hitlist.vis') }}</h4>
<hit-map :job="job" @resubmit-section="resubmitSection"/>
</div>

<div ref="hits" class="result-section">
<h4 class="mb-4">
{{ $t('jobs.results.hitlist.hits') }}
</h4>
<hit-list-table :job="job" :fields="hitListFields"/>
</div>
<div ref="hits" class="result-section">
<h4 class="mb-4">
{{ $t('jobs.results.hitlist.hits') }}
</h4>
<hit-list-table :job="job" :fields="hitListFields" />
</div>
</div>
</div>
</div>
</template>

<script lang="ts">
import Loading from '@/components/utils/Loading.vue';
import HitListTable from '@/components/jobs/result-tabs/sections/HitListTable.vue';
import HitMap from '@/components/jobs/result-tabs/sections/HitMap.vue';
import SearchResultTabMixin from '@/mixins/SearchResultTabMixin';
import EventBus from '@/util/EventBus';
import {resultsService} from '@/services/ResultsService';
import { resultsService } from '@/services/ResultsService';
import Logger from 'js-logger';
const logger = Logger.get('PLMBlastResultsTab');

import { PLMBLASTAlignmentItem } from '@/types/toolkit/results';

export default SearchResultTabMixin.extend({
name: 'PLMBlastResultsTab',
components: {
Loading,
HitListTable,
HitMap,
},
data() {
return {
alignments: undefined as PLMBLASTAlignmentItem[] | undefined,
hitListFields: [
{
key: 'num',
label: this.$t('jobs.results.plmblast.table.num'),
sortable: true,
},
{
key: 'acc',
label: this.$t('jobs.results.plmblast.table.accession'),
sortable: true,
},
{
key: 'name',
label: this.$t('jobs.results.plmblast.table.description'),
sortable: true,
},
{
key: 'eval',
label: this.$t('jobs.results.plmblast.table.eValue'),
class: 'no-wrap',
sortable: true,
},
{
key: 'bitScore',
label: this.$t('jobs.results.plmblast.table.bitscore'),
sortable: true,
},
{
key: 'hitLen',
label: this.$t('jobs.results.plmblast.table.hit_len'),
sortable: true,
},
{
key: 'matchLen',
label: this.$t('jobs.results.plmblast.table.match_len'),
sortable: true,
name: 'PLMBlastResultsTab',
components: {
Loading,
HitListTable,
HitMap,
},
data() {
return {
alignments: undefined as PLMBLASTAlignmentItem[] | undefined,
hitListFields: [
{
key: 'num',
label: this.$t('jobs.results.plmblast.table.num'),
sortable: true,
},
{
key: 'acc',
label: this.$t('jobs.results.plmblast.table.accession'),
sortable: true,
},
{
key: 'name',
label: this.$t('jobs.results.plmblast.table.description'),
sortable: true,
},
{
key: 'eval',
label: this.$t('jobs.results.plmblast.table.eValue'),
class: 'no-wrap',
sortable: true,
},
{
key: 'bitScore',
label: this.$t('jobs.results.plmblast.table.bitscore'),
sortable: true,
},
{
key: 'hitLen',
label: this.$t('jobs.results.plmblast.table.hit_len'),
sortable: true,
},
{
key: 'matchLen',
label: this.$t('jobs.results.plmblast.table.match_len'),
sortable: true,
},
],
};
},
computed: {
filename(): string {
if (!this.viewOptions.filename) {
return '';
}
return this.viewOptions.filename.replace(':jobID', this.job.jobID);
},
],
};
},
computed: {
filename(): string {
if (!this.viewOptions.filename) {
return '';
}
return this.viewOptions.filename.replace(':jobID', this.job.jobID);
},
},
methods: {
download(): void {
const toolName = this.tool.name;
const downloadFilename = `${toolName}_${this.job.jobID}.hits.csv`;
resultsService.downloadFile(this.job.jobID, this.filename, downloadFilename).catch((e) => {
logger.error(e);
});
methods: {
download(): void {
const toolName = this.tool.name;
const downloadFilename = `${toolName}_${this.job.jobID}.hits.csv`;
resultsService.downloadFile(this.job.jobID, this.filename, downloadFilename).catch((e) => {
logger.error(e);
});
},
},
},
});
</script>

<style lang="scss" scoped>
.result-section {
padding-top: 3.5rem;
padding-top: 3.5rem;
}

.alignments-table {
font-size: 0.95em;
font-size: 0.95em;

.blank-row {
height: 0.8rem;
}
.blank-row {
height: 0.8rem;
}

.sequence td {
word-break: keep-all;
white-space: nowrap;
font-family: $font-family-monospace;
padding: 0 1rem 0 0;
}
.sequence td {
word-break: keep-all;
white-space: nowrap;
font-family: $font-family-monospace;
padding: 0 1rem 0 0;
}

a {
cursor: pointer;
color: $primary;
a {
cursor: pointer;
color: $primary;

&:hover {
color: $tk-dark-green;
&:hover {
color: $tk-dark-green;
}
}
}
}
</style>
3 changes: 2 additions & 1 deletion frontend/src/i18n/lang/modules/tools-en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,8 @@ export default {
'<a href="https://doi.org/10.1093/nar/gkaa1079" target="_blank" rel="noopener">' +
'Nucleic Acids Res. 2021;49(D1):D266-D273</a>.<br><br>',
hhpred_manual: '',
plmblast: 'pLM-BLAST – distant homology detection based on direct comparison of sequence representations from ' +
plmblast:
'pLM-BLAST – distant homology detection based on direct comparison of sequence representations from ' +
'protein language models.<br> Kaminski K, Ludwiczak K, Alva V, Dunin-Horkawicz S. bioRxiv. 2022.',
},
};
1 change: 0 additions & 1 deletion frontend/src/types/toolkit/results.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ export interface PLMBLASTAlignmentItem extends SearchAlignmentItem {
matchLen: number;
}


export interface PSIBLASTAlignmentItem extends SearchAlignmentItem {
fastaLink: string;
eval: number;
Expand Down