-
Notifications
You must be signed in to change notification settings - Fork 0
/
2.ts
31 lines (25 loc) · 923 Bytes
/
2.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import { cas, db, gene_name, v } from "./prequel.ts";
let x = await db.query(/* surrealql */ `
let $a = select *, count(targets.target) as tc from drugs where ["BE0000163", "BE0000029"] ANYINSIDE targets.target.id
and type != "small molecule"
and ["Hepatotoxic Agents"] noneinside categories.category.category
order by tc asc;
return $a;
return select indication, categories, ${
v("average-mass")
}, groups.group, targets, ${v("half-life")}, ${
v("mechanism-of-action")
}, toxicity, name from $a;
select name from $a;
`);
// let x = await db.query(/* surrealql */ `
// let $a = select * from drugs where name == "Sunitinib";
// return $a;
// `);
// let x = await db.query(/* surrealql */ `
// let $a = select * from drugs where ${cas}=="216974-75-3";
// return $a;
// select name from $a;
// `);
// Deno.writeTextFile("./var/vegf-small.json", JSON.stringify(x, null, 2));
console.log(x);