Skip to content

Commit

Permalink
Remove backend code built for GISAID version
Browse files Browse the repository at this point in the history
  • Loading branch information
theosanderson authored Oct 6, 2024
1 parent 3f96b02 commit 9c2ed5c
Showing 1 changed file with 1 addition and 38 deletions.
39 changes: 1 addition & 38 deletions taxonium_backend/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -364,20 +364,7 @@ app.get("/validate/", async function (req, res) {
console.log(new Date() - start_time);
});

// "Takes EPI_ISL_12345" input
function get_epi_isl_url(epi_isl) {
if (epi_isl.length > 4) {
return (
"https://www.epicov.org/acknowledgement/" +
epi_isl.slice(-4, -2) +
"/" +
epi_isl.slice(-2) +
"/" +
epi_isl +
".json"
);
}
}


async function getGenBankAuthors(genbank_accession) {
const genbank_xml_url =
Expand Down Expand Up @@ -409,7 +396,6 @@ app.get("/node_details/", async (req, res) => {
});

const detailed_node = { ...node, mutations: node_mutations };
// If node name starts with EPI_ISL_, then get the URL

if (
config.enable_genbank_acknowledgement &&
Expand All @@ -427,29 +413,6 @@ app.get("/node_details/", async (req, res) => {
}
}

if (detailed_node.name.startsWith("EPI_ISL_")) {
const acknowledgements_url = get_epi_isl_url(detailed_node.name);
// get the data from the URL
const response = await axios.get(acknowledgements_url).catch((e) => {
console.log(e);
});
try {
const data = response.data;
detailed_node.acknowledgements = data;
} catch (e) {
detailed_node.acknowledgements = {
covv_orig_lab:
"The GISAID acknowledgements server did not return a valid response",
covv_orig_lab:
"The GISAID acknowledgements server did not return a valid response",
covv_authors:
"The GISAID acknowledgements server did not return a valid response",
covv_subm_lab:
"The GISAID acknowledgements server did not return a valid response",
};
console.log(e);
}
}
validateSIDandSend(detailed_node, req.query.sid, res);
console.log(
"Request took " + (Date.now() - start_time) + "ms, and output " + node
Expand Down

0 comments on commit 9c2ed5c

Please sign in to comment.