Public
Edited
Nov 20, 2023
1 star
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
viewof x = Inputs.search(lineage_list, {
query: searchfor,
placeholder: "Lineage",
width: 350,
label: md`<strong>Search 👉</strong>`
})
Insert cell
searchfor = "XBB.1.9.2"
Insert cell
viewof input = Inputs.input(searchfor)
Insert cell
function set(input, value) {
input.value = value;
input.dispatchEvent(new Event("input", { bubbles: true }));
}
Insert cell
set(viewof input, searchfor)
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
parent = search[0].unaliased_pango.split(".").slice(0, -1).join(".")
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
choices = {
var queryChoice = {};
if (preset.search) {
queryChoice = {
Preset: {
label: "URL Search Query",
value: preset.search
}
};
}
const specialChoices = {
Omicron: {
label: "Variants Containing Omicron",
value: "omicron"
},
Recombinants: {
label: "Omicron Recombinants",
value: "recombinants"
}
};
const baseChoices = {
B_1_1_529: {
label: "B.1.1.529",
value: "B.1.1.529"
},

BA_2_75: {
label: "BA.2.75",
value: "BA.2.75"
},

XBB: {
label: "XBB",
value: "XBB"
},
XBB_1_5: {
label: "XBB.1.5",
value: "XBB.1.5"
},
XBB_1_9: {
label: "XBB.1.9",
value: "XBB.1.9"
},
EG: {
label: "EG*",
value: "XBB.1.9.2"
},
XBB_1_16: {
label: "XBB.1.16",
value: "XBB.1.16"
}
};
return { ...baseChoices, ...queryChoice, ...specialChoices };
}
Insert cell
Insert cell
search.value
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Object.entries(mutations)
.filter(([variant, data]) =>
data.mutations.complete.list.some((item) => item.includes("478Q"))
)
.map(([variant, data]) => {
return {
name: variant,
aaSubstitutionsNew: data.new.aaSubstitutions
};
})
Insert cell
mutations = FileAttachment("mutations.json").json()
Insert cell
variant = "BH.1"
Insert cell
mutations[variant].mutations.complete.list
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell

One platform to build and deploy the best data apps

Experiment and prototype by building visualizations in live JavaScript notebooks. Collaborate with your team and decide which concepts to build out.
Use Observable Framework to build data apps locally. Use data loaders to build in any language or library, including Python, SQL, and R.
Seamlessly deploy to Observable. Test before you ship, use automatic deploy-on-commit, and ensure your projects are always up-to-date.
Learn more