Skip to content

Commit 2b1425e

Browse files
committed
Differentiated interface structure viewer
1 parent fed38df commit 2b1425e

4 files changed

Lines changed: 678 additions & 6 deletions

File tree

backend/alignment.go

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,37 @@ type ComplexAlignmentEntry struct {
141141
TaxonName string `json:"taxName,omitempty"`
142142
}
143143

144+
type InterfaceAlignmentEntry struct {
145+
MarshalFormat MarshalFormat `json:"-"`
146+
Query string `json:"query"`
147+
Target string `json:"target"`
148+
SeqId float32 `json:"seqId"`
149+
AlnLength int `json:"alnLength"`
150+
Missmatches int `json:"missmatches"`
151+
Gapsopened int `json:"gapsopened"`
152+
QueryStartPos int `json:"qStartPos"`
153+
QueryEndPos int `json:"qEndPos"`
154+
DbStartPos int `json:"dbStartPos"`
155+
DbEndPos int `json:"dbEndPos"`
156+
Prob float32 `json:"prob"`
157+
Eval float64 `json:"eval"`
158+
Score int `json:"score"`
159+
QueryLength int `json:"qLen"`
160+
DbLength int `json:"dbLen"`
161+
QueryAln string `json:"qAln"`
162+
DbAln string `json:"dbAln"`
163+
TargetCa string `json:"tCa"`
164+
TargetSeq string `json:"tSeq"`
165+
ComplexAssignId int `json:"complexid"`
166+
ComplexQtmScore float32 `json:"complexqtm"`
167+
ComplexTtmScore float32 `json:"complexttm"`
168+
ComplexU string `json:"complexu"`
169+
ComplexT string `json:"complext"`
170+
TargetKey uint32 `json:"targetKey"`
171+
TaxonId json.Number `json:"taxId,omitempty"`
172+
TaxonName string `json:"taxName,omitempty"`
173+
}
174+
144175
func (entry ComplexAlignmentEntry) MarshalJSON() ([]byte, error) {
145176
type Alias ComplexAlignmentEntry
146177

@@ -562,13 +593,10 @@ func ComplexAlignments(id Id, entry []uint32, databases []string, jobsbase strin
562593
return ReadAlignments[ComplexAlignmentEntry, uint32](id, entry, databases, jobsbase)
563594
}
564595

565-
type InterfaceAlignmentEntry = ComplexAlignmentEntry
566-
567596
func InterfaceAlignments(id Id, entry []uint32, databases []string, jobsbase string) ([]SearchResult, error) {
568597
return ReadAlignments[InterfaceAlignmentEntry, uint32](id, entry, databases, jobsbase)
569598
}
570599

571-
572600
func FoldDiscoAlignments(id Id, databases []string, jobsbase string) ([]FoldDiscoResult, error) {
573601
return ReadFoldDisco(id, databases, jobsbase)
574602
}

backend/worker.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -825,7 +825,7 @@ mv -f -- "${BASE}/query.lookup_tmp" "${BASE}/query.lookup"
825825
columns += "target"
826826
}
827827
columns += ",pident,alnlen,mismatch,gapopen,qstart,qend,tstart,tend,prob,evalue,bits,qlen,tlen,qaln,taln,tca,tseq"
828-
columns += ",complexassignid,complexqtmscore,complexttmscore,complexu,complext"
828+
columns += ",complexassignid,complexqtmscore,complexttmscore,complexu,complext,tkey"
829829
if params.Taxonomy {
830830
columns += ",taxid,taxname"
831831
}

frontend/AlignmentPanel.vue

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@
5353
</template>
5454
</div>
5555
<div v-if=" $APP == 'foldseek'" class="alignment-structure-wrapper">
56-
<StructureViewer
56+
<component
57+
:is="structureViewerComponent"
5758
:key="`struc2-${alignments[0].id}`"
5859
:alignments="alignments"
5960
:highlights="structureHighlights"
@@ -102,7 +103,11 @@ function countCharacter(string, char) {
102103
}
103104
104105
export default {
105-
components: { StructureViewer: () => __APP__ == "foldseek" ? import('./StructureViewer.vue') : null, Alignment },
106+
components: {
107+
StructureViewer: () => __APP__ == "foldseek" ? import('./StructureViewer.vue') : null,
108+
StructureViewerInterface: () => __APP__ == "foldseek" ? import('./StructureViewerInterface.vue') : null,
109+
Alignment,
110+
},
106111
data: () => ({
107112
queryMap: null,
108113
targetMap: null,
@@ -131,6 +136,9 @@ export default {
131136
searchType: { type: String },
132137
},
133138
computed: {
139+
structureViewerComponent() {
140+
return this.searchType === 'interfacesearch' ? 'StructureViewerInterface' : 'StructureViewer';
141+
},
134142
hasSelection() {
135143
return !this.structureHighlights.some(e => e !== null);
136144
}

0 commit comments

Comments
 (0)