-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #213 from xnought/foldseek-table
feat: restyle foldseek table with more info
- Loading branch information
Showing
14 changed files
with
477 additions
and
201 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -82,7 +82,7 @@ p { | |
} | ||
|
||
a { | ||
color: var(--lightblue); | ||
color: var(--primary-600); | ||
} | ||
|
||
a:hover { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<script lang="ts"> | ||
import * as d3 from "d3"; | ||
// query, 0 to ogLength | ||
export let ogLength: number; | ||
// alignment within query | ||
export let qstart: number; | ||
export let qend: number; | ||
export let width: number; | ||
export let height: number; | ||
const alnToWidthScaler = d3 | ||
.scaleLinear() | ||
.domain([1, ogLength]) | ||
.range([0, width]); | ||
</script> | ||
|
||
<svg {width} {height} id="aln" style="overflow: visible;"> | ||
<rect {width} {height} fill="var(--primary-100)" /> | ||
<line | ||
x1={alnToWidthScaler(qstart)} | ||
y1={height / 2} | ||
x2={alnToWidthScaler(qend)} | ||
y2={height / 2} | ||
stroke-width={height} | ||
stroke="var(--primary-700)" | ||
/> | ||
<text | ||
x={alnToWidthScaler(qend) + 3} | ||
y={height / 2 + 3} | ||
style="font-size: 10px;" | ||
text-anchor="start" | ||
fill="var(--primary-700)">{qend}</text | ||
> | ||
<text | ||
x={alnToWidthScaler(qstart) - 3} | ||
y={height / 2 + 3} | ||
style="font-size: 10px;" | ||
text-anchor="end" | ||
fill="var(--primary-700)">{qstart}</text | ||
> | ||
</svg> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<script lang="ts"> | ||
export let maxColor: string; | ||
export let normalizedValue: number; | ||
export let diameter: number; | ||
const radius = diameter / 2; | ||
</script> | ||
|
||
<div> | ||
<svg width={diameter} height={diameter}> | ||
<circle | ||
cx={radius} | ||
cy={radius} | ||
r={radius} | ||
opacity={normalizedValue} | ||
fill={maxColor} | ||
/> | ||
</svg> | ||
</div> | ||
|
||
<style> | ||
circle { | ||
transition: opacity ease-in-out 400ms; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
<script lang="ts"> | ||
import { PDBeMolstarPlugin } from "../../venome-molstar/lib"; | ||
export let url = ""; | ||
export let format = "pdb"; | ||
export let bgColor = { r: 255, g: 255, b: 255 }; // white | ||
export let binary = false; | ||
export let width = 500; | ||
export let height = 500; | ||
let divEl: HTMLDivElement; | ||
async function render() { | ||
// @ts-ignore | ||
const m = new PDBeMolstarPlugin(); // loaded through app.html | ||
// some bs for the whole thing to rerender. TODO: fix this. | ||
divEl.innerHTML = ""; | ||
const div = document.createElement("div"); | ||
divEl.appendChild(div); | ||
await m.render(div, { | ||
customData: { | ||
url, | ||
format, | ||
binary, | ||
}, | ||
bgColor, | ||
subscribeEvents: false, | ||
selectInteraction: true, | ||
alphafoldView: true, | ||
reactive: true, | ||
sequencePanel: true, | ||
hideControls: true, | ||
hideCanvasControls: ["animation"], | ||
}); | ||
} | ||
$: { | ||
if (url && divEl) { | ||
render(); | ||
} | ||
} | ||
</script> | ||
|
||
<div | ||
bind:this={divEl} | ||
id="myViewer" | ||
style="width: {width}px; height: {height}px;" | ||
/> | ||
|
||
<style> | ||
/* https://embed.plnkr.co/plunk/WlRx73uuGA9EJbpn */ | ||
.msp-plugin ::-webkit-scrollbar-thumb { | ||
background-color: #474748 !important; | ||
} | ||
#myViewer { | ||
float: left; | ||
position: relative; | ||
z-index: 997; | ||
} | ||
</style> |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.